]> Pileus Git - ~andy/gtk/blob - gtk/gtkmenushellprivate.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkmenushellprivate.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 #ifndef __GTK_MENU_SHELL_PRIVATE_H__
19 #define __GTK_MENU_SHELL_PRIVATE_H__
20
21
22 #include <gtk/gtkmenushell.h>
23 #include <gtk/gtkmnemonichash.h>
24 #include <gtk/gtkkeyhash.h>
25
26
27 G_BEGIN_DECLS
28
29 struct _GtkMenuShellPrivate
30 {
31   GList *children;
32   GtkWidget *active_menu_item;
33   GtkWidget *parent_menu_shell;
34
35   guint button;
36   guint32 activate_time;
37
38   guint active               : 1;
39   guint have_grab            : 1;
40   guint have_xgrab           : 1;
41   guint ignore_enter         : 1;
42   guint keyboard_mode        : 1;
43
44   guint take_focus           : 1;
45   guint activated_submenu    : 1;
46   guint in_unselectable_item : 1; /* This flag is a crutch to keep
47                                    * mnemonics in the same menu if
48                                    * the user moves the mouse over
49                                    * an unselectable menuitem.
50                                    */
51   GtkMnemonicHash *mnemonic_hash;
52   GtkKeyHash *key_hash;
53
54   GdkDevice *grab_pointer;
55 };
56
57 void        _gtk_menu_shell_select_last      (GtkMenuShell *menu_shell,
58                                               gboolean      search_sensitive);
59 gint        _gtk_menu_shell_get_popup_delay  (GtkMenuShell *menu_shell);
60 void        _gtk_menu_shell_set_grab_device  (GtkMenuShell *menu_shell,
61                                               GdkDevice    *device);
62 GdkDevice *_gtk_menu_shell_get_grab_device   (GtkMenuShell *menu_shell);
63
64 void       _gtk_menu_shell_add_mnemonic      (GtkMenuShell *menu_shell,
65                                               guint         keyval,
66                                               GtkWidget    *target);
67 void       _gtk_menu_shell_remove_mnemonic   (GtkMenuShell *menu_shell,
68                                               guint         keyval,
69                                               GtkWidget    *target);
70
71 void       _gtk_menu_shell_update_mnemonics  (GtkMenuShell *menu_shell);
72 void       _gtk_menu_shell_set_keyboard_mode (GtkMenuShell *menu_shell,
73                                               gboolean      keyboard_mode);
74 gboolean   _gtk_menu_shell_get_keyboard_mode (GtkMenuShell *menu_shell);
75
76
77 G_END_DECLS
78
79 #endif  /* __GTK_MENU_SHELL_PRIVATE_H__ */