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

Unified Diff: ui/base/gtk/gtk_screen_util.h

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RenderText fixup Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ui/base/gtk/gtk_screen_util.h
diff --git a/ui/base/gtk/gtk_screen_util.h b/ui/base/gtk/gtk_screen_util.h
index 312075081efcda30dc1a934de41f930221694ac8..b916cf238afd24cfea6e7c2fbdcfc7193a0ce1a3 100644
--- a/ui/base/gtk/gtk_screen_util.h
+++ b/ui/base/gtk/gtk_screen_util.h
@@ -10,6 +10,7 @@
#include "ui/base/ui_export.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/vector2d.h"
namespace ui {
@@ -22,8 +23,8 @@ UI_EXPORT gfx::Point ScreenPoint(GtkWidget* widget);
// Get the current location of the mouse cursor relative to the widget.
UI_EXPORT gfx::Point ClientPoint(GtkWidget* widget);
-// Gets the position of a gtk widget in screen coordinates.
-UI_EXPORT gfx::Point GetWidgetScreenPosition(GtkWidget* widget);
+// Gets the offset of a gtk widget from the origin in screen coordinates.
+UI_EXPORT gfx::Vector2d GetWidgetScreenOffset(GtkWidget* widget);
// Returns the bounds of the specified widget in screen coordinates.
UI_EXPORT gfx::Rect GetWidgetScreenBounds(GtkWidget* widget);

Powered by Google App Engine
This is Rietveld 408576698