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&#39;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;">&nbsp; signals[SET_=
SCROLL_ADJUSTMENTS] =3D</span><br style=3D"font-family: courier new,monospa=
ce;"><span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;=
 g_signal_new (I_(&quot;set_scroll_adjustments&quot;),</span><br style=3D"f=
ont-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp; G_OBJECT_CLASS_TYPE (gobject_class),</span><br style=
=3D"font-family: courier new,monospace;"><span style=3D"font-family: courie=
r new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 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;">&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp; 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;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nb=
sp; NULL, NULL,</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp; _gtk_marshal_VOID__OBJECT_OBJECT,</span><br style=3D"=
font-family: courier new,monospace;"><span style=3D"font-family: courier ne=
w,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; G_TYPE_NONE, 2,<=
/span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp; GTK_TYPE_ADJUSTMENT,</span><br style=3D"font-family: =
courier new,monospace;"><span style=3D"font-family: courier new,monospace;"=
>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; 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;">&nbsp;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;">&nbsp; gboolean</span><br style=3D"font-=
family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">&nbsp; set_scroll_adjus=
tments (self,</span><br style=3D"font-family: courier new,monospace;"><span=
 style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gtk:Adjustment&nbsp;&nbsp;&=
nbsp; *hadjustment,</span><br style=3D"font-family: courier new,monospace;"=
>
<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gtk:Adjustment&nbsp;&n=
bsp;&nbsp; *vadjustment)</span><br style=3D"font-family: courier new,monosp=
ace;"><br>but got the error &quot;Error: Unknown GTK+ type &#39;GTK_TYPE_AD=
JUSTMENT&#39; among signal types&quot;.<br>
<br>This also failed:<br><br><span style=3D"font-family: courier new,monosp=
ace;">&nbsp;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;">&nbsp; gboolean</span><=
br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">&nbsp; set_scroll_adjus=
tments (self,</span><br style=3D"font-family: courier new,monospace;">
<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gtk:Adjustment&nbsp;&n=
bsp;&nbsp; *hadjustment,</span><br style=3D"font-family: courier new,monosp=
ace;">
<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gtk:Adjustment&nbsp;&n=
bsp;&nbsp; *vadjustment)</span><br style=3D"font-family: courier new,monosp=
ace;">
<br><br>which gave the error &quot;Error: syntax error before &#39;=3D&#39;=
&quot;.<br><br>In the end I used:<br><br><span style=3D"font-family: courie=
r new,monospace;">&nbsp;signal last NONE (OBJECT, OBJECT)</span><br style=
=3D"font-family: courier new,monospace;">


<span style=3D"font-family: courier new,monospace;">&nbsp; gboolean</span><=
br style=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">&nbsp; set_scroll_adjus=
tments (self,</span><br style=3D"font-family: courier new,monospace;">

<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gtk:Adjustment&nbsp;&n=
bsp;&nbsp; *hadjustment,</span><br style=3D"font-family: courier new,monosp=
ace;">

<span style=3D"font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gtk:Adjustment&nbsp;&n=
bsp;&nbsp; *vadjustment)</span><br style=3D"font-family: courier new,monosp=
ace;">

<br>
and then applied an external patch:<br><br>-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp; &nbsp;&nbsp;&nbsp; G_TYPE_OBJECT,<br>-&nbsp;&nbsp;&nbsp; &nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; G_TYPE_OBJECT);<br>+&nbsp;&nbsp;&nbsp; &nbsp;&nb=
sp;&nbsp; &nbsp;&nbsp;&nbsp; GTK_TYPE_ADJUSTMENT,<br>+&nbsp;&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 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]