Chromium Code Reviews| Index: ui/gfx/native_widget_types.h |
| diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h |
| index 479f366fd517fd566db532e1ca143fe062ffcd28..3ee258cb74a77dee3842fd67528dbe468f377a57 100644 |
| --- a/ui/gfx/native_widget_types.h |
| +++ b/ui/gfx/native_widget_types.h |
| @@ -55,6 +55,14 @@ class NSView; |
| class NSWindow; |
| class NSTextField; |
| #endif // __OBJC__ |
| +#elif defined(USE_WAYLAND) |
| +typedef struct _PangoFontDescription PangoFontDescription; |
| +typedef struct _cairo cairo_t; |
| +typedef struct _GdkPixbuf GdkPixbuf; |
| +struct wl_egl_window; |
| +class WaylandWindow; |
| +class WaylandCursor; |
| +typedef struct _GdkRegion GdkRegion; |
| #elif defined(TOOLKIT_USES_GTK) |
| typedef struct _PangoFontDescription PangoFontDescription; |
| typedef struct _GdkCursor GdkCursor; |
| @@ -87,6 +95,18 @@ typedef CGContext* NativeDrawingContext; |
| typedef void* NativeCursor; |
| typedef void* NativeMenu; |
| typedef void* NativeViewAccessible; |
| +#elif defined(USE_WAYLAND) |
| +typedef PangoFontDescription* NativeFont; |
| +typedef WaylandWindow* NativeView; |
| +typedef WaylandWindow* NativeWindow; |
| +typedef void* NativeEditView; |
| +typedef cairo_t* NativeDrawingContext; |
| +typedef void* NativeCursor; |
| +typedef void* NativeMenu; |
| +// TODO This should be replaced with a cairo region or maybe |
|
jonathan.backer
2011/07/26 14:56:27
TODO almost always has an LDAP (e.g. TODO(dnicoara
|
| +// a Wayland specific region |
| +typedef GdkRegion* NativeRegion; |
| +typedef void* NativeViewAccessible; |
| #elif defined(USE_X11) |
| typedef PangoFontDescription* NativeFont; |
| typedef GtkWidget* NativeView; |
| @@ -145,6 +165,10 @@ static inline NativeView NativeViewFromIdInBrowser(NativeViewId id) { |
| static inline NativeViewId IdFromNativeView(NativeView view) { |
| return reinterpret_cast<NativeViewId>(view); |
| } |
| +#elif defined(USE_WAYLAND) |
|
jonathan.backer
2011/07/26 14:56:27
Isn't this exactly the same as above? (e.g. roll i
|
| +static inline NativeViewId IdFromNativeView(NativeView view) { |
| + return reinterpret_cast<NativeViewId>(view); |
| +} |
| #elif defined(USE_X11) |
| // Not inlined because it involves pulling too many headers. |
| UI_API NativeViewId IdFromNativeView(NativeView view); |
| @@ -157,6 +181,9 @@ UI_API NativeViewId IdFromNativeView(NativeView view); |
| #if defined(OS_WIN) |
| typedef HWND PluginWindowHandle; |
| const PluginWindowHandle kNullPluginWindow = NULL; |
| +#elif defined(USE_WAYLAND) |
| + typedef struct wl_egl_window* PluginWindowHandle; |
| + const PluginWindowHandle kNullPluginWindow = NULL; |
| #elif defined(USE_X11) |
| typedef unsigned long PluginWindowHandle; |
| const PluginWindowHandle kNullPluginWindow = 0; |
| @@ -179,6 +206,9 @@ UI_API NativeViewId IdFromNativeView(NativeView view); |
| #if defined(OS_WIN) |
| typedef HWND AcceleratedWidget; |
| const AcceleratedWidget kNullAcceleratedWidget = NULL; |
| +#elif defined(USE_WAYLAND) |
| +typedef struct wl_egl_window* AcceleratedWidget; |
| +const AcceleratedWidget kNullAcceleratedWidget = NULL; |
| #elif defined(USE_X11) |
| typedef unsigned long AcceleratedWidget; |
| const AcceleratedWidget kNullAcceleratedWidget = 0; |