Mercurial > hg > xemacs-beta
diff lwlib/lwlib.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children | 41dbb7a9d5f2 |
line wrap: on
line diff
--- a/lwlib/lwlib.h Mon Aug 13 11:19:22 2007 +0200 +++ b/lwlib/lwlib.h Mon Aug 13 11:20:41 2007 +0200 @@ -1,8 +1,17 @@ -#ifndef INCLUDED_lwlib_h_ -#define INCLUDED_lwlib_h_ +#ifndef LWLIB_H +#define LWLIB_H + +#undef CONST #include <X11/Intrinsic.h> +/* 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 @@ -97,17 +106,6 @@ int scrollbar_x, scrollbar_y; } scrollbar_values; -typedef struct _widget_args -{ - /* some things are only possible at creation time. args are applied - to widgets at creation time. */ - 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. */ - int ref_count; -} widget_args; - typedef struct _widget_value { /* This slot is only partially utilized right now. */ @@ -149,12 +147,10 @@ /* data defining a scrollbar; only valid if type == "scrollbar" */ scrollbar_values *scrollbar_data; - /* A reference counted arg structure. */ - struct _widget_args *args; /* we resource the widget_value structures; this points to the next - one on the free list if this one has been deallocated. */ + one on the free list if this one has been deallocated. + */ struct _widget_value *free_list; - } widget_value; @@ -180,17 +176,13 @@ /* do this for the other toolkits too */ #endif /* LWLIB_MENUBARS_LUCID */ -#if defined (LWLIB_TABS_LUCID) -#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, @@ -209,13 +201,9 @@ Boolean lw_get_some_values (LWLIB_ID id, widget_value* val); 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); -void lw_copy_widget_value_args (widget_value* copy, widget_value* val); widget_value *malloc_widget_value (void); void free_widget_value (widget_value *); -void free_widget_value_tree (widget_value *wv); widget_value *replace_widget_value_tree (widget_value*, widget_value*); void lw_popup_menu (Widget, XEvent *); @@ -226,4 +214,4 @@ /* Silly Energize hack to invert the "sheet" button */ void lw_show_busy (Widget w, Boolean busy); -#endif /* INCLUDED_lwlib_h_ */ +#endif /* LWLIB_H */