Top |
void (*GtkPrintFunc) (gpointer func_data
,const gchar *str
);
GtkPrintFunc
is deprecated and should not be used in newly-written code.
void (*GtkItemFactoryCallback) ();
GtkItemFactoryCallback
is deprecated and should not be used in newly-written code.
void (*GtkItemFactoryCallback1) (gpointer callback_data
,guint callback_action
,GtkWidget *widget
);
GtkItemFactoryCallback1
is deprecated and should not be used in newly-written code.
void (*GtkItemFactoryCallback2) (GtkWidget *widget
,gpointer callback_data
,guint callback_action
);
GtkItemFactoryCallback2
is deprecated and should not be used in newly-written code.
GtkItemFactory * gtk_item_factory_new (GType container_type
,const gchar *path
,GtkAccelGroup *accel_group
);
gtk_item_factory_new
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Creates a new GtkItemFactory.
Beware that the returned object does not have a floating reference.
container_type |
the kind of menu to create; can be GTK_TYPE_MENU_BAR, GTK_TYPE_MENU or GTK_TYPE_OPTION_MENU |
|
path |
the factory path of the new item factory, a string of the form
|
|
accel_group |
a GtkAccelGroup to which the accelerators for the
menu items will be added, or |
[allow-none] |
returns |
a new GtkItemFactory |
void gtk_item_factory_construct (GtkItemFactory *ifactory
,GType container_type
,const gchar *path
,GtkAccelGroup *accel_group
);
gtk_item_factory_construct
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Initializes an item factory.
ifactory |
||
container_type |
the kind of menu to create; can be GTK_TYPE_MENU_BAR, GTK_TYPE_MENU or GTK_TYPE_OPTION_MENU |
|
path |
the factory path of |
|
accel_group |
a GtkAccelGroup to which the accelerators for the
menu items will be added, or |
void gtk_item_factory_add_foreign (GtkWidget *accel_widget
,const gchar *full_path
,GtkAccelGroup *accel_group
,guint keyval
,GdkModifierType modifiers
);
gtk_item_factory_add_foreign
has been deprecated since version 2.4 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.
GtkItemFactory *
gtk_item_factory_from_widget (GtkWidget *widget
);
gtk_item_factory_from_widget
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Obtains the item factory from which a widget was created.
const gchar *
gtk_item_factory_path_from_widget (GtkWidget *widget
);
gtk_item_factory_path_from_widget
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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.)
GtkWidget * gtk_item_factory_get_item (GtkItemFactory *ifactory
,const gchar *path
);
gtk_item_factory_get_item
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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.
GtkWidget * gtk_item_factory_get_widget (GtkItemFactory *ifactory
,const gchar *path
);
gtk_item_factory_get_widget
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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.
GtkWidget * gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory
,guint action
);
gtk_item_factory_get_widget_by_action
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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.
ifactory |
||
action |
an action as specified in the |
|
returns |
the widget which corresponds to the given action, or |
[allow-none] |
GtkWidget * gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory
,guint action
);
gtk_item_factory_get_item_by_action
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Obtains the menu item which was constructed from the first
GtkItemFactoryEntry with the given action
.
ifactory |
||
action |
an action as specified in the |
|
returns |
the menu item which corresponds to the given action, or |
[allow-none] |
void gtk_item_factory_create_item (GtkItemFactory *ifactory
,GtkItemFactoryEntry *entry
,gpointer callback_data
,guint callback_type
);
gtk_item_factory_create_item
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Creates an item for entry
.
ifactory |
||
entry |
the GtkItemFactoryEntry to create an item for |
|
callback_data |
data passed to the callback function of |
|
callback_type |
1 if the callback function of |
void gtk_item_factory_create_items (GtkItemFactory *ifactory
,guint n_entries
,GtkItemFactoryEntry *entries
,gpointer callback_data
);
gtk_item_factory_create_items
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Creates the menu items from the entries
.
ifactory |
||
n_entries |
the length of |
|
entries |
an array of GtkItemFactoryEntrys whose |
|
callback_data |
data passed to the callback functions of all entries |
void gtk_item_factory_create_items_ac (GtkItemFactory *ifactory
,guint n_entries
,GtkItemFactoryEntry *entries
,gpointer callback_data
,guint callback_type
);
gtk_item_factory_create_items_ac
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Creates the menu items from the entries
.
ifactory |
||
n_entries |
the length of |
|
entries |
an array of GtkItemFactoryEntrys |
|
callback_data |
data passed to the callback functions of all entries |
|
callback_type |
1 if the callback functions in |
void gtk_item_factory_delete_item (GtkItemFactory *ifactory
,const gchar *path
);
gtk_item_factory_delete_item
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Deletes the menu item which was created for path
by the given
item factory.
void gtk_item_factory_delete_entry (GtkItemFactory *ifactory
,GtkItemFactoryEntry *entry
);
gtk_item_factory_delete_entry
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Deletes the menu item which was created from entry
by the given
item factory.
void gtk_item_factory_delete_entries (GtkItemFactory *ifactory
,guint n_entries
,GtkItemFactoryEntry *entries
);
gtk_item_factory_delete_entries
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Deletes the menu items which were created from the entries
by the given
item factory.
void gtk_item_factory_popup (GtkItemFactory *ifactory
,guint x
,guint y
,guint mouse_button
,guint32 time_
);
gtk_item_factory_popup
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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()
.
ifactory |
a GtkItemFactory of type GTK_TYPE_MENU (see |
|
x |
the x position |
|
y |
the y position |
|
mouse_button |
the mouse button which was pressed to initiate the popup |
|
time_ |
the time at which the activation event occurred |
void gtk_item_factory_popup_with_data (GtkItemFactory *ifactory
,gpointer popup_data
,GDestroyNotify destroy
,guint x
,guint y
,guint mouse_button
,guint32 time_
);
gtk_item_factory_popup_with_data
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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()
.
ifactory |
a GtkItemFactory of type GTK_TYPE_MENU (see |
|
popup_data |
data available for callbacks while the menu is posted |
|
destroy |
a GDestroyNotify function to be called on |
|
x |
the x position |
|
y |
the y position |
|
mouse_button |
the mouse button which was pressed to initiate the popup |
|
time_ |
the time at which the activation event occurred |
gpointer
gtk_item_factory_popup_data (GtkItemFactory *ifactory
);
gtk_item_factory_popup_data
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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.
gpointer
gtk_item_factory_popup_data_from_widget
(GtkWidget *widget
);
gtk_item_factory_popup_data_from_widget
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
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.
GtkItemFactory *
gtk_item_factory_from_path (const gchar *path
);
gtk_item_factory_from_path
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Finds an item factory which has been constructed using the
"<name>"
prefix of path
as the path
argument
for gtk_item_factory_new()
.
path |
a string starting with a factory path of the form
|
|
returns |
the GtkItemFactory created for the given factory path, or |
[allow-none] |
void gtk_item_factory_create_menu_entries (guint n_entries
,GtkMenuEntry *entries
);
gtk_item_factory_create_menu_entries
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Creates the menu items from the entries
.
void gtk_item_factories_path_delete (const gchar *ifactory_path
,const gchar *path
);
gtk_item_factories_path_delete
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Deletes all widgets constructed from the specified path.
void gtk_item_factory_set_translate_func (GtkItemFactory *ifactory
,GtkTranslateFunc func
,gpointer data
,GDestroyNotify notify
);
gtk_item_factory_set_translate_func
has been deprecated since version 2.4 and should not be used in newly-written code.
Use GtkUIManager instead.
Sets a function to be used for translating the path elements before they are displayed.
ifactory |
||
func |
the GtkTranslateFunc function to be used to translate path elements |
|
data |
data to pass to |
|
notify |
a GDestroyNotify function to be called when |
struct GtkItemFactory;
GtkItemFactory
is deprecated and should not be used in newly-written code.
struct GtkItemFactoryEntry { 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
is deprecated and should not be used in newly-written code.