Re: Gtk2::Gdk::Screen and $widget->size_request



On Thursday, June 12, 2003, at 05:53 PM, Gavin Brown wrote:

GType 'GdkScreenX11' is not registered with GPerl; representing this
object as first known parent type 'GdkScreen' instead at
gdkscreentest.pl line 13.

Gdk uses private subclasses to implement backend-specific stuff... this is one of these. by calling gperl_object_set_no_warn_unreg_subclass in the boot code for the GdkScreen binding module, i can disable this warning. the problem is:


Can't locate object method "get_width" via package "Gtk2::Gdk::Screen"
at gdkscreentest.pl line 14.

eh, that's because no bindings for GdkScreen have been written yet.

i just commited GdkScreen.xs, so if you get the most current CVS and do a complete rebuild (specifically, rerun Makefile.PL to add the new file to the build), you should have gdk screen working.

oh yeah -- GdkScreen's methods exist only in 2.2.x.


Secondly, the GTK docs suggest that I can call size_request() on a
realized widget to get the on-screen dimensions, but I get a "can't
locate object method" error.

size_request isn't bound, but that's not really what you want to use to find out the on-screen dimensions --- that's what $widget->allocation is for.

the size request is how big the widget wants to be, the allocation is how big the widget actually is.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]