view generator/typesystem_webkit.xml @ 248:7664de4a55e5

Fixed #23. QtD_QObjectEntity is not created dynamically for shell classes any more. Class initialization is now performed by static constructors. When wrapping QObjects returned from functions, their run-time types are now taken into account. QObjects are allocated on GC heap, a doubly-linked list is used to prevent them from been collected (arguably a better solution than allocating on C heap and adding GC ranges) Minor changes (including unnecessary).
author maxter
date Thu, 20 Aug 2009 14:47:17 +0000
parents a5cba313c924
children 37eed70de029
line wrap: on
line source

<?xml version="1.0" encoding="UTF-8"?>
<typesystem package="qt.webkit" default-superclass="QtdObject">
<inject-code>
    qt.Utilities.loadQtLibrary("QtGui");
    qt.Utilities.loadQtLibrary("QtNetwork");
    qt.Utilities.loadQtLibrary("QtWebKit");
    </inject-code>
    <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"/>

    <object-type name="QWebView">
        <modify-function signature="setPage(QWebPage*)">
            <modify-argument index="1">
                <define-ownership class="java" owner="c++"/>
            </modify-argument>
        </modify-function>
    </object-type>
    <object-type name="QWebFrame">
        <modify-function signature="addToJavaScriptWindowObject(QString,QObject*)">
            <modify-argument index="2">
                <reference-count action="ignore"/>
            </modify-argument>
        </modify-function>
    </object-type>
    <object-type name="QWebHistory"/>
    <object-type name="QWebSettings"/>
    <object-type name="QWebPage">
<!--        <inject-code class="java">
            <import-file name="typesystem_webkit-java.java" quote-after-line="class QWebPage___" quote-before-line="}// class"/>
        </inject-code>
        <modify-function signature="javaScriptPrompt(QWebFrame*,QString,QString,QString*)">
            <access modifier="private"/>
        </modify-function>
        -->
        <modify-function signature="setView(QWidget*)">
            <modify-argument index="1">
                <reference-count action="set" variable-name="__rcView"/>
            </modify-argument>
        </modify-function>
        <modify-function signature="setNetworkAccessManager(QNetworkAccessManager*)">
            <modify-argument index="1">
                 <define-ownership class="java" owner="c++"/>
            </modify-argument>
        </modify-function>
    </object-type>

    <value-type name="QWebHitTestResult">
      <modify-function signature="operator=(QWebHitTestResult)" remove="all"/>
    </value-type>

    <value-type name="QWebHistoryItem">
        <custom-constructor>
            return new QWebHistoryItem(*copy);
        </custom-constructor>
        <custom-destructor>
            delete copy;
        </custom-destructor>
        <modify-function signature="operator=(QWebHistoryItem)" remove="all"/>
    </value-type>

    <object-type name="QWebHistoryInterface">
        <modify-function signature="setDefaultInterface(QWebHistoryInterface*)">
            <modify-argument index="1">
                <reference-count action="set" variable-name="__rcInterface"/>
            </modify-argument>
        </modify-function>
    </object-type>

    <suppress-warning text="WARNING(MetaJavaBuilder) :: skipping function 'QWebFrame::QWebFrame', unmatched parameter type 'QWebFrameData*'"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: skipping function 'QWebSettings::QWebSettings', unmatched parameter type 'WebCore::Settings*'"/>

    <!-- Needed to avoid warnings on compilers that don't support webkit -->
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebPage' for enum 'NavigationRequestResponse' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebSettings' for enum 'WebAttribute' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebSettings' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebHistoryItem' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebHistoryInterface' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebPage' for enum 'WebAction' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebSettings' for enum 'FontSize' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebSettings' for enum 'WebGraphic' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebPage' for enum 'NavigationType' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebSettings' for enum 'FontType' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebFrame' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebHistory' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebView' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebPage' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>

    <suppress-warning text="WARNING(MetaJavaBuilder) :: type 'QWebHitTestResult' is specified in typesystem, but not defined. This could potentially lead to compilation errors."/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebPage' for enum 'FindFlag' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebPage' for enum 'LinkDelegationPolicy' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebSettings' for enum 'FontFamily' is not declared"/>
    <suppress-warning text="WARNING(MetaJavaBuilder) :: namespace 'qt.webkit.QWebPage' for enum 'WebWindowType' is not declared"/>

</typesystem>