pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

gntwidget.c
Go to the documentation of this file.
1 
23 /* Stuff brutally ripped from Gflib */
24 
25 #include "gntinternal.h"
26 #include "gntwidget.h"
27 #include "gntstyle.h"
28 #include "gntmarshal.h"
29 #include "gntutils.h"
30 #include "gnt.h"
31 
32 enum
33 {
50 };
51 
52 static GObjectClass *parent_class = NULL;
53 static guint signals[SIGS] = { 0 };
54 
55 static void init_widget(GntWidget *widget);
56 
57 static void
58 gnt_widget_init(GTypeInstance *instance, gpointer class)
59 {
60  GntWidget *widget = GNT_WIDGET(instance);
61  widget->priv.name = NULL;
62  GNTDEBUG;
63 }
64 
65 static void
67 {
68  /* Get some default size for the widget */
69  GNTDEBUG;
70  g_signal_emit(widget, signals[SIG_MAP], 0);
72 }
73 
74 static void
76 {
77  GntWidget *self = GNT_WIDGET(obj);
78  g_signal_emit(self, signals[SIG_DESTROY], 0);
79  parent_class->dispose(obj);
80  GNTDEBUG;
81 }
82 
83 static void
85 {
88 }
89 
90 static gboolean
92 {
93  gboolean shadow;
94  if (width < widget->priv.minw || height < widget->priv.minh)
95  return FALSE;
96  shadow = gnt_widget_has_shadow(widget);
97  if (widget->priv.width + shadow != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X))
98  return FALSE;
99  if (widget->priv.height + shadow != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y))
100  return FALSE;
101  return TRUE;
102 }
103 
104 static gboolean
106 {
107  gboolean ret = FALSE;
108  g_signal_emit(bind, signals[SIG_CONTEXT_MENU], 0, &ret);
109  return ret;
110 }
111 
112 static void
114 {
115  GObjectClass *obj_class = G_OBJECT_CLASS(klass);
116 
117  parent_class = g_type_class_peek_parent(klass);
118 
119  obj_class->dispose = gnt_widget_dispose;
120 
121  klass->destroy = gnt_widget_destroy;
122  klass->show = gnt_widget_show;
123  klass->draw = gnt_widget_draw;
124  klass->expose = gnt_widget_expose;
125  klass->map = gnt_widget_map;
126  klass->lost_focus = gnt_widget_focus_change;
127  klass->gained_focus = gnt_widget_focus_change;
128  klass->confirm_size = gnt_widget_dummy_confirm_size;
129 
130  klass->key_pressed = NULL;
131  klass->activate = NULL;
132  klass->clicked = NULL;
133 
135  g_signal_new("destroy",
136  G_TYPE_FROM_CLASS(klass),
137  G_SIGNAL_RUN_LAST,
138  G_STRUCT_OFFSET(GntWidgetClass, destroy),
139  NULL, NULL,
140  g_cclosure_marshal_VOID__VOID,
141  G_TYPE_NONE, 0);
143  g_signal_new("gained-focus",
144  G_TYPE_FROM_CLASS(klass),
145  G_SIGNAL_RUN_LAST,
146  G_STRUCT_OFFSET(GntWidgetClass, gained_focus),
147  NULL, NULL,
148  g_cclosure_marshal_VOID__VOID,
149  G_TYPE_NONE, 0);
151  g_signal_new("lost-focus",
152  G_TYPE_FROM_CLASS(klass),
153  G_SIGNAL_RUN_LAST,
154  G_STRUCT_OFFSET(GntWidgetClass, lost_focus),
155  NULL, NULL,
156  g_cclosure_marshal_VOID__VOID,
157  G_TYPE_NONE, 0);
159  g_signal_new("activate",
160  G_TYPE_FROM_CLASS(klass),
161  G_SIGNAL_RUN_LAST,
162  G_STRUCT_OFFSET(GntWidgetClass, activate),
163  NULL, NULL,
164  g_cclosure_marshal_VOID__VOID,
165  G_TYPE_NONE, 0);
166  signals[SIG_MAP] =
167  g_signal_new("map",
168  G_TYPE_FROM_CLASS(klass),
169  G_SIGNAL_RUN_LAST,
170  G_STRUCT_OFFSET(GntWidgetClass, map),
171  NULL, NULL,
172  g_cclosure_marshal_VOID__VOID,
173  G_TYPE_NONE, 0);
174  signals[SIG_DRAW] =
175  g_signal_new("draw",
176  G_TYPE_FROM_CLASS(klass),
177  G_SIGNAL_RUN_LAST,
178  G_STRUCT_OFFSET(GntWidgetClass, draw),
179  NULL, NULL,
180  g_cclosure_marshal_VOID__VOID,
181  G_TYPE_NONE, 0);
182  signals[SIG_HIDE] =
183  g_signal_new("hide",
184  G_TYPE_FROM_CLASS(klass),
185  G_SIGNAL_RUN_LAST,
186  G_STRUCT_OFFSET(GntWidgetClass, hide),
187  NULL, NULL,
188  g_cclosure_marshal_VOID__VOID,
189  G_TYPE_NONE, 0);
191  g_signal_new("expose",
192  G_TYPE_FROM_CLASS(klass),
193  G_SIGNAL_RUN_LAST,
194  G_STRUCT_OFFSET(GntWidgetClass, expose),
195  NULL, NULL,
197  G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
199  g_signal_new("position-set",
200  G_TYPE_FROM_CLASS(klass),
201  G_SIGNAL_RUN_LAST,
202  G_STRUCT_OFFSET(GntWidgetClass, set_position),
203  NULL, NULL,
205  G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
207  g_signal_new("size_request",
208  G_TYPE_FROM_CLASS(klass),
209  G_SIGNAL_RUN_LAST,
210  G_STRUCT_OFFSET(GntWidgetClass, size_request),
211  NULL, NULL,
212  g_cclosure_marshal_VOID__VOID,
213  G_TYPE_NONE, 0);
215  g_signal_new("size_changed",
216  G_TYPE_FROM_CLASS(klass),
217  G_SIGNAL_RUN_LAST,
218  G_STRUCT_OFFSET(GntWidgetClass, size_changed),
219  NULL, NULL,
221  G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
223  g_signal_new("confirm_size",
224  G_TYPE_FROM_CLASS(klass),
225  G_SIGNAL_RUN_LAST,
226  G_STRUCT_OFFSET(GntWidgetClass, confirm_size),
227  NULL, NULL,
229  G_TYPE_BOOLEAN, 2, G_TYPE_INT, G_TYPE_INT);
231  g_signal_new("key_pressed",
232  G_TYPE_FROM_CLASS(klass),
233  G_SIGNAL_RUN_LAST,
234  G_STRUCT_OFFSET(GntWidgetClass, key_pressed),
237  G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
238 
240  g_signal_new("clicked",
241  G_TYPE_FROM_CLASS(klass),
242  G_SIGNAL_RUN_LAST,
243  G_STRUCT_OFFSET(GntWidgetClass, clicked),
246  G_TYPE_BOOLEAN, 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
247 
249  g_signal_new("context-menu",
250  G_TYPE_FROM_CLASS(klass),
251  G_SIGNAL_RUN_LAST,
252  0,
255  G_TYPE_BOOLEAN, 0);
256 
257  /* This is relevant for all widgets */
262 
263  gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass));
264  GNTDEBUG;
265 }
266 
267 /******************************************************************************
268  * GntWidget API
269  *****************************************************************************/
270 GType
272 {
273  static GType type = 0;
274 
275  if(type == 0) {
276  static const GTypeInfo info = {
277  sizeof(GntWidgetClass),
278  NULL, /* base_init */
279  NULL, /* base_finalize */
280  (GClassInitFunc)gnt_widget_class_init,
281  NULL,
282  NULL, /* class_data */
283  sizeof(GntWidget),
284  0, /* n_preallocs */
285  gnt_widget_init, /* instance_init */
286  NULL /* value_table */
287  };
288 
289  type = g_type_register_static(GNT_TYPE_BINDABLE,
290  "GntWidget",
291  &info, G_TYPE_FLAG_ABSTRACT);
292  }
293 
294  return type;
295 }
296 
297 void gnt_widget_set_take_focus(GntWidget *widget, gboolean can)
298 {
299  if (can)
301  else
303 }
304 
312 void
314 {
315  g_return_if_fail(GNT_IS_WIDGET(obj));
316 
320  delwin(obj->window);
321  g_object_run_dispose(G_OBJECT(obj));
322  }
323  GNTDEBUG;
324 }
325 
326 void
328 {
329  g_return_if_fail(widget != NULL);
330 
333 }
334 
335 void
337 {
338  /* Draw the widget */
340  return;
341 
345  }
346 
347  if (widget->window == NULL)
348  {
349 #if 0
350  int x, y, maxx, maxy, w, h;
351  int oldw, oldh;
352  gboolean shadow = TRUE;
353 
355  shadow = FALSE;
356 
357  x = widget->priv.x;
358  y = widget->priv.y;
359  w = oldw = widget->priv.width + shadow;
360  h = oldh = widget->priv.height + shadow;
361 
362  getmaxyx(stdscr, maxy, maxx);
363  maxy -= 1; /* room for the taskbar */
364 
365  x = MAX(0, x);
366  y = MAX(0, y);
367  if (x + w >= maxx)
368  x = MAX(0, maxx - w);
369  if (y + h >= maxy)
370  y = MAX(0, maxy - h);
371 
372  w = MIN(w, maxx);
373  h = MIN(h, maxy);
374 
375  widget->priv.x = x;
376  widget->priv.y = y;
377  if (w != oldw || h != oldh) {
378  widget->priv.width = w - shadow;
379  widget->priv.height = h - shadow;
380  g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh);
381  }
382 #else
383  widget->window = newpad(widget->priv.height + 20, widget->priv.width + 20); /* XXX: */
384 #endif
386  }
387 
388  g_signal_emit(widget, signals[SIG_DRAW], 0);
391 }
392 
393 gboolean
395 {
396  gboolean ret;
398  return FALSE;
399 
402  return TRUE;
403 
405  g_signal_emit(widget, signals[SIG_KEY_PRESSED], 0, keys, &ret);
406  return ret;
407 }
408 
409 gboolean
410 gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y)
411 {
412  gboolean ret;
413  g_signal_emit(widget, signals[SIG_CLICKED], 0, event, x, y, &ret);
414  if (!ret && event == GNT_RIGHT_MOUSE_DOWN)
416  return ret;
417 }
418 
419 void
420 gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height)
421 {
422  g_signal_emit(widget, signals[SIG_EXPOSE], 0, x, y, width, height);
423 }
424 
425 void
427 {
428  g_signal_emit(widget, signals[SIG_HIDE], 0);
429  wbkgdset(widget->window, '\0' | gnt_color_pair(GNT_COLOR_NORMAL));
430 #if 0
431  /* XXX: I have no clue why, but this seemed to be necessary. */
433  mvwvline(widget->window, 1, widget->priv.width, ' ', widget->priv.height);
434 #endif
438 }
439 
440 void
441 gnt_widget_set_position(GntWidget *wid, int x, int y)
442 {
443  g_signal_emit(wid, signals[SIG_POSITION], 0, x, y);
444  /* XXX: Need to install properties for these and g_object_notify */
445  wid->priv.x = x;
446  wid->priv.y = y;
447 }
448 
449 void
450 gnt_widget_get_position(GntWidget *wid, int *x, int *y)
451 {
452  if (x)
453  *x = wid->priv.x;
454  if (y)
455  *y = wid->priv.y;
456 }
457 
458 void
460 {
461  g_signal_emit(widget, signals[SIG_SIZE_REQUEST], 0);
462 }
463 
464 void
465 gnt_widget_get_size(GntWidget *wid, int *width, int *height)
466 {
467  gboolean shadow = TRUE;
468  if (!gnt_widget_has_shadow(wid))
469  shadow = FALSE;
470 
471  if (width)
472  *width = wid->priv.width + shadow;
473  if (height)
474  *height = wid->priv.height + shadow;
475 }
476 
477 static void
479 {
480  gboolean shadow = TRUE;
481 
483  shadow = FALSE;
484 
485  wbkgd(widget->window, gnt_color_pair(GNT_COLOR_NORMAL));
486  werase(widget->window);
487 
489  {
490  /* - This is ugly. */
491  /* - What's your point? */
492  mvwvline(widget->window, 0, 0, ACS_VLINE | gnt_color_pair(GNT_COLOR_NORMAL), widget->priv.height);
493  mvwvline(widget->window, 0, widget->priv.width - 1,
494  ACS_VLINE | gnt_color_pair(GNT_COLOR_NORMAL), widget->priv.height);
495  mvwhline(widget->window, widget->priv.height - 1, 0,
496  ACS_HLINE | gnt_color_pair(GNT_COLOR_NORMAL), widget->priv.width);
497  mvwhline(widget->window, 0, 0, ACS_HLINE | gnt_color_pair(GNT_COLOR_NORMAL), widget->priv.width);
498  mvwaddch(widget->window, 0, 0, ACS_ULCORNER | gnt_color_pair(GNT_COLOR_NORMAL));
499  mvwaddch(widget->window, 0, widget->priv.width - 1,
500  ACS_URCORNER | gnt_color_pair(GNT_COLOR_NORMAL));
501  mvwaddch(widget->window, widget->priv.height - 1, 0,
502  ACS_LLCORNER | gnt_color_pair(GNT_COLOR_NORMAL));
503  mvwaddch(widget->window, widget->priv.height - 1, widget->priv.width - 1,
504  ACS_LRCORNER | gnt_color_pair(GNT_COLOR_NORMAL));
505  }
506 
507  if (shadow)
508  {
509  wbkgdset(widget->window, '\0' | gnt_color_pair(GNT_COLOR_SHADOW));
510  mvwvline(widget->window, 1, widget->priv.width, ' ', widget->priv.height);
511  mvwhline(widget->window, widget->priv.height, 1, ' ', widget->priv.width);
512  }
513 }
514 
515 gboolean
516 gnt_widget_set_size(GntWidget *widget, int width, int height)
517 {
518  gboolean ret = TRUE;
519 
521  {
522  width--;
523  height--;
524  }
525  if (width <= 0)
526  width = widget->priv.width;
527  if (height <= 0)
528  height = widget->priv.height;
529 
531  {
532  ret = gnt_widget_confirm_size(widget, width, height);
533  }
534 
535  if (ret)
536  {
537  gboolean shadow = TRUE;
538  int oldw, oldh;
539 
541  shadow = FALSE;
542 
543  oldw = widget->priv.width;
544  oldh = widget->priv.height;
545 
546  widget->priv.width = width;
547  widget->priv.height = height;
548  if (width + shadow >= getmaxx(widget->window) || height + shadow >= getmaxy(widget->window)) {
549  delwin(widget->window);
550  widget->window = newpad(height + 20, width + 20);
551  }
552 
553  g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh);
554 
555  if (widget->window)
556  {
558  }
561  else
563  }
564 
565  return ret;
566 }
567 
568 gboolean
570 {
572  return FALSE;
573 
575  {
577  g_signal_emit(widget, signals[SIG_GIVE_FOCUS], 0);
578  }
580  {
582  g_signal_emit(widget, signals[SIG_LOST_FOCUS], 0);
583  }
584  else
585  return FALSE;
586 
587  return TRUE;
588 }
589 
590 void gnt_widget_set_name(GntWidget *widget, const char *name)
591 {
592  g_free(widget->priv.name);
593  widget->priv.name = g_strdup(name);
594 }
595 
597 {
598  return widget->priv.name;
599 }
600 
602 {
603  g_signal_emit(widget, signals[SIG_ACTIVATE], 0);
604 }
605 
606 static gboolean
607 update_queue_callback(gpointer data)
608 {
610 
611  if (!g_object_get_data(G_OBJECT(widget), "gnt:queue_update"))
612  return FALSE;
615  g_object_set_data(G_OBJECT(widget), "gnt:queue_update", NULL);
616  return FALSE;
617 }
618 
620 {
621  if (widget->window == NULL)
622  return;
623  while (widget->parent)
624  widget = widget->parent;
625 
626  if (!g_object_get_data(G_OBJECT(widget), "gnt:queue_update"))
627  {
628  int id = g_timeout_add(0, update_queue_callback, widget);
629  g_object_set_data_full(G_OBJECT(widget), "gnt:queue_update", GINT_TO_POINTER(id),
630  (GDestroyNotify)g_source_remove);
631  }
632 }
633 
634 gboolean gnt_widget_confirm_size(GntWidget *widget, int width, int height)
635 {
636  gboolean ret = FALSE;
637  g_signal_emit(widget, signals[SIG_CONFIRM_SIZE], 0, width, height, &ret);
638  return ret;
639 }
640 
642 {
643  if (set)
645  else
647 }
648 
650 {
653 }
654 
gnt_widget_set_size
gboolean gnt_widget_set_size(GntWidget *widget, int width, int height)
Definition: gntwidget.c:515
info
static PurplePluginInfo info
Definition: gntclipboard.c:147
GNT_WIDGET_NO_BORDER
Definition: gntwidget.h:59
gnt_widget_dispose
static void gnt_widget_dispose(GObject *obj)
Definition: gntwidget.c:75
name
char * name
Definition: gntbindable.c:47
_GntWidgetPriv::width
int width
Definition: gntwidget.h:91
SIG_ACTIVATE
Definition: gntwidget.c:41
GNT_WIDGET_FLAGS
#define GNT_WIDGET_FLAGS(obj)
Definition: gntwidget.h:43
SIG_EXPOSE
Definition: gntwidget.c:42
GNT_WIDGET_GROW_X
Definition: gntwidget.h:64
GNT_RIGHT_MOUSE_DOWN
Definition: gntwidget.h:75
GNT_KEY_POPUP
#define GNT_KEY_POPUP
Definition: gntkeys.h:45
gnt_widget_get_size
void gnt_widget_get_size(GntWidget *wid, int *width, int *height)
Definition: gntwidget.c:464
gnt_widget_key_pressed
gboolean gnt_widget_key_pressed(GntWidget *widget, const char *keys)
Definition: gntwidget.c:393
GntMouseEvent
enum _GntMouseEvent GntMouseEvent
GNT_KEY_F11
#define GNT_KEY_F11
Definition: gntkeys.h:103
gnt_widget_show
void gnt_widget_show(GntWidget *widget)
Definition: gntwidget.c:326
SIG_MAP
Definition: gntwidget.c:40
GNT_WIDGET_DISABLE_ACTIONS
Definition: gntwidget.h:68
_GntWidgetPriv::x
int x
Definition: gntwidget.h:90
set
static void set(PurpleDesktopItem *item, const char *key, const char *value)
Definition: desktopitem.c:206
widget
GtkWidget * widget
Definition: pidgintooltip.c:38
_GntWidget
Definition: gntwidget.h:98
gnt.h
gnt_widget_set_take_focus
void gnt_widget_set_take_focus(GntWidget *widget, gboolean can)
Definition: gntwidget.c:296
SIG_SIZE_REQUEST
Definition: gntwidget.c:43
gnt_bindable_perform_action_named
gboolean gnt_bindable_perform_action_named(GntBindable *bindable, const char *name,...)
Definition: gntbindable.c:310
gntutils.h
GNT_WIDGET_MAPPED
Definition: gntwidget.h:56
gnt_widget_init
static void gnt_widget_init(GTypeInstance *instance, gpointer class)
Definition: gntwidget.c:58
gnt_screen_occupy
void gnt_screen_occupy(GntWidget *widget)
Definition: gntmain.c:556
gnt_widget_has_shadow
gboolean gnt_widget_has_shadow(GntWidget *widget)
Definition: gntwidget.c:648
SIG_KEY_PRESSED
Definition: gntwidget.c:39
gnt_bindable_remap_keys
const char * gnt_bindable_remap_keys(GntBindable *bindable, const char *text)
Definition: gntbindable.c:289
GNT_WIDGET_IS_FLAG_SET
#define GNT_WIDGET_IS_FLAG_SET(obj, flags)
Definition: gntwidget.h:46
gnt_closure_marshal_BOOLEAN__VOID
void gnt_closure_marshal_BOOLEAN__VOID(GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
Definition: gntmarshal.c:53
GNT_WIDGET_INVISIBLE
Definition: gntwidget.h:66
gnt_widget_focus_change
static void gnt_widget_focus_change(GntWidget *widget)
Definition: gntwidget.c:84
keys
char * keys
Definition: gntbindable.c:45
GNT_COLOR_SHADOW
Definition: gntcolors.h:45
gnt_bindable_register_binding
void gnt_bindable_register_binding(GntBindableClass *klass, const char *name, const char *trigger,...)
Definition: gntbindable.c:380
GNTDEBUG
#define GNTDEBUG
Definition: gntbindable.h:42
gnt_widget_set_position
void gnt_widget_set_position(GntWidget *wid, int x, int y)
Definition: gntwidget.c:440
gntinternal.h
SIGS
Definition: gntwidget.c:49
gnt_widget_set_name
void gnt_widget_set_name(GntWidget *widget, const char *name)
Definition: gntwidget.c:589
bind
#define bind(socket, addr, length)
Definition: libc_interface.h:62
GNT_WIDGET_DESTROYING
Definition: gntwidget.h:54
klass
GntBindableClass * klass
Definition: gntbindable.c:46
data
gpointer data
Definition: gntwm.c:1781
GntWidgetClass
struct _GntWidgetClass GntWidgetClass
Definition: gntwidget.h:50
GntWidget
struct _GntWidget GntWidget
Definition: gntwidget.h:48
GNT_WIDGET_HAS_FOCUS
Definition: gntwidget.h:61
context_menu
static gboolean context_menu(GntBindable *bind, GList *null)
Definition: gntwidget.c:105
gnt_widget_get_name
const char * gnt_widget_get_name(GntWidget *widget)
Definition: gntwidget.c:595
gntmarshal.h
NULL
#define NULL
Definition: getopt1.c:52
GNT_KEY_CTRL_X
#define GNT_KEY_CTRL_X
Definition: gntkeys.h:90
gnt_bindable_perform_action_key
gboolean gnt_bindable_perform_action_key(GntBindable *bindable, const char *keys)
Definition: gntbindable.c:331
SIG_CONFIRM_SIZE
Definition: gntwidget.c:44
GNT_WIDGET_UNSET_FLAGS
#define GNT_WIDGET_UNSET_FLAGS(obj, flags)
Definition: gntwidget.h:45
GNT_COLOR_NORMAL
Definition: gntcolors.h:37
GNT_STYLE_SHADOW
Definition: gntstyle.h:32
signals
static guint signals[SIGS]
Definition: gntwidget.c:53
gnt_widget_activate
void gnt_widget_activate(GntWidget *widget)
Definition: gntwidget.c:600
GNT_WIDGET_SET_FLAGS
#define GNT_WIDGET_SET_FLAGS(obj, flags)
Definition: gntwidget.h:44
gnt_widget_size_request
void gnt_widget_size_request(GntWidget *widget)
Definition: gntwidget.c:458
gnt_closure_marshal_BOOLEAN__INT_INT_INT
void gnt_closure_marshal_BOOLEAN__INT_INT_INT(GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
Definition: gntmarshal.c:285
gnt_widget_queue_update
void gnt_widget_queue_update(GntWidget *widget)
Definition: gntwidget.c:618
SIG_SIZE_CHANGED
Definition: gntwidget.c:45
GNT_WIDGET
#define GNT_WIDGET(obj)
Definition: gntwidget.h:37
SIG_CLICKED
Definition: gntwidget.c:47
gnt_widget_get_position
void gnt_widget_get_position(GntWidget *wid, int *x, int *y)
Definition: gntwidget.c:449
gnt_closure_marshal_BOOLEAN__STRING
void gnt_closure_marshal_BOOLEAN__STRING(GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
Definition: gntmarshal.c:90
TRUE
#define TRUE
Definition: protobuf-c.c:56
SIG_POSITION
Definition: gntwidget.c:46
dbus-analyze-signals.type
string type
Definition: dbus-analyze-signals.py:42
SIG_GIVE_FOCUS
Definition: gntwidget.c:37
FALSE
#define FALSE
Definition: protobuf-c.c:57
init_widget
static void init_widget(GntWidget *widget)
Definition: gntwidget.c:477
GNT_WIDGET_GROW_Y
Definition: gntwidget.h:65
gnt_widget_confirm_size
gboolean gnt_widget_confirm_size(GntWidget *widget, int width, int height)
Definition: gntwidget.c:633
GNT_TYPE_BINDABLE
#define GNT_TYPE_BINDABLE
Definition: gntbindable.h:35
gnt_screen_update
void gnt_screen_update(GntWidget *widget)
Definition: gntmain.c:567
gnt_screen_release
void gnt_screen_release(GntWidget *widget)
Definition: gntmain.c:561
SIG_CONTEXT_MENU
Definition: gntwidget.c:48
_GntWidgetClass
Definition: gntwidget.h:113
gntwidget.h
gnt_style_read_actions
void gnt_style_read_actions(GType type, GntBindableClass *klass)
Definition: gntstyle.c:217
SIG_HIDE
Definition: gntwidget.c:36
SIG_DRAW
Definition: gntwidget.c:35
gnt_widget_get_gtype
GType gnt_widget_get_gtype(void)
Definition: gntwidget.c:270
gntstyle.h
SIG_LOST_FOCUS
Definition: gntwidget.c:38
GNT_WIDGET_CAN_TAKE_FOCUS
Definition: gntwidget.h:55
gnt_closure_marshal_VOID__INT_INT_INT_INT
void gnt_closure_marshal_VOID__INT_INT_INT_INT(GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
Definition: gntmarshal.c:129
gnt_color_pair
int gnt_color_pair(int pair)
Definition: gntcolors.c:298
key_pressed
static gboolean key_pressed(GntWidget *widget, const char *text, FinchBlist *ggblist)
Definition: gntblist.c:1938
_GntWidgetPriv::y
int y
Definition: gntwidget.h:90
gnt_widget_destroy
void gnt_widget_destroy(GntWidget *obj)
Definition: gntwidget.c:312
gnt_widget_set_focus
gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set)
Definition: gntwidget.c:568
gnt_widget_draw
void gnt_widget_draw(GntWidget *widget)
Definition: gntwidget.c:335
gnt_closure_marshal_BOOLEAN__INT_INT
void gnt_closure_marshal_BOOLEAN__INT_INT(GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
Definition: gntmarshal.c:244
pietray.obj
obj
Definition: pietray.py:29
gnt_widget_dummy_confirm_size
static gboolean gnt_widget_dummy_confirm_size(GntWidget *widget, int width, int height)
Definition: gntwidget.c:91
gnt_widget_set_visible
void gnt_widget_set_visible(GntWidget *widget, gboolean set)
Definition: gntwidget.c:640
gnt_widget_class_init
static void gnt_widget_class_init(GntWidgetClass *klass)
Definition: gntwidget.c:113
parent_class
static GObjectClass * parent_class
Definition: gntwidget.c:52
gnt_widget_hide
void gnt_widget_hide(GntWidget *widget)
Definition: gntwidget.c:425
GNT_WIDGET_NO_SHADOW
Definition: gntwidget.h:60
gnt_bindable_class_register_action
void gnt_bindable_class_register_action(GntBindableClass *klass, const char *name, GntBindableActionCallback callback, const char *trigger,...)
Definition: gntbindable.c:396
gnt_widget_clicked
gboolean gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y)
Definition: gntwidget.c:409
gnt_boolean_handled_accumulator
gboolean gnt_boolean_handled_accumulator(GSignalInvocationHint *ihint, GValue *return_accu, const GValue *handler_return, gpointer dummy)
Definition: gntutils.c:174
_GntBindable
Definition: gntbindable.h:47
GNT_IS_WIDGET
#define GNT_IS_WIDGET(obj)
Definition: gntwidget.h:39
SIG_DESTROY
Definition: gntwidget.c:34
gnt_style_get_bool
gboolean gnt_style_get_bool(GntStyle style, gboolean def)
Definition: gntstyle.c:102
gnt_widget_expose
void gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height)
Definition: gntwidget.c:419
GNT_BINDABLE
#define GNT_BINDABLE(obj)
Definition: gntbindable.h:36
GNT_BINDABLE_CLASS
#define GNT_BINDABLE_CLASS(klass)
Definition: gntbindable.h:37
_GntWidgetPriv::height
int height
Definition: gntwidget.h:91
_GntWidget::priv
GntWidgetPriv priv
Definition: gntwidget.h:104
GNT_WIDGET_DRAWING
Definition: gntwidget.h:62
gnt_closure_marshal_VOID__INT_INT
void gnt_closure_marshal_VOID__INT_INT(GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data)
Definition: gntmarshal.c:170
update_queue_callback
static gboolean update_queue_callback(gpointer data)
Definition: gntwidget.c:606
gnt_widget_map
static void gnt_widget_map(GntWidget *widget)
Definition: gntwidget.c:66