BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
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 G_BEGIN_DECLS
8 
9 /* --- icon sizes --- */
10 #define GXK_ICON_SIZE_BUTTON (gxk_size_button)
11 #define GXK_ICON_SIZE_BIG_BUTTON (gxk_size_big_button)
12 #define GXK_ICON_SIZE_CANVAS (gxk_size_canvas)
13 #define GXK_ICON_SIZE_TOOLBAR (gxk_size_toolbar)
14 #define GXK_ICON_SIZE_MENU (gxk_size_menu)
15 #define GXK_ICON_SIZE_TABULATOR (gxk_size_tabulator)
16 #define GXK_ICON_SIZE_INFO_SIGN (gxk_size_info_sign)
17 #define GXK_ICON_SIZE_PALETTE (gxk_size_palette)
18 guint gxk_size_width (GtkIconSize icon_size);
19 guint gxk_size_height (GtkIconSize icon_size);
20 
21 
22 /* --- functions --- */
23 GtkWidget* gxk_stock_image (const gchar *stock_icon_id,
24  GtkIconSize icon_size);
25 GtkWidget* gxk_stock_button (const gchar *stock_id,
26  const gchar *label);
27 GtkWidget* gxk_stock_button_child (const gchar *stock_id,
28  const gchar *label);
29 const gchar* gxk_stock_item (const gchar *stock_id);
30 GdkPixbuf* gxk_stock_fallback_pixbuf (const gchar *stock_id);
31 GtkWidget* gxk_stock_icon_window (const gchar *stock_id);
32 
33 
34 /* --- registration --- */
35 typedef struct {
36  const gchar *stock_id;
37  const guint8 *inlined_pixbuf;
38 } GxkStockIcon;
39 typedef struct {
40  const gchar *stock_id;
41  const gchar *label;
42  const gchar *stock_fallback;
43 } GxkStockItem;
44 void gxk_stock_register_icon (const GxkStockIcon *icon);
45 void gxk_stock_register_icons (guint n_icons,
46  const GxkStockIcon *icons);
47 void gxk_stock_register_item (const GxkStockItem *item);
48 void gxk_stock_register_items (guint n_items,
49  const GxkStockItem *items);
50 
51 
52 /* --- internal --- */
53 extern GtkIconSize gxk_size_button;
54 extern GtkIconSize gxk_size_big_button;
55 extern GtkIconSize gxk_size_canvas;
56 extern GtkIconSize gxk_size_toolbar;
57 extern GtkIconSize gxk_size_menu;
58 extern GtkIconSize gxk_size_tabulator;
59 extern GtkIconSize gxk_size_info_sign;
60 extern GtkIconSize gxk_size_palette;
61 
62 
63 G_END_DECLS
64 
65 #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:39
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:35
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