Re: g_object_new(G_TYPE_OBJECT,NULL) failed

2005-03-21 Thread Tristan Van Berkom
Yueyu Lin wrote: Hi, After reading the G-lib system carefully,I think I understand the GLib system. So I writer the following codes: [...] Here are a few comments: gint pet_get_ages(Pet *pet){ if((pet)&&(pet->priv)){ return pet->priv->ages; } return 0; } void pet_set_ages(Pet *pet,in

Re: g_object_new(G_TYPE_OBJECT,NULL) failed

2005-03-21 Thread Tim Müller
On Monday 21 March 2005 15:43, Yueyu Lin wrote: > ... > > int > main (int argc,char *argv[]) > { > g_print("hello\r\n"); You need to initialise the GObject type system here with a call to g_type_init (); > GObject *object = g_object_new(G_TYPE_OBJECT,NULL); I don't think you can

g_object_new(G_TYPE_OBJECT,NULL) failed

2005-03-21 Thread Yueyu Lin
Hi, After reading the G-lib system carefully,I think I understand the GLib system. So I writer the following codes: #pet.h #ifndef PET_H #define PET_H /** *Type macros */ typedef struct _Pet Pet; typedef struct _PetClass PetClass; /** *Type macros for private structure */ typedef struc

Re: storing integers in pointers

2005-03-21 Thread Baurzhan Ismagulov
On Mon, Mar 21, 2005 at 02:27:24PM +, Tim Müller wrote: > > BTW, the latter is not mentioned at > > http://developer.gnome.org/doc/API/glib/glib-balanced-binary-trees.html > > but is described in glib 2.4.8. Should the pages be regenerated? > > That is the API reference for GLib-1.2. The GLi

Re: storing integers in pointers

2005-03-21 Thread Tim Müller
On Monday 21 March 2005 14:09, Baurjan Ismagulov wrote: > > g_hashtable_lookup_extended() and g_tree_lookup_extended() > > BTW, the latter is not mentioned at > http://developer.gnome.org/doc/API/glib/glib-balanced-binary-trees.html > but is described in glib 2.4.8. Should the pages be regenera

Re: storing integers in pointers

2005-03-21 Thread Baurjan Ismagulov
On Sat, Mar 19, 2005 at 11:20:47AM +, Tim Müller wrote: > You can if you use g_hashtable_lookup_extended() and g_tree_lookup_extended() > for the lookup. BTW, the latter is not mentioned at http://developer.gnome.org/doc/API/glib/glib-balanced-binary-trees.html , but is described in glib 2.4.

gtkfixed in gtkwindow offset in top left corner

2005-03-21 Thread Jeff Picciotti
Hello, This is my first post to the list and I am just starting out. I am doing something very simple for the moment. I am running GTK+-2.4.14, patched with directfb. Everything seems to be in order so far. My problem is, I create a gtk window and put a fixed into it. Does the fixed take up t

RE: Chronological and structural link icons

2005-03-21 Thread Drew Adams
the GTK stock icon items does not distunguish between "chronological" and "structural" links. With a structural link we mean those links that takes you to the previous, next or up node in something structured like a table of contents. For structural links I would suggest wh

never mind. was-- Re: something's wiping out my SIGALRM handler...

2005-03-21 Thread Ben Johnson
On Mon, Mar 21, 2005 at 01:53:00AM -0800, Ben Johnson wrote: ... > so... as always, I could be wrong, but it kinda looks like glib is > messing with the SIGALRM signal and spoiling my fun. surprises! I love I'm wrong. a perl module I'm calling into is mucking with signals. grr... Sorry for th

something's wiping out my SIGALRM handler...

2005-03-21 Thread Ben Johnson
I'm using setitimer() to run certain callbacks after a given interval. (you might suggest that I use g_timeout_add() instead and not worry about it... and I may end up doing that, but not now.) using setitimer has been working pretty well, until just recently. I'm not sure what happened, but it