本文整理汇总了C++中GWA_GET_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ GWA_GET_CLASS函数的具体用法?C++ GWA_GET_CLASS怎么用?C++ GWA_GET_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GWA_GET_CLASS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: glade_gtk_action_bar_verify_property
gboolean
glade_gtk_action_bar_verify_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id,
const GValue * value)
{
if (!strcmp (id, "size"))
return glade_gtk_action_bar_verify_size (object, value);
else if (GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property)
return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object, id, value);
return TRUE;
}
开发者ID:metaltrrocker,项目名称:glade,代码行数:13,代码来源:glade-gtk-action-bar.c
示例2: glade_gtk_widget_action_submenu
GtkWidget *
glade_gtk_widget_action_submenu (GladeWidgetAdaptor * adaptor,
GObject * object, const gchar * action_path)
{
GladeWidget *gwidget = glade_widget_get_from_gobject (object);
GList *groups, *list;
if (strcmp (action_path, "sizegroup_add") == 0)
{
GtkWidget *menu = gtk_menu_new ();
GtkWidget *separator, *item;
GladeWidget *group;
if ((groups = list_sizegroups (gwidget)) != NULL)
{
for (list = groups; list; list = list->next)
{
group = list->data;
item = gtk_menu_item_new_with_label (glade_widget_get_name (group));
g_object_set_data (G_OBJECT (item), "glade-group-widget", group);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (glade_gtk_widget_add2group_cb),
gwidget);
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
g_list_free (groups);
separator = gtk_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), separator);
gtk_widget_show (separator);
}
/* Add trailing new... item */
item = gtk_menu_item_new_with_label (_("New Size Group"));
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (glade_gtk_widget_add2group_cb), gwidget);
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
return menu;
}
else if (GWA_GET_CLASS (G_TYPE_OBJECT)->action_submenu)
return GWA_GET_CLASS (G_TYPE_OBJECT)->action_submenu (adaptor,
object, action_path);
return NULL;
}
开发者ID:zlongshen,项目名称:glade,代码行数:51,代码来源:glade-gtk-widget.c
示例3: glade_gtk_image_set_property
void
glade_gtk_image_set_property (GladeWidgetAdaptor *adaptor,
GObject *object,
const gchar *id,
const GValue *value)
{
if (!strcmp (id, "image-mode"))
glade_gtk_image_set_image_mode (object, value);
else if (!strcmp (id, "icon-size"))
{
/* Make the enum an int... */
GValue int_value = { 0, };
g_value_init (&int_value, G_TYPE_INT);
g_value_set_int (&int_value, g_value_get_enum (value));
GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id,
&int_value);
g_value_unset (&int_value);
}
else
{
GladeWidget *widget = glade_widget_get_from_gobject (object);
GladeImageEditMode mode = 0;
glade_widget_property_get (widget, "image-mode", &mode);
/* avoid setting properties in the wrong mode... */
switch (mode)
{
case GLADE_IMAGE_MODE_STOCK:
if (!strcmp (id, "icon-name") || !strcmp (id, "pixbuf"))
return;
break;
case GLADE_IMAGE_MODE_ICON:
if (!strcmp (id, "stock") || !strcmp (id, "pixbuf"))
return;
break;
case GLADE_IMAGE_MODE_FILENAME:
if (!strcmp (id, "stock") || !strcmp (id, "icon-name"))
return;
case GLADE_IMAGE_MODE_RESOURCE:
/* Screw the resource mode here, we can't apply them at Glade's runtime anyway */
default:
break;
}
GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object,
id, value);
}
}
开发者ID:GNOME,项目名称:glade,代码行数:49,代码来源:glade-gtk-image.c
示例4: glade_gtk_table_verify_property
gboolean
glade_gtk_table_verify_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id, const GValue * value)
{
if (!strcmp (id, "n-rows"))
return glade_gtk_table_verify_n_common (object, value, TRUE);
else if (!strcmp (id, "n-columns"))
return glade_gtk_table_verify_n_common (object, value, FALSE);
else if (GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property)
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object,
id, value);
return TRUE;
}
开发者ID:kugel-,项目名称:glade,代码行数:15,代码来源:glade-gtk-table.c
示例5: glade_gtk_menu_item_action_activate
void
glade_gtk_menu_item_action_activate (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * action_path)
{
GObject *obj = NULL, *shell = NULL;
GladeWidget *w = glade_widget_get_from_gobject (object);
while ((w = glade_widget_get_parent (w)))
{
obj = glade_widget_get_object (w);
if (GTK_IS_MENU_SHELL (obj))
shell = obj;
}
if (strcmp (action_path, "launch_editor") == 0)
{
if (shell)
object = shell;
if (GTK_IS_MENU_BAR (object))
glade_gtk_menu_shell_launch_editor (object, _("Edit Menu Bar"));
else if (GTK_IS_MENU (object))
glade_gtk_menu_shell_launch_editor (object, _("Edit Menu"));
}
else
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->action_activate (adaptor,
object, action_path);
if (shell)
gtk_menu_shell_deactivate (GTK_MENU_SHELL (shell));
}
开发者ID:kugel-,项目名称:glade,代码行数:32,代码来源:glade-gtk-menu-item.c
示例6: glade_gtk_widget_read_widget
void
glade_gtk_widget_read_widget (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlNode * node)
{
const gchar *tooltip_markup = NULL;
if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
return;
/* First chain up and read in all the normal properties.. */
GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
/* Read in accelerators */
glade_gtk_read_accels (widget, node, TRUE);
/* Read in atk props */
glade_gtk_widget_read_atk_props (widget, node);
/* Read in the style classes */
glade_gtk_widget_read_style_classes (widget, node);
/* Resolve the virtual tooltip use markup property */
glade_widget_property_get (widget, "tooltip-markup", &tooltip_markup);
if (tooltip_markup != NULL)
glade_widget_property_set (widget, "glade-tooltip-markup", TRUE);
}
开发者ID:metaltrrocker,项目名称:glade,代码行数:27,代码来源:glade-gtk-widget.c
示例7: glade_gtk_file_filter_write_widget
void
glade_gtk_file_filter_write_widget (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node)
{
GladeXmlNode *strings_node;
if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
return;
/* First chain up and read in all the normal properties.. */
GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
strings_node = glade_xml_node_new (context, GLADE_TAG_MIME_TYPES);
glade_gtk_filter_write_strings (widget, context, strings_node, FILTER_MIME, "glade-mime-types");
if (!glade_xml_node_get_children (strings_node))
glade_xml_node_delete (strings_node);
else
glade_xml_node_append_child (node, strings_node);
strings_node = glade_xml_node_new (context, GLADE_TAG_PATTERNS);
glade_gtk_filter_write_strings (widget, context, strings_node, FILTER_PATTERN, "glade-patterns");
if (!glade_xml_node_get_children (strings_node))
glade_xml_node_delete (strings_node);
else
glade_xml_node_append_child (node, strings_node);
}
开发者ID:kugel-,项目名称:glade,代码行数:32,代码来源:glade-gtk-recent-file-filter.c
示例8: glade_gtk_size_group_set_property
void
glade_gtk_size_group_set_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * property_name,
const GValue * value)
{
if (!strcmp (property_name, "widgets"))
{
GSList *sg_widgets, *slist;
GList *widgets, *list;
/* remove old widgets */
if ((sg_widgets =
gtk_size_group_get_widgets (GTK_SIZE_GROUP (object))) != NULL)
{
/* copy since we are modifying an internal list */
sg_widgets = g_slist_copy (sg_widgets);
for (slist = sg_widgets; slist; slist = slist->next)
gtk_size_group_remove_widget (GTK_SIZE_GROUP (object),
GTK_WIDGET (slist->data));
g_slist_free (sg_widgets);
}
/* add new widgets */
if ((widgets = g_value_get_boxed (value)) != NULL)
{
for (list = widgets; list; list = list->next)
gtk_size_group_add_widget (GTK_SIZE_GROUP (object),
GTK_WIDGET (list->data));
}
}
else
GWA_GET_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
property_name, value);
}
开发者ID:kugel-,项目名称:glade,代码行数:35,代码来源:glade-gtk-size-group.c
示例9: glade_gtk_combo_box_text_write_widget
void
glade_gtk_combo_box_text_write_widget (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node)
{
GladeXmlNode *attrs_node;
if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
return;
/* First chain up and read in all the normal properties.. */
GWA_GET_CLASS (GTK_TYPE_COMBO_BOX)->write_widget (adaptor, widget, context, node);
attrs_node = glade_xml_node_new (context, GLADE_TAG_ITEMS);
glade_gtk_combo_box_text_write_items (widget, context, attrs_node);
if (!glade_xml_node_get_children (attrs_node))
glade_xml_node_delete (attrs_node);
else
glade_xml_node_append_child (node, attrs_node);
}
开发者ID:GNOME,项目名称:glade,代码行数:25,代码来源:glade-gtk-combo-box-text.c
示例10: glade_gtk_progress_bar_set_property
void
glade_gtk_progress_bar_set_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id, const GValue * value)
{
GladeWidget *widget = glade_widget_get_from_gobject (object);
GladeProperty *property = glade_widget_get_property (widget, id);
if (strcmp (id, "show-text") == 0)
{
if (g_value_get_boolean (value))
{
glade_widget_property_set_sensitive (widget, "text", TRUE, NULL);
glade_widget_property_set_sensitive (widget, "ellipsize", TRUE, NULL);
}
else
{
glade_widget_property_set_sensitive (widget, "text", FALSE, TEXT_DISABLED_MSG);
glade_widget_property_set_sensitive (widget, "ellipsize", FALSE, TEXT_DISABLED_MSG);
}
}
if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
开发者ID:kugel-,项目名称:glade,代码行数:25,代码来源:glade-gtk-progress-bar.c
示例11: glade_gtk_color_button_set_property
void
glade_gtk_color_button_set_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id, const GValue * value)
{
GladeProperty *property;
GladeWidget *gwidget = glade_widget_get_from_gobject (object);
if (!strcmp (id, "color"))
{
if ((property = glade_widget_get_property (gwidget, "color")) != NULL &&
glade_property_get_enabled (property) && g_value_get_boxed (value))
{
GdkColor *color = g_value_get_boxed (value);
GdkRGBA copy;
copy.red = color->red / 65535.0;
copy.green = color->green / 65535.0;
copy.blue = color->blue / 65535.0;
copy.alpha = 1.0;
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (object), ©);
}
}
else if (!strcmp (id, "rgba"))
{
if ((property = glade_widget_get_property (gwidget, "rgba")) != NULL &&
glade_property_get_enabled (property) && g_value_get_boxed (value))
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (object),
(GdkRGBA *) g_value_get_boxed (value));
}
else
GWA_GET_CLASS (GTK_TYPE_BUTTON)->set_property (adaptor, object, id, value);
}
开发者ID:kugel-,项目名称:glade,代码行数:34,代码来源:glade-gtk-button.c
示例12: glade_gtk_button_read_widget
void
glade_gtk_button_read_widget (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlNode * node)
{
GObject *object;
if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
return;
/* First chain up and read in all the normal properties.. */
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->read_widget (adaptor, widget, node);
glade_gtk_button_update_stock (widget);
/* Fold "font-name" property into the "font" propery */
object = glade_widget_get_object (widget);
if (GTK_IS_FONT_BUTTON (object))
{
gchar *font_prop_value = NULL;
glade_widget_property_get (widget, "font-name", &font_prop_value);
if (font_prop_value != NULL)
{
glade_widget_property_set (widget, "font", font_prop_value);
glade_widget_property_set (widget, "font-name", NULL);
}
}
}
开发者ID:kugel-,项目名称:glade,代码行数:30,代码来源:glade-gtk-button.c
示例13: glade_gtk_tool_palette_get_child_property
void
glade_gtk_tool_palette_get_child_property (GladeWidgetAdaptor * adaptor,
GObject * container,
GObject * child,
const gchar * property_name,
GValue * value)
{
g_return_if_fail (GTK_IS_TOOL_PALETTE (container));
if (GTK_IS_TOOL_ITEM_GROUP (child) == FALSE)
return;
if (strcmp (property_name, "position") == 0)
{
g_value_set_int (value,
gtk_tool_palette_get_group_position (GTK_TOOL_PALETTE (container),
GTK_TOOL_ITEM_GROUP (child)));
}
else
{ /* Chain Up */
GWA_GET_CLASS
(GTK_TYPE_CONTAINER)->child_get_property (adaptor,
container, child,
property_name, value);
}
}
开发者ID:metaltrrocker,项目名称:glade,代码行数:25,代码来源:glade-gtk-tool-palette.c
示例14: glade_gtk_icon_factory_string_from_value
gchar *
glade_gtk_icon_factory_string_from_value (GladeWidgetAdaptor *adaptor,
GladePropertyClass *klass,
const GValue *value)
{
GString *string;
GParamSpec *pspec;
pspec = glade_property_class_get_pspec (klass);
if (pspec->value_type == GLADE_TYPE_ICON_SOURCES)
{
GladeIconSources *sources = g_value_get_boxed (value);
if (!sources)
return g_strdup ("");
string = g_string_new ("");
g_hash_table_foreach (sources->sources, (GHFunc) serialize_icon_sources,
string);
return g_string_free (string, FALSE);
}
else
return GWA_GET_CLASS
(G_TYPE_OBJECT)->string_from_value (adaptor, klass, value);
}
开发者ID:GNOME,项目名称:glade,代码行数:26,代码来源:glade-gtk-icon-factory.c
示例15: glade_gtk_treeview_set_property
void
glade_gtk_treeview_set_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id, const GValue * value)
{
GladeWidget *widget = glade_widget_get_from_gobject (object);
GladeProperty *property = glade_widget_get_property (widget, id);
if (strcmp (id, "enable-search") == 0)
{
if (g_value_get_boolean (value))
glade_widget_property_set_sensitive (widget, "search-column", TRUE, NULL);
else
glade_widget_property_set_sensitive (widget, "search-column", FALSE, _("Search is disabled"));
}
else if (strcmp (id, "headers-visible") == 0)
{
if (g_value_get_boolean (value))
glade_widget_property_set_sensitive (widget, "headers-clickable", TRUE, NULL);
else
glade_widget_property_set_sensitive (widget, "headers-clickable", FALSE, _("Headers are invisible"));
}
else if (strcmp (id, "show-expanders") == 0)
{
if (g_value_get_boolean (value))
glade_widget_property_set_sensitive (widget, "expander-column", TRUE, NULL);
else
glade_widget_property_set_sensitive (widget, "expander-column", FALSE, _("Expanders are not shown"));
}
if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
开发者ID:kugel-,项目名称:glade,代码行数:33,代码来源:glade-gtk-tree-view.c
示例16: glade_gtk_header_bar_set_property
void
glade_gtk_header_bar_set_property (GladeWidgetAdaptor * adaptor,
GObject * object,
const gchar * id,
const GValue * value)
{
if (!strcmp (id, "use-custom-title"))
glade_gtk_header_bar_set_use_custom_title (object, g_value_get_boolean (value));
else if (!strcmp (id, "show-close-button"))
{
GladeWidget *gwidget = glade_widget_get_from_gobject (object);
/* We don't set the property to 'ignore' so that we catch this in the adaptor,
* but we also do not apply the property to the runtime object here, thus
* avoiding showing the close button which would in turn close glade itself
* when clicked.
*/
glade_widget_property_set_sensitive (gwidget, "decoration-layout",
g_value_get_boolean (value),
_("The decoration layout does not apply to header bars "
"which do no show window controls"));
}
else if (!strcmp (id, "size"))
glade_gtk_header_bar_set_size (object, value);
else
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
开发者ID:metaltrrocker,项目名称:glade,代码行数:27,代码来源:glade-gtk-header-bar.c
示例17: glade_gtk_combo_box_text_set_property
void
glade_gtk_combo_box_text_set_property (GladeWidgetAdaptor *adaptor,
GObject *object,
const gchar *id,
const GValue *value)
{
if (!strcmp (id, "glade-items"))
{
GList *string_list, *l;
GladeString *string;
gint active;
string_list = g_value_get_boxed (value);
active = gtk_combo_box_get_active (GTK_COMBO_BOX (object));
/* Update comboboxtext items */
gtk_combo_box_text_remove_all (GTK_COMBO_BOX_TEXT (object));
for (l = string_list; l; l = l->next)
{
string = l->data;
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (object), string->id, string->string);
}
gtk_combo_box_set_active (GTK_COMBO_BOX (object),
CLAMP (active, 0, g_list_length (string_list) - 1));
}
else
GWA_GET_CLASS (GTK_TYPE_COMBO_BOX)->set_property (adaptor, object, id, value);
}
开发者ID:GNOME,项目名称:glade,代码行数:32,代码来源:glade-gtk-combo-box-text.c
示例18: glade_gtk_header_bar_add_child
void
glade_gtk_header_bar_add_child (GladeWidgetAdaptor *adaptor,
GObject *parent,
GObject *child)
{
GladeWidget *gbox, *gchild;
gint size;
gchar *special_child_type;
gchild = glade_widget_get_from_gobject (child);
if (gchild)
glade_widget_set_pack_action_visible (gchild, "remove_slot", FALSE);
special_child_type = g_object_get_data (child, "special-child-type");
d(g_message ("Add %s %p (special: %s)",
GLADE_IS_PLACEHOLDER (child) ? "placeholder" : "child",
child, special_child_type));
if (special_child_type && !strcmp (special_child_type, "title"))
{
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (parent), GTK_WIDGET (child));
return;
}
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->add (adaptor, parent, child);
gbox = glade_widget_get_from_gobject (parent);
if (!glade_widget_superuser ())
{
glade_widget_property_get (gbox, "size", &size);
glade_widget_property_set (gbox, "size", size);
}
}
开发者ID:metaltrrocker,项目名称:glade,代码行数:34,代码来源:glade-gtk-header-bar.c
示例19: glade_gtk_listbox_get_child_property
void
glade_gtk_listbox_get_child_property (GladeWidgetAdaptor *adaptor,
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value)
{
g_return_if_fail (GTK_IS_LIST_BOX (container));
g_return_if_fail (GTK_IS_LIST_BOX_ROW (child));
if (strcmp (property_name, "position") == 0)
{
gint position = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (child));
g_value_set_int (value, position);
}
else
{
/* Chain Up */
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->child_get_property (adaptor,
container,
child,
property_name,
value);
}
}
开发者ID:kugel-,项目名称:glade,代码行数:25,代码来源:glade-gtk-list-box.c
示例20: glade_gtk_listbox_child_action_activate
void
glade_gtk_listbox_child_action_activate (GladeWidgetAdaptor *adaptor,
GObject *container,
GObject *object,
const gchar *action_path)
{
if (strcmp (action_path, "insert_after") == 0)
{
glade_gtk_listbox_child_insert_action (adaptor, container, object,
_("Insert Row on %s"),
TRUE);
}
else if (strcmp (action_path, "insert_before") == 0)
{
glade_gtk_listbox_child_insert_action (adaptor, container, object,
_("Insert Row on %s"),
FALSE);
}
else
{
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->child_action_activate (adaptor,
container,
object,
action_path);
}
}
开发者ID:kugel-,项目名称:glade,代码行数:26,代码来源:glade-gtk-list-box.c
注:本文中的GWA_GET_CLASS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论