| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 6 #define CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // relative to the widget's top-left origin. | 106 // relative to the widget's top-left origin. |
| 107 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p); | 107 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p); |
| 108 | 108 |
| 109 // Stick the widget in the given hbox without expanding vertically. The widget | 109 // Stick the widget in the given hbox without expanding vertically. The widget |
| 110 // is packed at the start of the hbox. This is useful for widgets that would | 110 // is packed at the start of the hbox. This is useful for widgets that would |
| 111 // otherwise expand to fill the vertical space of the hbox | 111 // otherwise expand to fill the vertical space of the hbox |
| 112 // (e.g. buttons). Returns the vbox that widget was packed in. | 112 // (e.g. buttons). Returns the vbox that widget was packed in. |
| 113 GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, | 113 GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, |
| 114 bool pack_at_end, int padding); | 114 bool pack_at_end, int padding); |
| 115 | 115 |
| 116 // Enumerates the top-level gdk windows of the current display. | |
| 117 void EnumerateTopLevelWindows(ui::EnumerateWindowsDelegate* delegate); | |
| 118 | |
| 119 // Set that clicking the button with the given mouse buttons will cause a click | 116 // Set that clicking the button with the given mouse buttons will cause a click |
| 120 // event. | 117 // event. |
| 121 // NOTE: If you need to connect to the button-press-event or | 118 // NOTE: If you need to connect to the button-press-event or |
| 122 // button-release-event signals, do so before calling this function. | 119 // button-release-event signals, do so before calling this function. |
| 123 void SetButtonClickableByMouseButtons(GtkWidget* button, | 120 void SetButtonClickableByMouseButtons(GtkWidget* button, |
| 124 bool left, bool middle, bool right); | 121 bool left, bool middle, bool right); |
| 125 | 122 |
| 126 // Set that a button causes a page navigation. In particular, it will accept | 123 // Set that a button causes a page navigation. In particular, it will accept |
| 127 // middle clicks. Warning: only call this *after* you have connected your | 124 // middle clicks. Warning: only call this *after* you have connected your |
| 128 // own handlers for button-press and button-release events, or you will not get | 125 // own handlers for button-press and button-release events, or you will not get |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 void ApplyMessageDialogQuirks(GtkWidget* dialog); | 310 void ApplyMessageDialogQuirks(GtkWidget* dialog); |
| 314 | 311 |
| 315 // Performs Cut/Copy/Paste operation on the |window|. | 312 // Performs Cut/Copy/Paste operation on the |window|. |
| 316 void DoCut(BrowserWindow* window); | 313 void DoCut(BrowserWindow* window); |
| 317 void DoCopy(BrowserWindow* window); | 314 void DoCopy(BrowserWindow* window); |
| 318 void DoPaste(BrowserWindow* window); | 315 void DoPaste(BrowserWindow* window); |
| 319 | 316 |
| 320 } // namespace gtk_util | 317 } // namespace gtk_util |
| 321 | 318 |
| 322 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 319 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
| OLD | NEW |