summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2014-06-02 22:01:21 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2014-06-02 22:01:21 +0400
commit5668fb88bf3731d39c4e958c8e79a549f789ce1e (patch)
treeb0d3fd3555fca3b34c47b803a633da2f36d31165 /src/keyboard.h
parentda11196a248b530c3b3a8329497d71332f8c71a3 (diff)
downloademacs-5668fb88bf3731d39c4e958c8e79a549f789ce1e.tar.gz
Use common memory management functions for lwlib and refactor users.
* lwlib/lwlib.h (widget_value): Do not maintain a free list any more. (malloc_widget_value, free_widget_value): Remove prototypes. * lwlib/lwlib.c (malloc_widget_value, free_widget_value): (widget_value_free_list, malloc_cpt): Remove. (free_widget_value_tree, copy_widget_value_tree): Adjust users. * src/menu.h (xmalloc_widget_value): Replaced by ... (make_widget_value): ... new prototype. * src/menu.c (xmalloc_widget_value): Replaced by ... (make_widget_value): ... new function. (free_menubar_widget_value_tree, digest_single_submenu): Adjust users. * src/gtkutil.c (malloc_widget_value, free_widget_value): (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code. * src/keyboard.h (enum button_type, struct _widget_value): * src/gtkutil.h, src/nsgui.h, src/w32gui.h (malloc_widget_value): (free_widget_value): Likewise. * src/nsmenu.m (ns_update_menubar, ns_menu_show): * src/w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show): * src/xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users. * src/xterm.h (XtParent) [USE_GTK]: Remove unused macro.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
index 8bb54dd86e0..8a72d03416f 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -354,57 +354,6 @@ extern void unuse_menu_items (void);
#define ENCODE_MENU_STRING(str) (str)
#endif
-#if defined (HAVE_NS) || defined (HAVE_NTGUI) || defined (USE_GTK)
-
-/* Definitions copied from lwlib.h */
-
-enum button_type
-{
- BUTTON_TYPE_NONE,
- BUTTON_TYPE_TOGGLE,
- BUTTON_TYPE_RADIO
-};
-
-/* This structure is based on the one in ../lwlib/lwlib.h, with unused portions
- removed. No term uses these. */
-typedef struct _widget_value
-{
- /* name of widget */
- Lisp_Object lname;
- const char* name;
- /* value (meaning depend on widget type) */
- const char* value;
- /* keyboard equivalent. no implications for XtTranslations */
- Lisp_Object lkey;
- const char* key;
- /* Help string or nil if none.
- GC finds this string through the frame's menu_bar_vector
- or through menu_items. */
- Lisp_Object help;
- /* true if enabled */
- unsigned char enabled;
- /* true if selected */
- unsigned char selected;
- /* The type of a button. */
- enum button_type button_type;
-#if defined (HAVE_NTGUI)
- /* true if menu title */
- unsigned char title;
-#endif
- /* Contents of the sub-widgets, also selected slot for checkbox */
- struct _widget_value* contents;
- /* data passed to callback */
- void *call_data;
- /* next one in the list */
- struct _widget_value* next;
-#ifdef USE_GTK
- struct _widget_value *free_list;
-#endif
-} widget_value;
-
-#endif /* HAVE_NS || HAVE_NTGUI */
-
-
/* Macros for dealing with lispy events. */
/* True if EVENT has data fields describing it (i.e. a mouse click). */