Mercurial > emacs
comparison lwlib/lwlib.c @ 109351:c8a969d13eda
merge trunk
author | Kenichi Handa <handa@etlken> |
---|---|
date | Fri, 09 Jul 2010 15:55:27 +0900 |
parents | 33021b778d4d |
children | 5e90a4ff527d |
comparison
equal
deleted
inserted
replaced
109350:c11d07f3d731 | 109351:c8a969d13eda |
---|---|
247 copy->free_toolkit_data = False; | 247 copy->free_toolkit_data = False; |
248 return copy; | 248 return copy; |
249 } | 249 } |
250 | 250 |
251 static widget_info * | 251 static widget_info * |
252 allocate_widget_info (type, name, id, val, pre_activate_cb, | 252 allocate_widget_info (char* type, |
253 selection_cb, post_activate_cb, highlight_cb) | 253 char* name, |
254 char* type; | 254 LWLIB_ID id, |
255 char* name; | 255 widget_value* val, |
256 LWLIB_ID id; | 256 lw_callback pre_activate_cb, |
257 widget_value* val; | 257 lw_callback selection_cb, |
258 lw_callback pre_activate_cb; | 258 lw_callback post_activate_cb, |
259 lw_callback selection_cb; | 259 lw_callback highlight_cb) |
260 lw_callback post_activate_cb; | |
261 lw_callback highlight_cb; | |
262 { | 260 { |
263 widget_info* info = (widget_info*)malloc (sizeof (widget_info)); | 261 widget_info* info = (widget_info*)malloc (sizeof (widget_info)); |
264 info->type = safe_strdup (type); | 262 info->type = safe_strdup (type); |
265 info->name = safe_strdup (name); | 263 info->name = safe_strdup (name); |
266 info->id = id; | 264 info->id = id; |
429 # define EXPLAIN(name, oc, nc, desc, a1, a2) | 427 # define EXPLAIN(name, oc, nc, desc, a1, a2) |
430 #endif | 428 #endif |
431 | 429 |
432 | 430 |
433 static widget_value * | 431 static widget_value * |
434 merge_widget_value (widget_value *val1, widget_value *val2, int level, int *change_p) | 432 merge_widget_value (widget_value *val1, |
433 widget_value *val2, | |
434 int level, | |
435 int *change_p) | |
435 { | 436 { |
436 change_type change, this_one_change; | 437 change_type change, this_one_change; |
437 widget_value* merged_next; | 438 widget_value* merged_next; |
438 widget_value* merged_contents; | 439 widget_value* merged_contents; |
439 | 440 |
820 | 821 |
821 /* XtRealizeWidget (instance->widget);*/ | 822 /* XtRealizeWidget (instance->widget);*/ |
822 } | 823 } |
823 | 824 |
824 void | 825 void |
825 lw_register_widget (type, name, id, val, pre_activate_cb, | 826 lw_register_widget (char* type, |
826 selection_cb, post_activate_cb, highlight_cb) | 827 char* name, |
827 char* type; | 828 LWLIB_ID id, |
828 char* name; | 829 widget_value* val, |
829 LWLIB_ID id; | 830 lw_callback pre_activate_cb, |
830 widget_value* val; | 831 lw_callback selection_cb, |
831 lw_callback pre_activate_cb; | 832 lw_callback post_activate_cb, |
832 lw_callback selection_cb; | 833 lw_callback highlight_cb) |
833 lw_callback post_activate_cb; | |
834 lw_callback highlight_cb; | |
835 { | 834 { |
836 if (!get_widget_info (id, False)) | 835 if (!get_widget_info (id, False)) |
837 allocate_widget_info (type, name, id, val, pre_activate_cb, selection_cb, | 836 allocate_widget_info (type, name, id, val, pre_activate_cb, selection_cb, |
838 post_activate_cb, highlight_cb); | 837 post_activate_cb, highlight_cb); |
839 } | 838 } |
1160 | 1159 |
1161 /* This function can be used as a an XtCallback for the widgets that get | 1160 /* This function can be used as a an XtCallback for the widgets that get |
1162 modified to update other instances of the widgets. Closure should be the | 1161 modified to update other instances of the widgets. Closure should be the |
1163 widget_instance. */ | 1162 widget_instance. */ |
1164 void | 1163 void |
1165 lw_internal_update_other_instances (Widget widget, XtPointer closure, XtPointer call_data) | 1164 lw_internal_update_other_instances (Widget widget, |
1165 XtPointer closure, | |
1166 XtPointer call_data) | |
1166 { | 1167 { |
1167 widget_instance* instance = (widget_instance*)closure; | 1168 widget_instance* instance = (widget_instance*)closure; |
1168 char* name = XtName (widget); | 1169 char* name = XtName (widget); |
1169 widget_info* info; | 1170 widget_info* info; |
1170 widget_instance* cur; | 1171 widget_instance* cur; |