GTK2-Perl is a set of Perl language bindings for the GTK2 graphical user interface toolkit, enabling Perl developers to create cross-platform desktop applications with native look and feel. The bindings provide comprehensive access to GTK2 widgets, events, and drawing capabilities.
The object-oriented API wraps GTK2 classes in Perl packages with methods corresponding to C functions. Constructors create widgets using familiar Perl syntax. Properties access and modify widget attributes. Signals connect callback functions to events.
Widget support includes windows, dialogs, buttons, labels, entries, text views, tree views, and many more. Container widgets like boxes and tables organize children with flexible layouts. Custom widgets inherit from existing classes.
Drawing support through Cairo enables custom graphics including shapes, text, images, and paths. Event handling captures mouse clicks, key presses, and other user input. Timers and idle functions schedule periodic updates.
Dialog helpers simplify common interactions including file choosers, message dialogs, and color selection. Text buffers support rich text with formatting tags. Tree models handle hierarchical and list data for display in views.
Glade interface files load GUI designs created in visual tools. Signal auto-connection links handlers by naming convention. Documentation covers all available functions with examples. Active community provides support through mailing lists and forums.