annotate lwlib/lwlib-internal.h @ 435:53cf74a9db44

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