| 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 #include "ui/gfx/gtk_util.h" | 5 #include "ui/gfx/gtk_util.h" |
| 6 | 6 |
| 7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 for (size_t i = 0; i < cutouts.size(); ++i) { | 130 for (size_t i = 0; i < cutouts.size(); ++i) { |
| 131 GdkRectangle rect = cutouts[i].ToGdkRectangle(); | 131 GdkRectangle rect = cutouts[i].ToGdkRectangle(); |
| 132 GdkRegion* rect_region = gdk_region_rectangle(&rect); | 132 GdkRegion* rect_region = gdk_region_rectangle(&rect); |
| 133 gdk_region_subtract(region, rect_region); | 133 gdk_region_subtract(region, rect_region); |
| 134 // TODO(deanm): It would be nice to be able to reuse the GdkRegion here. | 134 // TODO(deanm): It would be nice to be able to reuse the GdkRegion here. |
| 135 gdk_region_destroy(rect_region); | 135 gdk_region_destroy(rect_region); |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 GdkCursor* GetCursor(int type) { | 139 GdkCursor* GetCursor(int type) { |
| 140 static GdkCursorCache impl; | 140 CR_DEFINE_STATIC_LOCAL(GdkCursorCache, impl, ()); |
| 141 return impl.GetCursorImpl(static_cast<GdkCursorType>(type)); | 141 return impl.GetCursorImpl(static_cast<GdkCursorType>(type)); |
| 142 } | 142 } |
| 143 | 143 |
| 144 #if !defined(USE_WAYLAND) && !defined(USE_AURA) | 144 #if !defined(USE_WAYLAND) && !defined(USE_AURA) |
| 145 PangoContext* GetPangoContext() { | 145 PangoContext* GetPangoContext() { |
| 146 return gdk_pango_context_get(); | 146 return gdk_pango_context_get(); |
| 147 } | 147 } |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 void InitRCStyles() { | 150 void InitRCStyles() { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 170 " GtkDialog::button-spacing = 6\n" | 170 " GtkDialog::button-spacing = 6\n" |
| 171 " GtkDialog::content-area-spacing = 18\n" | 171 " GtkDialog::content-area-spacing = 18\n" |
| 172 " GtkDialog::content-area-border = 0\n" | 172 " GtkDialog::content-area-border = 0\n" |
| 173 "}\n" | 173 "}\n" |
| 174 "widget \"about-dialog\" style : application \"about-dialog\"\n"; | 174 "widget \"about-dialog\" style : application \"about-dialog\"\n"; |
| 175 | 175 |
| 176 gtk_rc_parse_string(kRCText); | 176 gtk_rc_parse_string(kRCText); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace gfx | 179 } // namespace gfx |
| OLD | NEW |