annotate lwlib/lwlib-internal.h @ 138:6608ceec7cf8 r20-2b3

Import from CVS: tag r20-2b3
author cvs
date Mon, 13 Aug 2007 09:31:46 +0200
parents ac2d302a0011
children 74fd4e045ea6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 #ifndef LWLIB_INTERNAL_H
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 #define LWLIB_INTERNAL_H
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 #include "lwlib.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 /* This represents a single widget within a widget tree. All the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 widgets in a widget tree are chained through the `next' field.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 `info' is a back pointer to the widget tree. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 typedef struct _widget_instance
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 Widget widget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 Widget parent;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 Boolean pop_up_p;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 struct _widget_info* info;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 struct _widget_instance* next;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 } widget_instance;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 /* This represents a single widget tree, such as a single menubar.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 The global variable `all_widget_info' lists all widget trees,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 chained through the `next' field of this structure. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 typedef struct _widget_info
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 char* type;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 char* name;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 LWLIB_ID id;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 widget_value* val;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 Boolean busy;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 lw_callback pre_activate_cb;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 lw_callback selection_cb;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 lw_callback post_activate_cb;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 struct _widget_instance* instances;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 struct _widget_info* next;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 } widget_info;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 typedef Widget
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (*widget_creation_function) (widget_instance* instance);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 typedef struct _widget_creation_entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 {
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
42 CONST char* type;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 widget_creation_function function;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 } widget_creation_entry;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 /* update all other instances of a widget. Can be used in a callback when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 a wiget has been used by the user */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 lw_internal_update_other_instances (Widget widget, XtPointer closure,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 XtPointer call_data);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 /* get the widget_value for a widget in a given instance */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 widget_value*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 lw_get_widget_value_for_widget (widget_instance* instance, Widget w);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 widget_info *lw_get_widget_info (LWLIB_ID id);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 #endif /* LWLIB_INTERNAL_H */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59