Events & palletes



Hi,

Currently we're developing an application using GTK on Sun Solaris.
It's a medical image viewer. About a file which is viewed ,certain
information is stored. After closing the window, this memory should be
freed. Currently i'm using the destroy event of the window widget. In
some cases however, dus results in a sigsev, because the memory is
already freed, and an other event tries to access this memory (which
points to NULL). Could someone please tell me which events happen when
,when closing a window. The (important) widgets used are: GtkPixmap (+
eventbox)  & GtkEntry.

Besides that ,the program has to change some colors. I've been trying to
fond out how this works with GTK ,but it's not very clear. The program
needs a custom pallete of colors. This colors in this pallete must be
changed often. First we tried to use GDK_DIRECT_COLOR colormaps and
writing directly to X using gdk_color_change(). After that i found the
GDK_Color_Context. Is this the right way to create such a custom
pallete? If yes -> a source code example please, if no-> how to do this?

Jeroen Benckhuijsen
University Hospital of Maastricht
Department of Radiodiagnostics




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