comparison lwlib/lwlib.h @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents 3ecd8885ac67
children 8de8e3f6228a
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
103 int slider_position; 103 int slider_position;
104 104
105 int scrollbar_width, scrollbar_height; 105 int scrollbar_width, scrollbar_height;
106 int scrollbar_x, scrollbar_y; 106 int scrollbar_x, scrollbar_y;
107 } scrollbar_values; 107 } scrollbar_values;
108
109 typedef struct _widget_args
110 {
111 /* some things are only possible at creation time. args are applied
112 to widgets at creation time. */
113 ArgList args;
114 int nargs;
115 /* Copying args is impossible so we make the caller give us heap allocated
116 args and free them when on-one wants them any more. */
117 int ref_count;
118 } widget_args;
108 119
109 typedef struct _widget_value 120 typedef struct _widget_value
110 { 121 {
111 /* This slot is only partially utilized right now. */ 122 /* This slot is only partially utilized right now. */
112 widget_value_type type; 123 widget_value_type type;
145 Boolean free_toolkit_data; 156 Boolean free_toolkit_data;
146 157
147 /* data defining a scrollbar; only valid if type == "scrollbar" */ 158 /* data defining a scrollbar; only valid if type == "scrollbar" */
148 scrollbar_values *scrollbar_data; 159 scrollbar_values *scrollbar_data;
149 160
161 /* A reference counted arg structure. */
162 struct _widget_args *args;
150 /* we resource the widget_value structures; this points to the next 163 /* we resource the widget_value structures; this points to the next
151 one on the free list if this one has been deallocated. */ 164 one on the free list if this one has been deallocated. */
152 struct _widget_value *free_list; 165 struct _widget_value *free_list;
153 166
154 /* some things are only possible at creation time. args are applied
155 to widgets at creation time. */
156 ArgList args;
157 int nargs;
158 Boolean free_args;
159 } widget_value; 167 } widget_value;
160 168
161 169
162 typedef void (*lw_callback) (Widget w, LWLIB_ID id, XtPointer data); 170 typedef void (*lw_callback) (Widget w, LWLIB_ID id, XtPointer data);
163 171
209 widget_value* lw_get_all_values (LWLIB_ID id); 217 widget_value* lw_get_all_values (LWLIB_ID id);
210 Boolean lw_get_some_values (LWLIB_ID id, widget_value* val); 218 Boolean lw_get_some_values (LWLIB_ID id, widget_value* val);
211 void lw_pop_up_all_widgets (LWLIB_ID id); 219 void lw_pop_up_all_widgets (LWLIB_ID id);
212 void lw_pop_down_all_widgets (LWLIB_ID id); 220 void lw_pop_down_all_widgets (LWLIB_ID id);
213 void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset); 221 void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset);
222 void lw_add_widget_value_arg (widget_value* wv, String name, XtArgVal value);
223 void lw_copy_widget_value_args (widget_value* copy, widget_value* val);
214 224
215 widget_value *malloc_widget_value (void); 225 widget_value *malloc_widget_value (void);
216 void free_widget_value (widget_value *); 226 void free_widget_value (widget_value *);
217 void free_widget_value_tree (widget_value *wv); 227 void free_widget_value_tree (widget_value *wv);
218 widget_value *replace_widget_value_tree (widget_value*, widget_value*); 228 widget_value *replace_widget_value_tree (widget_value*, widget_value*);