| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 BASE_GFX_NATIVE_WIDGET_TYPES_H_ | 5 #ifndef BASE_GFX_NATIVE_WIDGET_TYPES_H_ |
| 6 #define BASE_GFX_NATIVE_WIDGET_TYPES_H_ | 6 #define BASE_GFX_NATIVE_WIDGET_TYPES_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 namespace gfx { | 56 namespace gfx { |
| 57 | 57 |
| 58 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
| 59 typedef HWND NativeView; | 59 typedef HWND NativeView; |
| 60 typedef HWND NativeWindow; | 60 typedef HWND NativeWindow; |
| 61 typedef HWND NativeEditView; | 61 typedef HWND NativeEditView; |
| 62 typedef HDC NativeDrawingContext; | 62 typedef HDC NativeDrawingContext; |
| 63 typedef HCURSOR NativeCursor; | 63 typedef HCURSOR NativeCursor; |
| 64 typedef HMENU NativeMenu; |
| 64 #elif defined(OS_MACOSX) | 65 #elif defined(OS_MACOSX) |
| 65 typedef NSView* NativeView; | 66 typedef NSView* NativeView; |
| 66 typedef NSWindow* NativeWindow; | 67 typedef NSWindow* NativeWindow; |
| 67 typedef NSTextField* NativeEditView; | 68 typedef NSTextField* NativeEditView; |
| 68 typedef CGContext* NativeDrawingContext; | 69 typedef CGContext* NativeDrawingContext; |
| 69 typedef void* NativeCursor; | 70 typedef void* NativeCursor; |
| 71 typedef void* NativeMenu; |
| 70 #elif defined(OS_LINUX) | 72 #elif defined(OS_LINUX) |
| 71 typedef GtkWidget* NativeView; | 73 typedef GtkWidget* NativeView; |
| 72 typedef GtkWindow* NativeWindow; | 74 typedef GtkWindow* NativeWindow; |
| 73 typedef GtkWidget* NativeEditView; | 75 typedef GtkWidget* NativeEditView; |
| 74 typedef cairo_surface_t* NativeDrawingContext; | 76 typedef cairo_surface_t* NativeDrawingContext; |
| 75 typedef GdkCursor* NativeCursor; | 77 typedef GdkCursor* NativeCursor; |
| 78 typedef GtkWidget* NativeMenu; |
| 76 #endif | 79 #endif |
| 77 | 80 |
| 78 // Note: for test_shell we're packing a pointer into the NativeViewId. So, if | 81 // Note: for test_shell we're packing a pointer into the NativeViewId. So, if |
| 79 // you make it a type which is smaller than a pointer, you have to fix | 82 // you make it a type which is smaller than a pointer, you have to fix |
| 80 // test_shell. | 83 // test_shell. |
| 81 // | 84 // |
| 82 // See comment at the top of the file for usage. | 85 // See comment at the top of the file for usage. |
| 83 typedef intptr_t NativeViewId; | 86 typedef intptr_t NativeViewId; |
| 84 | 87 |
| 85 // Convert a NativeViewId to a NativeView. | 88 // Convert a NativeViewId to a NativeView. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 107 return reinterpret_cast<NativeViewId>(view); | 110 return reinterpret_cast<NativeViewId>(view); |
| 108 } | 111 } |
| 109 #elif defined(OS_LINUX) | 112 #elif defined(OS_LINUX) |
| 110 // Not inlined because it involves pulling too many headers. | 113 // Not inlined because it involves pulling too many headers. |
| 111 NativeViewId IdFromNativeView(NativeView view); | 114 NativeViewId IdFromNativeView(NativeView view); |
| 112 #endif // defined(OS_LINUX) | 115 #endif // defined(OS_LINUX) |
| 113 | 116 |
| 114 } // namespace gfx | 117 } // namespace gfx |
| 115 | 118 |
| 116 #endif // BASE_GFX_NATIVE_WIDGET_TYPES_H_ | 119 #endif // BASE_GFX_NATIVE_WIDGET_TYPES_H_ |
| OLD | NEW |