gtk: register GtkStockItem as boxed type
This commit is contained in:
parent
1261be3bb9
commit
71e0fbadc5
3 changed files with 17 additions and 0 deletions
|
|
@ -3949,6 +3949,7 @@ gtk_statusbar_set_has_resize_grip
|
|||
#if IN_FILE(__GTK_STOCK_C__)
|
||||
gtk_stock_add
|
||||
gtk_stock_add_static
|
||||
gtk_stock_item_get_type G_GNUC_CONST
|
||||
gtk_stock_item_copy
|
||||
gtk_stock_item_free
|
||||
gtk_stock_list_ids
|
||||
|
|
|
|||
|
|
@ -308,6 +308,19 @@ gtk_stock_item_free (GtkStockItem *item)
|
|||
g_free (item);
|
||||
}
|
||||
|
||||
GType
|
||||
gtk_stock_item_get_type (void)
|
||||
{
|
||||
static GType our_type = 0;
|
||||
|
||||
if (our_type == 0)
|
||||
our_type = g_boxed_type_register_static (I_("GtkStockItem"),
|
||||
(GBoxedCopyFunc) gtk_stock_item_copy,
|
||||
(GBoxedFreeFunc) gtk_stock_item_free);
|
||||
|
||||
return our_type;
|
||||
}
|
||||
|
||||
static const GtkStockItem builtin_items [] =
|
||||
{
|
||||
/* KEEP IN SYNC with gtkiconfactory.c stock icons, when appropriate */
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_STOCK_ITEM (gtk_stock_item_get_type ())
|
||||
|
||||
typedef struct _GtkStockItem GtkStockItem;
|
||||
|
||||
struct _GtkStockItem
|
||||
|
|
@ -60,6 +62,7 @@ gboolean gtk_stock_lookup (const gchar *stock_id,
|
|||
*/
|
||||
GSList* gtk_stock_list_ids (void);
|
||||
|
||||
GType gtk_stock_item_get_type (void) G_GNUC_CONST;
|
||||
GtkStockItem *gtk_stock_item_copy (const GtkStockItem *item);
|
||||
void gtk_stock_item_free (GtkStockItem *item);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue