X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lwlib%2Flwlib.h;h=ad0241b5990ad972fd8b340848b63f41525ae0cc;hb=1d5902a0e4712e0f19c14cb123dca81eff111989;hp=882348d186177d787a9a1658857d35de7f22ba6c;hpb=46f51e794ddb493a8a76ec2f3be00b41e3b0be22;p=chise%2Fxemacs-chise.git.1 diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h index 882348d..ad0241b 100644 --- a/lwlib/lwlib.h +++ b/lwlib/lwlib.h @@ -1,17 +1,8 @@ -#ifndef LWLIB_H -#define LWLIB_H - -#undef CONST +#ifndef INCLUDED_lwlib_h_ +#define INCLUDED_lwlib_h_ #include -/* To eliminate use of `const' in the lwlib sources, define CONST_IS_LOSING. */ -#ifdef CONST_IS_LOSING -# define CONST -#else -# define CONST const -#endif - #if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_MENUBARS_MOTIF) || defined (LWLIB_MENUBARS_ATHENA) #define NEED_MENUBARS #endif @@ -113,8 +104,11 @@ typedef struct _widget_args ArgList args; int nargs; /* Copying args is impossible so we make the caller give us heap allocated - args and free them when on-one wants them any more. */ + args and free them when no one wants them any more. */ int ref_count; + /* Since we are reference counting we need to be able to determine + when something has changed. */ + Boolean args_changed; } widget_args; typedef struct _widget_value @@ -124,7 +118,7 @@ typedef struct _widget_value /* name of widget */ char* name; - /* value (meaning BOGUSLY depend on widget type) */ + /* value (meaning BOGUSLY depends on widget type) */ char* value; /* keyboard equivalent. no implications for XtTranslations */ char* key; @@ -143,11 +137,11 @@ typedef struct _widget_value Boolean edited; /* true if has changed (maintained by lw library) */ change_type change; - /* Contents of the sub-widgets, also selected slot for checkbox */ + /* Contents of sub-widgets, also selected slot for checkbox */ struct _widget_value* contents; /* data passed to callback */ XtPointer call_data; - /* next one in the list */ + /* next in the list of siblings */ struct _widget_value* next; /* slot for the toolkit dependent part. Always initialize to NULL. */ void* toolkit_data; @@ -193,13 +187,13 @@ extern int lw_menu_active; #include "xlwtabs.h" #endif -void lw_register_widget (CONST char* type, CONST char* name, LWLIB_ID id, +void lw_register_widget (const char* type, const char* name, LWLIB_ID id, widget_value* val, lw_callback pre_activate_cb, lw_callback selection_cb, lw_callback post_activate_cb); Widget lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p); Widget lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p); -Widget lw_create_widget (CONST char* type, CONST char* name, LWLIB_ID id, +Widget lw_create_widget (const char* type, const char* name, LWLIB_ID id, widget_value* val, Widget parent, Boolean pop_up_p, lw_callback pre_activate_cb, lw_callback selection_cb, @@ -220,7 +214,9 @@ void lw_pop_up_all_widgets (LWLIB_ID id); void lw_pop_down_all_widgets (LWLIB_ID id); void lw_add_value_args_to_args (widget_value* wv, ArgList addto, int* offset); void lw_add_widget_value_arg (widget_value* wv, String name, XtArgVal value); +XtArgVal lw_get_value_arg (widget_value* wv, String name); void lw_copy_widget_value_args (widget_value* copy, widget_value* val); +widget_value * copy_widget_value_tree (widget_value *val, change_type change); widget_value *malloc_widget_value (void); void free_widget_value (widget_value *); @@ -235,4 +231,6 @@ void lw_set_keyboard_focus (Widget parent, Widget w); /* Silly Energize hack to invert the "sheet" button */ void lw_show_busy (Widget w, Boolean busy); -#endif /* LWLIB_H */ +void lw_remove_accelerator_spec (char *val); + +#endif /* INCLUDED_lwlib_h_ */