annotate lwlib/lwlib.h @ 8099:a06382fd175d

(Fdelete_frame): Call x_clear_frame_selections.
author Richard M. Stallman <rms@gnu.org>
date Fri, 01 Jul 1994 00:35:07 +0000
parents 75570af32e92
children 0166e4ab659a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 #ifndef LWLIB_H
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 #define LWLIB_H
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 #include <X11/Intrinsic.h>
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 /*
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ** Widget values depend on the Widget type:
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 **
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ** widget: (name value key enabled data contents/selected)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 **
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 ** label: ("name" "string" NULL NULL NULL NULL)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ** button: ("name" "string" "key" T/F data <default-button-p>)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 ** button w/menu:
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ** ("name" "string" "key" T/F data (label|button|button w/menu...))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 ** menubar: ("name" NULL NULL T/F data (button w/menu))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ** selectable thing:
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ** ("name" "string" "key" T/F data T/F)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ** checkbox: selectable thing
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ** radio: ("name" NULL NULL T/F data (selectable thing...))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 ** strings: ("name" NULL NULL T/F data (selectable thing...))
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ** text: ("name" "string" <ign> T/F data)
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 typedef unsigned long LWLIB_ID;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 typedef enum _change_type
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 NO_CHANGE = 0,
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 INVISIBLE_CHANGE = 1,
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 VISIBLE_CHANGE = 2,
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 STRUCTURAL_CHANGE = 3
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 } change_type;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 typedef struct _widget_value
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 {
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 /* name of widget */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 char* name;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 /* value (meaning depend on widget type) */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 char* value;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 /* keyboard equivalent. no implications for XtTranslations */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 char* key;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 /* true if enabled */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 Boolean enabled;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 /* true if selected */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 Boolean selected;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 /* true if was edited (maintained by get_value) */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 Boolean edited;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48 /* true if has changed (maintained by lw library) */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 change_type change;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 /* Contents of the sub-widgets, also selected slot for checkbox */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 struct _widget_value* contents;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 /* data passed to callback */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 XtPointer call_data;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 /* next one in the list */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 struct _widget_value* next;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 /* slot for the toolkit dependent part. Always initialize to NULL. */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 void* toolkit_data;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 /* tell us if we should free the toolkit data slot when freeing the
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 widget_value itself. */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 Boolean free_toolkit_data;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 /* we resource the widget_value structures; this points to the next
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 one on the free list if this one has been deallocated.
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 */
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 struct _widget_value *free_list;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 } widget_value;
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68
5706
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
69 typedef void (*lw_callback) ();
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70
5706
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
71 void lw_register_widget ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
72 Widget lw_get_widget ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
73 Widget lw_make_widget ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
74 Widget lw_create_widget ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
75 LWLIB_ID lw_get_widget_id ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
76 void lw_modify_all_widgets ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
77 void lw_destroy_widget ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
78 void lw_destroy_all_widgets ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
79 void lw_destroy_everything ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
80 void lw_destroy_all_pop_ups ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
81 Widget lw_raise_all_pop_up_widgets ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
82 widget_value* lw_get_all_values ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
83 Boolean lw_get_some_values ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
84 void lw_pop_up_all_widgets ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
85 void lw_pop_down_all_widgets ();
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 widget_value *malloc_widget_value ();
5706
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
87 void free_widget_value ();
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
88 void lw_popup_menu ();
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 /* Toolkit independent way of focusing on a Widget at the Xt level. */
5706
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
91 void lw_set_keyboard_focus ();
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 /* Silly Energize hack to invert the "sheet" button */
5706
75570af32e92 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 5626
diff changeset
94 void lw_show_busy ();
5626
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95
93bb7e0935ba Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 #endif /* LWLIB_H */