| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // Get the current location of the mouse cursor relative to the screen. | 231 // Get the current location of the mouse cursor relative to the screen. |
| 232 gfx::Point ScreenPoint(GtkWidget* widget); | 232 gfx::Point ScreenPoint(GtkWidget* widget); |
| 233 | 233 |
| 234 // Get the current location of the mouse cursor relative to the widget. | 234 // Get the current location of the mouse cursor relative to the widget. |
| 235 gfx::Point ClientPoint(GtkWidget* widget); | 235 gfx::Point ClientPoint(GtkWidget* widget); |
| 236 | 236 |
| 237 // Reverses a point in RTL mode. Used in making vectors of GdkPoints for window | 237 // Reverses a point in RTL mode. Used in making vectors of GdkPoints for window |
| 238 // shapes. | 238 // shapes. |
| 239 GdkPoint MakeBidiGdkPoint(gint x, gint y, gint width, bool ltr); | 239 GdkPoint MakeBidiGdkPoint(gint x, gint y, gint width, bool ltr); |
| 240 | 240 |
| 241 // Creates a tooltip string to be passed to gtk_widget_set_tooltip_markup from |
| 242 // the title and URL. |
| 243 std::string BuildTooltipTitleFor(string16 title, GURL url); |
| 244 |
| 241 // Draws a GTK text entry with the style parameters of GtkEntry | 245 // Draws a GTK text entry with the style parameters of GtkEntry |
| 242 // |offscreen_entry| onto |widget_to_draw_on| in the rectangle |rec|. Drawing | 246 // |offscreen_entry| onto |widget_to_draw_on| in the rectangle |rec|. Drawing |
| 243 // is only done in the clip rectangle |dirty_rec|. | 247 // is only done in the clip rectangle |dirty_rec|. |
| 244 void DrawTextEntryBackground(GtkWidget* offscreen_entry, | 248 void DrawTextEntryBackground(GtkWidget* offscreen_entry, |
| 245 GtkWidget* widget_to_draw_on, | 249 GtkWidget* widget_to_draw_on, |
| 246 GdkRectangle* dirty_rec, | 250 GdkRectangle* dirty_rec, |
| 247 GdkRectangle* rec); | 251 GdkRectangle* rec); |
| 248 | 252 |
| 249 // Draws the background of the toolbar area subject to the expose rectangle | 253 // Draws the background of the toolbar area subject to the expose rectangle |
| 250 // |event| and starting image tiling from |tabstrip_origin|. | 254 // |event| and starting image tiling from |tabstrip_origin|. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 void ApplyMessageDialogQuirks(GtkWidget* dialog); | 371 void ApplyMessageDialogQuirks(GtkWidget* dialog); |
| 368 | 372 |
| 369 // Performs Cut/Copy/Paste operation on the |window|. | 373 // Performs Cut/Copy/Paste operation on the |window|. |
| 370 void DoCut(BrowserWindow* window); | 374 void DoCut(BrowserWindow* window); |
| 371 void DoCopy(BrowserWindow* window); | 375 void DoCopy(BrowserWindow* window); |
| 372 void DoPaste(BrowserWindow* window); | 376 void DoPaste(BrowserWindow* window); |
| 373 | 377 |
| 374 } // namespace gtk_util | 378 } // namespace gtk_util |
| 375 | 379 |
| 376 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 380 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
| OLD | NEW |