OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_GTK_GTK_CUSTOM_MENU_H_ | |
6 #define CHROME_BROWSER_UI_GTK_GTK_CUSTOM_MENU_H_ | |
7 | |
8 // GtkCustomMenu is a GtkMenu subclass that can contain, and collaborates with, | |
9 // GtkCustomMenuItem instances. GtkCustomMenuItem is a GtkMenuItem that can | |
10 // have buttons and other normal widgets embeded in it. GtkCustomMenu exists | |
11 // only to override most of the button/motion/move callback functions so | |
12 // that the normal GtkMenu implementation doesn't handle events related to | |
13 // GtkCustomMenuItem items. | |
14 // | |
15 // For a more through overview of this system, see the comments in | |
16 // gtk_custom_menu_item.h. | |
17 | |
18 #include <gtk/gtk.h> | |
19 | |
20 G_BEGIN_DECLS | |
21 | |
22 #define GTK_TYPE_CUSTOM_MENU \ | |
23 (gtk_custom_menu_get_type()) | |
24 #define GTK_CUSTOM_MENU(obj) \ | |
25 (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_CUSTOM_MENU, GtkCustomMenu)) | |
26 #define GTK_CUSTOM_MENU_CLASS(klass) \ | |
27 (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_CUSTOM_MENU, GtkCustomMenuClass)) | |
28 #define GTK_IS_CUSTOM_MENU(obj) \ | |
29 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_CUSTOM_MENU)) | |
30 #define GTK_IS_CUSTOM_MENU_CLASS(klass) \ | |
31 (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_CUSTOM_MENU)) | |
32 #define GTK_CUSTOM_MENU_GET_CLASS(obj) \ | |
33 (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_CUSTOM_MENU, GtkCustomMenuClass)) | |
34 | |
35 typedef struct _GtkCustomMenu GtkCustomMenu; | |
36 typedef struct _GtkCustomMenuClass GtkCustomMenuClass; | |
37 | |
38 struct _GtkCustomMenu { | |
39 GtkMenu menu; | |
40 }; | |
41 | |
42 struct _GtkCustomMenuClass { | |
43 GtkMenuClass parent_class; | |
44 }; | |
45 | |
46 GType gtk_custom_menu_get_type(void) G_GNUC_CONST; | |
47 GtkWidget* gtk_custom_menu_new(); | |
48 | |
49 G_END_DECLS | |
50 | |
51 #endif // CHROME_BROWSER_UI_GTK_GTK_CUSTOM_MENU_H_ | |
OLD | NEW |