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_ITEM_PRIVATE_H__
19 #define __GTK_MENU_ITEM_PRIVATE_H__
20 
21 #include <gtk/gtkmenuitem.h>
22 #include <gtk/deprecated/gtkaction.h>
23 #include <gtk/gtkactionhelper.h>
24 #include <gtk/gtkcssgadgetprivate.h>
25 #include <gtk/gtkcssnodeprivate.h>
26 
27 G_BEGIN_DECLS
28 
29 struct _GtkMenuItemPrivate
30 {
31   GtkWidget *submenu;
32   GdkWindow *event_window;
33 
34   guint16 toggle_size;
35   guint16 accelerator_width;
36 
37   guint timer;
38 
39   const char *accel_path;
40 
41   GtkAction *action;
42   GtkActionHelper *action_helper;
43 
44   GtkCssGadget *gadget;
45   GtkCssGadget *arrow_gadget;
46 
47   guint submenu_placement      : 1;
48   guint submenu_direction      : 1;
49   guint right_justify          : 1;
50   guint from_menubar           : 1;
51   guint use_action_appearance  : 1;
52   guint reserve_indicator      : 1;
53 };
54 
55 GtkCssGadget * _gtk_menu_item_get_gadget     (GtkMenuItem   *menu_item);
56 void     _gtk_menu_item_refresh_accel_path   (GtkMenuItem   *menu_item,
57                                               const gchar   *prefix,
58                                               GtkAccelGroup *accel_group,
59                                               gboolean       group_changed);
60 gboolean _gtk_menu_item_is_selectable        (GtkWidget     *menu_item);
61 void     _gtk_menu_item_popup_submenu        (GtkWidget     *menu_item,
62                                               gboolean       with_delay);
63 void     _gtk_menu_item_popdown_submenu      (GtkWidget     *menu_item);
64 void	  _gtk_menu_item_refresh_accel_path  (GtkMenuItem   *menu_item,
65 					      const gchar   *prefix,
66 					      GtkAccelGroup *accel_group,
67 					      gboolean	     group_changed);
68 gboolean  _gtk_menu_item_is_selectable       (GtkWidget     *menu_item);
69 void      _gtk_menu_item_popup_submenu       (GtkWidget     *menu_item,
70 					      gboolean       with_delay);
71 void      _gtk_menu_item_popdown_submenu     (GtkWidget     *menu_item);
72 
73 G_END_DECLS
74 
75 #endif /* __GTK_MENU_ITEM_PRIVATE_H__ */
76