some new code
[cl-gtk2.git] / gtk / gtk.icon-factory.lisp
1 (in-package :gtk)
2
3 ;; icon-source
4
5 (at-init () (foreign-funcall "gtk_icon_source_get_type" :int))
6
7 (defcfun gtk-icon-source-new :pointer)
8
9 (define-g-boxed-opaque icon-source "GtkIconSource"
10   :alloc (gtk-icon-source-new))
11
12 (export 'icon-source)
13
14 (define-boxed-opaque-accessor icon-source icon-source-filename
15   :reader "gtk_icon_source_get_filename"
16   :writer "gtk_icon_source_set_filename"
17   :type (:string :free-from-foreign nil))
18
19 (export 'icon-source-filename)
20
21 (define-boxed-opaque-accessor icon-source icon-source-icon-name
22   :reader "gtk_icon_source_get_icon_name"
23   :writer "gtk_icon_source_set_icon_name"
24   :type (:string :free-from-foreign nil))
25
26 (export 'icon-source-icon-name)
27
28 #|
29 GtkTextDirection    gtk_icon_source_get_direction       (const GtkIconSource *source);
30 gboolean            gtk_icon_source_get_direction_wildcarded
31                                                         (const GtkIconSource *source);
32 GdkPixbuf*          gtk_icon_source_get_pixbuf          (const GtkIconSource *source);
33 GtkIconSize         gtk_icon_source_get_size            (const GtkIconSource *source);
34 gboolean            gtk_icon_source_get_size_wildcarded (const GtkIconSource *source);
35 GtkStateType        gtk_icon_source_get_state           (const GtkIconSource *source);
36 gboolean            gtk_icon_source_get_state_wildcarded
37                                                         (const GtkIconSource *source);
38
39 void                gtk_icon_source_set_direction       (GtkIconSource *source,
40                                                          GtkTextDirection direction);
41 void                gtk_icon_source_set_direction_wildcarded
42                                                         (GtkIconSource *source,
43                                                          gboolean setting);
44 void                gtk_icon_source_set_pixbuf          (GtkIconSource *source,
45                                                          GdkPixbuf *pixbuf);
46 void                gtk_icon_source_set_size            (GtkIconSource *source,
47                                                          GtkIconSize size);
48 void                gtk_icon_source_set_size_wildcarded (GtkIconSource *source,
49                                                          gboolean setting);
50 void                gtk_icon_source_set_state           (GtkIconSource *source,
51                                                          GtkStateType state);
52 void                gtk_icon_source_set_state_wildcarded
53                                                         (GtkIconSource *source,
54                                                          gboolean setting);
55 |#
56
57
58 ;; icon-set
59
60 (at-init () (foreign-funcall "gtk_icon_set_get_type" :int))
61
62 (defcfun gtk-icon-set-new :pointer)
63
64 (define-g-boxed-opaque icon-set "GtkIconSet"
65   :alloc (gtk-icon-set-new))
66
67 (export 'icon-set)
68
69 (defcfun gtk-icon-set-add-source :void
70   (icon-set (g-boxed-foreign icon-set))
71   (source (g-boxed-foreign icon-source)))
72
73 (defun icon-set-add-source (icon-set icon-source)
74   (gtk-icon-set-add-source icon-set icon-source))
75
76 (export 'icon-set-add-source)
77
78 #|
79 GtkIconSet*         gtk_icon_set_new_from_pixbuf        (GdkPixbuf *pixbuf);
80 GdkPixbuf*          gtk_icon_set_render_icon            (GtkIconSet *icon_set,
81                                                          GtkStyle *style,
82                                                          GtkTextDirection direction,
83                                                          GtkStateType state,
84                                                          GtkIconSize size,
85                                                          GtkWidget *widget,
86                                                          const char *detail);
87 void                gtk_icon_set_get_sizes              (GtkIconSet *icon_set,
88                                                          GtkIconSize **sizes,
89                                                          gint *n_sizes);
90
91 gboolean            gtk_icon_size_lookup                (GtkIconSize size,
92                                                          gint *width,
93                                                          gint *height);
94 gboolean            gtk_icon_size_lookup_for_settings   (GtkSettings *settings,
95                                                          GtkIconSize size,
96                                                          gint *width,
97                                                          gint *height);
98 GtkIconSize         gtk_icon_size_register              (const gchar *name,
99                                                          gint width,
100                                                          gint height);
101 void                gtk_icon_size_register_alias        (const gchar *alias,
102                                                          GtkIconSize target);
103 GtkIconSize         gtk_icon_size_from_name             (const gchar *name);
104 const gchar*        gtk_icon_size_get_name              (GtkIconSize size);
105 |#
106
107 ;; icon-factory
108
109 (defcfun gtk-icon-factory-add :void
110   (factory (g-object icon-factory))
111   (stock-id :string)
112   (icon-set (g-boxed-foreign icon-set)))
113
114 (defun icon-factory-add (factory stock-id icon-set)
115   (gtk-icon-factory-add factory stock-id icon-set))
116
117 (export 'icon-factory-add)
118
119 (defcfun gtk-icon-factory-add-default :void
120   (factory (g-object icon-factory)))
121
122 (defun icon-factory-add-default (factory)
123   (gtk-icon-factory-add-default factory))
124
125 (export 'icon-factory-add-default)
126
127 (defcfun gtk-icon-factory-lookup (g-boxed-foreign icon-set :return)
128   (factory (g-object icon-factory))
129   (stock-id :string))
130
131 (defun icon-factory-lookup (factory stock-id)
132   (gtk-icon-factory-lookup factory stock-id))
133
134 (export 'icon-factory-lookup)
135
136 #|
137 GtkIconSet*         gtk_icon_factory_lookup_default     (const gchar *stock_id);
138 void                gtk_icon_factory_remove_default     (GtkIconFactory *factory);
139 |#
140