Changeset 137469 in webkit


Ignore:
Timestamp:
Dec 12, 2012 8:11:04 AM (11 years ago)
Author:
Simon Pena
Message:

[GTK] Add sections documentation to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=104484

Reviewed by Martin Robinson.

Many of the sections in the WebKit2 GTK+ API documentation were
missing. This commit adds new documentation, in some cases
adapting it from WebKitGtk+ and in others writing it from the
scratch.

It also removes the WebKitWebViewBase class from the documentation
index, since it is not really relevant.

  • UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
  • UIProcess/API/gtk/WebKitContextMenu.cpp:
  • UIProcess/API/gtk/WebKitContextMenuItem.cpp:
  • UIProcess/API/gtk/WebKitCookieManager.cpp:
  • UIProcess/API/gtk/WebKitDownload.cpp:
  • UIProcess/API/gtk/WebKitError.cpp:
  • UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
  • UIProcess/API/gtk/WebKitFindController.cpp:
  • UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
  • UIProcess/API/gtk/WebKitPlugin.cpp:
  • UIProcess/API/gtk/WebKitPrintOperation.cpp:
  • UIProcess/API/gtk/WebKitSecurityManager.cpp:
  • UIProcess/API/gtk/WebKitURIRequest.cpp:
  • UIProcess/API/gtk/WebKitURIResponse.cpp:
  • UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
  • UIProcess/API/gtk/WebKitVersion.cpp:
  • UIProcess/API/gtk/WebKitWebContext.cpp:
  • UIProcess/API/gtk/WebKitWebInspector.cpp:
  • UIProcess/API/gtk/WebKitWebResource.cpp:

(webkit_web_resource_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
Location:
trunk/Source/WebKit2
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r137467 r137469  
     12012-12-12  Simon Pena  <spena@igalia.com>
     2
     3        [GTK] Add sections documentation to WebKit2 GTK+ API
     4        https://bugs.webkit.org/show_bug.cgi?id=104484
     5
     6        Reviewed by Martin Robinson.
     7
     8        Many of the sections in the WebKit2 GTK+ API documentation were
     9        missing. This commit adds new documentation, in some cases
     10        adapting it from WebKitGtk+ and in others writing it from the
     11        scratch.
     12
     13        It also removes the WebKitWebViewBase class from the documentation
     14        index, since it is not really relevant.
     15
     16        * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
     17        * UIProcess/API/gtk/WebKitContextMenu.cpp:
     18        * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
     19        * UIProcess/API/gtk/WebKitCookieManager.cpp:
     20        * UIProcess/API/gtk/WebKitDownload.cpp:
     21        * UIProcess/API/gtk/WebKitError.cpp:
     22        * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
     23        * UIProcess/API/gtk/WebKitFindController.cpp:
     24        * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
     25        * UIProcess/API/gtk/WebKitPlugin.cpp:
     26        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
     27        * UIProcess/API/gtk/WebKitSecurityManager.cpp:
     28        * UIProcess/API/gtk/WebKitURIRequest.cpp:
     29        * UIProcess/API/gtk/WebKitURIResponse.cpp:
     30        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
     31        * UIProcess/API/gtk/WebKitVersion.cpp:
     32        * UIProcess/API/gtk/WebKitWebContext.cpp:
     33        * UIProcess/API/gtk/WebKitWebInspector.cpp:
     34        * UIProcess/API/gtk/WebKitWebResource.cpp:
     35        (webkit_web_resource_class_init):
     36        * UIProcess/API/gtk/WebKitWebView.cpp:
     37        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
     38
    1392012-12-12  Kondapally Kalyan  <kalyan.kondapally@intel.com>
    240
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp

    r135565 r137469  
    2828
    2929using namespace WebKit;
     30
     31/**
     32 * SECTION: WebKitBackForwardListItem
     33 * @Short_description: One item of the #WebKitBackForwardList
     34 * @Title: WebKitBackForwardListItem
     35 * @See_also: #WebKitBackForwardList
     36 *
     37 * A history item is part of the #WebKitBackForwardList and consists
     38 * out of a title and a URI.
     39 *
     40 */
    3041
    3142struct _WebKitBackForwardListItemPrivate {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp

    r135565 r137469  
    2828using namespace WebKit;
    2929using namespace WebCore;
     30
     31/**
     32 * SECTION: WebKitContextMenu
     33 * @Short_description: Represents the context menu in a #WebKitWebView
     34 * @Title: WebKitContextMenu
     35 *
     36 * #WebKitContextMenu represents a context menu containing
     37 * #WebKitContextMenuItem<!-- -->s in a #WebKitWebView.
     38 *
     39 * When a #WebKitWebView is about to display the context menu, it
     40 * emits the #WebKitWebView::context-menu signal, which has the
     41 * #WebKitContextMenu as an argument. You can modify it, adding new
     42 * submenus that you can create with webkit_context_menu_new(), adding
     43 * new #WebKitContextMenuItem<!-- -->s with
     44 * webkit_context_menu_prepend(), webkit_context_menu_append() or
     45 * webkit_context_menu_insert(), maybe after having removed the
     46 * existing ones with webkit_context_menu_remove_all().
     47 *
     48 */
    3049
    3150struct _WebKitContextMenuPrivate {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp

    r135565 r137469  
    3838using namespace WebCore;
    3939
     40/**
     41 * SECTION: WebKitContextMenuItem
     42 * @Short_description: One item of the #WebKitContextMenu
     43 * @Title: WebKitContextMenuItem
     44 *
     45 * The #WebKitContextMenu is composed of #WebKitContextMenuItem<!--
     46 * -->s. These items can be created from a #GtkAction, from a
     47 * #WebKitContextMenuAction or from a #WebKitContextMenuAction and a
     48 * label. These #WebKitContextMenuAction<!-- -->s denote stock actions
     49 * for the items. You can also create separators and submenus.
     50 *
     51 */
     52
    4053struct _WebKitContextMenuItemPrivate {
    4154    ~_WebKitContextMenuItemPrivate()
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp

    r135565 r137469  
    2929
    3030using namespace WebKit;
     31
     32/**
     33 * SECTION: WebKitCookieManager
     34 * @Short_description: Defines how to handle cookies in a #WebKitWebContext
     35 * @Title: WebKitCookieManager
     36 *
     37 * The #WebKitCookieManager defines how to handle cookies in a
     38 * #WebKitWebContext. Get it from the context with
     39 * webkit_web_context_get_cookie_manager(), and use it to set where to
     40 * store cookies, with webkit_cookie_manager_set_persistent_storage(),
     41 * to get the list of domains with cookies, with
     42 * webkit_cookie_manager_get_domains_with_cookies(), or to set the
     43 * acceptance policy, with webkit_cookie_manager_get_accept_policy()
     44 * (among other actions).
     45 *
     46 */
    3147
    3248enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp

    r135565 r137469  
    3434using namespace WebKit;
    3535using namespace WebCore;
     36
     37/**
     38 * SECTION: WebKitDownload
     39 * @Short_description: Object used to communicate with the application when downloading
     40 * @Title: WebKitDownload
     41 *
     42 * #WebKitDownload carries information about a download request and
     43 * response, including a #WebKitURIRequest and a #WebKitURIResponse
     44 * objects. The application may use this object to control the
     45 * download process, or to simply figure out what is to be downloaded,
     46 * and handle the download process itself.
     47 *
     48 */
    3649
    3750enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp

    r111510 r137469  
    2626
    2727using namespace WebCore;
     28
     29/**
     30 * SECTION: WebKitError
     31 * @Short_description: Categorized WebKit errors
     32 * @Title: WebKitError
     33 *
     34 * Categorized WebKit errors.
     35 *
     36 */
    2837
    2938GQuark webkit_network_error_quark()
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp

    r135565 r137469  
    3535
    3636using namespace WebKit;
     37
     38/**
     39 * SECTION: WebKitFaviconDatabase
     40 * @Short_description: A WebKit favicon database
     41 * @Title: WebKitFaviconDatabase
     42 *
     43 * #WebKitFaviconDatabase provides access to the icons associated with
     44 * web sites.
     45 *
     46 * WebKit will automatically look for available icons in &lt;link&gt;
     47 * elements on opened pages as well as an existing favicon.ico and
     48 * load the images found into a memory cache if possible. That cache
     49 * is frozen to an on-disk database for persistence.
     50 *
     51 * If #WebKitSettings:enable-private-browsing is %TRUE, new icons
     52 * won't be added to the on-disk database and no existing icons will
     53 * be deleted from it. Nevertheless, WebKit will still store them in
     54 * the in-memory cache during the current execution.
     55 *
     56 */
    3757
    3858enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp

    r135565 r137469  
    3030using namespace WebKit;
    3131using namespace WebCore;
     32
     33/**
     34 * SECTION: WebKitFindController
     35 * @Short_description: Controls text search in a #WebKitWebView
     36 * @Title: WebKitFindController
     37 *
     38 * A #WebKitFindController is used to search text in a #WebKitWebView. You
     39 * can get a #WebKitWebView<!-- -->'s #WebKitFindController with
     40 * webkit_web_view_get_find_controller(), and later use it to search
     41 * for text using webkit_find_controller_search(), or get the
     42 * number of matches using webkit_find_controller_count_matches(). The
     43 * operations are asynchronous and trigger signals when ready, such as
     44 * #WebKitFindController::found-text,
     45 * #WebKitFindController::failed-to-find-text or
     46 * #WebKitFindController::counted-matches<!-- -->.
     47 *
     48 */
    3249
    3350enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp

    r135565 r137469  
    2828
    2929using namespace WebKit;
     30
     31/**
     32 * SECTION: WebKitFormSubmissionRequest
     33 * @Short_description: Represents a form submission request
     34 * @Title: WebKitFormSubmissionRequest
     35 *
     36 * When a form is about to be submitted in a #WebKitWebView, the
     37 * #WebKitWebView::submit-form signal is emitted. Its request argument
     38 * contains information about the text fields of the form, that are
     39 * typically used to store login information, returned in a
     40 * #GHashTable by the webkit_form_submission_request_get_text_fields()
     41 * method, and you can finally submit the form with
     42 * webkit_form_submission_request_submit().
     43 *
     44 */
    3045
    3146struct _WebKitFormSubmissionRequestPrivate {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPlugin.cpp

    r135565 r137469  
    2626
    2727using namespace WebKit;
     28
     29/**
     30 * SECTION: WebKitPlugin
     31 * @Short_description: Represents a plugin, enabling fine-grained control
     32 * @Title: WebKitPlugin
     33 *
     34 * This object represents a single plugin, found while scanning the
     35 * various platform plugin directories. This object can be used to get
     36 * more information about a plugin, and enable/disable it, allowing
     37 * fine-grained control of plugins. The list of available plugins can
     38 * be obtained from the #WebKitWebContext, with
     39 * webkit_web_context_get_plugins().
     40 *
     41 */
    2842
    2943struct _WebKitPluginPrivate {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp

    r135565 r137469  
    3838
    3939using namespace WebKit;
     40
     41/**
     42 * SECTION: WebKitPrintOperation
     43 * @Short_description: Controls a print operation
     44 * @Title: WebKitPrintOperation
     45 *
     46 * A #WebKitPrintOperation controls a print operation in WebKit. With
     47 * a similar API to #GtkPrintOperation, it lets you set the print
     48 * settings with webkit_print_operation_set_print_settings() or
     49 * display the print dialog with webkit_print_operation_run_dialog().
     50 *
     51 */
    4052
    4153enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManager.cpp

    r135565 r137469  
    2727
    2828using namespace WebKit;
     29
     30/**
     31 * SECTION: WebKitSecurityManager
     32 * @Short_description: Controls security settings in a #WebKitWebContext
     33 * @Title: WebKitSecurityManager
     34 *
     35 * The #WebKitSecurityManager defines security settings for URI
     36 * schemes in a #WebKitWebContext. Get it from the context with
     37 * webkit_web_context_get_security_manager(), and use it to register a
     38 * URI scheme with a certain security level, or to check if it already
     39 * has it.
     40 *
     41 */
    2942
    3043typedef enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIRequest.cpp

    r135565 r137469  
    3333
    3434using namespace WebCore;
     35
     36/**
     37 * SECTION: WebKitURIRequest
     38 * @Short_description: Represents a URI request
     39 * @Title: WebKitURIRequest
     40 *
     41 * A #WebKitURIRequest can be created with a URI using the
     42 * webkit_uri_request_new() method, and you can get the URI of an
     43 * existing request with the webkit_uri_request_get_uri() one.
     44 *
     45 */
    3546
    3647struct _WebKitURIRequestPrivate {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp

    r135565 r137469  
    3131using namespace WebCore;
    3232
     33/**
     34 * SECTION: WebKitURIResponse
     35 * @Short_description: Represents a URI response
     36 * @Title: WebKitURIResponse
     37 *
     38 * A #WebKitURIResponse contains information such as the URI, the
     39 * status code, the content length, the mime type, the HTTP status or
     40 * the suggested filename.
     41 *
     42 */
     43
    3344enum {
    3445    PROP_0,
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp

    r135565 r137469  
    3434using namespace WebKit;
    3535
     36/**
     37 * SECTION: WebKitURISchemeRequest
     38 * @Short_description: Represents a URI scheme request
     39 * @Title: WebKitURISchemeRequest
     40 *
     41 * If you register a particular URI scheme in a #WebKitWebContext,
     42 * using webkit_web_context_register_uri_scheme(), you have to provide
     43 * a #WebKitURISchemeRequestCallback. After that, when a URI request
     44 * is made with that particular scheme, your callback will be
     45 * called. There you will be able to access properties such as the
     46 * scheme, the URI and path, and the #WebKitWebView that initiated the
     47 * request, and also finish the request with
     48 * webkit_uri_scheme_request_finish().
     49 *
     50 */
     51
    3652static const unsigned int gReadBufferSize = 8192;
    3753
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitVersion.cpp

    r119837 r137469  
    2020#include "config.h"
    2121#include "WebKitVersion.h"
     22
     23/**
     24 * SECTION: WebKitVersion
     25 * @Short_description: Provides the WebKit version
     26 * @Title: WebKitVersion
     27 *
     28 * Provides convenience functions returning WebKit's major, minor and
     29 * micro versions of the WebKit library your code is running
     30 * against. This is not necessarily the same as the
     31 * #WEBKIT_MAJOR_VERSION, #WEBKIT_MINOR_VERSION or
     32 * #WEBKIT_MICRO_VERSION, which represent the version of the WebKit
     33 * headers included when compiling the code.
     34 *
     35 */
    2236
    2337/**
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp

    r135565 r137469  
    4747using namespace WebKit;
    4848
     49/**
     50 * SECTION: WebKitWebContext
     51 * @Short_description: Manages aspects common to all #WebKitWebView<!-- -->s
     52 * @Title: WebKitWebContext
     53 *
     54 * The #WebKitWebContext manages all aspects common to all
     55 * #WebKitWebView<!-- -->s.
     56 *
     57 * You can define the #WebKitCacheModel with
     58 * webkit_web_context_set_cache_model(), depending on the needs of
     59 * your application. You can access the #WebKitCookieManager or the
     60 * #WebKitSecurityManager to specify the behaviour of your application
     61 * regarding cookies and security, using
     62 * webkit_web_context_get_cookie_manager() and
     63 * webkit_web_context_get_security_manager() for that.
     64 *
     65 * It is also possible to change your preferred language or enable
     66 * spell checking, using webkit_web_context_set_preferred_languages(),
     67 * webkit_web_context_set_spell_checking_languages() and
     68 * webkit_web_context_set_spell_checking_enabled().
     69 *
     70 * You can use webkit_web_context_register_uri_scheme() to register
     71 * custom URI schemes, and manage several other settings.
     72 *
     73 */
     74
    4975enum {
    5076    DOWNLOAD_STARTED,
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp

    r135565 r137469  
    2929
    3030using namespace WebKit;
     31
     32/**
     33 * SECTION: WebKitWebInspector
     34 * @Short_description: Access to the WebKit inspector
     35 * @Title: WebKitWebInspector
     36 *
     37 * The WebKit Inspector is a graphical tool to inspect and change the
     38 * content of a #WebKitWebView. It also includes an interactive
     39 * JavaScript debugger. Using this class one can get a #GtkWidget
     40 * which can be embedded into an application to show the inspector.
     41 *
     42 * The inspector is available when the #WebKitSettings of the
     43 * #WebKitWebView has set the #WebKitSettings:enable-developer-extras
     44 * to true, otherwise no inspector is available.
     45 *
     46 * <informalexample><programlisting>
     47 * /<!-- -->* Enable the developer extras *<!-- -->/
     48 * WebKitSettings *setting = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview));
     49 * g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL);
     50 *
     51 * /<!-- -->* Load some data or reload to be able to inspect the page*<!-- -->/
     52 * webkit_web_load_uri (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org");
     53 *
     54 * /<!-- -->* Show the inspector *<!-- -->/
     55 * WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview));
     56 * webkit_web_inspector_show (WEBKIT_WEB_INSPECTOR(inspector));
     57 * </programlisting></informalexample>
     58 *
     59 */
    3160
    3261enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebResource.cpp

    r135565 r137469  
    3131
    3232using namespace WebKit;
     33
     34/**
     35 * SECTION: WebKitWebResource
     36 * @Short_description: Represents a resource at the end of a URI
     37 * @Title: WebKitWebResource
     38 *
     39 * A #WebKitWebResource encapsulates content for each resource at the
     40 * end of a particular URI. For example, one #WebKitWebResource will
     41 * be created for each separate image and stylesheet when a page is
     42 * loaded.
     43 *
     44 * You can access the response and the URI for a given
     45 * #WebKitWebResource, using webkit_web_resource_get_uri() and
     46 * webkit_web_resource_get_response(), as well as the raw data, using
     47 * webkit_web_resource_get_data().
     48 *
     49 */
    3350
    3451enum {
     
    91108                                    g_param_spec_string("uri",
    92109                                                        _("URI"),
    93                                                         _("The current active URI of the result"),
     110                                                        _("The current active URI of the resource"),
    94111                                                        0,
    95112                                                        WEBKIT_PARAM_READABLE));
     
    239256 * @resource: a #WebKitWebResource
    240257 *
    241  * Returns the current active URI of @web_view. The active URI might change during
     258 * Returns the current active URI of @resource. The active URI might change during
    242259 * a load operation:
    243260 *
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp

    r137450 r137469  
    6767using namespace WebKit;
    6868using namespace WebCore;
     69
     70/**
     71 * SECTION: WebKitWebView
     72 * @Short_description: The central class of the WebKit2GTK+ API
     73 * @Title: WebKitWebView
     74 *
     75 * #WebKitWebView is the central class of the WebKit2GTK+ API. It is
     76 * responsible for managing the drawing of the content and forwarding
     77 * of events. You can load any URI into the #WebKitWebView or a data
     78 * string. With #WebKitSettings you can control various aspects of the
     79 * rendering and loading of the content.
     80 *
     81 * Note that #WebKitWebView is scrollable by itself, so you don't need
     82 * to embed it in a #GtkScrolledWindow.
     83 */
    6984
    7085enum {
  • trunk/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml

    r129906 r137469  
    1414    <xi:include href="xml/WebKitWebContext.xml"/>
    1515    <xi:include href="xml/WebKitWebView.xml"/>
    16     <xi:include href="xml/WebKitWebViewBase.xml"/>
    1716    <xi:include href="xml/WebKitBackForwardList.xml"/>
    1817    <xi:include href="xml/WebKitBackForwardListItem.xml"/>
Note: See TracChangeset for help on using the changeset viewer.