Gtk2

 view release on metacpan or  search on metacpan

gtk-demo/stock_browser.pl  view on Meta::CPAN

      $sw->set_policy ('never', 'automatic');
      $hbox->pack_start ($sw, FALSE, FALSE, 0);

      my $model = create_model ();
      
      my $treeview = Gtk2::TreeView->new_with_model ($model);

      $sw->add ($treeview);
      
      my $column = Gtk2::TreeViewColumn->new;
      $column->set_title ("Macro");

      my $cell_renderer = Gtk2::CellRendererPixbuf->new;
      $column->pack_start ($cell_renderer, FALSE);
### this doesn't work for 2.0.x, because stock_id isn't an attribute for the
### renderer until 2.2.x
###      $column->set_attributes ($cell_renderer, stock_id => 1);
      $column->set_cell_data_func ($cell_renderer, \&macro_set_func_pixbuf);
      $cell_renderer = Gtk2::CellRendererText->new;
      $column->pack_start ($cell_renderer, TRUE);
      $column->set_cell_data_func ($cell_renderer, \&macro_set_func_text);

xs/Gtk2.xs  view on Meta::CPAN


Since the Gtk2 Perl module is a bridge to an external library with its own
versions and API revisions, we have three different versions available for
inspection.  Which one you need to use at which time depends entirely on
the situation.  Gtk2 uses the same scheme as Glib and the underlying gtk+
C library; that is, the standard
C<$Gtk2::VERSION> for the version of the bindings, all-caps
(MAJOR|MINOR|MICRO)_VERSION functions for the bound version, and
lower-case (major|minor|micro)_version functions for the runtime version.
See L<Glib::version> and
L<http://developer.gnome.org/doc/API/2.0/gtk/gtk-Feature-Test-Macros.html>
for more information.

Note also that gtk_check_version() and GTK_CHECK_VERSION() have different
semantics in C, and we have preserved those faithfully.

=cut

=for see_also Glib::version
=cut

xs/GtkWidget.xs  view on Meta::CPAN

flags (GtkWidget * widget)
    ALIAS:
	get_flags = 1
    CODE:
	PERL_UNUSED_VAR (ix);
	RETVAL = GTK_WIDGET_FLAGS (widget);
    OUTPUT:
	RETVAL

 #
 #/* Macros for setting and clearing widget flags.
 # */
 ##define GTK_WIDGET_SET_FLAGS(wid,flag)	  G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END
 ##define GTK_WIDGET_UNSET_FLAGS(wid,flag)  G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END

void
set_flags (widget, flags)
	GtkWidget * widget
	GtkWidgetFlags flags
    CODE:
	GTK_WIDGET_SET_FLAGS (widget, flags);



( run in 1.109 second using v1.01-cache-2.11-cpan-49f99fa48dc )