| 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 | /* | 
| 19 |  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS | 
| 20 |  * file for a list of people on the GTK+ Team.  See the ChangeLog | 
| 21 |  * files for a list of changes.  These files are distributed with | 
| 22 |  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. | 
| 23 |  */ | 
| 24 |  | 
| 25 | #ifndef __GTK_MENU_ITEM_H__ | 
| 26 | #define  | 
| 27 |  | 
| 28 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) | 
| 29 | #error "Only <gtk/gtk.h> can be included directly." | 
| 30 | #endif | 
| 31 |  | 
| 32 | #include <gtk/gtkbin.h> | 
| 33 |  | 
| 34 |  | 
| 35 | G_BEGIN_DECLS | 
| 36 |  | 
| 37 | #define             (gtk_menu_item_get_type ()) | 
| 38 | #define (obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MENU_ITEM, GtkMenuItem)) | 
| 39 | #define (klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_ITEM, GtkMenuItemClass)) | 
| 40 | #define (obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MENU_ITEM)) | 
| 41 | #define (klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_ITEM)) | 
| 42 | #define (obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MENU_ITEM, GtkMenuItemClass)) | 
| 43 |  | 
| 44 |  | 
| 45 | typedef struct _GtkMenuItem        ; | 
| 46 | typedef struct _GtkMenuItemClass   ; | 
| 47 | typedef struct  ; | 
| 48 |  | 
| 49 | struct  | 
| 50 | { | 
| 51 |   GtkBin ; | 
| 52 |  | 
| 53 |   /*< private >*/ | 
| 54 |   GtkMenuItemPrivate *; | 
| 55 | }; | 
| 56 |  | 
| 57 | /** | 
| 58 |  * GtkMenuItemClass: | 
| 59 |  * @parent_class: The parent class. | 
| 60 |  * @hide_on_activate: If %TRUE, then we should always | 
| 61 |  *    hide the menu when the %GtkMenuItem is activated. Otherwise, | 
| 62 |  *    it is up to the caller. | 
| 63 |  * @activate: Signal emitted when the item is activated. | 
| 64 |  * @activate_item: Signal emitted when the item is activated, but also | 
| 65 |  *    if the menu item has a submenu. | 
| 66 |  * @toggle_size_request:  | 
| 67 |  * @toggle_size_allocate:  | 
| 68 |  * @set_label: Sets @text on the #GtkMenuItem label | 
| 69 |  * @get_label: Gets @text from the #GtkMenuItem label | 
| 70 |  * @select: Signal emitted when the item is selected. | 
| 71 |  * @deselect: Signal emitted when the item is deselected. | 
| 72 |  */ | 
| 73 | struct  | 
| 74 | { | 
| 75 |   GtkBinClass ; | 
| 76 |  | 
| 77 |   /*< public >*/ | 
| 78 |  | 
| 79 |   /* If the following flag is true, then we should always | 
| 80 |    * hide the menu when the MenuItem is activated. Otherwise, | 
| 81 |    * it is up to the caller. For instance, when navigating | 
| 82 |    * a menu with the keyboard, <Space> doesn't hide, but | 
| 83 |    * <Return> does. | 
| 84 |    */ | 
| 85 |   guint  : 1; | 
| 86 |  | 
| 87 |   void (* )             (GtkMenuItem *); | 
| 88 |   void (* )        (GtkMenuItem *); | 
| 89 |   void (* )  (GtkMenuItem *, | 
| 90 |                                  gint        *requisition); | 
| 91 |   void (* ) (GtkMenuItem *, | 
| 92 |                                  gint         allocation); | 
| 93 |   void (* )            (GtkMenuItem *, | 
| 94 |                                  const gchar *label); | 
| 95 |   const gchar * (* )   (GtkMenuItem *); | 
| 96 |  | 
| 97 |   void (* )               (GtkMenuItem *); | 
| 98 |   void (* )             (GtkMenuItem *); | 
| 99 |  | 
| 100 |   /*< private >*/ | 
| 101 |  | 
| 102 |   /* Padding for future expansion */ | 
| 103 |   void (*) (void); | 
| 104 |   void (*) (void); | 
| 105 |   void (*) (void); | 
| 106 |   void (*) (void); | 
| 107 | }; | 
| 108 |  | 
| 109 |  | 
| 110 | GDK_AVAILABLE_IN_ALL | 
| 111 | GType                   (void) G_GNUC_CONST; | 
| 112 |  | 
| 113 | GDK_AVAILABLE_IN_ALL | 
| 114 | GtkWidget*                   (void); | 
| 115 | GDK_AVAILABLE_IN_ALL | 
| 116 | GtkWidget*        (const gchar         *label); | 
| 117 | GDK_AVAILABLE_IN_ALL | 
| 118 | GtkWidget*     (const gchar         *label); | 
| 119 | GDK_AVAILABLE_IN_ALL | 
| 120 | void                 (GtkMenuItem         *, | 
| 121 |                                                GtkWidget           *); | 
| 122 | GDK_AVAILABLE_IN_ALL | 
| 123 | GtkWidget*           (GtkMenuItem         *); | 
| 124 | GDK_AVAILABLE_IN_ALL | 
| 125 | void                      (GtkMenuItem         *); | 
| 126 | GDK_AVAILABLE_IN_ALL | 
| 127 | void                    (GtkMenuItem         *); | 
| 128 | GDK_AVAILABLE_IN_ALL | 
| 129 | void                    (GtkMenuItem         *); | 
| 130 | GDK_AVAILABLE_IN_ALL | 
| 131 | void         (GtkMenuItem         *, | 
| 132 |                                                gint                *requisition); | 
| 133 | GDK_AVAILABLE_IN_ALL | 
| 134 | void        (GtkMenuItem         *, | 
| 135 |                                                gint                 allocation); | 
| 136 | GDK_DEPRECATED_IN_3_2 | 
| 137 | void         (GtkMenuItem         *, | 
| 138 |                                                gboolean             right_justified); | 
| 139 | GDK_DEPRECATED_IN_3_2 | 
| 140 | gboolean     (GtkMenuItem         *); | 
| 141 | GDK_AVAILABLE_IN_ALL | 
| 142 | void              (GtkMenuItem         *, | 
| 143 |                                                const gchar         *accel_path); | 
| 144 | GDK_AVAILABLE_IN_ALL | 
| 145 | const gchar *     (GtkMenuItem    *); | 
| 146 |  | 
| 147 | GDK_AVAILABLE_IN_ALL | 
| 148 | void                   (GtkMenuItem         *, | 
| 149 |                                                const gchar         *label); | 
| 150 | GDK_AVAILABLE_IN_ALL | 
| 151 | const gchar *          (GtkMenuItem         *); | 
| 152 |  | 
| 153 | GDK_AVAILABLE_IN_ALL | 
| 154 | void           (GtkMenuItem         *, | 
| 155 |                                                gboolean             setting); | 
| 156 | GDK_AVAILABLE_IN_ALL | 
| 157 | gboolean       (GtkMenuItem         *); | 
| 158 |  | 
| 159 | GDK_AVAILABLE_IN_ALL | 
| 160 | void        (GtkMenuItem        *, | 
| 161 |                                                 gboolean            reserve); | 
| 162 | GDK_AVAILABLE_IN_ALL | 
| 163 | gboolean    (GtkMenuItem        *); | 
| 164 |  | 
| 165 | G_END_DECLS | 
| 166 |  | 
| 167 | #endif /* __GTK_MENU_ITEM_H__ */ | 
| 168 |  |