summaryrefslogtreecommitdiffstats
path: root/PySide/QtWebKit
diff options
context:
space:
mode:
authorCarlos Goncalves <mail@cgoncalves.info>2010-02-09 01:07:14 +0000
committerHugo Lima <hugo.lima@openbossa.org>2010-02-25 19:14:49 -0300
commit9639df1818207f6073b22ff6d3890c8d09bc12ce (patch)
tree579b4ab499cfad15584afa67df417e3fdc7ae95a /PySide/QtWebKit
parent42cd45f62ae1e57c929dcb55ab66d4dec67291f2 (diff)
Initial QtWebKit binding (Qt 4.6 supported)
Diffstat (limited to 'PySide/QtWebKit')
-rw-r--r--PySide/QtWebKit/CMakeLists.txt78
-rw-r--r--PySide/QtWebKit/typesystem_webkit.xml66
2 files changed, 144 insertions, 0 deletions
diff --git a/PySide/QtWebKit/CMakeLists.txt b/PySide/QtWebKit/CMakeLists.txt
new file mode 100644
index 00000000..e7e11e45
--- /dev/null
+++ b/PySide/QtWebKit/CMakeLists.txt
@@ -0,0 +1,78 @@
+project(QtWebKit)
+
+if(Q_WS_X11)
+ set(MODULE_NAME webkit_x11)
+ set(SPECIFIC_OS_FILES
+ )
+elseif(Q_WS_MAC)
+ set(MODULE_NAME webkit_mac)
+ set(SPECIFIC_OS_FILES
+ )
+else()
+ message(FATAL_ERROR "OS not supported")
+endif(Q_WS_X11)
+
+if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+ set (QtWebKit_46_SRC )
+else ()
+ set(QtWebKit_46_SRC
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelement_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelementcollection_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebinspector_wrapper.cpp
+ )
+endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+
+set(QtWebKit_SRC
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qgraphicswebview_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qtwebkit_module_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebdatabase_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebframe_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistoryinterface_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistoryitem_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistory_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhittestresult_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_mimetype_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_plugin_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebsecurityorigin_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebsettings_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebview_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp
+
+${SPECIFIC_OS_FILES}
+${QtWebKit_46_SRC}
+)
+
+execute_generator(webkit QtWebKit_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtNetwork_SOURCE_DIR}")
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/
+ ${QT_INCLUDE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTNETWORK_INCLUDE_DIR}
+ ${QT_QTWEBKIT_INCLUDE_DIR}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ ${QtNetwork_BINARY_DIR}/PySide/QtNetwork/
+ )
+
+add_library(QtWebKit SHARED ${QtWebKit_SRC})
+set_property(TARGET QtWebKit PROPERTY PREFIX "")
+target_link_libraries(QtWebKit
+ pyside
+ QtCore
+ QtGui
+ QtNetwork
+ ${PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${QT_QTWEBKIT_LIBRARY}
+ )
+
+# install
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtWebKit.so
+ DESTINATION ${SITE_PACKAGE}/PySide)
diff --git a/PySide/QtWebKit/typesystem_webkit.xml b/PySide/QtWebKit/typesystem_webkit.xml
new file mode 100644
index 00000000..e19b71da
--- /dev/null
+++ b/PySide/QtWebKit/typesystem_webkit.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<typesystem package="PySide.QtWebKit">
+ <load-typesystem name="typesystem_core.xml" generate="no"/>
+ <load-typesystem name="typesystem_gui.xml.in" generate="no"/> <!-- FIXME -->
+ <load-typesystem name="typesystem_network.xml" generate="no"/>
+
+ <namespace-type name="WebCore"/>
+
+ <enum-type name="QWebSettings::FontFamily"/>
+ <enum-type name="QWebSettings::FontSize"/>
+ <enum-type name="QWebSettings::WebGraphic"/>
+ <enum-type name="QWebSettings::WebAttribute"/>
+ <enum-type name="QWebPage::NavigationType"/>
+ <enum-type name="QWebPage::WebAction"/>
+ <enum-type name="QWebPage::WebWindowType"/>
+ <enum-type name="QWebPage::FindFlag" flags="QWebPage::FindFlags"/>
+ <enum-type name="QWebPage::LinkDelegationPolicy"/>
+ <enum-type name="QWebPluginFactory::Extension"/>
+
+ <!-- Qt 4.6 -->
+ <enum-type name="QWebElement::StyleResolveStrategy"/>
+ <enum-type name="QWebFrame::RenderLayer"/>
+ <enum-type name="QWebPage:ErrorDomain"/>
+ <enum-type name="QWebPage::Extension"/>
+
+ <!-- unsuported property with type QList<MimeType> -->
+ <rejection class="QWebPluginFactory::Plugin" field-name="mimeTypes"/>
+
+ <object-type name="QWebView">
+ <modify-function signature="setPage(QWebPage*)">
+ <modify-argument index="1">
+ <define-ownership class="target" owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="print(QPrinter*)const" rename="print_" />
+ </object-type>
+ <object-type name="QWebFrame">
+ <modify-function signature="addToJavaScriptWindowObject(QString,QObject*)">
+ <modify-argument index="2">
+ <parent index="this" action="add"/>
+ </modify-argument>
+ </modify-function>
+ <!-- TODO QtScript isn't implemented yet -->
+ <modify-function signature="addToJavaScriptWindowObject(QString,QObject*,QScriptEngine::ValueOwnership)" remove="all" />
+ <!-- TODO QMultiMap isn't implemented yet -->
+ <modify-function signature="metaData()const" remove="all" />
+ </object-type>
+
+ <object-type name="QWebSettings"/>
+ <object-type name="QWebPage"/>
+ <object-type name="QWebHistory"/>
+ <object-type name="QWebHistoryInterface"/>
+ <object-type name="QWebPluginFactory"/>
+ <value-type name="QWebPluginFactory::Plugin"/>
+ <value-type name="QWebPluginFactory::MimeType"/>
+ <value-type name="QWebDatabase"/>
+ <value-type name="QWebHistoryItem"/>
+ <value-type name="QWebHitTestResult"/>
+ <value-type name="QWebSecurityOrigin"/>
+
+ <!-- Qt 4.6 -->
+ <object-type name="QGraphicsWebView"/>
+ <object-type name="QWebInspector"/>
+ <value-type name="QWebElement"/>
+ <value-type name="QWebElementCollection"/>
+</typesystem>