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 UI_GFX_LINUX_UTIL_H_ | 5 #ifndef UI_GFX_LINUX_UTIL_H_ |
6 #define UI_GFX_LINUX_UTIL_H_ | 6 #define UI_GFX_LINUX_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <glib-object.h> | 9 #include <glib-object.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "ui/base/ui_export.h" | 16 #include "ui/base/ui_export.h" |
17 | 17 |
18 typedef struct _PangoContext PangoContext; | 18 typedef struct _PangoContext PangoContext; |
19 | 19 |
20 class SkBitmap; | |
21 | |
22 namespace gfx { | 20 namespace gfx { |
23 | 21 |
24 class Rect; | |
25 | |
26 // Creates and returns a PangoContext. The caller owns the context. | 22 // Creates and returns a PangoContext. The caller owns the context. |
27 PangoContext* GetPangoContext(); | 23 PangoContext* GetPangoContext(); |
28 | 24 |
29 // Returns the resolution (DPI) used by pango. A negative values means the | 25 // Returns the resolution (DPI) used by pango. A negative values means the |
30 // resolution hasn't been set. | 26 // resolution hasn't been set. |
31 double GetPangoResolution(); | 27 double GetPangoResolution(); |
32 | 28 |
33 // Change windows accelerator style to GTK style. (GTK uses _ for | 29 // Change windows accelerator style to GTK style. (GTK uses _ for |
34 // accelerators. Windows uses & with && as an escape for &.) | 30 // accelerators. Windows uses & with && as an escape for &.) |
35 UI_EXPORT std::string ConvertAcceleratorsFromWindowsStyle( | 31 UI_EXPORT std::string ConvertAcceleratorsFromWindowsStyle( |
(...skipping 21 matching lines...) Expand all Loading... |
57 void operator()(U* ptr) const { | 53 void operator()(U* ptr) const { |
58 if (ptr) | 54 if (ptr) |
59 g_object_unref(ptr); | 55 g_object_unref(ptr); |
60 } | 56 } |
61 }; | 57 }; |
62 | 58 |
63 typedef scoped_ptr_malloc<T, GObjectUnrefer<T> > Type; | 59 typedef scoped_ptr_malloc<T, GObjectUnrefer<T> > Type; |
64 }; | 60 }; |
65 | 61 |
66 #endif // UI_GFX_LINUX_UTIL_H_ | 62 #endif // UI_GFX_LINUX_UTIL_H_ |
OLD | NEW |