| 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 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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // specific typedef. | 36 // specific typedef. |
| 37 // | 37 // |
| 38 // NativeImage: The platform-specific image type used for drawing UI elements | 38 // NativeImage: The platform-specific image type used for drawing UI elements |
| 39 // in the browser. | 39 // in the browser. |
| 40 // | 40 // |
| 41 // The name 'View' here meshes with OS X where the UI elements are called | 41 // The name 'View' here meshes with OS X where the UI elements are called |
| 42 // 'views' and with our Chrome UI code where the elements are also called | 42 // 'views' and with our Chrome UI code where the elements are also called |
| 43 // 'views'. | 43 // 'views'. |
| 44 | 44 |
| 45 #if defined(USE_AURA) | 45 #if defined(USE_AURA) |
| 46 #include "ui/base/cursor/cursor.h" |
| 47 |
| 46 class SkRegion; | 48 class SkRegion; |
| 47 namespace aura { | 49 namespace aura { |
| 48 class Event; | 50 class Event; |
| 49 class Window; | 51 class Window; |
| 50 } | 52 } |
| 51 #endif // defined(USE_AURA) | 53 #endif // defined(USE_AURA) |
| 52 | 54 |
| 53 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
| 54 #include <windows.h> // NOLINT | 56 #include <windows.h> // NOLINT |
| 55 typedef struct HFONT__* HFONT; | 57 typedef struct HFONT__* HFONT; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 typedef struct _GtkWidget GtkWidget; | 97 typedef struct _GtkWidget GtkWidget; |
| 96 typedef struct _GtkWindow GtkWindow; | 98 typedef struct _GtkWindow GtkWindow; |
| 97 #elif defined(OS_ANDROID) | 99 #elif defined(OS_ANDROID) |
| 98 class ChromeView; | 100 class ChromeView; |
| 99 #endif | 101 #endif |
| 100 class SkBitmap; | 102 class SkBitmap; |
| 101 | 103 |
| 102 namespace gfx { | 104 namespace gfx { |
| 103 | 105 |
| 104 #if defined(USE_AURA) | 106 #if defined(USE_AURA) |
| 105 // See ui/aura/cursor.h for values. | 107 typedef ui::Cursor NativeCursor; |
| 106 typedef int NativeCursor; | |
| 107 typedef aura::Window* NativeView; | 108 typedef aura::Window* NativeView; |
| 108 typedef aura::Window* NativeWindow; | 109 typedef aura::Window* NativeWindow; |
| 109 typedef SkRegion* NativeRegion; | 110 typedef SkRegion* NativeRegion; |
| 110 typedef aura::Event* NativeEvent; | 111 typedef aura::Event* NativeEvent; |
| 111 #elif defined(OS_WIN) | 112 #elif defined(OS_WIN) |
| 112 typedef HCURSOR NativeCursor; | 113 typedef HCURSOR NativeCursor; |
| 113 typedef HWND NativeView; | 114 typedef HWND NativeView; |
| 114 typedef HWND NativeWindow; | 115 typedef HWND NativeWindow; |
| 115 typedef HRGN NativeRegion; | 116 typedef HRGN NativeRegion; |
| 116 typedef MSG NativeEvent; | 117 typedef MSG NativeEvent; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 typedef void* NativeViewAccessible; | 174 typedef void* NativeViewAccessible; |
| 174 #elif defined(OS_ANDROID) | 175 #elif defined(OS_ANDROID) |
| 175 typedef void* NativeFont; | 176 typedef void* NativeFont; |
| 176 typedef void* NativeEditView; | 177 typedef void* NativeEditView; |
| 177 typedef void* NativeDrawingContext; | 178 typedef void* NativeDrawingContext; |
| 178 typedef void* NativeMenu; | 179 typedef void* NativeMenu; |
| 179 typedef void* NativeViewAccessible; | 180 typedef void* NativeViewAccessible; |
| 180 #endif | 181 #endif |
| 181 | 182 |
| 182 // A constant value to indicate that gfx::NativeCursor refers to no cursor. | 183 // A constant value to indicate that gfx::NativeCursor refers to no cursor. |
| 184 #if defined(USE_AURA) |
| 185 const int kNullCursor = 0; |
| 186 #else |
| 183 const gfx::NativeCursor kNullCursor = static_cast<gfx::NativeCursor>(NULL); | 187 const gfx::NativeCursor kNullCursor = static_cast<gfx::NativeCursor>(NULL); |
| 188 #endif |
| 184 | 189 |
| 185 #if defined(OS_MACOSX) | 190 #if defined(OS_MACOSX) |
| 186 typedef NSImage NativeImageType; | 191 typedef NSImage NativeImageType; |
| 187 #elif defined(TOOLKIT_GTK) | 192 #elif defined(TOOLKIT_GTK) |
| 188 typedef GdkPixbuf NativeImageType; | 193 typedef GdkPixbuf NativeImageType; |
| 189 #else | 194 #else |
| 190 typedef SkBitmap NativeImageType; | 195 typedef SkBitmap NativeImageType; |
| 191 #endif | 196 #endif |
| 192 typedef NativeImageType* NativeImage; | 197 typedef NativeImageType* NativeImage; |
| 193 | 198 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 #elif defined(OS_ANDROID) | 307 #elif defined(OS_ANDROID) |
| 303 typedef uint64 AcceleratedWidget; | 308 typedef uint64 AcceleratedWidget; |
| 304 const AcceleratedWidget kNullAcceleratedWidget = 0; | 309 const AcceleratedWidget kNullAcceleratedWidget = 0; |
| 305 #else | 310 #else |
| 306 #error unknown platform | 311 #error unknown platform |
| 307 #endif | 312 #endif |
| 308 | 313 |
| 309 } // namespace gfx | 314 } // namespace gfx |
| 310 | 315 |
| 311 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ | 316 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ |
| OLD | NEW |