1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef LWLIB_H
22 #define LWLIB_H
23
24 #include <X11/Intrinsic.h>
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 #include "lwlib-widget.h"
46
47 typedef unsigned int LWLIB_ID;
48
49
50
51 enum menu_separator
52 {
53
54 SEPARATOR_NO_LINE,
55 SEPARATOR_SINGLE_LINE,
56 SEPARATOR_DOUBLE_LINE,
57 SEPARATOR_SINGLE_DASHED_LINE,
58 SEPARATOR_DOUBLE_DASHED_LINE,
59 SEPARATOR_SHADOW_ETCHED_IN,
60 SEPARATOR_SHADOW_ETCHED_OUT,
61 SEPARATOR_SHADOW_ETCHED_IN_DASH,
62 SEPARATOR_SHADOW_ETCHED_OUT_DASH,
63
64
65 SEPARATOR_SHADOW_DOUBLE_ETCHED_IN,
66 SEPARATOR_SHADOW_DOUBLE_ETCHED_OUT,
67 SEPARATOR_SHADOW_DOUBLE_ETCHED_IN_DASH,
68 SEPARATOR_SHADOW_DOUBLE_ETCHED_OUT_DASH
69 };
70
71
72 typedef void (*lw_callback) (Widget w, LWLIB_ID id, void* data);
73
74 void lw_register_widget (const char* type, const char* name, LWLIB_ID id,
75 widget_value* val, lw_callback pre_activate_cb,
76 lw_callback selection_cb,
77 lw_callback post_activate_cb,
78 lw_callback highlight_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 (const char* type, const 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 lw_callback highlight_cb);
87 LWLIB_ID lw_get_widget_id (Widget w);
88 int lw_modify_all_widgets (LWLIB_ID id, widget_value* val, Boolean deep_p);
89 void lw_destroy_widget (Widget w);
90 void lw_destroy_all_widgets (LWLIB_ID id);
91 void lw_destroy_everything (void);
92 void lw_destroy_all_pop_ups (void);
93 Widget lw_raise_all_pop_up_widgets (void);
94 widget_value* lw_get_all_values (LWLIB_ID id);
95 Boolean lw_get_some_values (LWLIB_ID id, widget_value* val);
96 void lw_pop_up_all_widgets (LWLIB_ID id);
97 void lw_pop_down_all_widgets (LWLIB_ID id);
98 void lw_popup_menu (Widget, XEvent *);
99
100
101 void lw_set_keyboard_focus (Widget parent, Widget w);
102
103
104 void lw_show_busy (Widget w, Boolean busy);
105
106
107 void lw_refigure_widget (Widget w, Boolean doit);
108
109
110
111 Boolean lw_window_is_in_menubar (Window win, Widget menubar_widget);
112
113
114 void lw_allow_resizing (Widget w, Boolean flag);
115
116
117 void lw_set_main_areas (Widget parent,
118 Widget menubar,
119 Widget work_area);
120
121
122
123
124
125
126 int lw_separator_p (const char *label, enum menu_separator *type,
127 int motif_p);
128
129 #endif