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_NATIVE_WIDGET_TYPES_H_ | 5 #ifndef UI_GFX_NATIVE_WIDGET_TYPES_H_ |
6 #define UI_GFX_NATIVE_WIDGET_TYPES_H_ | 6 #define UI_GFX_NATIVE_WIDGET_TYPES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 // NativeImage: The platform-specific image type used for drawing UI elements | 32 // NativeImage: The platform-specific image type used for drawing UI elements |
33 // in the browser. | 33 // in the browser. |
34 // | 34 // |
35 // The name 'View' here meshes with OS X where the UI elements are called | 35 // The name 'View' here meshes with OS X where the UI elements are called |
36 // 'views' and with our Chrome UI code where the elements are also called | 36 // 'views' and with our Chrome UI code where the elements are also called |
37 // 'views'. | 37 // 'views'. |
38 | 38 |
39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
40 #include <windows.h> // NOLINT | 40 #include <windows.h> // NOLINT |
41 typedef struct HFONT__* HFONT; | 41 typedef struct HFONT__* HFONT; |
| 42 struct IAccessible; |
42 #elif defined(OS_MACOSX) | 43 #elif defined(OS_MACOSX) |
43 struct CGContext; | 44 struct CGContext; |
44 #ifdef __OBJC__ | 45 #ifdef __OBJC__ |
45 @class NSFont; | 46 @class NSFont; |
46 @class NSImage; | 47 @class NSImage; |
47 @class NSView; | 48 @class NSView; |
48 @class NSWindow; | 49 @class NSWindow; |
49 @class NSTextField; | 50 @class NSTextField; |
50 #else | 51 #else |
51 class NSFont; | 52 class NSFont; |
(...skipping 17 matching lines...) Expand all Loading... |
69 | 70 |
70 #if defined(OS_WIN) | 71 #if defined(OS_WIN) |
71 typedef HFONT NativeFont; | 72 typedef HFONT NativeFont; |
72 typedef HWND NativeView; | 73 typedef HWND NativeView; |
73 typedef HWND NativeWindow; | 74 typedef HWND NativeWindow; |
74 typedef HWND NativeEditView; | 75 typedef HWND NativeEditView; |
75 typedef HDC NativeDrawingContext; | 76 typedef HDC NativeDrawingContext; |
76 typedef HCURSOR NativeCursor; | 77 typedef HCURSOR NativeCursor; |
77 typedef HMENU NativeMenu; | 78 typedef HMENU NativeMenu; |
78 typedef HRGN NativeRegion; | 79 typedef HRGN NativeRegion; |
| 80 typedef IAccessible* NativeViewAccessible; |
79 #elif defined(OS_MACOSX) | 81 #elif defined(OS_MACOSX) |
80 typedef NSFont* NativeFont; | 82 typedef NSFont* NativeFont; |
81 typedef NSView* NativeView; | 83 typedef NSView* NativeView; |
82 typedef NSWindow* NativeWindow; | 84 typedef NSWindow* NativeWindow; |
83 typedef NSTextField* NativeEditView; | 85 typedef NSTextField* NativeEditView; |
84 typedef CGContext* NativeDrawingContext; | 86 typedef CGContext* NativeDrawingContext; |
85 typedef void* NativeCursor; | 87 typedef void* NativeCursor; |
86 typedef void* NativeMenu; | 88 typedef void* NativeMenu; |
| 89 typedef void* NativeViewAccessible; |
87 #elif defined(USE_X11) | 90 #elif defined(USE_X11) |
88 typedef PangoFontDescription* NativeFont; | 91 typedef PangoFontDescription* NativeFont; |
89 typedef GtkWidget* NativeView; | 92 typedef GtkWidget* NativeView; |
90 typedef GtkWindow* NativeWindow; | 93 typedef GtkWindow* NativeWindow; |
91 typedef GtkWidget* NativeEditView; | 94 typedef GtkWidget* NativeEditView; |
92 typedef cairo_t* NativeDrawingContext; | 95 typedef cairo_t* NativeDrawingContext; |
93 typedef GdkCursor* NativeCursor; | 96 typedef GdkCursor* NativeCursor; |
94 typedef GtkWidget* NativeMenu; | 97 typedef GtkWidget* NativeMenu; |
95 typedef GdkRegion* NativeRegion; | 98 typedef GdkRegion* NativeRegion; |
| 99 typedef void* NativeViewAccessible; |
96 #endif | 100 #endif |
97 | 101 |
98 #if defined(OS_MACOSX) | 102 #if defined(OS_MACOSX) |
99 typedef NSImage NativeImageType; | 103 typedef NSImage NativeImageType; |
100 #elif defined(TOOLKIT_GTK) | 104 #elif defined(TOOLKIT_GTK) |
101 typedef GdkPixbuf NativeImageType; | 105 typedef GdkPixbuf NativeImageType; |
102 #else | 106 #else |
103 typedef SkBitmap NativeImageType; | 107 typedef SkBitmap NativeImageType; |
104 #endif | 108 #endif |
105 typedef NativeImageType* NativeImage; | 109 typedef NativeImageType* NativeImage; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 typedef unsigned long AcceleratedWidget; | 183 typedef unsigned long AcceleratedWidget; |
180 const AcceleratedWidget kNullAcceleratedWidget = 0; | 184 const AcceleratedWidget kNullAcceleratedWidget = 0; |
181 #else | 185 #else |
182 typedef void* AcceleratedWidget; | 186 typedef void* AcceleratedWidget; |
183 const AcceleratedWidget kNullAcceleratedWidget = NULL; | 187 const AcceleratedWidget kNullAcceleratedWidget = NULL; |
184 #endif | 188 #endif |
185 | 189 |
186 } // namespace gfx | 190 } // namespace gfx |
187 | 191 |
188 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ | 192 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ |
OLD | NEW |