Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / gfx / native_widget_types.h
index 44fee5b..f79670d 100644 (file)
@@ -98,14 +98,7 @@ typedef struct _PangoFontDescription PangoFontDescription;
 typedef struct _cairo cairo_t;
 #endif
 
-#if defined(TOOLKIT_GTK)
-typedef struct _GdkCursor GdkCursor;
-typedef union _GdkEvent GdkEvent;
-typedef struct _GdkPixbuf GdkPixbuf;
-typedef struct _GdkRegion GdkRegion;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkWindow GtkWindow;
-#elif defined(OS_ANDROID)
+#if defined(OS_ANDROID)
 struct ANativeWindow;
 namespace ui {
 class WindowAndroid;
@@ -122,12 +115,6 @@ typedef aura::Window* NativeView;
 typedef aura::Window* NativeWindow;
 typedef SkRegion* NativeRegion;
 typedef ui::Event* NativeEvent;
-#elif defined(OS_WIN)
-typedef HCURSOR NativeCursor;
-typedef HWND NativeView;
-typedef HWND NativeWindow;
-typedef HRGN NativeRegion;
-typedef MSG NativeEvent;
 #elif defined(OS_IOS)
 typedef void* NativeCursor;
 typedef UIView* NativeView;
@@ -138,12 +125,6 @@ typedef NSCursor* NativeCursor;
 typedef NSView* NativeView;
 typedef NSWindow* NativeWindow;
 typedef NSEvent* NativeEvent;
-#elif defined(TOOLKIT_GTK)
-typedef GdkCursor* NativeCursor;
-typedef GtkWidget* NativeView;
-typedef GtkWindow* NativeWindow;
-typedef GdkRegion* NativeRegion;
-typedef GdkEvent* NativeEvent;
 #elif defined(OS_ANDROID)
 typedef void* NativeCursor;
 typedef ui::ViewAndroid* NativeView;
@@ -166,11 +147,6 @@ typedef NSFont* NativeFont;
 typedef NSTextField* NativeEditView;
 typedef CGContext* NativeDrawingContext;
 typedef void* NativeViewAccessible;
-#elif defined(TOOLKIT_GTK)
-typedef PangoFontDescription* NativeFont;
-typedef GtkWidget* NativeEditView;
-typedef cairo_t* NativeDrawingContext;
-typedef void* NativeViewAccessible;
 #elif defined(USE_CAIRO)
 typedef PangoFontDescription* NativeFont;
 typedef void* NativeEditView;
@@ -194,8 +170,6 @@ const gfx::NativeCursor kNullCursor = static_cast<gfx::NativeCursor>(NULL);
 typedef UIImage NativeImageType;
 #elif defined(OS_MACOSX)
 typedef NSImage NativeImageType;
-#elif defined(TOOLKIT_GTK)
-typedef GdkPixbuf NativeImageType;
 #else
 typedef SkBitmap NativeImageType;
 #endif
@@ -208,30 +182,6 @@ typedef NativeImageType* NativeImage;
 // See comment at the top of the file for usage.
 typedef intptr_t NativeViewId;
 
-#if defined(OS_WIN) && !defined(USE_AURA)
-// Convert a NativeViewId to a NativeView.
-//
-// On Windows, we pass an HWND into the renderer. As stated above, the renderer
-// should not be performing operations on the view.
-static inline NativeView NativeViewFromId(NativeViewId id) {
-  return reinterpret_cast<NativeView>(id);
-}
-#define NativeViewFromIdInBrowser(x) NativeViewFromId(x)
-#elif defined(OS_POSIX) || defined(USE_AURA)
-// On Mac, Linux and USE_AURA, a NativeView is a pointer to an object, and is
-// useless outside the process in which it was created. NativeViewFromId should
-// only be used inside the appropriate platform ifdef outside of the browser.
-// (NativeViewFromIdInBrowser can be used everywhere in the browser.) If your
-// cross-platform design involves a call to NativeViewFromId from outside the
-// browser it will never work on Mac or Linux and is fundamentally broken.
-
-// Please do not call this from outside the browser. It won't work; the name
-// should give you a subtle hint.
-static inline NativeView NativeViewFromIdInBrowser(NativeViewId id) {
-  return reinterpret_cast<NativeView>(id);
-}
-#endif  // defined(OS_POSIX)
-
 // PluginWindowHandle is an abstraction wrapping "the types of windows
 // used by NPAPI plugins". On Windows it's an HWND, on X it's an X
 // window id.