| OLD | NEW |
| 1 // Copyright (c) 2010 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_GTK_GTK_CUSTOM_MENU_ITEM_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_CUSTOM_MENU_ITEM_H_ |
| 6 #define CHROME_BROWSER_GTK_GTK_CUSTOM_MENU_ITEM_H_ | 6 #define CHROME_BROWSER_UI_GTK_GTK_CUSTOM_MENU_ITEM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // GtkCustomMenuItem is a GtkMenuItem subclass that has buttons in it and acts | 9 // GtkCustomMenuItem is a GtkMenuItem subclass that has buttons in it and acts |
| 10 // to support this. GtkCustomMenuItems only render properly when put in a | 10 // to support this. GtkCustomMenuItems only render properly when put in a |
| 11 // GtkCustomMenu; there's a lot of collaboration between these two classes | 11 // GtkCustomMenu; there's a lot of collaboration between these two classes |
| 12 // necessary to work around how gtk normally does menus. | 12 // necessary to work around how gtk normally does menus. |
| 13 // | 13 // |
| 14 // We can't rely on the normal event infrastructure. While a menu is up, the | 14 // We can't rely on the normal event infrastructure. While a menu is up, the |
| 15 // GtkMenu has a grab on all events. Instead of trying to pump events through | 15 // GtkMenu has a grab on all events. Instead of trying to pump events through |
| 16 // the normal channels, we have the GtkCustomMenu selectively forward mouse | 16 // the normal channels, we have the GtkCustomMenu selectively forward mouse |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 gboolean gtk_custom_menu_item_try_no_dismiss_command( | 131 gboolean gtk_custom_menu_item_try_no_dismiss_command( |
| 132 GtkCustomMenuItem* menu_item); | 132 GtkCustomMenuItem* menu_item); |
| 133 | 133 |
| 134 // Calls |callback| with every button and button-label in the container. | 134 // Calls |callback| with every button and button-label in the container. |
| 135 void gtk_custom_menu_item_foreach_button(GtkCustomMenuItem* menu_item, | 135 void gtk_custom_menu_item_foreach_button(GtkCustomMenuItem* menu_item, |
| 136 GtkCallback callback, | 136 GtkCallback callback, |
| 137 gpointer callback_data); | 137 gpointer callback_data); |
| 138 | 138 |
| 139 G_END_DECLS | 139 G_END_DECLS |
| 140 | 140 |
| 141 #endif // CHROME_BROWSER_GTK_GTK_CUSTOM_MENU_ITEM_H_ | 141 #endif // CHROME_BROWSER_UI_GTK_GTK_CUSTOM_MENU_ITEM_H_ |
| OLD | NEW |