Gtk2

 view release on metacpan or  search on metacpan

xs/GtkWidget.xs  view on Meta::CPAN

	if (gperl_sv_is_defined (widget_or_class_name) &&
	    SvROK (widget_or_class_name)) {
		GtkWidget * widget = SvGtkWidget (widget_or_class_name);
		if (!widget)
			croak ("wha?  NULL widget in list_style_properties");
		type = G_OBJECT_TYPE (widget);
	} else {
		type = gperl_object_type_from_package
			(SvPV_nolen (widget_or_class_name));
		if (!type)
			croak ("package %s is not registered with GPerl",
			       SvPV_nolen (widget_or_class_name));
	}

	switch (ix) {
	case 0:
		if (items != 2)
			croak ("Usage: Gtk2::Widget::find_style_property (class, name)");
		name = SvGChar (ST (1));
		break;
	default: /* ix==1 */
		if (items != 1)
			croak ("Usage: Gtk2::Widget::list_style_properties (class)");
		break;
	}
	if (! g_type_is_a (type, GTK_TYPE_WIDGET))
		croak ("Not a Gtk2::Widget");

	/* classes registered by perl are kept alive by the bindings.
	 * those coming straight from C are not.  if we had an actual
	 * widget, the class will be alive, but if we just had a
	 * package, the class may not exist yet.  thus, we'll have to
	 * do an honest ref here, rather than a peek.
	 */
	widget_class = g_type_class_ref (type);

	if (ix == 0) {
		GParamSpec *pspec
		  = gtk_widget_class_find_style_property
		      (widget_class, name);
		XPUSHs (pspec
			? sv_2mortal (newSVGParamSpec (pspec))
			: &PL_sv_undef);
	}
	else if (ix == 1) {
		GParamSpec **props;
		guint n_props, i;
		props = gtk_widget_class_list_style_properties
			  (widget_class, &n_props);
		if (n_props) {
			EXTEND (SP, n_props);
			for (i = 0; i < n_props; i++)
				PUSHs (sv_2mortal (newSVGParamSpec (props[i])));
		}
		g_free (props); /* must free even when n_props==0 */
	}

	g_type_class_unref (widget_class);


#GtkClipboard* gtk_widget_get_clipboard (GtkWidget *widget, GdkAtom selection)
GtkClipboard *
gtk_widget_get_clipboard (widget, selection=GDK_SELECTION_CLIPBOARD)
	GtkWidget * widget
	GdkAtom     selection


GdkDisplay * gtk_widget_get_display (GtkWidget * widget)

GdkWindow * gtk_widget_get_root_window (GtkWidget * widget)

GdkScreen * gtk_widget_get_screen (GtkWidget * widget)

gboolean gtk_widget_has_screen (GtkWidget * widget);

#endif


#if GTK_CHECK_VERSION(2,4,0)

void gtk_widget_set_no_show_all (GtkWidget *widget, gboolean no_show_all);

gboolean gtk_widget_get_no_show_all (GtkWidget *widget);

void gtk_widget_queue_resize_no_redraw (GtkWidget *widget);

gboolean
gtk_widget_can_activate_accel (widget, signal_id)
	GtkWidget *widget
	guint signal_id

void
gtk_widget_list_mnemonic_labels (widget)
	GtkWidget *widget
    PREINIT:
	GList *i, *list = NULL;
    PPCODE:
	list = gtk_widget_list_mnemonic_labels (widget);
	for (i = list; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGtkWidget (i->data)));
	g_list_free (list);

void gtk_widget_add_mnemonic_label (GtkWidget *widget, GtkWidget *label);

void gtk_widget_remove_mnemonic_label (GtkWidget *widget, GtkWidget *label);

#endif

#if GTK_CHECK_VERSION(2, 10, 0)

void gtk_widget_input_shape_combine_mask (GtkWidget *widget, GdkBitmap_ornull *shape_mask, gint offset_x, gint offset_y);

gboolean gtk_widget_is_composited (GtkWidget *widget);

#endif /* 2.10 */

#if GTK_CHECK_VERSION(2, 12, 0)

gboolean gtk_widget_keynav_failed (GtkWidget *widget, GtkDirectionType direction);

void gtk_widget_error_bell (GtkWidget *widget);

void gtk_widget_set_tooltip_window (GtkWidget *widget, GtkWindow_ornull *custom_window);



( run in 1.370 second using v1.01-cache-2.11-cpan-2398b32b56e )