Commit aee84800 authored by christian@webkit.org's avatar christian@webkit.org

2010-02-04 Christian Dywan <christian@twotoasts.de>

        Reviewed by Gustavo Noronha Silva.

        [GTK] Add and cleanup return values of signals in view and frame
        https://bugs.webkit.org/show_bug.cgi?id=33484

        Add missing and cleanup return values of web frame and web view signals.

        * webkit/webkitwebframe.cpp:
        (webkit_web_frame_class_init):
        * webkit/webkitwebview.cpp:
        (DNDContentsRequest::webkit_web_view_class_init):

git-svn-id: svn://svn.chromium.org/blink/trunk@54378 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 624d3b8d
2010-02-04 Christian Dywan <christian@twotoasts.de>
Reviewed by Gustavo Noronha Silva.
[GTK] Add and cleanup return values of signals in view and frame
https://bugs.webkit.org/show_bug.cgi?id=33484
Add missing and cleanup return values of web frame and web view signals.
* webkit/webkitwebframe.cpp:
(webkit_web_frame_class_init):
* webkit/webkitwebview.cpp:
(DNDContentsRequest::webkit_web_view_class_init):
2010-02-02 Gustavo Noronha Silva <gns@gnome.org> 2010-02-02 Gustavo Noronha Silva <gns@gnome.org>
Reviewed by Xan Lopez. Reviewed by Xan Lopez.
......
...@@ -269,6 +269,9 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass) ...@@ -269,6 +269,9 @@ static void webkit_web_frame_class_init(WebKitWebFrameClass* frameClass)
* WebKitWebFrame:horizontal-scrollbar-policy and * WebKitWebFrame:horizontal-scrollbar-policy and
* WebKitWebFrame:vertical-scrollbar-policy properties. * WebKitWebFrame:vertical-scrollbar-policy properties.
* *
* Return value: %TRUE to stop other handlers from being invoked for the
* event. %FALSE to propagate the event further.
*
* Since: 1.1.14 * Since: 1.1.14
*/ */
webkit_web_frame_signals[SCROLLBARS_POLICY_CHANGED] = g_signal_new("scrollbars-policy-changed", webkit_web_frame_signals[SCROLLBARS_POLICY_CHANGED] = g_signal_new("scrollbars-policy-changed",
......
...@@ -1325,7 +1325,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1325,7 +1325,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* WebKitWebView::create-web-view: * WebKitWebView::create-web-view:
* @web_view: the object on which the signal is emitted * @web_view: the object on which the signal is emitted
* @frame: the #WebKitWebFrame * @frame: the #WebKitWebFrame
* @return: a newly allocated #WebKitWebView or %NULL
* *
* Emitted when the creation of a new window is requested. * Emitted when the creation of a new window is requested.
* If this signal is handled the signal handler should return the * If this signal is handled the signal handler should return the
...@@ -1338,6 +1337,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1338,6 +1337,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* the new #WebKitWebView. The widget to which the widget is added will * the new #WebKitWebView. The widget to which the widget is added will
* handle that. * handle that.
* *
* Return value: a newly allocated #WebKitWebView, or %NULL
*
* Since: 1.0.3 * Since: 1.0.3
*/ */
webkit_web_view_signals[CREATE_WEB_VIEW] = g_signal_new("create-web-view", webkit_web_view_signals[CREATE_WEB_VIEW] = g_signal_new("create-web-view",
...@@ -1353,8 +1354,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1353,8 +1354,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/** /**
* WebKitWebView::web-view-ready: * WebKitWebView::web-view-ready:
* @web_view: the object on which the signal is emitted * @web_view: the object on which the signal is emitted
* @return: %TRUE to stop other handlers from being invoked for
* the event, %FALSE to propagate the event further
* *
* Emitted after #WebKitWebView::create-web-view when the new #WebKitWebView * Emitted after #WebKitWebView::create-web-view when the new #WebKitWebView
* should be displayed to the user. When this signal is emitted * should be displayed to the user. When this signal is emitted
...@@ -1367,6 +1366,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1367,6 +1366,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* time of the window, so you may want to connect to the ::notify * time of the window, so you may want to connect to the ::notify
* signal of the #WebKitWebWindowFeatures object to handle those. * signal of the #WebKitWebWindowFeatures object to handle those.
* *
* Return value: %TRUE to stop handlers from being invoked for the event or
* %FALSE to propagate the event furter
*
* Since: 1.0.3 * Since: 1.0.3
*/ */
webkit_web_view_signals[WEB_VIEW_READY] = g_signal_new("web-view-ready", webkit_web_view_signals[WEB_VIEW_READY] = g_signal_new("web-view-ready",
...@@ -1381,14 +1383,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1381,14 +1383,15 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/** /**
* WebKitWebView::close-web-view: * WebKitWebView::close-web-view:
* @web_view: the object on which the signal is emitted * @web_view: the object on which the signal is emitted
* @return: %TRUE to stop handlers from being invoked for the event or
* %FALSE to propagate the event furter
* *
* Emitted when closing a #WebKitWebView is requested. This occurs when a * Emitted when closing a #WebKitWebView is requested. This occurs when a
* call is made from JavaScript's window.close function. The default * call is made from JavaScript's window.close function. The default
* signal handler does not do anything. It is the owner's responsibility * signal handler does not do anything. It is the owner's responsibility
* to hide or delete the web view, if necessary. * to hide or delete the web view, if necessary.
* *
* Return value: %TRUE to stop handlers from being invoked for the event or
* %FALSE to propagate the event furter
*
* Since: 1.1.11 * Since: 1.1.11
*/ */
webkit_web_view_signals[CLOSE_WEB_VIEW] = g_signal_new("close-web-view", webkit_web_view_signals[CLOSE_WEB_VIEW] = g_signal_new("close-web-view",
...@@ -1405,10 +1408,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1405,10 +1408,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @web_view: the object on which the signal is emitted * @web_view: the object on which the signal is emitted
* @frame: the #WebKitWebFrame that required the navigation * @frame: the #WebKitWebFrame that required the navigation
* @request: a #WebKitNetworkRequest * @request: a #WebKitNetworkRequest
* @return: a WebKitNavigationResponse
* *
* Emitted when @frame requests a navigation to another page. * Emitted when @frame requests a navigation to another page.
* *
* Return value: a #WebKitNavigationResponse
*
* Deprecated: Use WebKitWebView::navigation-policy-decision-requested * Deprecated: Use WebKitWebView::navigation-policy-decision-requested
* instead * instead
*/ */
...@@ -1430,8 +1434,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1430,8 +1434,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @request: a #WebKitNetworkRequest * @request: a #WebKitNetworkRequest
* @navigation_action: a #WebKitWebNavigation * @navigation_action: a #WebKitWebNavigation
* @policy_decision: a #WebKitWebPolicyDecision * @policy_decision: a #WebKitWebPolicyDecision
* @return: TRUE if a decision was made, FALSE to have the
* default behavior apply
* *
* Emitted when @frame requests opening a new window. With this * Emitted when @frame requests opening a new window. With this
* signal the browser can use the context of the request to decide * signal the browser can use the context of the request to decide
...@@ -1453,6 +1455,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1453,6 +1455,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* webkit_web_policy_decision_download() on the @policy_decision * webkit_web_policy_decision_download() on the @policy_decision
* object. * object.
* *
* Return value: %TRUE if a decision was made, %FALSE to have the
* default behavior apply
*
* Since: 1.1.4 * Since: 1.1.4
*/ */
webkit_web_view_signals[NEW_WINDOW_POLICY_DECISION_REQUESTED] = webkit_web_view_signals[NEW_WINDOW_POLICY_DECISION_REQUESTED] =
...@@ -1476,8 +1481,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1476,8 +1481,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @request: a #WebKitNetworkRequest * @request: a #WebKitNetworkRequest
* @navigation_action: a #WebKitWebNavigation * @navigation_action: a #WebKitWebNavigation
* @policy_decision: a #WebKitWebPolicyDecision * @policy_decision: a #WebKitWebPolicyDecision
* @return: TRUE if a decision was made, FALSE to have the
* default behavior apply
* *
* Emitted when @frame requests a navigation to another page. * Emitted when @frame requests a navigation to another page.
* If this signal is not handled, the default behavior is to allow the * If this signal is not handled, the default behavior is to allow the
...@@ -1490,6 +1493,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1490,6 +1493,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* webkit_web_policy_decision_download() on the @policy_decision * webkit_web_policy_decision_download() on the @policy_decision
* object. * object.
* *
* Return value: %TRUE if a decision was made, %FALSE to have the
* default behavior apply
*
* Since: 1.0.3 * Since: 1.0.3
*/ */
webkit_web_view_signals[NAVIGATION_POLICY_DECISION_REQUESTED] = g_signal_new("navigation-policy-decision-requested", webkit_web_view_signals[NAVIGATION_POLICY_DECISION_REQUESTED] = g_signal_new("navigation-policy-decision-requested",
...@@ -1512,8 +1518,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1512,8 +1518,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @request: a WebKitNetworkRequest * @request: a WebKitNetworkRequest
* @mimetype: the MIME type attempted to load * @mimetype: the MIME type attempted to load
* @policy_decision: a #WebKitWebPolicyDecision * @policy_decision: a #WebKitWebPolicyDecision
* @return: TRUE if a decision was made, FALSE to have the
* default behavior apply
* *
* Decide whether or not to display the given MIME type. If this * Decide whether or not to display the given MIME type. If this
* signal is not handled, the default behavior is to show the * signal is not handled, the default behavior is to show the
...@@ -1531,6 +1535,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1531,6 +1535,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* webkit_web_policy_decision_download() on the @policy_decision * webkit_web_policy_decision_download() on the @policy_decision
* object. * object.
* *
* Return value: %TRUE if a decision was made, %FALSE to have the
* default behavior apply
*
* Since: 1.0.3 * Since: 1.0.3
*/ */
webkit_web_view_signals[MIME_TYPE_POLICY_DECISION_REQUESTED] = g_signal_new("mime-type-policy-decision-requested", webkit_web_view_signals[MIME_TYPE_POLICY_DECISION_REQUESTED] = g_signal_new("mime-type-policy-decision-requested",
...@@ -1578,7 +1585,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1578,7 +1585,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @web_view: the object on which the signal is emitted * @web_view: the object on which the signal is emitted
* @download: a #WebKitDownload object that lets you control the * @download: a #WebKitDownload object that lets you control the
* download process * download process
* @return: %TRUE if the download should be performed, %FALSE to cancel it.
* *
* A new Download is being requested. By default, if the signal is * A new Download is being requested. By default, if the signal is
* not handled, the download is cancelled. If you handle the download * not handled, the download is cancelled. If you handle the download
...@@ -1601,6 +1607,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1601,6 +1607,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* is to download anything that WebKit can't handle, which you can * is to download anything that WebKit can't handle, which you can
* figure out by using webkit_web_view_can_show_mime_type()). * figure out by using webkit_web_view_can_show_mime_type()).
* *
* Return value: TRUE if the download should be performed, %FALSE to
* cancel it
*
* Since: 1.1.2 * Since: 1.1.2
*/ */
webkit_web_view_signals[DOWNLOAD_REQUESTED] = g_signal_new("download-requested", webkit_web_view_signals[DOWNLOAD_REQUESTED] = g_signal_new("download-requested",
...@@ -1681,6 +1690,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1681,6 +1690,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* handle the signal if you want to provide your own error page. * handle the signal if you want to provide your own error page.
* *
* Since: 1.1.6 * Since: 1.1.6
*
* Return value: %TRUE to stop other handlers from being invoked for the
* event. %FALSE to propagate the event further.
*/ */
webkit_web_view_signals[LOAD_ERROR] = g_signal_new("load-error", webkit_web_view_signals[LOAD_ERROR] = g_signal_new("load-error",
G_TYPE_FROM_CLASS(webViewClass), G_TYPE_FROM_CLASS(webViewClass),
...@@ -1774,8 +1786,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1774,8 +1786,6 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* WebKitWebView::print-requested * WebKitWebView::print-requested
* @web_view: the object in which the signal is emitted * @web_view: the object in which the signal is emitted
* @web_frame: the frame that is requesting to be printed * @web_frame: the frame that is requesting to be printed
* @return: %TRUE if the print request has been handled, %FALSE if
* the default handler should run
* *
* Emitted when printing is requested by the frame, usually * Emitted when printing is requested by the frame, usually
* because of a javascript call. When handling this signal you * because of a javascript call. When handling this signal you
...@@ -1787,6 +1797,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1787,6 +1797,9 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* ignore a print request you must connect to this signal, and * ignore a print request you must connect to this signal, and
* return %TRUE. * return %TRUE.
* *
* Return value: %TRUE if the print request has been handled, %FALSE if
* the default handler should run
*
* Since: 1.1.5 * Since: 1.1.5
*/ */
webkit_web_view_signals[PRINT_REQUESTED] = g_signal_new("print-requested", webkit_web_view_signals[PRINT_REQUESTED] = g_signal_new("print-requested",
...@@ -1843,9 +1856,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1843,9 +1856,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @message: the message text * @message: the message text
* @line: the line where the error occured * @line: the line where the error occured
* @source_id: the source id * @source_id: the source id
* @return: TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
* *
* A JavaScript console message was created. * A JavaScript console message was created.
*
* Return value: %TRUE to stop other handlers from being invoked for the
* event. %FALSE to propagate the event further.
*/ */
webkit_web_view_signals[CONSOLE_MESSAGE] = g_signal_new("console-message", webkit_web_view_signals[CONSOLE_MESSAGE] = g_signal_new("console-message",
G_TYPE_FROM_CLASS(webViewClass), G_TYPE_FROM_CLASS(webViewClass),
...@@ -1862,9 +1877,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1862,9 +1877,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @web_view: the object on which the signal is emitted * @web_view: the object on which the signal is emitted
* @frame: the relevant frame * @frame: the relevant frame
* @message: the message text * @message: the message text
* @return: TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
* *
* A JavaScript alert dialog was created. * A JavaScript alert dialog was created.
*
* Return value: %TRUE to stop other handlers from being invoked for the
* event. %FALSE to propagate the event further.
*/ */
webkit_web_view_signals[SCRIPT_ALERT] = g_signal_new("script-alert", webkit_web_view_signals[SCRIPT_ALERT] = g_signal_new("script-alert",
G_TYPE_FROM_CLASS(webViewClass), G_TYPE_FROM_CLASS(webViewClass),
...@@ -1882,9 +1899,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1882,9 +1899,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @frame: the relevant frame * @frame: the relevant frame
* @message: the message text * @message: the message text
* @confirmed: whether the dialog has been confirmed * @confirmed: whether the dialog has been confirmed
* @return: TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
* *
* A JavaScript confirm dialog was created, providing Yes and No buttons. * A JavaScript confirm dialog was created, providing Yes and No buttons.
*
* Return value: %TRUE to stop other handlers from being invoked for the
* event. %FALSE to propagate the event further.
*/ */
webkit_web_view_signals[SCRIPT_CONFIRM] = g_signal_new("script-confirm", webkit_web_view_signals[SCRIPT_CONFIRM] = g_signal_new("script-confirm",
G_TYPE_FROM_CLASS(webViewClass), G_TYPE_FROM_CLASS(webViewClass),
...@@ -1903,9 +1922,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -1903,9 +1922,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* @message: the message text * @message: the message text
* @default: the default value * @default: the default value
* @text: To be filled with the return value or NULL if the dialog was cancelled. * @text: To be filled with the return value or NULL if the dialog was cancelled.
* @return: TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.
* *
* A JavaScript prompt dialog was created, providing an entry to input text. * A JavaScript prompt dialog was created, providing an entry to input text.
*
* Return value: %TRUE to stop other handlers from being invoked for the
* event. %FALSE to propagate the event further.
*/ */
webkit_web_view_signals[SCRIPT_PROMPT] = g_signal_new("script-prompt", webkit_web_view_signals[SCRIPT_PROMPT] = g_signal_new("script-prompt",
G_TYPE_FROM_CLASS(webViewClass), G_TYPE_FROM_CLASS(webViewClass),
...@@ -2033,6 +2054,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -2033,6 +2054,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* The #WebKitWebView::move-cursor will be emitted to apply the * The #WebKitWebView::move-cursor will be emitted to apply the
* cursor movement described by its parameters to the @view. * cursor movement described by its parameters to the @view.
* *
* Return value: %TRUE or %FALSE
*
* Since: 1.1.4 * Since: 1.1.4
*/ */
webkit_web_view_signals[MOVE_CURSOR] = g_signal_new("move-cursor", webkit_web_view_signals[MOVE_CURSOR] = g_signal_new("move-cursor",
...@@ -2059,6 +2082,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass) ...@@ -2059,6 +2082,8 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
* to set the property value of "webkit-widget-is-selected". This can * to set the property value of "webkit-widget-is-selected". This can
* be used to draw a visual indicator of the selection. * be used to draw a visual indicator of the selection.
* *
* Return value: a new #GtkWidget, or %NULL
*
* Since: 1.1.8 * Since: 1.1.8
*/ */
webkit_web_view_signals[PLUGIN_WIDGET] = g_signal_new("create-plugin-widget", webkit_web_view_signals[PLUGIN_WIDGET] = g_signal_new("create-plugin-widget",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment