Mercurial > emacs
annotate lwlib/lwlib.h @ 19860:c17fd465ea95 libc-970911 libc-970912 libc-970913 libc-970914 libc-970915 libc-970916 libc-970917 libc-970918 libc-970919 libc-970920 libc-970921 libc-970922 libc-970923 libc-970924 libc-970925 libc-970926 libc-970927 libc-970928 libc-970929 libc-970930 libc-971001 libc-971018 libc-971019 libc-971020 libc-971021 libc-971022 libc-971023 libc-971024 libc-971025 libc-971026 libc-971027 libc-971028 libc-971029 libc-971030 libc-971031 libc-971101 libc-971102 libc-971103 libc-971104 libc-971105 libc-971106 libc-971107 libc-971108 libc-971109 libc-971110 libc-971111 libc-971112 libc-971113 libc-971114 libc-971115 libc-971116 libc-971117 libc-971118 libc-971120 libc-971121 libc-971122 libc-971123 libc-971124 libc-971125 libc-971126 libc-971127 libc-971128 libc-971129 libc-971130 libc-971201 libc-971203 libc-971204 libc-971205 libc-971206 libc-971207 libc-971208 libc-971209 libc-971210 libc-971211 libc-971212 libc-971213 libc-971214 libc-971217 libc-971218 libc-971219 libc-971220 libc-971221 libc-971222 libc-971223 libc-971224 libc-971225 libc-971226 libc-971227 libc-971228 libc-971229 libc-971230 libc-971231 libc-980103 libc-980104 libc-980105 libc-980106 libc-980107 libc-980108 libc-980109 libc-980110 libc-980111 libc-980112 libc-980114 libc-980115 libc-980116 libc-980117 libc-980118 libc-980119 libc-980120 libc-980121 libc-980122 libc-980123 libc-980124 libc-980125 libc-980126 libc-980127 libc-980128
typos.
author | Jeff Law <law@redhat.com> |
---|---|
date | Wed, 10 Sep 1997 21:16:20 +0000 |
parents | de5c3eda52fc |
children | d8d30f76cc61 |
rev | line source |
---|---|
5626 | 1 #ifndef LWLIB_H |
2 #define LWLIB_H | |
3 | |
4 #include <X11/Intrinsic.h> | |
5 | |
6 /* | |
7 ** Widget values depend on the Widget type: | |
8 ** | |
9 ** widget: (name value key enabled data contents/selected) | |
10 ** | |
11 ** label: ("name" "string" NULL NULL NULL NULL) | |
12 ** button: ("name" "string" "key" T/F data <default-button-p>) | |
13 ** button w/menu: | |
14 ** ("name" "string" "key" T/F data (label|button|button w/menu...)) | |
15 ** menubar: ("name" NULL NULL T/F data (button w/menu)) | |
16 ** selectable thing: | |
17 ** ("name" "string" "key" T/F data T/F) | |
18 ** checkbox: selectable thing | |
19 ** radio: ("name" NULL NULL T/F data (selectable thing...)) | |
20 ** strings: ("name" NULL NULL T/F data (selectable thing...)) | |
21 ** text: ("name" "string" <ign> T/F data) | |
8784 | 22 ** main: ("name") |
5626 | 23 */ |
24 | |
25 typedef unsigned long LWLIB_ID; | |
26 | |
27 typedef enum _change_type | |
28 { | |
29 NO_CHANGE = 0, | |
30 INVISIBLE_CHANGE = 1, | |
31 VISIBLE_CHANGE = 2, | |
32 STRUCTURAL_CHANGE = 3 | |
33 } change_type; | |
34 | |
35 typedef struct _widget_value | |
36 { | |
37 /* name of widget */ | |
38 char* name; | |
39 /* value (meaning depend on widget type) */ | |
40 char* value; | |
41 /* keyboard equivalent. no implications for XtTranslations */ | |
42 char* key; | |
43 /* true if enabled */ | |
44 Boolean enabled; | |
45 /* true if selected */ | |
46 Boolean selected; | |
47 /* true if was edited (maintained by get_value) */ | |
48 Boolean edited; | |
49 /* true if has changed (maintained by lw library) */ | |
50 change_type change; | |
14878
487b03096cc5
(struct widget_value): New field this_one_change.
Richard M. Stallman <rms@gnu.org>
parents:
14018
diff
changeset
|
51 /* true if this widget itself has changed, |
487b03096cc5
(struct widget_value): New field this_one_change.
Richard M. Stallman <rms@gnu.org>
parents:
14018
diff
changeset
|
52 but not counting the other widgets found in the `next' field. */ |
487b03096cc5
(struct widget_value): New field this_one_change.
Richard M. Stallman <rms@gnu.org>
parents:
14018
diff
changeset
|
53 change_type this_one_change; |
5626 | 54 /* Contents of the sub-widgets, also selected slot for checkbox */ |
55 struct _widget_value* contents; | |
56 /* data passed to callback */ | |
57 XtPointer call_data; | |
58 /* next one in the list */ | |
59 struct _widget_value* next; | |
60 /* slot for the toolkit dependent part. Always initialize to NULL. */ | |
61 void* toolkit_data; | |
62 /* tell us if we should free the toolkit data slot when freeing the | |
63 widget_value itself. */ | |
64 Boolean free_toolkit_data; | |
65 | |
66 /* we resource the widget_value structures; this points to the next | |
67 one on the free list if this one has been deallocated. | |
68 */ | |
69 struct _widget_value *free_list; | |
70 } widget_value; | |
71 | |
72 | |
8784 | 73 typedef void (*lw_callback) (/* Widget w, LWLIB_ID id, void* data */); |
5626 | 74 |
8784 | 75 void lw_register_widget (/* char* type, char* name, LWLIB_ID id, |
76 widget_value* val, lw_callback pre_activate_cb, | |
77 lw_callback selection_cb, | |
78 lw_callback post_activate_cb */); | |
79 Widget lw_get_widget (/* LWLIB_ID id, Widget parent, Boolean pop_up_p */); | |
80 Widget lw_make_widget (/* LWLIB_ID id, Widget parent, Boolean pop_up_p */); | |
81 Widget lw_create_widget (/* char* type, char* name, LWLIB_ID id, | |
82 widget_value* val, Widget parent, Boolean pop_up_p, | |
83 lw_callback pre_activate_cb, | |
84 lw_callback selection_cb, | |
85 lw_callback post_activate_cb */); | |
86 LWLIB_ID lw_get_widget_id (/* Widget w */); | |
87 void lw_modify_all_widgets (/* LWLIB_ID id, widget_value* val, Boolean deep_p */); | |
88 void lw_destroy_widget (/* Widget w */); | |
89 void lw_destroy_all_widgets (/* LWLIB_ID id */); | |
90 void lw_destroy_everything (/* void */); | |
91 void lw_destroy_all_pop_ups (/* void */); | |
92 Widget lw_raise_all_pop_up_widgets (/* void */); | |
93 widget_value* lw_get_all_values (/* LWLIB_ID id */); | |
94 Boolean lw_get_some_values (/* LWLIB_ID id, widget_value* val */); | |
95 void lw_pop_up_all_widgets (/* LWLIB_ID id */); | |
96 void lw_pop_down_all_widgets (/* LWLIB_ID id */); | |
5626 | 97 widget_value *malloc_widget_value (); |
8784 | 98 void free_widget_value (/* widget_value * */); |
99 void lw_popup_menu (/* Widget */); | |
5626 | 100 |
101 /* Toolkit independent way of focusing on a Widget at the Xt level. */ | |
8784 | 102 void lw_set_keyboard_focus (/* Widget parent, Widget w */); |
5626 | 103 |
104 /* Silly Energize hack to invert the "sheet" button */ | |
8784 | 105 void lw_show_busy (/* Widget w, Boolean busy */); |
106 | |
107 /* Silly hack to assist with Lucid/Athena geometry management. */ | |
14018 | 108 void lw_refigure_widget (/* Widget w, Boolean doit */); |
8784 | 109 |
110 /* Toolkit independent way of determining if an event occurred on a | |
111 menubar. */ | |
112 Boolean lw_window_is_in_menubar (/* Window win, Widget menubar_widget */); | |
113 | |
114 /* Manage resizing: TRUE permits resizing widget w; FALSE disallows it. */ | |
115 void lw_allow_resizing (/* Widget w, Boolean flag */); | |
5626 | 116 |
9064 | 117 /* Set up the main window. */ |
118 void lw_set_main_areas (/* Widget parent, | |
119 Widget menubar, | |
120 Widget work_area */); | |
121 | |
5626 | 122 #endif /* LWLIB_H */ |