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

Unified Diff: ui/gfx/native_widget_types.h

Issue 7467007: Adding Wayland support for ui/gfx (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Adding missing WaylandDisplay include Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/gtk_util.cc ('k') | ui/gfx/platform_font_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/native_widget_types.h
diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h
index a5afdbd93b9e4dab0824bd0a152a5b8b52fd9d7e..251b4d57d0db4fd4b4120f35e97fc978c8e17d08 100644
--- a/ui/gfx/native_widget_types.h
+++ b/ui/gfx/native_widget_types.h
@@ -55,6 +55,18 @@ 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;
+
+namespace ui {
+class WaylandWindow;
+class WaylandCursor;
+}
+
+typedef struct _GdkRegion GdkRegion;
#elif defined(TOOLKIT_USES_GTK)
typedef struct _PangoFontDescription PangoFontDescription;
typedef struct _GdkCursor GdkCursor;
@@ -87,6 +99,18 @@ typedef CGContext* NativeDrawingContext;
typedef void* NativeCursor;
typedef void* NativeMenu;
typedef void* NativeViewAccessible;
+#elif defined(USE_WAYLAND)
+typedef PangoFontDescription* NativeFont;
+typedef ui::WaylandWindow* NativeView;
+typedef ui::WaylandWindow* NativeWindow;
+typedef void* NativeEditView;
+typedef cairo_t* NativeDrawingContext;
+typedef void* NativeCursor;
+typedef void* NativeMenu;
+// TODO(dnicoara) This should be replaced with a cairo region or maybe
+// a Wayland specific region
+typedef GdkRegion* NativeRegion;
+typedef void* NativeViewAccessible;
#elif defined(USE_X11)
typedef PangoFontDescription* NativeFont;
typedef GtkWidget* NativeView;
@@ -141,7 +165,7 @@ static inline NativeView NativeViewFromIdInBrowser(NativeViewId id) {
// Convert a NativeView to a NativeViewId. See the comments at the top of
// this file.
-#if defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(USE_WAYLAND)
static inline NativeViewId IdFromNativeView(NativeView view) {
return reinterpret_cast<NativeViewId>(view);
}
@@ -157,6 +181,9 @@ UI_EXPORT 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_EXPORT 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;
« no previous file with comments | « ui/gfx/gtk_util.cc ('k') | ui/gfx/platform_font_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698