synopsis#include <gtk/gtk.h> gtkitemfactory; void (*gtkprintfunc) (gpointer func_data, const gchar *str); gchar* (*gtktranslatefunc) (const gchar *path, gpointer func_data); void (*gtkitemfactorycallback) (); void (*gtkitemfactorycallback1) (gpointer callback_data, guint callback_action, gtkwidget *widget); void (*gtkitemfactorycallback2) (gtkwidget *widget, gpointer callback_data, guint callback_action); gtkitemfactoryentry; gtkitemfactoryitem; gtkitemfactory* gtk_item_factory_new (gtype container_type, const gchar *path, gtkaccelgroup *accel_group); void gtk_item_factory_construct (gtkitemfactory *ifactory, gtype container_type, const gchar *path, gtkaccelgroup *accel_group); void gtk_item_factory_add_foreign (gtkwidget *accel_widget, const gchar *full_path, gtkaccelgroup *accel_group, guint keyval, gdkmodifiertype modifiers); gtkitemfactory* gtk_item_factory_from_widget (gtkwidget *widget); const gchar* gtk_item_factory_path_from_widget (gtkwidget *widget); gtkwidget* gtk_item_factory_get_item (gtkitemfactory *ifactory, const gchar *path); gtkwidget* gtk_item_factory_get_widget (gtkitemfactory *ifactory, const gchar *path); gtkwidget* gtk_item_factory_get_widget_by_action (gtkitemfactory *ifactory, guint action); gtkwidget* gtk_item_factory_get_item_by_action (gtkitemfactory *ifactory, guint action); void gtk_item_factory_create_item (gtkitemfactory *ifactory, gtkitemfactoryentry *entry, gpointer callback_data, guint callback_type); void gtk_item_factory_create_items (gtkitemfactory *ifactory, guint n_entries, gtkitemfactoryentry *entries, gpointer callback_data); void gtk_item_factory_create_items_ac (gtkitemfactory *ifactory, guint n_entries, gtkitemfactoryentry *entries, gpointer callback_data, guint callback_type); void gtk_item_factory_delete_item (gtkitemfactory *ifactory, const gchar *path); void gtk_item_factory_delete_entry (gtkitemfactory *ifactory, gtkitemfactoryentry *entry); void gtk_item_factory_delete_entries (gtkitemfactory *ifactory, guint n_entries, gtkitemfactoryentry *entries); void gtk_item_factory_popup (gtkitemfactory *ifactory, guint x, guint y, guint mouse_button, guint32 time_); void gtk_item_factory_popup_with_data (gtkitemfactory *ifactory, gpointer popup_data, gtkdestroynotify destroy, guint x, guint y, guint mouse_button, guint32 time_); gpointer gtk_item_factory_popup_data (gtkitemfactory *ifactory); gpointer gtk_item_factory_popup_data_from_widget (gtkwidget *widget); gtkitemfactory* gtk_item_factory_from_path (const gchar *path); void gtk_item_factory_create_menu_entries (guint n_entries, gtkmenuentry *entries); void gtk_item_factories_path_delete (const gchar *ifactory_path, const gchar *path); void gtk_item_factory_set_translate_func (gtkitemfactory *ifactory, gtktranslatefunc func, gpointer data, gtkdestroynotify notify); detailsgtkitemfactorytypedef struct _gtkitemfactory gtkitemfactory; warninggtkitemfactory is deprecated and should not be used in newly-written code.
gtkprintfunc ()void (*gtkprintfunc) (gpointer func_data, const gchar *str); warninggtkprintfunc is deprecated and should not be used in newly-written code.
gtktranslatefunc ()gchar* (*gtktranslatefunc) (const gchar *path, gpointer func_data); the function used to translate messages in e.g. gtkiconfactory and gtkactiongroup.
gtkitemfactorycallback ()void (*gtkitemfactorycallback) (); warninggtkitemfactorycallback is deprecated and should not be used in newly-written code.
gtkitemfactorycallback1 ()void (*gtkitemfactorycallback1) (gpointer callback_data, guint callback_action, gtkwidget *widget); warninggtkitemfactorycallback1 is deprecated and should not be used in newly-written code.
gtkitemfactorycallback2 ()void (*gtkitemfactorycallback2) (gtkwidget *widget, gpointer callback_data, guint callback_action); warninggtkitemfactorycallback2 is deprecated and should not be used in newly-written code.
gtkitemfactoryentrytypedef struct { gchar *path; gchar *accelerator; gtkitemfactorycallback callback; guint callback_action; /* possible values: * null -> "<item>" * "" -> "<item>" * "<title>" -> create a title item * "<item>" -> create a simple item * "<imageitem>" -> create an item holding an image * "<stockitem>" -> create an item holding a stock image * "<checkitem>" -> create a check item * "<toggleitem>" -> create a toggle item * "<radioitem>" -> create a radio item * <path> -> path of a radio item to link against * "<separator>" -> create a separator * "<tearoff>" -> create a tearoff separator * "<branch>" -> create an item to hold sub items * "<lastbranch>" -> create a right justified item to hold sub items */ gchar *item_type; /* extra data for some item types: * imageitem -> pointer to inlined pixbuf stream * stockitem -> name of stock item */ gconstpointer extra_data; } gtkitemfactoryentry; warninggtkitemfactoryentry is deprecated and should not be used in newly-written code.
gtkitemfactoryitemtypedef struct { gchar *path; gslist *widgets; } gtkitemfactoryitem; warninggtkitemfactoryitem is deprecated and should not be used in newly-written code.
gtk_item_factory_new ()gtkitemfactory* gtk_item_factory_new (gtype container_type, const gchar *path, gtkaccelgroup *accel_group); warninggtk_item_factory_new is deprecated and should not be used in newly-written code. creates a new gtkitemfactory. beware that the returned object does not have a floating reference.
gtk_item_factory_construct ()void gtk_item_factory_construct (gtkitemfactory *ifactory, gtype container_type, const gchar *path, gtkaccelgroup *accel_group); warninggtk_item_factory_construct is deprecated and should not be used in newly-written code. initializes an item factory.
gtk_item_factory_add_foreign ()void gtk_item_factory_add_foreign (gtkwidget *accel_widget, const gchar *full_path, gtkaccelgroup *accel_group, guint keyval, gdkmodifiertype modifiers); warninggtk_item_factory_add_foreign is deprecated and should not be used in newly-written code. the recommended api for this purpose are the functions gtk_menu_item_set_accel_path() and gtk_widget_set_accel_path(); don't use gtk_item_factory_add_foreign() in new code, since it is likely to be removed in the future. installs an accelerator for accel_widget in accel_group, that causes the ::activate signal to be emitted if the accelerator is activated. this function can be used to make widgets participate in the accel saving/restoring functionality provided by gtk_accel_map_save() and gtk_accel_map_load(), even if they haven't been created by an item factory.
gtk_item_factory_from_widget ()gtkitemfactory* gtk_item_factory_from_widget (gtkwidget *widget); warninggtk_item_factory_from_widget is deprecated and should not be used in newly-written code. obtains the item factory from which a widget was created.
gtk_item_factory_path_from_widget ()const gchar* gtk_item_factory_path_from_widget (gtkwidget *widget); warninggtk_item_factory_path_from_widget is deprecated and should not be used in newly-written code. if widget has been created by an item factory, returns the full path to it. (the full path of a widget is the concatenation of the factory path specified in gtk_item_factory_new() with the path specified in the gtkitemfactoryentry from which the widget was created.)
gtk_item_factory_get_item ()gtkwidget* gtk_item_factory_get_item (gtkitemfactory *ifactory, const gchar *path); warninggtk_item_factory_get_item is deprecated and should not be used in newly-written code. obtains the menu item which corresponds to path. if the widget corresponding to path is a menu item which opens a submenu, then the item is returned. if you are interested in the submenu, use gtk_item_factory_get_widget() instead.
gtk_item_factory_get_widget ()gtkwidget* gtk_item_factory_get_widget (gtkitemfactory *ifactory, const gchar *path); warninggtk_item_factory_get_widget is deprecated and should not be used in newly-written code. obtains the widget which corresponds to path. if the widget corresponding to path is a menu item which opens a submenu, then the submenu is returned. if you are interested in the menu item, use gtk_item_factory_get_item() instead.
gtk_item_factory_get_widget_by_action ()gtkwidget* gtk_item_factory_get_widget_by_action (gtkitemfactory *ifactory, guint action); warninggtk_item_factory_get_widget_by_action is deprecated and should not be used in newly-written code. obtains the widget which was constructed from the gtkitemfactoryentry with the given action. if there are multiple items with the same action, the result is undefined.
gtk_item_factory_get_item_by_action ()gtkwidget* gtk_item_factory_get_item_by_action (gtkitemfactory *ifactory, guint action); warninggtk_item_factory_get_item_by_action is deprecated and should not be used in newly-written code. obtains the menu item which was constructed from the first gtkitemfactoryentry with the given action.
gtk_item_factory_create_item ()void gtk_item_factory_create_item (gtkitemfactory *ifactory, gtkitemfactoryentry *entry, gpointer callback_data, guint callback_type); warninggtk_item_factory_create_item is deprecated and should not be used in newly-written code. creates an item for entry.
gtk_item_factory_create_items ()void gtk_item_factory_create_items (gtkitemfactory *ifactory, guint n_entries, gtkitemfactoryentry *entries, gpointer callback_data); warninggtk_item_factory_create_items is deprecated and should not be used in newly-written code. creates the menu items from the entries.
gtk_item_factory_create_items_ac ()void gtk_item_factory_create_items_ac (gtkitemfactory *ifactory, guint n_entries, gtkitemfactoryentry *entries, gpointer callback_data, guint callback_type); warninggtk_item_factory_create_items_ac is deprecated and should not be used in newly-written code. creates the menu items from the entries.
gtk_item_factory_delete_item ()void gtk_item_factory_delete_item (gtkitemfactory *ifactory, const gchar *path); warninggtk_item_factory_delete_item is deprecated and should not be used in newly-written code. deletes the menu item which was created for path by the given item factory.
gtk_item_factory_delete_entry ()void gtk_item_factory_delete_entry (gtkitemfactory *ifactory, gtkitemfactoryentry *entry); warninggtk_item_factory_delete_entry is deprecated and should not be used in newly-written code. deletes the menu item which was created from entry by the given item factory.
gtk_item_factory_delete_entries ()void gtk_item_factory_delete_entries (gtkitemfactory *ifactory, guint n_entries, gtkitemfactoryentry *entries); warninggtk_item_factory_delete_entries is deprecated and should not be used in newly-written code. deletes the menu items which were created from the entries by the given item factory.
gtk_item_factory_popup ()void gtk_item_factory_popup (gtkitemfactory *ifactory, guint x, guint y, guint mouse_button, guint32 time_); warninggtk_item_factory_popup is deprecated and should not be used in newly-written code. pops up the menu constructed from the item factory at (x, y). the mouse_button parameter should be the mouse button pressed to initiate the menu popup. if the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, mouse_button should be 0. the time_ parameter should be the time stamp of the event that initiated the popup. if such an event is not available, use gtk_get_current_event_time() instead. the operation of the mouse_button and the time_ parameter is the same as the button and activation_time parameters for gtk_menu_popup().
gtk_item_factory_popup_with_data ()void gtk_item_factory_popup_with_data (gtkitemfactory *ifactory, gpointer popup_data, gtkdestroynotify destroy, guint x, guint y, guint mouse_button, guint32 time_); warninggtk_item_factory_popup_with_data is deprecated and should not be used in newly-written code. pops up the menu constructed from the item factory at (x, y). callbacks can access the popup_data while the menu is posted via gtk_item_factory_popup_data() and gtk_item_factory_popup_data_from_widget(). the mouse_button parameter should be the mouse button pressed to initiate the menu popup. if the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, mouse_button should be 0. the time_ parameter should be the time stamp of the event that initiated the popup. if such an event is not available, use gtk_get_current_event_time() instead. the operation of the mouse_button and the time_ parameters is the same as the button and activation_time parameters for gtk_menu_popup().
gtk_item_factory_popup_data ()gpointer gtk_item_factory_popup_data (gtkitemfactory *ifactory); warninggtk_item_factory_popup_data is deprecated and should not be used in newly-written code. obtains the popup_data which was passed to gtk_item_factory_popup_with_data(). this data is available until the menu is popped down again.
gtk_item_factory_popup_data_from_widget ()gpointer gtk_item_factory_popup_data_from_widget (gtkwidget *widget); warninggtk_item_factory_popup_data_from_widget is deprecated and should not be used in newly-written code. obtains the popup_data which was passed to gtk_item_factory_popup_with_data(). this data is available until the menu is popped down again.
gtk_item_factory_from_path ()gtkitemfactory* gtk_item_factory_from_path (const gchar *path); warninggtk_item_factory_from_path is deprecated and should not be used in newly-written code. finds an item factory which has been constructed using the "<name>" prefix of path as the path argument for gtk_item_factory_new().
gtk_item_factory_create_menu_entries ()void gtk_item_factory_create_menu_entries (guint n_entries, gtkmenuentry *entries); warninggtk_item_factory_create_menu_entries is deprecated and should not be used in newly-written code. creates the menu items from the entries.
gtk_item_factories_path_delete ()void gtk_item_factories_path_delete (const gchar *ifactory_path, const gchar *path); warninggtk_item_factories_path_delete is deprecated and should not be used in newly-written code. deletes all widgets constructed from the specified path.
gtk_item_factory_set_translate_func ()void gtk_item_factory_set_translate_func (gtkitemfactory *ifactory, gtktranslatefunc func, gpointer data, gtkdestroynotify notify); warninggtk_item_factory_set_translate_func is deprecated and should not be used in newly-written code. sets a function to be used for translating the path elements before they are displayed.
|