Gtk2::Object(3)
β¨ Gtk2::Object β bestie edition π
okay so this is the manual page for Gtk2::Object (that's the Perl wrapper for GtkObject, iykyk), and it lives in the User Contributed Perl Documentation section. buckle up, it's short and it's iconic π
π¦ NAME π¦
Gtk2::Object β it's literally just a wrapper for GtkObject. no cap.
πΈ HIERARCHY πΈ
here's the family tree, and yes the vibes are immaculate:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
π METHODS π
object = Gtk2::Object->new ($object_class, ...)
the args, bestie:
$object_class(string) β package name of object to create...(list) β of property-name => value pairs
so you make a brand new object of type $object_class, with some optional initial property values. and listen, you might clock this used in some code as Gtk2::Widget->new, like this:
$window = Gtk2::Widget->new ('Gtk2::Window',
title => 'something cool',
allow_grow => TRUE);
and here's the tea: this is really just a convenience function that wraps Glib::Object->new. that's it. that's the whole thing. π«Ά
boolean = $object->bindings_activate ($keyval, $modifiers)
the args:
$keyval(integer)$modifiers(Gtk2::Gdk::ModifierType)
so even though activate and activate_event are Gtk2::Object methods, as of Gtk 2.12 binding sets are only associated with widgets β so on an object as such the return is always false (no binding activated). yeah. always. π
and it gets deeper: although activate and binding sets are both expressed in terms of keyvals, internally the lookup is by keycode. so if a keyval can't be generated by at least one keycode/modifier combination (see Gtk2::Gdk::Keymap) then it cannot be activated. in particular, this means keyvals like Pointer_Button1 which are not actual keys cannot be dispatched by activate (returning false for no binding activated). so if it's not a real key, it's not getting dispatched. periodt.
boolean = $object->bindings_activate_event ($event)
$event(Gtk2::Gdk::Event)
Since: gtk+ 2.4
$object->destroy
okay this one is important so pay attention π₯ β this is an explicit destroy β NOT the auto destroy. Gtk2::Object inherits that auto destroy thing from Glib::Object! do not mix them up, bestie, they are different and the distinction is real.
π PROPERTIES π
'user-data'(gpointer : default 0 : readable / writable / private / static-nick / static-blurb) β Anonymous User Data Pointer
π SIGNALS π
destroy(Gtk2::Object)
π ENUMS AND FLAGS π
flags Gtk2::Gdk::ModifierType
every single one of them, in order, no skips:
'shift-mask'/'GDK_SHIFT_MASK''lock-mask'/'GDK_LOCK_MASK''control-mask'/'GDK_CONTROL_MASK''mod1-mask'/'GDK_MOD1_MASK''mod2-mask'/'GDK_MOD2_MASK''mod3-mask'/'GDK_MOD3_MASK''mod4-mask'/'GDK_MOD4_MASK''mod5-mask'/'GDK_MOD5_MASK''button1-mask'/'GDK_BUTTON1_MASK''button2-mask'/'GDK_BUTTON2_MASK''button3-mask'/'GDK_BUTTON3_MASK''button4-mask'/'GDK_BUTTON4_MASK''button5-mask'/'GDK_BUTTON5_MASK''super-mask'/'GDK_SUPER_MASK''hyper-mask'/'GDK_HYPER_MASK''meta-mask'/'GDK_META_MASK''release-mask'/'GDK_RELEASE_MASK''modifier-mask'/'GDK_MODIFIER_MASK'
π SEE ALSO π
- Gtk2
- Glib::Object
- Glib::InitiallyUnowned
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
okay that's the whole page, you ate that π and for the sign-off: this is from perl v5.42.0, dated 2025-07-25, and you can find it under Gtk2::Object(3). mwah πβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms