Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: ui/gfx/native_widget_types.h

Issue 2400873002: keep only one typedef for the native drawing context (Closed)
Patch Set: native_drawing_context.h Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/blit.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 typedef void* NativeCursor; 130 typedef void* NativeCursor;
131 typedef ui::ViewAndroid* NativeView; 131 typedef ui::ViewAndroid* NativeView;
132 typedef ui::WindowAndroid* NativeWindow; 132 typedef ui::WindowAndroid* NativeWindow;
133 typedef jobject NativeEvent; 133 typedef jobject NativeEvent;
134 #else 134 #else
135 #error Unknown build environment. 135 #error Unknown build environment.
136 #endif 136 #endif
137 137
138 #if defined(OS_WIN) 138 #if defined(OS_WIN)
139 typedef HFONT NativeFont; 139 typedef HFONT NativeFont;
140 typedef HDC NativeDrawingContext;
141 typedef IAccessible* NativeViewAccessible; 140 typedef IAccessible* NativeViewAccessible;
142 #elif defined(OS_IOS) 141 #elif defined(OS_IOS)
143 typedef UIFont* NativeFont; 142 typedef UIFont* NativeFont;
144 typedef CGContext* NativeDrawingContext;
145 #ifdef __OBJC__ 143 #ifdef __OBJC__
146 typedef id NativeViewAccessible; 144 typedef id NativeViewAccessible;
147 #else 145 #else
148 typedef void* NativeViewAccessible; 146 typedef void* NativeViewAccessible;
149 #endif // __OBJC__ 147 #endif // __OBJC__
150 #elif defined(OS_MACOSX) 148 #elif defined(OS_MACOSX)
151 typedef NSFont* NativeFont; 149 typedef NSFont* NativeFont;
152 typedef CGContext* NativeDrawingContext;
153 #ifdef __OBJC__ 150 #ifdef __OBJC__
154 typedef id NativeViewAccessible; 151 typedef id NativeViewAccessible;
155 #else 152 #else
156 typedef void* NativeViewAccessible; 153 typedef void* NativeViewAccessible;
157 #endif // __OBJC__ 154 #endif // __OBJC__
158 #else // Android, Linux, Chrome OS, etc. 155 #else // Android, Linux, Chrome OS, etc.
159 // Linux doesn't have a native font type. 156 // Linux doesn't have a native font type.
160 #if defined(USE_CAIRO)
161 typedef cairo_t* NativeDrawingContext;
162 #else
163 typedef void* NativeDrawingContext;
164 #endif // defined(USE_CAIRO)
165 #if defined(USE_X11) && !defined(OS_CHROMEOS) 157 #if defined(USE_X11) && !defined(OS_CHROMEOS)
166 typedef AtkObject* NativeViewAccessible; 158 typedef AtkObject* NativeViewAccessible;
167 #else 159 #else
168 typedef void* NativeViewAccessible; 160 typedef void* NativeViewAccessible;
169 #endif 161 #endif
170 #endif 162 #endif
171 163
172 // A constant value to indicate that gfx::NativeCursor refers to no cursor. 164 // A constant value to indicate that gfx::NativeCursor refers to no cursor.
173 #if defined(USE_AURA) 165 #if defined(USE_AURA)
174 const int kNullCursor = 0; 166 const int kNullCursor = 0;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 #elif defined(USE_OZONE) 203 #elif defined(USE_OZONE)
212 typedef int32_t AcceleratedWidget; 204 typedef int32_t AcceleratedWidget;
213 constexpr AcceleratedWidget kNullAcceleratedWidget = 0; 205 constexpr AcceleratedWidget kNullAcceleratedWidget = 0;
214 #else 206 #else
215 #error unknown platform 207 #error unknown platform
216 #endif 208 #endif
217 209
218 } // namespace gfx 210 } // namespace gfx
219 211
220 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ 212 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_
OLDNEW
« no previous file with comments | « ui/gfx/blit.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698