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 | /* |
21 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
22 | * file for a list of people on the GTK+ Team. See the ChangeLog |
23 | * files for a list of changes. These files are distributed with |
24 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
25 | */ |
26 | |
27 | #ifndef __GTK_MENU_ITEM_H__ |
28 | #define |
29 | |
30 | |
31 | #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
32 | #error "Only <gtk/gtk.h> can be included directly." |
33 | #endif |
34 | |
35 | #include <gtk/gtkitem.h> |
36 | |
37 | |
38 | G_BEGIN_DECLS |
39 | |
40 | #define (gtk_menu_item_get_type ()) |
41 | #define (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MENU_ITEM, GtkMenuItem)) |
42 | #define (klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_ITEM, GtkMenuItemClass)) |
43 | #define (obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MENU_ITEM)) |
44 | #define (klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_ITEM)) |
45 | #define (obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MENU_ITEM, GtkMenuItemClass)) |
46 | |
47 | |
48 | typedef struct _GtkMenuItem ; |
49 | typedef struct _GtkMenuItemClass ; |
50 | |
51 | struct |
52 | { |
53 | GtkItem ; |
54 | |
55 | GtkWidget *GSEAL (); |
56 | GdkWindow *GSEAL (); |
57 | |
58 | guint16 GSEAL (); |
59 | guint16 GSEAL (); |
60 | gchar *GSEAL (); |
61 | |
62 | guint GSEAL () : 1; |
63 | guint GSEAL () : 1; |
64 | guint GSEAL () : 1; |
65 | guint GSEAL (): 1; |
66 | guint GSEAL () : 1; |
67 | guint GSEAL () : 1; |
68 | guint GSEAL (); |
69 | }; |
70 | |
71 | struct |
72 | { |
73 | GtkItemClass ; |
74 | |
75 | /* If the following flag is true, then we should always hide |
76 | * the menu when the MenuItem is activated. Otherwise, the |
77 | * it is up to the caller. For instance, when navigating |
78 | * a menu with the keyboard, <Space> doesn't hide, but |
79 | * <Return> does. |
80 | */ |
81 | guint : 1; |
82 | |
83 | void (* ) (GtkMenuItem *); |
84 | void (* ) (GtkMenuItem *); |
85 | void (* ) (GtkMenuItem *, |
86 | gint *requisition); |
87 | void (* ) (GtkMenuItem *, |
88 | gint allocation); |
89 | void (* ) (GtkMenuItem *, |
90 | const gchar *label); |
91 | const gchar *(* ) (GtkMenuItem *); |
92 | |
93 | /* Padding for future expansion */ |
94 | void (*) (void); |
95 | void (*) (void); |
96 | }; |
97 | |
98 | |
99 | GType (void) G_GNUC_CONST; |
100 | GtkWidget* (void); |
101 | GtkWidget* (const gchar *label); |
102 | GtkWidget* (const gchar *label); |
103 | void (GtkMenuItem *, |
104 | GtkWidget *); |
105 | GtkWidget* (GtkMenuItem *); |
106 | void (GtkMenuItem *); |
107 | void (GtkMenuItem *); |
108 | void (GtkMenuItem *); |
109 | void (GtkMenuItem *, |
110 | gint *requisition); |
111 | void (GtkMenuItem *, |
112 | gint allocation); |
113 | void (GtkMenuItem *, |
114 | gboolean right_justified); |
115 | gboolean (GtkMenuItem *); |
116 | void (GtkMenuItem *, |
117 | const gchar *accel_path); |
118 | const gchar* (GtkMenuItem *); |
119 | |
120 | void (GtkMenuItem *, |
121 | const gchar *label); |
122 | const gchar * (GtkMenuItem *); |
123 | |
124 | void (GtkMenuItem *, |
125 | gboolean setting); |
126 | gboolean (GtkMenuItem *); |
127 | |
128 | /* private */ |
129 | void (GtkMenuItem *, |
130 | const gchar *prefix, |
131 | GtkAccelGroup *accel_group, |
132 | gboolean group_changed); |
133 | gboolean (GtkWidget *); |
134 | void (GtkWidget *, |
135 | gboolean with_delay); |
136 | void (GtkWidget *); |
137 | |
138 | #ifndef GTK_DISABLE_DEPRECATED |
139 | void (GtkMenuItem *); |
140 | #define (menu_item) gtk_menu_item_set_right_justified ((menu_item), TRUE) |
141 | #endif /* GTK_DISABLE_DEPRECATED */ |
142 | |
143 | G_END_DECLS |
144 | |
145 | #endif /* __GTK_MENU_ITEM_H__ */ |
146 | |