]> Pileus Git - ~andy/gtk/blob - gtk/gtkcellrendererpixbuf.c
Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
[~andy/gtk] / gtk / gtkcellrendererpixbuf.c
1 /* gtkcellrendererpixbuf.c
2  * Copyright (C) 2000  Red Hat, Inc.,  Jonathan Blandford <jrb@redhat.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #include <config.h>
21 #include <stdlib.h>
22 #include "gtkcellrendererpixbuf.h"
23 #include "gtkiconfactory.h"
24 #include "gtkintl.h"
25 #include "gtkprivate.h"
26 #include "gtkalias.h"
27
28 static void gtk_cell_renderer_pixbuf_get_property  (GObject                    *object,
29                                                     guint                       param_id,
30                                                     GValue                     *value,
31                                                     GParamSpec                 *pspec);
32 static void gtk_cell_renderer_pixbuf_set_property  (GObject                    *object,
33                                                     guint                       param_id,
34                                                     const GValue               *value,
35                                                     GParamSpec                 *pspec);
36 static void gtk_cell_renderer_pixbuf_init       (GtkCellRendererPixbuf      *celltext);
37 static void gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class);
38 static void gtk_cell_renderer_pixbuf_finalize   (GObject                    *object);
39 static void gtk_cell_renderer_pixbuf_create_stock_pixbuf (GtkCellRendererPixbuf *cellpixbuf,
40                                                           GtkWidget             *widget);
41 static void gtk_cell_renderer_pixbuf_get_size   (GtkCellRenderer            *cell,
42                                                  GtkWidget                  *widget,
43                                                  GdkRectangle               *rectangle,
44                                                  gint                       *x_offset,
45                                                  gint                       *y_offset,
46                                                  gint                       *width,
47                                                  gint                       *height);
48 static void gtk_cell_renderer_pixbuf_render     (GtkCellRenderer            *cell,
49                                                  GdkDrawable                *window,
50                                                  GtkWidget                  *widget,
51                                                  GdkRectangle               *background_area,
52                                                  GdkRectangle               *cell_area,
53                                                  GdkRectangle               *expose_area,
54                                                  GtkCellRendererState        flags);
55
56
57 enum {
58         PROP_ZERO,
59         PROP_PIXBUF,
60         PROP_PIXBUF_EXPANDER_OPEN,
61         PROP_PIXBUF_EXPANDER_CLOSED,
62         PROP_STOCK_ID,
63         PROP_STOCK_SIZE,
64         PROP_STOCK_DETAIL,
65         PROP_FOLLOW_STATE
66 };
67
68 static gpointer parent_class;
69
70
71 #define GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CELL_RENDERER_PIXBUF, GtkCellRendererPixbufPrivate))
72
73 typedef struct _GtkCellRendererPixbufPrivate GtkCellRendererPixbufPrivate;
74 struct _GtkCellRendererPixbufPrivate
75 {
76   gchar *stock_id;
77   GtkIconSize stock_size;
78   gchar *stock_detail;
79   gboolean follow_state;
80 };
81
82
83 GType
84 gtk_cell_renderer_pixbuf_get_type (void)
85 {
86   static GType cell_pixbuf_type = 0;
87
88   if (!cell_pixbuf_type)
89     {
90       static const GTypeInfo cell_pixbuf_info =
91       {
92         sizeof (GtkCellRendererPixbufClass),
93         NULL,           /* base_init */
94         NULL,           /* base_finalize */
95         (GClassInitFunc) gtk_cell_renderer_pixbuf_class_init,
96         NULL,           /* class_finalize */
97         NULL,           /* class_data */
98         sizeof (GtkCellRendererPixbuf),
99         0,              /* n_preallocs */
100         (GInstanceInitFunc) gtk_cell_renderer_pixbuf_init,
101       };
102
103       cell_pixbuf_type =
104         g_type_register_static (GTK_TYPE_CELL_RENDERER, "GtkCellRendererPixbuf",
105                                 &cell_pixbuf_info, 0);
106     }
107
108   return cell_pixbuf_type;
109 }
110
111 static void
112 gtk_cell_renderer_pixbuf_init (GtkCellRendererPixbuf *cellpixbuf)
113 {
114   GtkCellRendererPixbufPrivate *priv;
115
116   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (cellpixbuf);
117   priv->stock_size = GTK_ICON_SIZE_MENU;
118 }
119
120 static void
121 gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
122 {
123   GObjectClass *object_class = G_OBJECT_CLASS (class);
124   GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
125
126   parent_class = g_type_class_peek_parent (class);
127
128   object_class->finalize = gtk_cell_renderer_pixbuf_finalize;
129
130   object_class->get_property = gtk_cell_renderer_pixbuf_get_property;
131   object_class->set_property = gtk_cell_renderer_pixbuf_set_property;
132
133   cell_class->get_size = gtk_cell_renderer_pixbuf_get_size;
134   cell_class->render = gtk_cell_renderer_pixbuf_render;
135
136   g_object_class_install_property (object_class,
137                                    PROP_PIXBUF,
138                                    g_param_spec_object ("pixbuf",
139                                                         P_("Pixbuf Object"),
140                                                         P_("The pixbuf to render"),
141                                                         GDK_TYPE_PIXBUF,
142                                                         GTK_PARAM_READWRITE));
143
144   g_object_class_install_property (object_class,
145                                    PROP_PIXBUF_EXPANDER_OPEN,
146                                    g_param_spec_object ("pixbuf-expander-open",
147                                                         P_("Pixbuf Expander Open"),
148                                                         P_("Pixbuf for open expander"),
149                                                         GDK_TYPE_PIXBUF,
150                                                         GTK_PARAM_READWRITE));
151
152   g_object_class_install_property (object_class,
153                                    PROP_PIXBUF_EXPANDER_CLOSED,
154                                    g_param_spec_object ("pixbuf-expander-closed",
155                                                         P_("Pixbuf Expander Closed"),
156                                                         P_("Pixbuf for closed expander"),
157                                                         GDK_TYPE_PIXBUF,
158                                                         GTK_PARAM_READWRITE));
159
160   g_object_class_install_property (object_class,
161                                    PROP_STOCK_ID,
162                                    g_param_spec_string ("stock-id",
163                                                         P_("Stock ID"),
164                                                         P_("The stock ID of the stock icon to render"),
165                                                         NULL,
166                                                         GTK_PARAM_READWRITE));
167
168   g_object_class_install_property (object_class,
169                                    PROP_STOCK_SIZE,
170                                    g_param_spec_uint ("stock-size",
171                                                       P_("Size"),
172                                                       P_("The GtkIconSize value that specifies the size of the rendered icon"),
173                                                       0,
174                                                       G_MAXUINT,
175                                                       GTK_ICON_SIZE_MENU,
176                                                       GTK_PARAM_READWRITE));
177
178   g_object_class_install_property (object_class,
179                                    PROP_STOCK_DETAIL,
180                                    g_param_spec_string ("stock-detail",
181                                                         P_("Detail"),
182                                                         P_("Render detail to pass to the theme engine"),
183                                                         NULL,
184                                                         GTK_PARAM_READWRITE));
185
186   /**
187    * GtkCellRendererPixbuf:follow-state:
188    *
189    * Specifies whether the rendered pixbuf should be colorized
190    * according to the #GtkCellRendererState.
191    *
192    * Since: 2.8
193    */
194   g_object_class_install_property (object_class,
195                                    PROP_FOLLOW_STATE,
196                                    g_param_spec_boolean ("follow-state",
197                                                          P_("Follow State"),
198                                                          P_("Whether the rendered pixbuf should be "
199                                                             "colorized according to the state"),
200                                                          FALSE,
201                                                          GTK_PARAM_READWRITE));
202
203
204   g_type_class_add_private (object_class, sizeof (GtkCellRendererPixbufPrivate));
205 }
206
207 static void
208 gtk_cell_renderer_pixbuf_finalize (GObject *object)
209 {
210   GtkCellRendererPixbuf *cellpixbuf = GTK_CELL_RENDERER_PIXBUF (object);
211   GtkCellRendererPixbufPrivate *priv;
212
213   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (object);
214
215   if (cellpixbuf->pixbuf)
216     g_object_unref (cellpixbuf->pixbuf);
217
218   if (priv->stock_id)
219     g_free (priv->stock_id);
220
221   if (priv->stock_detail)
222     g_free (priv->stock_detail);
223
224   (* G_OBJECT_CLASS (parent_class)->finalize) (object);
225 }
226
227 static void
228 gtk_cell_renderer_pixbuf_get_property (GObject        *object,
229                                        guint           param_id,
230                                        GValue         *value,
231                                        GParamSpec     *pspec)
232 {
233   GtkCellRendererPixbuf *cellpixbuf = GTK_CELL_RENDERER_PIXBUF (object);
234   GtkCellRendererPixbufPrivate *priv;
235
236   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (object);
237   
238   switch (param_id)
239     {
240     case PROP_PIXBUF:
241       g_value_set_object (value,
242                           cellpixbuf->pixbuf ? G_OBJECT (cellpixbuf->pixbuf) : NULL);
243       break;
244     case PROP_PIXBUF_EXPANDER_OPEN:
245       g_value_set_object (value,
246                           cellpixbuf->pixbuf_expander_open ? G_OBJECT (cellpixbuf->pixbuf_expander_open) : NULL);
247       break;
248     case PROP_PIXBUF_EXPANDER_CLOSED:
249       g_value_set_object (value,
250                           cellpixbuf->pixbuf_expander_closed ? G_OBJECT (cellpixbuf->pixbuf_expander_closed) : NULL);
251       break;
252     case PROP_STOCK_ID:
253       g_value_set_string (value, priv->stock_id);
254       break;
255     case PROP_STOCK_SIZE:
256       g_value_set_uint (value, priv->stock_size);
257       break;
258     case PROP_STOCK_DETAIL:
259       g_value_set_string (value, priv->stock_detail);
260       break;
261     case PROP_FOLLOW_STATE:
262       g_value_set_boolean (value, priv->follow_state);
263       break;
264     default:
265       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
266       break;
267     }
268 }
269
270
271 static void
272 gtk_cell_renderer_pixbuf_set_property (GObject      *object,
273                                        guint         param_id,
274                                        const GValue *value,
275                                        GParamSpec   *pspec)
276 {
277   GdkPixbuf *pixbuf;
278   GtkCellRendererPixbuf *cellpixbuf = GTK_CELL_RENDERER_PIXBUF (object);
279   GtkCellRendererPixbufPrivate *priv;
280
281   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (object);
282   
283   switch (param_id)
284     {
285     case PROP_PIXBUF:
286       pixbuf = (GdkPixbuf*) g_value_get_object (value);
287       if (pixbuf)
288         g_object_ref (pixbuf);
289       if (cellpixbuf->pixbuf)
290         g_object_unref (cellpixbuf->pixbuf);
291       cellpixbuf->pixbuf = pixbuf;
292       break;
293     case PROP_PIXBUF_EXPANDER_OPEN:
294       pixbuf = (GdkPixbuf*) g_value_get_object (value);
295       if (pixbuf)
296         g_object_ref (pixbuf);
297       if (cellpixbuf->pixbuf_expander_open)
298         g_object_unref (cellpixbuf->pixbuf_expander_open);
299       cellpixbuf->pixbuf_expander_open = pixbuf;
300       break;
301     case PROP_PIXBUF_EXPANDER_CLOSED:
302       pixbuf = (GdkPixbuf*) g_value_get_object (value);
303       if (pixbuf)
304         g_object_ref (pixbuf);
305       if (cellpixbuf->pixbuf_expander_closed)
306         g_object_unref (cellpixbuf->pixbuf_expander_closed);
307       cellpixbuf->pixbuf_expander_closed = pixbuf;
308       break;
309     case PROP_STOCK_ID:
310       if (priv->stock_id)
311         {
312           if (cellpixbuf->pixbuf)
313             {
314               g_object_unref (cellpixbuf->pixbuf);
315               cellpixbuf->pixbuf = NULL;
316             }
317           g_free (priv->stock_id);
318         }
319       priv->stock_id = g_strdup (g_value_get_string (value));
320       break;
321     case PROP_STOCK_SIZE:
322       priv->stock_size = g_value_get_uint (value);
323       break;
324     case PROP_STOCK_DETAIL:
325       if (priv->stock_detail)
326         g_free (priv->stock_detail);
327       priv->stock_detail = g_strdup (g_value_get_string (value));
328       break;
329     case PROP_FOLLOW_STATE:
330       priv->follow_state = g_value_get_boolean (value);
331       break;
332     default:
333       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
334       break;
335     }
336
337   if (cellpixbuf->pixbuf && priv->stock_id)
338     {
339       g_object_unref (cellpixbuf->pixbuf);
340       cellpixbuf->pixbuf = NULL;
341     }
342 }
343
344 /**
345  * gtk_cell_renderer_pixbuf_new:
346  * 
347  * Creates a new #GtkCellRendererPixbuf. Adjust rendering
348  * parameters using object properties. Object properties can be set
349  * globally (with g_object_set()). Also, with #GtkTreeViewColumn, you
350  * can bind a property to a value in a #GtkTreeModel. For example, you
351  * can bind the "pixbuf" property on the cell renderer to a pixbuf value
352  * in the model, thus rendering a different image in each row of the
353  * #GtkTreeView.
354  * 
355  * Return value: the new cell renderer
356  **/
357 GtkCellRenderer *
358 gtk_cell_renderer_pixbuf_new (void)
359 {
360   return g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, NULL);
361 }
362
363 static void
364 gtk_cell_renderer_pixbuf_create_stock_pixbuf (GtkCellRendererPixbuf *cellpixbuf,
365                                               GtkWidget             *widget)
366 {
367   GtkCellRendererPixbufPrivate *priv;
368
369   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (cellpixbuf);
370
371   if (cellpixbuf->pixbuf)
372     g_object_unref (cellpixbuf->pixbuf);
373
374   cellpixbuf->pixbuf = gtk_widget_render_icon (widget,
375                                                priv->stock_id,
376                                                priv->stock_size,
377                                                priv->stock_detail);
378 }
379
380 static GdkPixbuf *
381 create_colorized_pixbuf (GdkPixbuf *src, 
382                          GdkColor  *new_color)
383 {
384   gint i, j;
385   gint width, height, has_alpha, src_row_stride, dst_row_stride;
386   gint red_value, green_value, blue_value;
387   guchar *target_pixels;
388   guchar *original_pixels;
389   guchar *pixsrc;
390   guchar *pixdest;
391   GdkPixbuf *dest;
392   
393   red_value = new_color->red / 255.0;
394   green_value = new_color->green / 255.0;
395   blue_value = new_color->blue / 255.0;
396   
397   dest = gdk_pixbuf_new (gdk_pixbuf_get_colorspace (src),
398                          gdk_pixbuf_get_has_alpha (src),
399                          gdk_pixbuf_get_bits_per_sample (src),
400                          gdk_pixbuf_get_width (src),
401                          gdk_pixbuf_get_height (src));
402   
403   has_alpha = gdk_pixbuf_get_has_alpha (src);
404   width = gdk_pixbuf_get_width (src);
405   height = gdk_pixbuf_get_height (src);
406   src_row_stride = gdk_pixbuf_get_rowstride (src);
407   dst_row_stride = gdk_pixbuf_get_rowstride (dest);
408   target_pixels = gdk_pixbuf_get_pixels (dest);
409   original_pixels = gdk_pixbuf_get_pixels (src);
410   
411   for (i = 0; i < height; i++) {
412     pixdest = target_pixels + i*dst_row_stride;
413     pixsrc = original_pixels + i*src_row_stride;
414     for (j = 0; j < width; j++) {               
415       *pixdest++ = (*pixsrc++ * red_value) >> 8;
416       *pixdest++ = (*pixsrc++ * green_value) >> 8;
417       *pixdest++ = (*pixsrc++ * blue_value) >> 8;
418       if (has_alpha) {
419         *pixdest++ = *pixsrc++;
420       }
421     }
422   }
423   return dest;
424 }
425
426
427 static void
428 gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell,
429                                    GtkWidget       *widget,
430                                    GdkRectangle    *cell_area,
431                                    gint            *x_offset,
432                                    gint            *y_offset,
433                                    gint            *width,
434                                    gint            *height)
435 {
436   GtkCellRendererPixbuf *cellpixbuf = (GtkCellRendererPixbuf *) cell;
437   GtkCellRendererPixbufPrivate *priv;
438   gint pixbuf_width  = 0;
439   gint pixbuf_height = 0;
440   gint calc_width;
441   gint calc_height;
442
443   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (cell);
444
445   if (!cellpixbuf->pixbuf && priv->stock_id)
446     gtk_cell_renderer_pixbuf_create_stock_pixbuf (cellpixbuf, widget);
447
448   if (cellpixbuf->pixbuf)
449     {
450       pixbuf_width  = gdk_pixbuf_get_width (cellpixbuf->pixbuf);
451       pixbuf_height = gdk_pixbuf_get_height (cellpixbuf->pixbuf);
452     }
453   if (cellpixbuf->pixbuf_expander_open)
454     {
455       pixbuf_width  = MAX (pixbuf_width, gdk_pixbuf_get_width (cellpixbuf->pixbuf_expander_open));
456       pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_open));
457     }
458   if (cellpixbuf->pixbuf_expander_closed)
459     {
460       pixbuf_width  = MAX (pixbuf_width, gdk_pixbuf_get_width (cellpixbuf->pixbuf_expander_closed));
461       pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed));
462     }
463   
464   calc_width  = (gint) cell->xpad * 2 + pixbuf_width;
465   calc_height = (gint) cell->ypad * 2 + pixbuf_height;
466   
467   if (x_offset) *x_offset = 0;
468   if (y_offset) *y_offset = 0;
469
470   if (cell_area && pixbuf_width > 0 && pixbuf_height > 0)
471     {
472       if (x_offset)
473         {
474           *x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
475                         1.0 - cell->xalign : cell->xalign) * 
476                        (cell_area->width - calc_width - 2 * cell->xpad));
477           *x_offset = MAX (*x_offset, 0) + cell->xpad;
478         }
479       if (y_offset)
480         {
481           *y_offset = (cell->yalign *
482                        (cell_area->height - calc_height - 2 * cell->ypad));
483           *y_offset = MAX (*y_offset, 0) + cell->ypad;
484         }
485     }
486
487   if (width)
488     *width = calc_width;
489   
490   if (height)
491     *height = calc_height;
492 }
493
494 static void
495 gtk_cell_renderer_pixbuf_render (GtkCellRenderer      *cell,
496                                  GdkWindow            *window,
497                                  GtkWidget            *widget,
498                                  GdkRectangle         *background_area,
499                                  GdkRectangle         *cell_area,
500                                  GdkRectangle         *expose_area,
501                                  GtkCellRendererState  flags)
502
503 {
504   GtkCellRendererPixbuf *cellpixbuf = (GtkCellRendererPixbuf *) cell;
505   GtkCellRendererPixbufPrivate *priv;
506   GdkPixbuf *pixbuf;
507   GdkPixbuf *invisible = NULL;
508   GdkPixbuf *colorized = NULL;
509   GdkRectangle pix_rect;
510   GdkRectangle draw_rect;
511   cairo_t *cr;
512
513   priv = GTK_CELL_RENDERER_PIXBUF_GET_PRIVATE (cell);
514
515   gtk_cell_renderer_pixbuf_get_size (cell, widget, cell_area,
516                                      &pix_rect.x,
517                                      &pix_rect.y,
518                                      &pix_rect.width,
519                                      &pix_rect.height);
520
521   pix_rect.x += cell_area->x;
522   pix_rect.y += cell_area->y;
523   pix_rect.width  -= cell->xpad * 2;
524   pix_rect.height -= cell->ypad * 2;
525
526   if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) ||
527       !gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect))
528     return;
529
530   pixbuf = cellpixbuf->pixbuf;
531
532   if (cell->is_expander)
533     {
534       if (cell->is_expanded &&
535           cellpixbuf->pixbuf_expander_open != NULL)
536         pixbuf = cellpixbuf->pixbuf_expander_open;
537       else if (!cell->is_expanded &&
538                cellpixbuf->pixbuf_expander_closed != NULL)
539         pixbuf = cellpixbuf->pixbuf_expander_closed;
540     }
541
542   if (!pixbuf)
543     return;
544
545   if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE || !cell->sensitive)
546     {
547       GtkIconSource *source;
548       
549       source = gtk_icon_source_new ();
550       gtk_icon_source_set_pixbuf (source, pixbuf);
551       /* The size here is arbitrary; since size isn't
552        * wildcarded in the source, it isn't supposed to be
553        * scaled by the engine function
554        */
555       gtk_icon_source_set_size (source, GTK_ICON_SIZE_SMALL_TOOLBAR);
556       gtk_icon_source_set_size_wildcarded (source, FALSE);
557       
558      invisible = gtk_style_render_icon (widget->style,
559                                         source,
560                                         gtk_widget_get_direction (widget),
561                                         GTK_STATE_INSENSITIVE,
562                                         /* arbitrary */
563                                         (GtkIconSize)-1,
564                                         widget,
565                                         "gtkcellrendererpixbuf");
566      
567      gtk_icon_source_free (source);
568      
569      pixbuf = invisible;
570     }
571   else if (priv->follow_state && 
572            (flags & (GTK_CELL_RENDERER_SELECTED|GTK_CELL_RENDERER_PRELIT)) != 0)
573     {
574       GtkStateType state;
575
576       if ((flags & GTK_CELL_RENDERER_SELECTED) != 0)
577         {
578           if (GTK_WIDGET_HAS_FOCUS (widget))
579             state = GTK_STATE_SELECTED;
580           else
581             state = GTK_STATE_ACTIVE;
582         }
583       else
584         state = GTK_STATE_PRELIGHT;
585
586       colorized = create_colorized_pixbuf (pixbuf,
587                                            &widget->style->base[state]);
588
589       pixbuf = colorized;
590     }
591
592   cr = gdk_cairo_create (window);
593   
594   gdk_cairo_set_source_pixbuf (cr, pixbuf, pix_rect.x, pix_rect.y);
595   gdk_cairo_rectangle (cr, &draw_rect);
596   cairo_fill (cr);
597
598   cairo_destroy (cr);
599   
600   if (invisible)
601     g_object_unref (invisible);
602
603   if (colorized)
604     g_object_unref (colorized);
605 }
606
607 #define __GTK_CELL_RENDERER_PIXBUF_C__
608 #include "gtkaliasdef.c"