Re: Fast ways to draw brush outlines on a DrawingArea

2007-09-30 Thread Jonathan Winterflood
the last place you were > at instead of the whole image, but if that's the only method then luckily > I've been doing it right. Cheers Jonathan. > > On 30/09/2007, Jonathan Winterflood <[EMAIL PROTECTED]> > wrote: > > > > There is indeed a method. > >

Re: Fast ways to draw brush outlines on a DrawingArea

2007-09-30 Thread Jonathan Winterflood
There is indeed a method. One would probably call it double buffering (anthough when you're done with your program you might have moe like quad buffering... The idea is to render everything in layers: bottom layer = your image (data, etc) above: rulers, marks, selection box, etc (semi-static stu

Re: How to convert a jpg image to a GtkImage ?

2007-09-11 Thread Jonathan Winterflood
rstand the implications... I'm quite used to java you see...) Jonathan On 9/11/07, Tom Trebisky <[EMAIL PROTECTED]> wrote: > > On Tue, Sep 11, 2007 at 10:29:45PM +0200, Jonathan Winterflood wrote: > > Hi, > > > > You could clone the > > pixbuf, or create a new one

Re: How to convert a jpg image to a GtkImage ?

2007-09-11 Thread Jonathan Winterflood
Hi, You could clone the pixbuf, or create a new one the same size and blit the content of the soon-to-be recycled one into the new one before unref'ing the loader Jonathan On 9/11/07, Tom Trebisky <[EMAIL PROTECTED]> wrote: > > Following this thread, I decided it would be wise to avoid this kin

Re: Getting a GdkPixbufs from a GtkTextBuffer

2007-09-03 Thread Jonathan Winterflood
Hi, Can't you just keep a reference to the pixbuf ? Jonathan On 9/3/07, Matí­as Alejandro Torres <[EMAIL PROTECTED]> wrote: > > Hi, > > If I insert a GdkPixbuf inside a GtkTextBuffer with the function > gtk_text_buffer_insert_pixbuf, how do I recover the inserted GdkPixbuf > from the GtkTextBuff

Re: Check Boxes Don't Work Independently

2007-08-30 Thread Jonathan Winterflood
Hi, No attachment has ever made it to the list that I remember It seems the list program strips them (and probably with reason) Please include the program in-line (preferably a minimal example of the problem) If it's too big, consider ftp or http hosting... Cheers, Jonathan On 8/30/07, Mikael H

Re: hbox with "width"

2007-08-17 Thread Jonathan Winterflood
On 8/17/07, Gavin Keighren <[EMAIL PROTECTED]> wrote: > > > On 17 Aug 2007, at 11:18, Dmitri Hrapof wrote: > > > Hello! > > > > I'd like to insert two widgets into my top level window so that the > > first widget > > always occupies, say, 70% of the total width. > > Like in HTML table with "width"

Re: color of vscrollbar

2007-08-08 Thread Jonathan Winterflood
On 8/8/07, David Nečas (Yeti) <[EMAIL PROTECTED]> wrote: > > On Wed, Aug 08, 2007 at 12:24:11PM +0200, Jonathan Winterflood wrote: > > Fair enough, but for work-related stuff, we should (and should be able > > to) use the work adress, it's much easier than having to ch

Re: color of vscrollbar

2007-08-08 Thread Jonathan Winterflood
On 8/8/07, Gian Mario Tagliaretti <[EMAIL PROTECTED]> wrote: > > 2007/8/8, Jonathan Winterflood <[EMAIL PROTECTED]>: > > > The "confidential" message is automatically added by the mail servers of > > most companies, the users cannot usually do anything ab

Re: color of vscrollbar

2007-08-08 Thread Jonathan Winterflood
On 8/8/07, Gian Mario Tagliaretti <[EMAIL PROTECTED]> wrote: > > 2007/8/8, Prasanna Kumar K <[EMAIL PROTECTED]>: > > Hi, > > Hi, most of the people read both gtk-list and gtk-app-devel-list, > please choose only one. > > > I wanted to add some colors to my current vscrollbar application. > > It's u

Re: How to catch touch screen signal??

2007-07-19 Thread Jonathan Winterflood
Hi, It is extremely likely thet the system will see the touchscreen as a mouse, Just try running the GTk example programs (or any program for that matter) and it shoud _just work_ Jonathan On 7/19/07, Sharath Jagannath <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am writing an embedded applicati

Re: Running external program inside a widget

2007-07-13 Thread Jonathan Winterflood
Hi, I believe you cant embed anythoing that wasn't designed for a plug (or can be modified for it) this might be useful though: http://www.mozilla.org/projects/embedding/ Jonathan On 7/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks a lot Kumar! > It seems not quite simple, also be

Re: Multiple threads and gtk_main()

2007-07-11 Thread Jonathan Winterflood
On 7/11/07, Gabriele Greco <[EMAIL PROTECTED]> wrote: > > Jonathan Winterflood wrote: > > Could the GAsyncQueue be configured to run a callback in the main thread > > when a element (or whatever gets pushed into it) is ready, just like one > > woud do with a GI

Re: Multiple threads and gtk_main()

2007-07-10 Thread Jonathan Winterflood
Hi, Could the GAsyncQueue be configured to run a callback in the main thread when a element (or whatever gets pushed into it) is ready, just like one woud do with a GIOChannel ? It would be cleaner than a timeout or an idle function I think. Jonathan On 7/10/07, Chris Vine <[EMAIL PROTECTED]> w

Re: [SPAM] Simple video playing with SDL [<- WITHOUT SDL]

2007-07-06 Thread Jonathan Winterflood
Hi, I don't know how to go about it, but usually video playing is done using 'overlay': the area in the app is painted bright green, or pink (some particular color) and the graphics card overlays the video onto any area that color inside the coordinates specified by your program. I think that woul

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Jonathan Winterflood
Wouldn't that be typedef struct MyMutex MyMutex; rather? Or for short : typedex struct _MyMutex { GStaticMutex mutex; } MyMutex; Cheers, Jonathan On 7/6/07, Andreas Stricker <[EMAIL PROTECTED]> wrote: > > Alan M. Evans schrieb: > > struct MyMutex { > > GStaticMutex mutex;

Re: new window from button

2007-07-03 Thread Jonathan Winterflood
or: > Gtk-Critical**: gtk_widget_show_all: assertion `GTK_IS_WIDGET (widget)` > failed > > Thanks again > Brad > On 7/3/07, brad smith <[EMAIL PROTECTED]> wrote: > > thanks alot. > > Take care. > > Brad > > > > On 7/3/07, Jonathan Winterflood

Fwd: new window from button

2007-07-03 Thread Jonathan Winterflood
ssage -- From: Matí­as Alejandro Torres <[EMAIL PROTECTED]> Date: Jul 3, 2007 4:20 PM Subject: Re: new window from button To: Jonathan Winterflood <[EMAIL PROTECTED]> Ok, sorry about that. #include #include void button_clicked_cb (GtkWidget *button, GtkWindow *parent) {

Re: How to determine *actual* visible region of a window?

2007-06-27 Thread Jonathan Winterflood
Hi, I'm no expert, but AFAIK that information would have to be returned by the X server/whatever, and I expect the server will try and send the least possible events, eg. the smallest rectangle comprising all the surface to redraw. Plus, IIRC expose events won't tell you what has been covered, onl

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Jonathan Winterflood
g on win32, idle_add (or some way of getting averything back into one thread) seems to be the only way. Jonathan On 6/15/07, Jonathan Winterflood <[EMAIL PROTECTED]> wrote: > > I too am rather intrigued by this problem... > I found this: > http://research.operationaldynamics.com

Re: linux vs. win32: gdk_threads_enter behaving different

2007-06-15 Thread Jonathan Winterflood
I too am rather intrigued by this problem... I found this: http://research.operationaldynamics.com/blogs/andrew/software/gnome-desktop/gtk-thread-awareness.html and I'm wondering: is your gtk_main() surrounded by gdk_threads_enter/leave. I imagine this missing would break in linux too, but just thi

Re: multi thread app and often variable accessing

2007-06-08 Thread Jonathan Winterflood
On 6/8/07, Tomasz Jankowski <[EMAIL PROTECTED]> wrote: > > In fact I write library, but it's based on GLIb, so my library will be > available only on platforms where GLib is available - problem resolved > itself ;P Returning to main problem, maybe for sure, I will add another > mutex used only for

Re: multi thread app and often variable accessing

2007-06-08 Thread Jonathan Winterflood
Hi, As far as I understand, g_atomic_int_get/set will do the job just fine, as long as you're sure the only part that needs to be atomic is the getting and setting. However, if the hardware you are running on does not provide an atomic way of getting/setting an int, (eg: int is an int32 and the ha

Re: drawing to textview's gdk_window

2007-06-08 Thread Jonathan Winterflood
Hi, Using g_signal_connect(), make your callback return false, so that the original callback (that obviously renders the text) will then be called also. Jonathan On 6/8/07, Luka Napotnik <[EMAIL PROTECTED]> wrote: > > I now connected the expose-event signal to a callback function that > draws a

Re: button event release

2007-05-23 Thread Jonathan Winterflood
the > forum today and I am happy to get a reply as in the past months I was asking > questions in gtk and gnome forums with a single or no reply at all. > > I will surely look into the archive now. Actually, I am dealing with > Bluetooth sockets in this case, > > best regards, &

Re: button event release

2007-05-23 Thread Jonathan Winterflood
Hi, There's been some talk about threads in the last couple of weeks on this list, you should be able to lift them from the archive if you just subscribed. An easy alternative to threads in this case would be to connect the socket to a GIOChannel, and have the gtk main loop deal with the data a

Re: menuitem activate

2007-05-23 Thread Jonathan Winterflood
Not really GTK-related, but shouldn't the compiler have complained loudly about passing a char* instead of a GtkMenuItem* ? Or are you using a binding of gtk to a language that doesn't check types at compile-time? Jonathan On 5/23/07, David Nečas (Yeti) <[EMAIL PROTECTED]> wrote: > > On Wed, May

Re: [SPAM] Portable network layer

2007-05-11 Thread Jonathan Winterflood
:P) Plus, gnet is just source, so I should just be able to compile it into my binary, yay! Jonathan On 5/11/07, Gabriele Greco <[EMAIL PROTECTED]> wrote: > > Jonathan Winterflood wrote: > > I'd like to keep the dependencies to a strict minimum (preferably > > bundle

Portable network layer

2007-05-11 Thread Jonathan Winterflood
Hi, I'm developing a gtk (gtkmm) app for both Windows and Linux. So far so good, everything works, on both platforms However, I'd like to add network functionality to the program: open a tcp connection to a server, and grab data from it. The protocol is a simple applicative one (not http), and I'

Re: Adding Text to a widget from a button_press_event Or Pop Up window from a time event.

2007-05-03 Thread Jonathan Winterflood
Hi, I don't think this kind of widget exists as such. Tracking the cursor position by constantly writing the coordinates in a Label or such would be (I think) more user-friendly than having a popup If you want the coordinates to stay the same for a while (eg. for a copy/paste), you could have a se

Re: zooming a image on GtkWidget

2007-04-27 Thread Jonathan Winterflood
Hi, I guess that would depend on how your image is displayed. Wich widget are you using for the display? Jonathan On 4/27/07, kirantoday <[EMAIL PROTECTED]> wrote: > > > Hi I have a image in GtkWidget. > I have two buttons for zoomout and zoomin. > when i click these buttons the image on the GtkW

Re:

2007-04-13 Thread Jonathan Winterflood
I'd think something like this should do: a read-only TextView widget for feedback with an Entry just below for user input I guess the TextView should be flexible enough to support some formatting (incl colors for example) even though you'd have to reparse the program's output for command-sequences

Re: gtk errors "!GTK_WIDGET_REALIZED (widget) failed

2007-03-29 Thread Jonathan Winterflood
Hi, >From the gtkmm documentation (just a wrapper for gtk): """ void Gtk::Widget::show ( ) Flags a widget to be displayed. """ ie. it doesn't acually show the widget, but tells gtk you'd like it to (wich it will do for you, a short time later) I'm guessing the widget hasn't had time to get realiz

Re: Positionning a widget in Table cells

2007-03-23 Thread Jonathan Winterflood
> If the widget is a subclass of GtkMisc, use its methods to > set the alignment. Otherwise pack it to a GtkAlignment. In > both cases it has to be attached to the table with vertical > GTK_FILL flag. Thanks for the fast anwser :) The widget is a box, prefilled with some other widgets & some log

Positionning a widget in Table cells

2007-03-23 Thread Jonathan Winterflood
Hi all, I'm developping an app w/ gtkmm 2.4. I'm using a number of custom widgets, packed into a Table in my main window One of these ("W") is attached to 2 cells of the first column, and others ("a","b","c","m") fill the other cells, like so: m m m W a b W _ b c c c This Widget is set to shrink