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