| 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_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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Returns the bounds of the specified widget in screen coordinates. | 120 // Returns the bounds of the specified widget in screen coordinates. |
| 121 gfx::Rect GetWidgetScreenBounds(GtkWidget* widget); | 121 gfx::Rect GetWidgetScreenBounds(GtkWidget* widget); |
| 122 | 122 |
| 123 // Retuns size of the |widget| without window manager decorations. | 123 // Retuns size of the |widget| without window manager decorations. |
| 124 gfx::Size GetWidgetSize(GtkWidget* widget); | 124 gfx::Size GetWidgetSize(GtkWidget* widget); |
| 125 | 125 |
| 126 // Converts a point in a widget to screen coordinates. The point |p| is | 126 // Converts a point in a widget to screen coordinates. The point |p| is |
| 127 // relative to the widget's top-left origin. | 127 // relative to the widget's top-left origin. |
| 128 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p); | 128 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p); |
| 129 | 129 |
| 130 // Initialize some GTK settings so that our dialogs are consistent. | |
| 131 void InitRCStyles(); | |
| 132 | |
| 133 // Stick the widget in the given hbox without expanding vertically. The widget | 130 // Stick the widget in the given hbox without expanding vertically. The widget |
| 134 // is packed at the start of the hbox. This is useful for widgets that would | 131 // is packed at the start of the hbox. This is useful for widgets that would |
| 135 // otherwise expand to fill the vertical space of the hbox | 132 // otherwise expand to fill the vertical space of the hbox |
| 136 // (e.g. buttons). Returns the vbox that widget was packed in. | 133 // (e.g. buttons). Returns the vbox that widget was packed in. |
| 137 GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, | 134 GtkWidget* CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, |
| 138 bool pack_at_end, int padding); | 135 bool pack_at_end, int padding); |
| 139 | 136 |
| 140 // Returns true if the screen is composited, false otherwise. | 137 // Returns true if the screen is composited, false otherwise. |
| 141 bool IsScreenComposited(); | 138 bool IsScreenComposited(); |
| 142 | 139 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 void ApplyMessageDialogQuirks(GtkWidget* dialog); | 336 void ApplyMessageDialogQuirks(GtkWidget* dialog); |
| 340 | 337 |
| 341 // Performs Cut/Copy/Paste operation on the |window|. | 338 // Performs Cut/Copy/Paste operation on the |window|. |
| 342 void DoCut(BrowserWindow* window); | 339 void DoCut(BrowserWindow* window); |
| 343 void DoCopy(BrowserWindow* window); | 340 void DoCopy(BrowserWindow* window); |
| 344 void DoPaste(BrowserWindow* window); | 341 void DoPaste(BrowserWindow* window); |
| 345 | 342 |
| 346 } // namespace gtk_util | 343 } // namespace gtk_util |
| 347 | 344 |
| 348 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 345 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
| OLD | NEW |