Fix creation of Secret Service items in auth-source
[emacs.git] / lwlib / xlwmenuP.h
blob4f35d60b944ab713d39171291cc9960d07c9fe55
1 /* Internals of a lightweight menubar widget.
3 Copyright (C) 2002-2018 Free Software Foundation, Inc.
4 Copyright (C) 1992 Lucid, Inc.
6 This file is part of the Lucid Widget Library.
8 The Lucid Widget Library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 1, or (at your option)
11 any later version.
13 The Lucid Widget Library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
21 #ifndef _XlwMenuP_h
22 #define _XlwMenuP_h
24 #include "xlwmenu.h"
25 #include <X11/CoreP.h>
26 #ifdef HAVE_XFT
27 #include <X11/Xft/Xft.h>
28 #endif
30 /* Elements in the stack arrays. */
31 typedef struct _window_state
33 Widget w;
34 Window window;
35 Pixmap pixmap;
36 Position x;
37 Position y;
38 Dimension width;
39 Dimension height;
40 Dimension label_width;
41 int max_rest_width;
43 /* Width of toggle buttons or radio buttons. */
44 Dimension button_width;
45 #ifdef HAVE_XFT
46 XftDraw* xft_draw;
47 #endif
48 } window_state;
51 /* New fields for the XlwMenu widget instance record */
52 typedef struct _XlwMenu_part
54 /* slots set by the resources */
55 #ifdef HAVE_X_I18N
56 XFontSet fontSet;
57 XFontSetExtents *font_extents;
58 #endif
59 #ifdef HAVE_XFT
60 int default_face;
61 XftFont* xft_font;
62 XftColor xft_fg, xft_bg, xft_disabled_fg;
63 #endif
64 String fontName;
65 XFontStruct* font;
66 Pixel foreground;
67 Pixel disabled_foreground;
68 Pixel button_foreground;
69 Dimension margin;
70 Dimension horizontal_spacing;
71 Dimension vertical_spacing;
72 Dimension arrow_spacing;
73 Dimension shadow_thickness;
74 Pixel top_shadow_color;
75 Pixel bottom_shadow_color;
76 Pixmap top_shadow_pixmap;
77 Pixmap bottom_shadow_pixmap;
78 Cursor cursor_shape;
79 XtCallbackList open;
80 XtCallbackList select, highlight;
81 XtCallbackList enter, leave;
82 widget_value* contents;
83 int horizontal;
85 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */
86 bool_bf free_top_shadow_color_p : 1;
87 bool_bf free_bottom_shadow_color_p : 1;
89 /* State of the XlwMenu */
90 int top_depth;
91 int old_depth;
92 widget_value** old_stack;
93 int old_stack_length;
94 widget_value* inside_entry;
96 /* New state after the user moved */
97 int new_depth;
98 widget_value** new_stack;
99 int new_stack_length;
101 /* Window resources */
102 window_state* windows;
103 int windows_length;
105 /* Internal part, set by the XlwMenu */
106 GC foreground_gc;
107 GC button_gc;
108 GC background_gc;
109 GC disabled_gc;
110 GC inactive_button_gc;
111 GC shadow_top_gc;
112 GC shadow_bottom_gc;
113 Cursor cursor;
114 Boolean popped_up;
115 Pixmap gray_pixmap;
116 } XlwMenuPart;
118 /* Full instance record declaration */
119 typedef struct _XlwMenuRec
121 CorePart core;
122 XlwMenuPart menu;
123 } XlwMenuRec;
125 /* New fields for the XlwMenu widget class record */
126 typedef struct
128 int dummy;
129 } XlwMenuClassPart;
131 /* Full class record declaration. */
132 typedef struct _XlwMenuClassRec
134 CoreClassPart core_class;
135 XlwMenuClassPart menu_class;
136 } XlwMenuClassRec;
138 /* Class pointer. */
139 extern XlwMenuClassRec xlwMenuClassRec;
141 #endif /* _XlwMenuP_h */