| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 std::string BuildTooltipTitleFor(string16 title, const GURL& url); | 199 std::string BuildTooltipTitleFor(string16 title, const GURL& url); |
| 200 | 200 |
| 201 // Draws a GTK text entry with the style parameters of GtkEntry | 201 // Draws a GTK text entry with the style parameters of GtkEntry |
| 202 // |offscreen_entry| onto |widget_to_draw_on| in the rectangle |rec|. Drawing | 202 // |offscreen_entry| onto |widget_to_draw_on| in the rectangle |rec|. Drawing |
| 203 // is only done in the clip rectangle |dirty_rec|. | 203 // is only done in the clip rectangle |dirty_rec|. |
| 204 void DrawTextEntryBackground(GtkWidget* offscreen_entry, | 204 void DrawTextEntryBackground(GtkWidget* offscreen_entry, |
| 205 GtkWidget* widget_to_draw_on, | 205 GtkWidget* widget_to_draw_on, |
| 206 GdkRectangle* dirty_rec, | 206 GdkRectangle* dirty_rec, |
| 207 GdkRectangle* rec); | 207 GdkRectangle* rec); |
| 208 | 208 |
| 209 // Set up the text to be displayed by |layout|. |
| 210 void SetLayoutText(PangoLayout* layout, const string16& text); |
| 211 |
| 209 // Draws the background of the toolbar area subject to the expose rectangle | 212 // Draws the background of the toolbar area subject to the expose rectangle |
| 210 // |event| and starting image tiling from |tabstrip_origin|. | 213 // |event| and starting image tiling from |tabstrip_origin|. |
| 211 void DrawThemedToolbarBackground(GtkWidget* widget, | 214 void DrawThemedToolbarBackground(GtkWidget* widget, |
| 212 cairo_t* cr, | 215 cairo_t* cr, |
| 213 GdkEventExpose* event, | 216 GdkEventExpose* event, |
| 214 const gfx::Point& tabstrip_origin, | 217 const gfx::Point& tabstrip_origin, |
| 215 GtkThemeService* provider); | 218 GtkThemeService* provider); |
| 216 | 219 |
| 217 // Returns the two colors averaged together. | 220 // Returns the two colors averaged together. |
| 218 GdkColor AverageColors(GdkColor color_one, GdkColor color_two); | 221 GdkColor AverageColors(GdkColor color_one, GdkColor color_two); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 void ApplyMessageDialogQuirks(GtkWidget* dialog); | 325 void ApplyMessageDialogQuirks(GtkWidget* dialog); |
| 323 | 326 |
| 324 // Performs Cut/Copy/Paste operation on the |window|. | 327 // Performs Cut/Copy/Paste operation on the |window|. |
| 325 void DoCut(BrowserWindow* window); | 328 void DoCut(BrowserWindow* window); |
| 326 void DoCopy(BrowserWindow* window); | 329 void DoCopy(BrowserWindow* window); |
| 327 void DoPaste(BrowserWindow* window); | 330 void DoPaste(BrowserWindow* window); |
| 328 | 331 |
| 329 } // namespace gtk_util | 332 } // namespace gtk_util |
| 330 | 333 |
| 331 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ | 334 #endif // CHROME_BROWSER_UI_GTK_GTK_UTIL_H_ |
| OLD | NEW |