Re: GdkRectangle, again
- From: Ross McFarland <rwmcfa1 neces com>
- To: gtk-perl-list gnome org
- Subject: Re: GdkRectangle, again
- Date: 29 Apr 2003 07:48:07 -0400
On Tue, 2003-04-29 at 05:26, Guillaume Cottenceau wrote:
"muppet" <scott asofyet org> writes:
E.g. even more readable than hash ref thing. There's also
->values so that you can do things like:
my (undef, undef, $w, $h) = $update_rect->values;
that's a very good idea.
the following is my implementation of gtk_tooltips_data_get which
returns a hash version of the struct that it would normally return. my
question is should we bless this hash with a Gtk2::TooltipsData moniker
for any reason? I don't know of anything that accepts a GtkTooltipsData
struct (even tooltips stuff doesn't.)
## GtkTooltipsData* gtk_tooltips_data_get (GtkWidget *widget)
void
gtk_tooltips_data_get (class, widget)
SV * class
GtkWidget * widget
PREINIT:
GtkTooltipsData * ret = NULL;
HV * hv;
PPCODE:
ret = gtk_tooltips_data_get(widget);
if( !ret )
XSRETURN_UNDEF;
hv = newHV();
hv_store(hv, "tooltips", 8, newSVGtkTooltips(ret->tooltips),0);
hv_store(hv, "widget", 6,
newSVGtkWidget(GTK_WIDGET(ret->widget)),0);
hv_store(hv, "tip_text", 8, newSVpv(ret->tip_text, PL_na),0);
hv_store(hv, "tip_private", 11, newSVpv(ret->tip_private,
PL_na),0);
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
-rm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]