| 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_LIBGTKUI_GTK_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ |
| 6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ | 6 #define CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void ClearAuraTransientParent(GtkWidget* dialog); | 76 void ClearAuraTransientParent(GtkWidget* dialog); |
| 77 | 77 |
| 78 #if GTK_MAJOR_VERSION > 2 | 78 #if GTK_MAJOR_VERSION > 2 |
| 79 // These constants are defined in gtk/gtkenums.h in Gtk3.12 or later. | 79 // These constants are defined in gtk/gtkenums.h in Gtk3.12 or later. |
| 80 // They are added here as a convenience to avoid version checks, and | 80 // They are added here as a convenience to avoid version checks, and |
| 81 // can be removed once the sysroot is switched from Wheezy to Jessie. | 81 // can be removed once the sysroot is switched from Wheezy to Jessie. |
| 82 #define GTK_STATE_FLAG_LINK static_cast<GtkStateFlags>(1 << 9) | 82 #define GTK_STATE_FLAG_LINK static_cast<GtkStateFlags>(1 << 9) |
| 83 #define GTK_STATE_FLAG_VISITED static_cast<GtkStateFlags>(1 << 10) | 83 #define GTK_STATE_FLAG_VISITED static_cast<GtkStateFlags>(1 << 10) |
| 84 #define GTK_STATE_FLAG_CHECKED static_cast<GtkStateFlags>(1 << 11) | 84 #define GTK_STATE_FLAG_CHECKED static_cast<GtkStateFlags>(1 << 11) |
| 85 | 85 |
| 86 void* GetGdkSharedLibrary(); |
| 87 void* GetGtkSharedLibrary(); |
| 88 |
| 86 class CairoSurface { | 89 class CairoSurface { |
| 87 public: | 90 public: |
| 88 // Attaches a cairo surface to an SkBitmap so that GTK can render | 91 // Attaches a cairo surface to an SkBitmap so that GTK can render |
| 89 // into it. |bitmap| must outlive this CairoSurface. | 92 // into it. |bitmap| must outlive this CairoSurface. |
| 90 explicit CairoSurface(SkBitmap& bitmap); | 93 explicit CairoSurface(SkBitmap& bitmap); |
| 91 | 94 |
| 92 // Creates a new cairo surface with the given size. The memory for | 95 // Creates a new cairo surface with the given size. The memory for |
| 93 // this surface is deallocated when this CairoSurface is destroyed. | 96 // this surface is deallocated when this CairoSurface is destroyed. |
| 94 explicit CairoSurface(const gfx::Size& size); | 97 explicit CairoSurface(const gfx::Size& size); |
| 95 | 98 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // the background-color property. | 227 // the background-color property. |
| 225 SkColor GetSelectionBgColor(const char* css_selector); | 228 SkColor GetSelectionBgColor(const char* css_selector); |
| 226 | 229 |
| 227 // Get the color of the GtkSeparator specified by |css_selector|. | 230 // Get the color of the GtkSeparator specified by |css_selector|. |
| 228 SkColor GetSeparatorColor(const char* css_selector); | 231 SkColor GetSeparatorColor(const char* css_selector); |
| 229 #endif | 232 #endif |
| 230 | 233 |
| 231 } // namespace libgtkui | 234 } // namespace libgtkui |
| 232 | 235 |
| 233 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ | 236 #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_ |
| OLD | NEW |