1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3
#ifndef __GLADE_WIDGET_CLASS_H__
4
#define __GLADE_WIDGET_CLASS_H__
9
GLADE_TOPLEVEL = 1 << 2,
10
GLADE_ADD_PLACEHOLDER = 1 << 3,
11
} GladeWidgetClassFlags;
13
#define GLADE_WIDGET_CLASS(gwc) ((GladeWidgetClass *) gwc)
15
#define GLADE_WIDGET_FLAGS(gw) ((GLADE_WIDGET(gw)->class)->flags)
16
#define GLADE_WIDGET_TOPLEVEL(gw) ((GLADE_WIDGET_FLAGS(gw) & GLADE_TOPLEVEL) != 0)
17
#define GLADE_WIDGET_ADD_PLACEHOLDER(gw) ((GLADE_WIDGET_FLAGS(gw) & GLADE_ADD_PLACEHOLDER) != 0)
19
#define GLADE_WIDGET_CLASS_FLAGS(gwc) ((GLADE_WIDGET_CLASS(gwc)->flags))
20
#define GLADE_WIDGET_CLASS_TOPLEVEL(gwc) ((GLADE_WIDGET_CLASS_FLAGS(gwc) & GLADE_TOPLEVEL) != 0)
21
#define GLADE_WIDGET_CLASS_ADD_PLACEHOLDER(gwc) ((GLADE_WIDGET_CLASS_FLAGS(gwc) & GLADE_ADD_PLACEHOLDER) != 0)
23
#define GLADE_WIDGET_CLASS_SET_FLAGS(gwc,flag) G_STMT_START{ (GLADE_WIDGET_CLASS_FLAGS (gwc) |= (flag)); }G_STMT_END
24
#define GLADE_WIDGET_CLASS_UNSET_FLAGS(gwc,flag) G_STMT_START{ (GLADE_WIDGET_CLASS_FLAGS (gwc) &= ~(flag)); }G_STMT_END
26
/* GladeWidgetClass contains all the information we need regarding an widget
27
* type. It is also used to store information that has been loaded to memory
28
* for that object like the icon/mask.
30
struct _GladeWidgetClass {
32
gchar *name; /* Name of the widget, for example GtkButton */
33
gchar *icon; /* Name of the icon without the prefix, for example
35
GdkPixmap *pixmap; /* The loaded pixmap for the icon of this widget type */
36
GdkBitmap *mask; /* The mask for the loaded pixmap */
37
GdkPixbuf *pixbuf; /* Temp for glade-project-view-tree. */
39
gchar *generic_name; /* Use to generate names of new widgets, for
40
* example "button" so that we generate button1,
44
gint flags; /* See GladeWidgetClassFlags above */
46
GList *properties; /* List of GladePropertyClass objects.
47
* [see glade-property.h ] this list contains
48
* properties about the widget that we are going
49
* to modify. Like "title", "label", "rows" .
50
* Each property creates an input in the propety
54
void (*placeholder_replace) (GladePlaceholder *placeholder,
59
GladeWidgetClass * glade_widget_class_new_from_name (const gchar *name);
61
const gchar * glade_widget_class_get_name (GladeWidgetClass *class);
62
gboolean glade_widget_class_has_queries (GladeWidgetClass *class);
66
#endif /* __GLADE_WIDGET_CLASS_H__ */