Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1980)

Side by Side Diff: chrome/common/gtk_util.h

Issue 155308: Fix the Linux tab strip zone calculation when using the skyline. We are look... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_COMMON_GTK_UTIL_H_ 5 #ifndef CHROME_COMMON_GTK_UTIL_H_
6 #define CHROME_COMMON_GTK_UTIL_H_ 6 #define CHROME_COMMON_GTK_UTIL_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // Force the font size of the widget to |size_pixels|. 68 // Force the font size of the widget to |size_pixels|.
69 void ForceFontSizePixels(GtkWidget* widget, double size_pixels); 69 void ForceFontSizePixels(GtkWidget* widget, double size_pixels);
70 70
71 // Gets the position of a gtk widget in screen coordinates. 71 // Gets the position of a gtk widget in screen coordinates.
72 gfx::Point GetWidgetScreenPosition(GtkWidget* widget); 72 gfx::Point GetWidgetScreenPosition(GtkWidget* widget);
73 73
74 // Returns the bounds of the specified widget in screen coordinates. 74 // Returns the bounds of the specified widget in screen coordinates.
75 gfx::Rect GetWidgetScreenBounds(GtkWidget* widget); 75 gfx::Rect GetWidgetScreenBounds(GtkWidget* widget);
76 76
77 // Converts a point in a widget to screen coordinates. 77 // Converts a point in a widget to screen coordinates. The point |p| is
78 // relative to the widgets top-left origin.
78 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p); 79 void ConvertWidgetPointToScreen(GtkWidget* widget, gfx::Point* p);
79 80
80 // Initialize some GTK settings so that our dialogs are consistent. 81 // Initialize some GTK settings so that our dialogs are consistent.
81 void InitRCStyles(); 82 void InitRCStyles();
82 83
83 // Stick the widget in the given hbox without expanding vertically. The widget 84 // Stick the widget in the given hbox without expanding vertically. The widget
84 // is packed at the start of the hbox. This is useful for widgets that would 85 // is packed at the start of the hbox. This is useful for widgets that would
85 // otherwise expand to fill the vertical space of the hbox (e.g. buttons). 86 // otherwise expand to fill the vertical space of the hbox (e.g. buttons).
86 void CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, bool pack_at_end, 87 void CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, bool pack_at_end,
87 int padding); 88 int padding);
(...skipping 17 matching lines...) Expand all
105 // Returns the mirrored x value for |bounds| if the layout is RTL; otherwise, 106 // Returns the mirrored x value for |bounds| if the layout is RTL; otherwise,
106 // the original value is returned unchanged. 107 // the original value is returned unchanged.
107 int MirroredLeftPointForRect(GtkWidget* widget, const gfx::Rect& bounds); 108 int MirroredLeftPointForRect(GtkWidget* widget, const gfx::Rect& bounds);
108 109
109 // Returns true if the pointer is currently inside the widget. 110 // Returns true if the pointer is currently inside the widget.
110 bool WidgetContainsCursor(GtkWidget* widget); 111 bool WidgetContainsCursor(GtkWidget* widget);
111 112
112 } // namespace gtk_util 113 } // namespace gtk_util
113 114
114 #endif // CHROME_COMMON_GTK_UTIL_H_ 115 #endif // CHROME_COMMON_GTK_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698