signals with GTK_TYPE_ADJUSTMENT
Dov Grobgeld <[email protected]> Sun, 25 Jan 2009 20:56:20 +0200
| Newsgroups | gmane.comp.gnome.devtools.gob.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. [email protected] Content-Type: multipart/alternative; boundary=0016e6d7e0458865520461532d20 --0016e6d7e0458865520461532d20 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In hope that the mailing list isn't dead yet, I wonder if someone can help me with some gob2 syntax. I got stuck on trying to create signals with the following signature (copied from GtkTextView) in gob: signals[SET_SCROLL_ADJUSTMENTS] = g_signal_new (I_("set_scroll_adjustments"), G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (MyFooClass, set_scroll_adjustments), NULL, NULL, _gtk_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); I tried the following: signal last NONE (GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT) gboolean set_scroll_adjustments (self, Gtk:Adjustment *hadjustment, Gtk:Adjustment *vadjustment) but got the error "Error: Unknown GTK+ type 'GTK_TYPE_ADJUSTMENT' among signal types". This also failed: signal last NONE (OBJECT=Gtk:Adjustment, OBJECT=Gtk:Adjustment) gboolean set_scroll_adjustments (self, Gtk:Adjustment *hadjustment, Gtk:Adjustment *vadjustment) which gave the error "Error: syntax error before '='". In the end I used: signal last NONE (OBJECT, OBJECT) gboolean set_scroll_adjustments (self, Gtk:Adjustment *hadjustment, Gtk:Adjustment *vadjustment) and then applied an external patch: - G_TYPE_OBJECT, - G_TYPE_OBJECT); + GTK_TYPE_ADJUSTMENT, + GTK_TYPE_ADJUSTMENT); But of course I wonder whether there is any syntax to do this in gob2? Thanks! Dov --0016e6d7e0458865520461532d20 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">In hope that the mailing list isn't dead yet, I wonder= if someone can help me with some gob2 syntax.<br><br>I got stuck on trying= to create signals with the following signature (copied from GtkTextView) i= n gob:<br> <br><span style=3D"font-family: courier new,monospace;"> signals[SET_= SCROLL_ADJUSTMENTS] =3D</span><br style=3D"font-family: courier new,monospa= ce;"><span style=3D"font-family: courier new,monospace;"> = g_signal_new (I_("set_scroll_adjustments"),</span><br style=3D"f= ont-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> &nbs= p; G_OBJECT_CLASS_TYPE (gobject_class),</span><br style= =3D"font-family: courier new,monospace;"><span style=3D"font-family: courie= r new,monospace;"> G_SIGNAL_RUN= _LAST | G_SIGNAL_ACTION,</span><br style=3D"font-family: courier new,monosp= ace;"> <span style=3D"font-family: courier new,monospace;"> &nbs= p; G_STRUCT_OFFSET (MyFooClass, set_scroll_adjustments),= </span><br style=3D"font-family: courier new,monospace;"><span style=3D"fon= t-family: courier new,monospace;"> &nb= sp; NULL, NULL,</span><br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> &nbs= p; _gtk_marshal_VOID__OBJECT_OBJECT,</span><br style=3D"= font-family: courier new,monospace;"><span style=3D"font-family: courier ne= w,monospace;"> G_TYPE_NONE, 2,<= /span><br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> &nbs= p; GTK_TYPE_ADJUSTMENT,</span><br style=3D"font-family: = courier new,monospace;"><span style=3D"font-family: courier new,monospace;"= > GTK_TYPE_ADJUSTMENT);</span><= br style=3D"font-family: courier new,monospace;"> <br>I tried the following:<br><br><span style=3D"font-family: courier new,m= onospace;"> signal last NONE (GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT= )</span><br style=3D"font-family: courier new,monospace;"><span style=3D"fo= nt-family: courier new,monospace;"> gboolean</span><br style=3D"font-= family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> set_scroll_adjus= tments (self,</span><br style=3D"font-family: courier new,monospace;"><span= style=3D"font-family: courier new,monospace;"> &nbs= p; &= nbsp; Gtk:Adjustment &= nbsp; *hadjustment,</span><br style=3D"font-family: courier new,monospace;"= > <span style=3D"font-family: courier new,monospace;">  = ; &n= bsp; Gtk:Adjustment &n= bsp; *vadjustment)</span><br style=3D"font-family: courier new,monosp= ace;"><br>but got the error "Error: Unknown GTK+ type 'GTK_TYPE_AD= JUSTMENT' among signal types".<br> <br>This also failed:<br><br><span style=3D"font-family: courier new,monosp= ace;"> signal last NONE (OBJECT=3DGtk:Adjustment, OBJECT=3DGtk:Adjustm= ent)</span><br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> gboolean</span><= br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> set_scroll_adjus= tments (self,</span><br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;">  = ; &n= bsp; Gtk:Adjustment &n= bsp; *hadjustment,</span><br style=3D"font-family: courier new,monosp= ace;"> <span style=3D"font-family: courier new,monospace;">  = ; &n= bsp; Gtk:Adjustment &n= bsp; *vadjustment)</span><br style=3D"font-family: courier new,monosp= ace;"> <br><br>which gave the error "Error: syntax error before '=3D'= ".<br><br>In the end I used:<br><br><span style=3D"font-family: courie= r new,monospace;"> signal last NONE (OBJECT, OBJECT)</span><br style= =3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> gboolean</span><= br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;"> set_scroll_adjus= tments (self,</span><br style=3D"font-family: courier new,monospace;"> <span style=3D"font-family: courier new,monospace;">  = ; &n= bsp; Gtk:Adjustment &n= bsp; *hadjustment,</span><br style=3D"font-family: courier new,monosp= ace;"> <span style=3D"font-family: courier new,monospace;">  = ; &n= bsp; Gtk:Adjustment &n= bsp; *vadjustment)</span><br style=3D"font-family: courier new,monosp= ace;"> <br> and then applied an external patch:<br><br>- = G_TYPE_OBJECT,<br>-  = ; G_TYPE_OBJECT);<br>+ &nb= sp; GTK_TYPE_ADJUSTMENT,<br>+ &n= bsp; GTK_TYPE_ADJUSTMENT);<br><br>But of cou= rse I wonder whether there is any syntax to do this in gob2?<br> <br>Thanks!<br>Dov<br><br><br> <br></div> --0016e6d7e0458865520461532d20-- [email protected] Content-Type: text/plain; charset=us-ascii; name="footer.txt" Content-Disposition: inline Content-Transfer-Encoding: 8bit -- to unsubscribe: send mail to [email protected] with "unsubscribe gob-list" in the subject [email protected]