Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gxkstock.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __GXK_STOCK_H__
3 #define __GXK_STOCK_H__
4 
5 #include <gxk/gxkutils.hh>
6 
7 /* --- icon sizes --- */
8 #define GXK_ICON_SIZE_BUTTON (gxk_size_button)
9 #define GXK_ICON_SIZE_BIG_BUTTON (gxk_size_big_button)
10 #define GXK_ICON_SIZE_CANVAS (gxk_size_canvas)
11 #define GXK_ICON_SIZE_TOOLBAR (gxk_size_toolbar)
12 #define GXK_ICON_SIZE_MENU (gxk_size_menu)
13 #define GXK_ICON_SIZE_TABULATOR (gxk_size_tabulator)
14 #define GXK_ICON_SIZE_INFO_SIGN (gxk_size_info_sign)
15 #define GXK_ICON_SIZE_PALETTE (gxk_size_palette)
16 guint gxk_size_width (GtkIconSize icon_size);
17 guint gxk_size_height (GtkIconSize icon_size);
18 
19 
20 /* --- functions --- */
21 GtkWidget* gxk_stock_image (const gchar *stock_icon_id,
22  GtkIconSize icon_size);
23 GtkWidget* gxk_stock_button (const gchar *stock_id,
24  const gchar *label);
25 GtkWidget* gxk_stock_button_child (const gchar *stock_id,
26  const gchar *label);
27 const gchar* gxk_stock_item (const gchar *stock_id);
28 GdkPixbuf* gxk_stock_fallback_pixbuf (const gchar *stock_id);
29 GtkWidget* gxk_stock_icon_window (const gchar *stock_id);
30 
31 
32 /* --- registration --- */
33 typedef struct {
34  const gchar *stock_id;
35  const guint8 *inlined_pixbuf;
36 } GxkStockIcon;
37 typedef struct {
38  const gchar *stock_id;
39  const gchar *label;
40  const gchar *stock_fallback;
41 } GxkStockItem;
42 void gxk_stock_register_icon (const GxkStockIcon *icon);
43 void gxk_stock_register_icons (guint n_icons,
44  const GxkStockIcon *icons);
45 void gxk_stock_register_item (const GxkStockItem *item);
46 void gxk_stock_register_items (guint n_items,
47  const GxkStockItem *items);
48 
49 
50 /* --- internal --- */
51 extern GtkIconSize gxk_size_button;
52 extern GtkIconSize gxk_size_big_button;
53 extern GtkIconSize gxk_size_canvas;
54 extern GtkIconSize gxk_size_toolbar;
55 extern GtkIconSize gxk_size_menu;
56 extern GtkIconSize gxk_size_tabulator;
57 extern GtkIconSize gxk_size_info_sign;
58 extern GtkIconSize gxk_size_palette;
59 
60 
61 #endif /* __GXK_STOCK_H__ */
GtkWidget * gxk_stock_image(const gchar *stock_icon_id, GtkIconSize icon_size)
Definition: gxkstock.cc:83
guint gxk_size_height(GtkIconSize icon_size)
Definition: gxkstock.cc:65
void gxk_stock_register_icons(guint n_icons, const GxkStockIcon *icons)
Definition: gxkstock.cc:185
GtkWidget * gxk_stock_button_child(const gchar *stock_id, const gchar *label)
Definition: gxkstock.cc:132
Definition: gxkstock.hh:37
GtkWidget * gxk_stock_icon_window(const gchar *stock_id)
Definition: gxkstock.cc:353
GdkPixbuf * gxk_stock_fallback_pixbuf(const gchar *stock_id)
Definition: gxkstock.cc:283
Definition: gxkstock.hh:33
void gxk_stock_register_items(guint n_items, const GxkStockItem *items)
Definition: gxkstock.cc:243
void gxk_stock_register_item(const GxkStockItem *item)
Definition: gxkstock.cc:210
GtkWidget * gxk_stock_button(const gchar *stock_id, const gchar *label)
Definition: gxkstock.cc:104
void gxk_stock_register_icon(const GxkStockIcon *icon)
Definition: gxkstock.cc:164
guint gxk_size_width(GtkIconSize icon_size)
Definition: gxkstock.cc:51