Re: can anybody help with bebugging a little displaying program?

2002-03-18 Thread Havoc Pennington
Simon Hookway <[EMAIL PROTECTED]> writes: > > what you have: > > GtkWidget *window; > GdkPixbuf *pixbuf; > GtkWidget *widget; > > window = gtk_window_new(GTK_WINDOW_TOPLEVEL); > widget = gtk_event_box_new(); > gdk_pixbuf_render_to_drawable (pixbuf, > widget->window,widget->style->white_gc,

Re: can anybody help with bebugging a little displaying program?

2002-03-18 Thread Simon Hookway
nw the second argument is the drawable, ie pixmap. the third is the GC which can be the window style your gonna put the pixmap in. So you might use: gdk_pixbuf_render_to_drawable(pixbuf, pixmap, window->style->fg_gc[GTK_STATE_NORMAL], sx,sy,dx,dy,w,h,GDK_RGB_DITHER_NORMAL,0,0); alternative

Re: can anybody help with bebugging a little displaying program?

2002-03-18 Thread Simon Hookway
Sure what you have: GtkWidget *window; GdkPixbuf *pixbuf; GtkWidget *widget; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); widget = gtk_event_box_new(); gdk_pixbuf_render_to_drawable (pixbuf, widget->window,widget->style->white_gc, 0, 0,0,0, gdk_pixbuf_get_width(pixbuf), widget->window i

Re: can anybody help with bebugging a little displaying program?

2002-03-18 Thread guo li
thank you , but following ur way, I get a sefmentation fault. ;( >From: Hing-Wah Wan <[EMAIL PROTECTED]> >To: guo li <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: can anybody help with bebugging a little displaying program? >Date: Tue, 19 Mar 2002 09:37:34 +0800 > >On Tue, Mar 19,

Re: can anybody help with bebugging a little displaying program?

2002-03-18 Thread Hing-Wah Wan
On Tue, Mar 19, 2002 at 12:06:53AM +, guo li wrote: > > the run time error is: > > i@olympia GTK]$ ./a.out > > ** CRITICAL **: file gdk-pixbuf-render.c: line 205 > (gdk_pixbuf_render_to_drawable): assertion `drawable != NULL' failed. > [gli@olympia GTK]$ > > > > pix

Re: can anybody help with bebugging a little displaying program?

2002-03-18 Thread guo li
the run time error is: i@olympia GTK]$ ./a.out ** CRITICAL **: file gdk-pixbuf-render.c: line 205 (gdk_pixbuf_render_to_drawable): assertion `drawable != NULL' failed. [gli@olympia GTK]$ #include #include void delete_event( GtkWidget *widget, GdkEvent *event,

can anybody help with a little displaying program?

2002-03-18 Thread guo li
#include #include void delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { gtk_main_quit (); } int main( int argc,char *argv[] ) { GtkWidget *window; GdkPixbuf *pixbuf;

Re: A desperate plea to the GTK developers

2002-03-18 Thread Norman Black
> > I've been banging my head against the proverbial brick wall > > for two days now (having never used GTK before) and cursing > > the endless webpages of API documentation devoid of any real > > information on signals (and I almost daren't mention the > > endless screenfulls of blank API docs fo

Re: key input get grab by other widget

2002-03-18 Thread ehml
Hi, It is me asking for help again. I need to create a frame with 256 toggle button with labels. I am unable to create the toggle button with labels without problem, but I am not able to do the following : 1. the toggle button background should be a pre-defined GdkGC. 2. the toggle button shoul

how do I compile gtk+2. on cygwin

2002-03-18 Thread Eli Kleinman
I gunzip the gtk+2 on cygwin and I am trying to run./configure I got this error message configure: error: *** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/ I download this package from there website (pkgconfig- 0.12.0.tar.gz) And gunzip and run./configure but it se

help!! how to get or setting the double click interval .

2002-03-18 Thread chihao
Dear all: I use gtk 1.2 in my program and use  GDK_2BUTTON_PRESS to got event. but now i want change the double click interval time in this program.  Have any function like gkt2.0"gtk_settings_set_double_property" in gtk 1.2  .    How to ?? any idea ??  

Re: Threading question (avoiding deadlock)

2002-03-18 Thread G Hasse
On Sun, 17 Mar 2002, Pascal Haakmat wrote: > Hello, > > I was hoping somebody could point me in the right direction here. > > I have a program with two (p)threads; one thread running the gtk_main() > event loop, and the other thread periodically updating the display in a > gdk_threads_enter() / g

Re: A desperate plea to the GTK developers

2002-03-18 Thread John Bleichert
Sounds to me like gtk.org has a potential doc-writer for the project ;-) Remember - these people are volunteers! I grabbed the Sams "gtk in 21 days" guide and it (+ the excellent documentaion of the gtk source files) got me going. The rest is just C. Use the source. JB PS: my email is sybor

Re: how shrink entire GUI?

2002-03-18 Thread Gavin Jefferies
Hi Christian, There may be another more GTK correct way to do this. I just hacked arround until I found what worked for me. The reason I use (and like) the rc file aproach is that I have different needs for different machine displays and this fits. I've never looked at the graphics context code b

Re: losing key release events

2002-03-18 Thread Paul Davis
>or alternatively, whilst the user is pressing Ctrl, another window is >created by a separate application, and the WM shifts focus over there. I >think this is a more fundamental problem as we don't have any control >over whether that window receives KeyRelease events or not. in Adrian Nye's book

Re: gtk2 Segmentation faults

2002-03-18 Thread Kristian Peters
Owen Taylor <[EMAIL PROTECTED]> wrote: > You are using GtkXft. :-) Turn it off and things will work a lot better. Yes... After ldconfig everything works fine. ;-) If there exists a FAQ somewhere it would be worth mentioning the incompatibility with gdkxft. :) *Kristian :... [snd.science] ..

how do I install gnome on cygwin?

2002-03-18 Thread Eli Kleinman
I gunzip the gtk+2 on cygwin and I am trying to run./configure I got this error message configure: error: *** pkg-config not found. See http://www.freedesktop.org/softw are/pkgconfig/ I download this package from there website (pkgconfig- 0.12.0.tar.gz) And gunzip and run./configure but it s

Re: gtk2 Segmentation faults

2002-03-18 Thread Owen Taylor
Kristian Peters <[EMAIL PROTECTED]> writes: > Neil Bird <[EMAIL PROTECTED]> wrote: > >Do a 'bt' command in gdb after the crash; that'll show you the > > current stack of procedure calls. > > Program received signal SIGSEGV, Segmentation fault. > gdk_window_get_geometry (window=0x0, x=0x0,

gtk_tree_view_column_pack_start/end() funcs

2002-03-18 Thread Vitaly Tishkov
Hi, What's the difference between gtk_tree_view_column_pack_start() and gtk_tree_view_column_pack_end()? Could anyone explain when we should use the first one and when the second one? Thanks, Vitaly. ___ gtk-list mailing list [EMAIL PROTECTED] htt

losing key release events

2002-03-18 Thread Paul Davis
lets imagine that an application is tracking keyboard state in order to allow arbitrary key combinations to be used for "shortcuts". when the user presses Ctrl-x, the following things happen: key press (Ctrl): mark state as having ctrl pressed key press (x):mark state as having x pres

Re: gtk2 Segmentation faults

2002-03-18 Thread Owen Taylor
Kristian Peters <[EMAIL PROTECTED]> writes: > Owen Taylor <[EMAIL PROTECTED]> wrote: > > Is your system Red Hat 7.2 in other ways? > > No. I applied updates from errata only. > > > Porbably something to do with config files or the set of files in your packages. >Maybe you could try the i386.r

Re: gtk2 Segmentation faults

2002-03-18 Thread Owen Taylor
Ronald Bultje <[EMAIL PROTECTED]> writes: > On Sun, 2002-03-17 at 23:00, Kristian Peters wrote: > > int main( int argc, > >char *argv[] ) > > { > > printf("1\n"); > > GtkWidget *window; > > printf("2\n"); > > [...] > > > > reveals: > > I wonder why this actually

Re: gtk2 Segmentation faults

2002-03-18 Thread Neil Bird
Around about 17/03/02 22:47, Kristian Peters typed ... > Program received signal SIGSEGV, Segmentation fault. > gdk_window_get_geometry (window=0x0, x=0x0, y=0x0, width=0x4067ef5c, >height=0x4067ef60, depth=0x0) at gdkwindow-x11.c:2147 > in gdkwindow-x11.c > (gdb) Do a 'bt' command in g

RE: GtkStateType....

2002-03-18 Thread hunchback
>use gtk_widget_set_sensitive () instead. thanks, that works.. but there's a problem... the button acumulates the events... if i put the button insensitive and then the user clicks 3 times, when the button becomes sensitive it calls the three events... how do i do to clean the events queue? A

Re: GtkStateType....

2002-03-18 Thread Sven Neumann
Hi, <[EMAIL PROTECTED]> writes: > i'm trying to deactivate a button, and i did the following: > > gtk_widget_set_state(button, GTK_STATE_INSENSITIVE); > > but when i try to reactivate the button i did: > gtk_widget_set_state(button, GTK_STATE_NORMAL); > > and it doesn't work, nor do the other

GtkStateType....

2002-03-18 Thread hunchback
Hi, i'm trying to deactivate a button, and i did the following: gtk_widget_set_state(button, GTK_STATE_INSENSITIVE); but when i try to reactivate the button i did: gtk_widget_set_state(button, GTK_STATE_NORMAL); and it doesn't work, nor do the other GtkStateType (GTK_STATE_ACTIVE, etc...) How

Re: gtk_input_add

2002-03-18 Thread Sven Neumann
Hi, Nicolas web <[EMAIL PROTECTED]> writes: > Hi. I need help to work with sockets. I have a socket > descriptor and I want to run my function when it has > data. > I use this command: > gdk_input_add (mysocket, GDK_INPUT_READ, > GTK_SIGNAL_FUNC (myfunction),&mydata) > I´ve not compiling error.

gtk_input_add

2002-03-18 Thread Nicolas web
Hi. I need help to work with sockets. I have a socket descriptor and I want to run my function when it has data. I use this command: gdk_input_add (mysocket, GDK_INPUT_READ, GTK_SIGNAL_FUNC (myfunction),&mydata) I´ve not compiling error. But when data arrives my program crashes. Function works OK,

Re: gtk2 Segmentation faults

2002-03-18 Thread Kristian Peters
iain <[EMAIL PROTECTED]> wrote: > Are you running a gtk1.2 LD_PRELOAD hack for antialiasing? No hacks, no patches applied. Are there known problems with freetype2-2.0.3 and XFree-4.1 ? Then I'll try my luck with XFree-4.2 and a more recent version of freetype. But I can't see why even that simp

Re: gtk2 Segmentation faults

2002-03-18 Thread Kristian Peters
Ronald Bultje <[EMAIL PROTECTED]> wrote: > On Sun, 2002-03-17 at 23:47, Kristian Peters wrote: > > Program received signal SIGSEGV, Segmentation fault. > > gdk_window_get_geometry (window=0x0 >^^ > > Your window variable is not initialized. But this happens di