Set `default-directory' for watchdog in tramp-test.el
[emacs.git] / lwlib / lwlib-widget.h
blob6a88d2a18cdb2deb3595b1ea6aa70aa99b0618f2
1 /*
2 Copyright (C) 1992, 1993 Lucid, Inc.
3 Copyright (C) 1994, 1999-2017 Free Software Foundation, Inc.
5 This file is part of the Lucid Widget Library.
7 The Lucid Widget Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 1, or (at your option)
10 any later version.
12 The Lucid Widget Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 /* This part is separate from lwlib.h because it does not need X,
21 and thus can be used by non-X code in Emacs proper. */
23 #ifndef LWLIB_WIDGET_H
24 #define LWLIB_WIDGET_H
26 #include "../src/lisp.h"
28 typedef enum
30 NO_CHANGE = 0,
31 INVISIBLE_CHANGE = 1,
32 VISIBLE_CHANGE = 2,
33 STRUCTURAL_CHANGE = 3
34 } change_type;
36 enum button_type
38 BUTTON_TYPE_NONE,
39 BUTTON_TYPE_TOGGLE,
40 BUTTON_TYPE_RADIO
43 typedef struct _widget_value
45 /* Name of widget. */
46 Lisp_Object lname;
47 char *name;
49 /* Value (meaning depend on widget type). */
50 char *value;
52 /* Keyboard equivalent. no implications for XtTranslations. */
53 Lisp_Object lkey;
54 char *key;
56 /* Help string or nil if none.
57 GC finds this string through the frame's menu_bar_vector
58 or through menu_items. */
59 Lisp_Object help;
61 /* True if enabled. */
62 bool enabled;
64 /* True if selected. */
65 bool selected;
67 /* True if was edited (maintained by get_value). */
68 bool edited;
70 #ifdef HAVE_NTGUI
71 /* True if menu title. */
72 bool title;
73 #endif
75 /* The type of a button. */
76 enum button_type button_type;
78 /* Contents of the sub-widgets, also selected slot for checkbox. */
79 struct _widget_value *contents;
81 /* Data passed to callback. */
82 void *call_data;
84 /* Next one in the list. */
85 struct _widget_value *next;
87 #ifdef USE_X_TOOLKIT
88 /* Type of change (maintained by lw library). */
89 change_type change;
91 /* Type of this widget's change, but not counting the other widgets
92 found in the `next' field. */
93 change_type this_one_change;
95 /* Slot for the toolkit dependent part. Always initialize to NULL. */
96 void *toolkit_data;
98 /* Whether we should free the toolkit data slot when freeing the
99 widget_value itself. */
100 bool free_toolkit_data;
101 #endif
103 } widget_value;
105 #endif