]> Pileus Git - ~andy/gtk/blob - gtk/gtkmenushellprivate.h
Fix commit 5f55c420471db9a05d145e140b3a7cdfc5bdba9f
[~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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GTK_MENU_SHELL_PRIVATE_H__
21 #define __GTK_MENU_SHELL_PRIVATE_H__
22
23
24 #include <gtk/gtkmenushell.h>
25 #include <gtk/gtkmnemonichash.h>
26 #include <gtk/gtkkeyhash.h>
27
28
29 G_BEGIN_DECLS
30
31 struct _GtkMenuShellPrivate
32 {
33   GList *children;
34   GtkWidget *active_menu_item;
35   GtkWidget *parent_menu_shell;
36
37   guint button;
38   guint32 activate_time;
39
40   guint active               : 1;
41   guint have_grab            : 1;
42   guint have_xgrab           : 1;
43   guint ignore_enter         : 1;
44   guint keyboard_mode        : 1;
45
46   guint take_focus           : 1;
47   guint activated_submenu    : 1;
48   guint in_unselectable_item : 1; /* This flag is a crutch to keep
49                                    * mnemonics in the same menu if
50                                    * the user moves the mouse over
51                                    * an unselectable menuitem.
52                                    */
53   GtkMnemonicHash *mnemonic_hash;
54   GtkKeyHash *key_hash;
55
56   GdkDevice *grab_pointer;
57 };
58
59 void        _gtk_menu_shell_select_last      (GtkMenuShell *menu_shell,
60                                               gboolean      search_sensitive);
61 gint        _gtk_menu_shell_get_popup_delay  (GtkMenuShell *menu_shell);
62 void        _gtk_menu_shell_set_grab_device  (GtkMenuShell *menu_shell,
63                                               GdkDevice    *device);
64 GdkDevice *_gtk_menu_shell_get_grab_device   (GtkMenuShell *menu_shell);
65
66 void       _gtk_menu_shell_add_mnemonic      (GtkMenuShell *menu_shell,
67                                               guint         keyval,
68                                               GtkWidget    *target);
69 void       _gtk_menu_shell_remove_mnemonic   (GtkMenuShell *menu_shell,
70                                               guint         keyval,
71                                               GtkWidget    *target);
72
73 void       _gtk_menu_shell_update_mnemonics  (GtkMenuShell *menu_shell);
74 void       _gtk_menu_shell_set_keyboard_mode (GtkMenuShell *menu_shell,
75                                               gboolean      keyboard_mode);
76 gboolean   _gtk_menu_shell_get_keyboard_mode (GtkMenuShell *menu_shell);
77
78
79 G_END_DECLS
80
81 #endif  /* __GTK_MENU_SHELL_PRIVATE_H__ */