GTK questions




Hi,

Being thoroughly convinced that GTK is a "Great Thing"(tm) etc., I've
decided to write a decent music MIDI sequencing (+ maybe more)
application, using GTK for the UI. Putting together simple (yet nice
looking) dialogues doesn't cause me any trouble, but here are a few
questions....

1) What re-entrancy problems will I come up against? Specifically, once a
callback is called (say a button), will pressing the button again start a
second "thread" over the same code? Likewise, if a button press fires off
some calculating code, will (say) a menu be able to start a different
piece of code executing simultaneously?

2) What basic things do I need to set up to get a scrollable (horizontal
and vertical) area in which I can scribble with basic drawing primitives
(filled rectangle etc). Which signals do I need to respond to, to notice
when the user scrolls or resizes the window?

3) I tried making a gtk_drawing_area, and drawing a black filled rectangle
in it with gdk_draw_rectangle (or similar). No output was visible. Do I
have to "flush" drawing commands like I would have to with the
corresponding raw X calls? Is a drawing area used for what it sounds like,
a generic size of window in which to scribble?


Note that I've gleaned quite a lot from looking at the (large) GIMP
sources, but I've just started a job, so don't have quite enough time for
that sort of thing anymore :-(. Feel free to tell me to RTFM, but please
indicate which direction the "FM" is in, as I can't find many docs.

Cheers for your patience, and hoping to add to the GTK based apps list,
soon...

Chris

PS Please cc: any replies to me so I can be sure to get them...



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]