static void webkit_network_request_class_init(WebKitNetworkRequestClass* requestClass)
{
    GObjectClass* objectClass = G_OBJECT_CLASS(requestClass);

    objectClass->dispose = webkit_network_request_dispose;
    objectClass->finalize = webkit_network_request_finalize;
    objectClass->get_property = webkit_network_request_get_property;
    objectClass->set_property = webkit_network_request_set_property;

    webkitInit();

    /**
     * WebKitNetworkRequest:uri:
     *
     * The URI to which the request will be made.
     *
     * Since: 1.1.10
     */
    g_object_class_install_property(objectClass, PROP_URI,
                                    g_param_spec_string("uri",
                                                        _("URI"),
                                                        _("The URI to which the request will be made."),
                                                        NULL,
                                                        (GParamFlags)(WEBKIT_PARAM_READWRITE)));

    /**
     * WebKitNetworkRequest:message:
     *
     * The #SoupMessage that backs the request.
     *
     * Since: 1.1.10
     */
    g_object_class_install_property(objectClass, PROP_MESSAGE,
                                    g_param_spec_object("message",
                                                        _("Message"),
                                                        _("The SoupMessage that backs the request."),
                                                        SOUP_TYPE_MESSAGE,
                                                        (GParamFlags)(WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));

    g_type_class_add_private(requestClass, sizeof(WebKitNetworkRequestPrivate));
}
Пример #2
0
WebKitNetworkRequest::WebKitNetworkRequest(const char *in) {
	uri = strdup(in);
	webkitInit();
}
Пример #3
0
static void webkit_hit_test_result_class_init(WebKitHitTestResultClass* webHitTestResultClass)
{
    GObjectClass* objectClass = G_OBJECT_CLASS(webHitTestResultClass);

    objectClass->finalize = webkit_hit_test_result_finalize;
    objectClass->dispose = webkit_hit_test_result_dispose;
    objectClass->get_property = webkit_hit_test_result_get_property;
    objectClass->set_property = webkit_hit_test_result_set_property;

    webkitInit();

    /**
     * WebKitHitTestResult:context:
     *
     * Flags indicating the kind of target that received the event.
     *
     * Since: 1.1.15
     */
    g_object_class_install_property(objectClass, PROP_CONTEXT,
                                    g_param_spec_flags("context",
                                                       _("Context"),
                                                       _("Flags indicating the kind of target that received the event."),
                                                       WEBKIT_TYPE_HIT_TEST_RESULT_CONTEXT,
                                                       WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT,
                                                       static_cast<GParamFlags>((WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY))));

    /**
     * WebKitHitTestResult:link-uri:
     *
     * The URI to which the target that received the event points, if any.
     *
     * Since: 1.1.15
     */
    g_object_class_install_property(objectClass, PROP_LINK_URI,
                                    g_param_spec_string("link-uri",
                                                        _("Link URI"),
                                                        _("The URI to which the target that received the event points, if any."),
                                                        NULL,
                                                        static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));

    /**
     * WebKitHitTestResult:image-uri:
     *
     * The URI of the image that is part of the target that received the event, if any.
     *
     * Since: 1.1.15
     */
    g_object_class_install_property(objectClass, PROP_IMAGE_URI,
                                    g_param_spec_string("image-uri",
                                                        _("Image URI"),
                                                        _("The URI of the image that is part of the target that received the event, if any."),
                                                        NULL,
                                                        static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));

    /**
     * WebKitHitTestResult:media-uri:
     *
     * The URI of the media that is part of the target that received the event, if any.
     *
     * Since: 1.1.15
     */
    g_object_class_install_property(objectClass, PROP_MEDIA_URI,
                                    g_param_spec_string("media-uri",
                                                        _("Media URI"),
                                                        _("The URI of the media that is part of the target that received the event, if any."),
                                                        NULL,
                                                        static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)));

    /**
     * WebKitHitTestResult:inner-node:
     *
     * The DOM node at the coordinates where the hit test
     * happened. Keep in mind that the node might not be
     * representative of the information given in the context
     * property, since WebKit uses a series of heuristics to figure
     * out that information. One common example is inner-node having
     * the text node inside the anchor (&lt;a&gt;) tag; WebKit knows the
     * whole context and will put WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK
     * in the 'context' property, but the user might be confused by
     * the lack of any link tag in 'inner-node'.
     *
     * Since: 1.3.2
     */
    g_object_class_install_property(objectClass, PROP_INNER_NODE,
                                    g_param_spec_object("inner-node",
                                                        _("Inner node"),
                                                        _("The inner DOM node associated with the hit test result."),
                                                        WEBKIT_TYPE_DOM_NODE,
                                                        static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));

    /**
     * WebKitHitTestResult:x:
     *
     * The x coordintate of the event relative to the view's window.
     *
     * Since: 1.10
     */
    g_object_class_install_property(objectClass, PROP_X,
                                    g_param_spec_int("x",
                                                     _("X coordinate"),
                                                     _("The x coordintate of the event relative to the view's window."),
                                                     G_MININT, G_MAXINT, 0,
                                                     static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));

    /**
     * WebKitHitTestResult:y:
     *
     * The x coordintate of the event relative to the view's window.
     *
     * Since: 1.10
     */
    g_object_class_install_property(objectClass, PROP_Y,
                                    g_param_spec_int("y",
                                                     _("Y coordinate"),
                                                     _("The y coordintate of the event relative to the view's window."),
                                                     G_MININT, G_MAXINT, 0,
                                                     static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));

    g_type_class_add_private(webHitTestResultClass, sizeof(WebKitHitTestResultPrivate));
}