[geary/wip/720442-vapigen] Return to diff .metadata files for diff vers of WebKitGTK



commit 662fc5ba8e3288e7a4b8bad2008d788474c2f3ec
Author: Jim Nelson <jim yorba org>
Date:   Mon Dec 16 14:44:40 2013 -0800

    Return to diff .metadata files for diff vers of WebKitGTK
    
    WebKitGTK 2.4 introduces large enough changes that cannot use a
    single .metadata file to all versions 1.10 - 2.4.

 CMakeLists.txt                                     |    3 ++
 bindings/Makefile                                  |    2 +-
 .../metadata/webkitgtk-1.10/WebKit-3.0.metadata    |   16 +++++++++
 .../{ => webkitgtk-2.0}/WebKit-3.0.metadata        |   11 ++----
 .../{ => webkitgtk-2.2}/WebKit-3.0.metadata        |    0
 .../metadata/webkitgtk-2.4/WebKit-3.0.metadata     |   14 ++++++++
 src/CMakeLists.txt                                 |   35 +++++++++++++++++++-
 7 files changed, 71 insertions(+), 10 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7f2423..e336b70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,9 @@ endif ()
 find_package(PkgConfig)
 pkg_check_modules(LIBUNITY QUIET unity>=5.12.0)
 pkg_check_modules(LIBMESSAGINGMENU QUIET messaging-menu>=12.10.2)
+pkg_check_modules(WEBKITGTK110X QUIET webkitgtk-3.0<=1.10.2)
+pkg_check_modules(WEBKITGTK22X QUIET webkitgtk-3.0<=2.2.100)
+pkg_check_modules(WEBKITGTK24X QUIET webkitgtk-3.0>=2.3.0)
 
 # intl
 include(Gettext)
diff --git a/bindings/Makefile b/bindings/Makefile
index db71bba..a2543d5 100644
--- a/bindings/Makefile
+++ b/bindings/Makefile
@@ -10,7 +10,7 @@ clean:
 
 generated/webkitgtk-3.0.vapi: /usr/share/gir-1.0/WebKit-3.0.gir
        @mkdir -p generated
-       @vapigen --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --pkg=JSCore-3.0 \
+       @vapigen --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 \
                --metadatadir=metadata --library=webkitgtk-3.0 --directory=generated \
                /usr/share/gir-1.0/WebKit-3.0.gir
 
diff --git a/bindings/metadata/webkitgtk-1.10/WebKit-3.0.metadata 
b/bindings/metadata/webkitgtk-1.10/WebKit-3.0.metadata
new file mode 100644
index 0000000..27ca48d
--- /dev/null
+++ b/bindings/metadata/webkitgtk-1.10/WebKit-3.0.metadata
@@ -0,0 +1,16 @@
+DOM* parent="WebKit.DOM" name="DOM(.+)"
+
+DOMEventTarget.add_event_listener skip=false
+DOMEventTarget.remove_event_listener skip=false
+
+WebView.entering_fullscreen#signal name="entering_fullscreen_signal"
+WebView.leaving_fullscreen#signal name="leaving_fullscreen_signal"
+
+WebView.move_cursor#virtual_method name="leaving_fullscreen_method"
+WebSettings.enable_default_context_menu#property deprecated=false
+
+DOMNode.dispatch_event type="void"
+DOMWebKitNamedFlow.dispatch_event type="void"
+DOMDOMApplicationCache.dispatch_event type="void"
+DOMDOMWindow.dispatch_event type="void"
+
diff --git a/bindings/metadata/WebKit-3.0.metadata b/bindings/metadata/webkitgtk-2.0/WebKit-3.0.metadata
similarity index 74%
copy from bindings/metadata/WebKit-3.0.metadata
copy to bindings/metadata/webkitgtk-2.0/WebKit-3.0.metadata
index c19e0c5..41376f1 100644
--- a/bindings/metadata/WebKit-3.0.metadata
+++ b/bindings/metadata/webkitgtk-2.0/WebKit-3.0.metadata
@@ -1,8 +1,6 @@
 DOM* parent="WebKit.DOM" name="DOM(.+)"
 
 DOMEventTarget.add_event_listener skip=false
-DOMEventTarget.add_event_listener.handler closure=-1
-DOMEventTarget.add_event_listener.user_data closure=-1
 DOMEventTarget.remove_event_listener skip=false
 
 WebView.entering_fullscreen#signal name="entering_fullscreen_signal"
@@ -11,14 +9,11 @@ WebView.leaving_fullscreen#signal name="leaving_fullscreen_signal"
 WebView.move_cursor#virtual_method name="leaving_fullscreen_method"
 WebSettings.enable_default_context_menu#property deprecated=false
 
-DOMBatteryManager.dispatch_event type="void"
-DOMAudioTrackList.dispatch_event type="void"
-DOMTextTrackCue.dispatch_event type="void"
-DOMTextTrack.dispatch_event type="void"
-DOMTextTrackList.dispatch_event type="void"
-DOMVideoTrackList.dispatch_event type="void"
 DOMNode.dispatch_event type="void"
 DOMWebKitNamedFlow.dispatch_event type="void"
 DOMDOMApplicationCache.dispatch_event type="void"
 DOMDOMWindow.dispatch_event type="void"
+DOMTextTrackCue.dispatch_event type="void"
+DOMTextTrack.dispatch_event type="void"
+DOMTextTrackList.dispatch_event type="void"
 
diff --git a/bindings/metadata/WebKit-3.0.metadata b/bindings/metadata/webkitgtk-2.2/WebKit-3.0.metadata
similarity index 100%
rename from bindings/metadata/WebKit-3.0.metadata
rename to bindings/metadata/webkitgtk-2.2/WebKit-3.0.metadata
diff --git a/bindings/metadata/webkitgtk-2.4/WebKit-3.0.metadata 
b/bindings/metadata/webkitgtk-2.4/WebKit-3.0.metadata
new file mode 100644
index 0000000..49723e4
--- /dev/null
+++ b/bindings/metadata/webkitgtk-2.4/WebKit-3.0.metadata
@@ -0,0 +1,14 @@
+DOM* parent="WebKit.DOM" name="DOM(.+)"
+
+DOMEventTarget.add_event_listener skip=false
+DOMEventTarget.add_event_listener.handler closure=-1
+DOMEventTarget.add_event_listener.user_data closure=-1
+DOMEventTarget.remove_event_listener skip=false
+
+WebView.entering_fullscreen#signal name="entering_fullscreen_signal"
+WebView.leaving_fullscreen#signal name="leaving_fullscreen_signal"
+
+WebView.move_cursor#virtual_method name="leaving_fullscreen_method"
+WebSettings.enable_default_context_menu#property deprecated=false
+
+WebFrame.get_global_context skip
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 831d82d..3de9f41 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -438,6 +438,40 @@ else ()
     message(STATUS "Unity launcher support: OFF")
 endif ()
 
+if (WEBKITGTK110X_FOUND)
+    message(STATUS "Targeting WebKitGTK 1.10")
+    SET(EXTRA_CLIENT_PKG_CONFIG
+        ${EXTRA_CLIENT_PKG_CONFIG}
+        webkitgtk-3.0>=1.10.0
+        webkitgtk-3.0<=1.10.2
+    )
+    
+    SET(WEBKITGTK_METADATA_DIR
+        webkitgtk-1.10
+    )
+elseif (WEBKITGTK22X_FOUND)
+    message(STATUS "Targeting WebKitGTK 2.2")
+    SET(EXTRA_CLIENT_PKG_CONFIG
+        ${EXTRA_CLIENT_PKG_CONFIG}
+        webkitgtk-3.0>=2.2.0
+    )
+    
+    SET(WEBKITGTK_METADATA_DIR
+        webkitgtk-2.2
+    )
+else ()
+    message(STATUS "Targeting WebKitGTK 2.0")
+    SET(EXTRA_CLIENT_PKG_CONFIG
+        ${EXTRA_CLIENT_PKG_CONFIG}
+        webkitgtk-3.0>=2.0.0
+        webkitgtk-3.0<=2.0.4
+    )
+    
+    SET(WEBKITGTK_METADATA_DIR
+        webkitgtk-2.0
+    )
+endif ()
+
 if (NO_FATAL_WARNINGS)
     message(STATUS "Vala fatal warnings: OFF")
 else ()
@@ -463,7 +497,6 @@ pkg_check_modules(DEPS REQUIRED
     gmime-2.6>=2.6.0
     libsecret-1>=0.11
     libxml-2.0>=2.7.8
-    webkitgtk-3.0>=1.10
     ${EXTRA_CLIENT_PKG_CONFIG}
 )
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]