From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Tools/TestWebKitAPI/PlatformWebView.h | 45 ++++++++++++++--------------------- 1 file changed, 18 insertions(+), 27 deletions(-) (limited to 'Tools/TestWebKitAPI/PlatformWebView.h') diff --git a/Tools/TestWebKitAPI/PlatformWebView.h b/Tools/TestWebKitAPI/PlatformWebView.h index 8679fa2c4..9c807321c 100644 --- a/Tools/TestWebKitAPI/PlatformWebView.h +++ b/Tools/TestWebKitAPI/PlatformWebView.h @@ -30,7 +30,11 @@ #include #endif -#ifdef __APPLE__ +#if PLATFORM(MAC) +#include +#endif + +#if defined(__APPLE__) && !PLATFORM(GTK) #ifdef __OBJC__ @class WKView; @class NSWindow; @@ -40,32 +44,24 @@ class NSWindow; #endif typedef WKView *PlatformWKView; typedef NSWindow *PlatformWindow; -#elif defined(WIN32) || defined(_WIN32) -typedef WKViewRef PlatformWKView; -typedef HWND PlatformWindow; #elif PLATFORM(GTK) typedef WKViewRef PlatformWKView; typedef GtkWidget *PlatformWindow; #elif PLATFORM(EFL) -typedef struct _Ecore_Evas Ecore_Evas; -#if USE(EO) -typedef struct _Eo_Opaque Evas_Object; -#else -typedef struct _Evas_Object Evas_Object; -#endif typedef Evas_Object* PlatformWKView; typedef Ecore_Evas* PlatformWindow; #endif namespace TestWebKitAPI { -#if PLATFORM(WIN) -class WindowMessageObserver; -#endif - class PlatformWebView { public: - PlatformWebView(WKContextRef, WKPageGroupRef = 0); + explicit PlatformWebView(WKPageConfigurationRef); + explicit PlatformWebView(WKContextRef, WKPageGroupRef = 0); + explicit PlatformWebView(WKPageRef relatedPage); +#if PLATFORM(MAC) + explicit PlatformWebView(WKContextRef, WKPageGroupRef, Class wkViewSubclass); +#endif ~PlatformWebView(); WKPageRef page() const; @@ -76,25 +72,20 @@ public: void simulateSpacebarKeyPress(); void simulateAltKeyPress(); void simulateRightClick(unsigned x, unsigned y); - void simulateMouseMove(unsigned x, unsigned y); - -#if PLATFORM(WIN) - void simulateAKeyDown(); - void setParentWindowMessageObserver(WindowMessageObserver* observer) { m_parentWindowMessageObserver = observer; } + void simulateMouseMove(unsigned x, unsigned y, WKEventModifiers = 0); +#if PLATFORM(MAC) + void simulateButtonClick(WKEventMouseButton, unsigned x, unsigned y, WKEventModifiers); #endif private: -#if PLATFORM(WIN) - static void registerWindowClass(); - static LRESULT CALLBACK wndProc(HWND, UINT message, WPARAM, LPARAM); +#if PLATFORM(MAC) + void initialize(WKPageConfigurationRef, Class wkViewSubclass); +#elif PLATFORM(GTK) + void initialize(WKPageConfigurationRef); #endif PlatformWKView m_view; PlatformWindow m_window; - -#if PLATFORM(WIN) - WindowMessageObserver* m_parentWindowMessageObserver; -#endif }; } // namespace TestWebKitAPI -- cgit v1.2.1