Mercurial > pidgin
comparison console/libgnt/gntwidget.h @ 13878:0d0ab1e39d0a
[gaim-migrate @ 16355]
Change the behaviour of the widgets about how they update themselves.
This makes things a little better, and hopefully easier to build more
stuff on top of this.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 27 Jun 2006 02:33:55 +0000 |
parents | 0e1e59770cb0 |
children | 9d66969a2e32 |
comparison
equal
deleted
inserted
replaced
13877:765bbdf29d04 | 13878:0d0ab1e39d0a |
---|---|
15 | 15 |
16 #define GNT_WIDGET_FLAGS(obj) (GNT_WIDGET(obj)->priv.flags) | 16 #define GNT_WIDGET_FLAGS(obj) (GNT_WIDGET(obj)->priv.flags) |
17 #define GNT_WIDGET_SET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) |= flags) | 17 #define GNT_WIDGET_SET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) |= flags) |
18 #define GNT_WIDGET_UNSET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) &= ~(flags)) | 18 #define GNT_WIDGET_UNSET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) &= ~(flags)) |
19 #define GNT_WIDGET_IS_FLAG_SET(obj, flags) (GNT_WIDGET_FLAGS(obj) & (flags)) | 19 #define GNT_WIDGET_IS_FLAG_SET(obj, flags) (GNT_WIDGET_FLAGS(obj) & (flags)) |
20 #define DEBUG | 20 #define DEBUG fprintf(stderr, "%s\n", __FUNCTION__) |
21 //#define DEBUG printf("%s\n", __FUNCTION__) | |
22 | 21 |
23 typedef struct _GnWidget GntWidget; | 22 typedef struct _GnWidget GntWidget; |
24 typedef struct _GnWidgetPriv GntWidgetPriv; | 23 typedef struct _GnWidgetPriv GntWidgetPriv; |
25 typedef struct _GnWidgetClass GntWidgetClass; | 24 typedef struct _GnWidgetClass GntWidgetClass; |
26 | 25 |
27 #define N_(X) X | 26 #define N_(X) X |
28 | 27 |
29 typedef enum _GnWidgetFlags | 28 typedef enum _GnWidgetFlags |
30 { | 29 { |
31 GNT_WIDGET_DESTROYING = 1 << 0, | 30 GNT_WIDGET_DESTROYING = 1 << 0, |
32 GNT_WIDGET_CAN_TAKE_FOCUS= 1 << 1, | 31 GNT_WIDGET_CAN_TAKE_FOCUS = 1 << 1, |
33 GNT_WIDGET_MAPPED = 1 << 2, | 32 GNT_WIDGET_MAPPED = 1 << 2, |
34 /* XXX: Need to set the following two as properties, and setup a callback whenever these | 33 /* XXX: Need to set the following two as properties, and setup a callback whenever these |
35 * get chnaged. */ | 34 * get chnaged. */ |
36 GNT_WIDGET_NO_BORDER = 1 << 3, | 35 GNT_WIDGET_NO_BORDER = 1 << 3, |
37 GNT_WIDGET_NO_SHADOW = 1 << 4, | 36 GNT_WIDGET_NO_SHADOW = 1 << 4, |
38 GNT_WIDGET_HAS_FOCUS = 1 << 5 | 37 GNT_WIDGET_HAS_FOCUS = 1 << 5, |
38 GNT_WIDGET_DRAWING = 1 << 6 | |
39 } GntWidgetFlags; | 39 } GntWidgetFlags; |
40 | 40 |
41 /* XXX: I'll have to ask grim what he's using this for in guifications. */ | |
41 typedef enum _GnParamFlags | 42 typedef enum _GnParamFlags |
42 { | 43 { |
43 GNT_PARAM_SERIALIZABLE = 1 << G_PARAM_USER_SHIFT | 44 GNT_PARAM_SERIALIZABLE = 1 << G_PARAM_USER_SHIFT |
44 } GntParamFlags; | 45 } GntParamFlags; |
45 | 46 |
110 gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set); | 111 gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set); |
111 void gnt_widget_activate(GntWidget *widget); | 112 void gnt_widget_activate(GntWidget *widget); |
112 | 113 |
113 void gnt_widget_set_name(GntWidget *widget, const char *name); | 114 void gnt_widget_set_name(GntWidget *widget, const char *name); |
114 | 115 |
116 /* Widget-subclasses should call this from the draw-callback. | |
117 * Applications should just call gnt_widget_draw instead of this. */ | |
118 void gnt_widget_queue_update(GntWidget *widget); | |
119 | |
115 G_END_DECLS | 120 G_END_DECLS |
116 | 121 |
117 #endif /* GNT_WIDGET_H */ | 122 #endif /* GNT_WIDGET_H */ |