Changeset 39532 in webkit


Ignore:
Timestamp:
Dec 31, 2008 9:52:47 AM (15 years ago)
Author:
zecke@webkit.org
Message:

Add section information for View, Frame, Settings, HistoryItem, BackForwardList, WindowFeatures and Inspector

Add section information and informal examples for WebKitWebView,
WebKitWebFrame, WebKitWebSettings, WebKitWebNetworkRequest,
WebKitWebWindowFeatures, WebKitWebHistoryItem,
WebKitWebBackForwardList and WebKitWebInspector.

Location:
trunk/WebKit/gtk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/gtk/ChangeLog

    r39426 r39532  
     12008-12-31  Holger Hans Peter Freyther  <zecke@selfish.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=17045
     6
     7        Add section information for View, Frame, Settings, HistoryItem, BackForwardList, WindowFeatures and Inspector
     8
     9        Add section information and informal examples for WebKitWebView,
     10        WebKitWebFrame, WebKitWebSettings, WebKitWebNetworkRequest,
     11        WebKitWebWindowFeatures, WebKitWebHistoryItem,
     12        WebKitWebBackForwardList and WebKitWebInspector.
     13
     14        * docs/webkitgtk-sections.txt: Decide to not document some bits
     15        * webkit/webkitnetworkrequest.cpp:
     16        * webkit/webkitwebbackforwardlist.cpp:
     17        * webkit/webkitwebframe.cpp:
     18        * webkit/webkitwebhistoryitem.cpp:
     19        * webkit/webkitwebhistoryitem.h:
     20        * webkit/webkitwebinspector.cpp:
     21        * webkit/webkitwebsettings.cpp:
     22        * webkit/webkitwebsettings.h:
     23        * webkit/webkitwebview.cpp:
     24        * webkit/webkitwebwindowfeatures.cpp:
     25
    1262008-12-21  Xan Lopez  <xan@gnome.org>
    227
  • trunk/WebKit/gtk/docs/webkitgtk-sections.txt

    r38834 r39532  
    133133WebKitNetworkRequest
    134134webkit_network_request_get_uri
    135 webkit_network_request_new
    136 webkit_network_request_set_uri
    137135<SUBSECTION Standard>
    138136WEBKIT_NETWORK_REQUEST
     
    144142<SUBSECTION Private>
    145143webkit_network_request_get_type
     144webkit_network_request_new
     145webkit_network_request_set_uri
    146146WebKitNetworkRequestPrivate
    147147WebKitNetworkRequest
     
    203203webkit_web_view_zoom_out
    204204webkit_web_view_get_window_features
    205 webkit_web_view_set_window_features
    206205<SUBSECTION Standard>
    207206WEBKIT_WEB_VIEW
     
    212211WEBKIT_WEB_VIEW_GET_CLASS
    213212<SUBSECTION Private>
     213webkit_web_view_set_window_features
    214214webkit_web_view_get_type
    215215WebKitWebViewPrivate
  • trunk/WebKit/gtk/webkit/webkitnetworkrequest.cpp

    r35136 r39532  
    11/*
    2  * Copyright (C) 2007 Holger Hans Peter Freyther
     2 * Copyright (C) 2007, 2008 Holger Hans Peter Freyther
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2121
    2222#include "webkitnetworkrequest.h"
     23
     24/**
     25 * SECTION:webkitnetworkrequest
     26 * @short_description: The target of a navigation request
     27 * @see_also: #WebKitWebView::navigation-requested
     28 *
     29 * This class represents the network related aspects of a navigation
     30 * request. Currently this is only the uri of the target. In the future
     31 * the state of the web form might be added.
     32 * Currently this object is only used along with the
     33 * #WebKitWebView::navigation-requested signal.
     34 *
     35 */
    2336
    2437extern "C" {
     
    7891}
    7992
     93/**
     94 * webkit_network_request_get_uri:
     95 * @request: a #WebKitNetworkRequest
     96 *
     97 * Returns: the uri of the #WebKitNetworkRequest
     98 *
     99 * Since: 1.0.0
     100 */
    80101G_CONST_RETURN gchar* webkit_network_request_get_uri(WebKitNetworkRequest* request)
    81102{
  • trunk/WebKit/gtk/webkit/webkitwebbackforwardlist.cpp

    r38695 r39532  
    3030#include "HistoryItem.h"
    3131
     32/**
     33 * SECTION:webkitwebbackforwardlist
     34 * @short_description: The history of a #WebKitWebView
     35 * @see_also: #WebKitWebView, #WebKitWebHistoryItem
     36 *
     37 * <informalexample><programlisting>
     38 * /<!-- -->* Get the WebKitWebBackForwardList from the WebKitWebView *<!-- -->/
     39 * WebKitWebBackForwardList *back_forward_list = webkit_web_view_get_back_forward_list (my_web_view);
     40 * WebKitWebHistoryItem *item = webkit_web_back_forward_list_get_current_item (back_forward_list);
     41 *
     42 * /<!-- -->* Do something with a WebKitWebHistoryItem *<!-- -->/
     43 * g_print("%p", item);
     44 *
     45 * /<!-- -->* Control some parameters *<!-- -->/
     46 * WebKitWebBackForwardList *back_forward_list = webkit_web_view_get_back_forward_list (my_web_view);
     47 * webkit_web_back_forward_list_set_limit (back_forward_list, 30);
     48 * </programlisting></informalexample>
     49 *
     50 */
     51
    3252using namespace WebKit;
    3353
  • trunk/WebKit/gtk/webkit/webkitwebframe.cpp

    r39278 r39532  
    4747#include <JavaScriptCore/APICast.h>
    4848
     49/**
     50 * SECTION:webkitwebframe
     51 * @short_description: The content of a #WebKitWebView
     52 *
     53 * A #WebKitWebView contains a main #WebKitWebFrame. A #WebKitWebFrame
     54 * contains the content of one URI. The URI and name of the frame can
     55 * be retrieved, the load status and progress can be observed using the
     56 * signals and can be controlled using the methods of the #WebKitWebFrame.
     57 * A #WebKitWebFrame can have any number of children and one child can
     58 * be found by using #webkit_web_frame_find_frame.
     59 *
     60 * <informalexample><programlisting>
     61 * /<!-- -->* Get the frame from the #WebKitWebView *<!-- -->/
     62 * WebKitWebFrame *frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(my_view));
     63 * g_print("The URI of this frame is '%s'", webkit_web_frame_get_uri (frame));
     64 * </programlisting></informalexample>
     65 */
     66
    4967using namespace WebKit;
    5068using namespace WebCore;
  • trunk/WebKit/gtk/webkit/webkitwebhistoryitem.cpp

    r38695 r39532  
    2929#include "HistoryItem.h"
    3030#include "PlatformString.h"
     31
     32/**
     33 * SECTION:webkitwebhistoryitem
     34 * @short_description: One item of the #WebKitWebBackForwardList and or global history
     35 * @see_also: #WebKitWebBackForwardList
     36 *
     37 * A history item consists out of a title and a uri. It can be part of the
     38 * #WebKitWebBackForwardList and the global history. The global history is used
     39 * for coloring the links of visited sites.  #WebKitHistoryItem's constructed with
     40 * #webkit_web_history_item_new and #webkit_web_history_item_new_with_data are
     41 * automatically added to the global history.
     42 *
     43 * <informalexample><programlisting>
     44 * /<!-- -->* Inject a visited page into the global history *<!-- -->/
     45 * webkit_web_history_item_new_with_data("http://www.gnome.org/", "GNOME: The Free Software Desktop Project");
     46 * webkit_web_history_item_new_with_data("http://www.webkit.org/", "The WebKit Open Source Project");
     47 * </programlisting></informalexample>
     48 *
     49 */
    3150
    3251using namespace WebKit;
  • trunk/WebKit/gtk/webkit/webkitwebhistoryitem.h

    r37238 r39532  
    4040    GObject parent_instance;
    4141
     42    /*< private >*/
    4243    WebKitWebHistoryItemPrivate *priv;
    4344};
  • trunk/WebKit/gtk/webkit/webkitwebinspector.cpp

    r38695 r39532  
    11/*
    22 * Copyright (C) 2008 Gustavo Noronha Silva
     3 * Copyright (C) 2008 Holger Hans Peter Freyther
    34 *
    45 * This library is free software; you can redistribute it and/or
     
    2425#include "InspectorClientGtk.h"
    2526#include "webkitprivate.h"
     27
     28/**
     29 * SECTION:webkitwebinspector
     30 * @short_description: Access to the WebKit Inspector
     31 *
     32 * The WebKit Inspector is a graphical tool to inspect and change
     33 * the content of a #WebKitWebView. It also includes an interactive
     34 * JavaScriptDebugger. Using this class one can get a GtkWidget which
     35 * can be embedded into an application to show the inspector.
     36 *
     37 * The inspector is available when the #WebKitWebSettings of the
     38 * #WebKitWebView has set the #WebKitWebSettings:enable-developer-extras
     39 * to true otherwise no inspector is available.
     40 *
     41 * <informalexample><programlisting>
     42 * /<!-- -->* Enable the developer extras *<!-- -->/
     43 * WebKitWebSettings *setting = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview));
     44 * g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL);
     45 *
     46 * /<!-- -->* load some data or reload to be able to inspect the page*<!-- -->/
     47 * webkit_web_view_open (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org");
     48 *
     49 * /<!-- -->* Embed the inspector somewhere *<!-- -->/
     50 * WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview));
     51 * g_signal_connect (G_OBJECT (inspector), "inspect-web-view", G_CALLBACK(create_gtk_window_around_it), NULL);
     52 * g_signal_connect (G_OBJECT (inspector), "show-window", G_CALLBACK(show_inpector_window), NULL));
     53 * g_signal_connect (G_OBJECT (inspector), "notify::inspected-uri", G_CALLBACK(inspected_uri_changed_do_stuff), NULL);
     54 * </programlisting></informalexample>
     55 */
    2656
    2757using namespace WebKit;
  • trunk/WebKit/gtk/webkit/webkitwebsettings.cpp

    r38841 r39532  
    33 * Copyright (C) 2008 Nuanti Ltd.
    44 * Copyright (C) 2008 Collabora Ltd.
     5 * Copyright (C) 2008 Holger Hans Peter Freyther
    56 *
    67 * This library is free software; you can redistribute it and/or
     
    2728#include "FileSystem.h"
    2829#include "PluginDatabase.h"
     30
     31/**
     32 * SECTION:webkitwebsettings
     33 * @short_description: Control the behaviour of a #WebKitWebView
     34 *
     35 * #WebKitWebSettings can be applied to a #WebKitWebView to control
     36 * the to be used text encoding, color, font sizes, printing mode,
     37 * script support, loading of images and various other things.
     38 *
     39 * <informalexample><programlisting>
     40 * /<!-- -->* Create a new websettings and disable java script *<!-- -->/
     41 * WebKitWebSettings *settings = webkit_web_settings_new ();
     42 * g_object_set (G_OBJECT(settings), "enable-scripts", FALSE, NULL);
     43 *
     44 * /<!-- -->* Apply the result *<!-- -->/
     45 * webkit_web_view_set_settings (WEBKIT_WEB_VIEW(my_webview), settings);
     46 * </programlisting></informalexample>
     47 */
    2948
    3049using namespace WebCore;
  • trunk/WebKit/gtk/webkit/webkitwebsettings.h

    r34586 r39532  
    3939    GObject parent_instance;
    4040
     41    /*< private >*/
    4142    WebKitWebSettingsPrivate *priv;
    4243};
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r39421 r39532  
    11/*
    2  *  Copyright (C) 2007 Holger Hans Peter Freyther
     2 *  Copyright (C) 2007, 2008 Holger Hans Peter Freyther
    33 *  Copyright (C) 2007, 2008 Christian Dywan <christian@imendio.com>
    44 *  Copyright (C) 2007 Xan Lopez <xan@gnome.org>
     
    6666
    6767#include <gdk/gdkkeysyms.h>
     68
     69/**
     70 * SECTION:webkitwebview
     71 * @short_description: The central class of the WebKit/Gtk+ API
     72 * @see_also: #WebKitWebSettings, #WebKitWebFrame
     73 *
     74 * #WebKitWebView is the central class of the WebKit/Gtk+ API. It is a
     75 * #GtkWidget implementing the scrolling interface which means you can
     76 * embed in a #GtkScrolledWindow. It is responsible for managing the
     77 * drawing of the content, forwarding of events. You can load any URI
     78 * into the #WebKitWebView or any kind of data string. With #WebKitWebSettings
     79 * you can control various aspects of the rendering and loading of the content.
     80 * Each #WebKitWebView has exactly one #WebKitWebFrame as main frame. A
     81 * #WebKitWebFrame can have n children.
     82 *
     83 * <programlisting>
     84 * /<!-- -->* Create the widgets *<!-- -->/
     85 * GtkWidget *main_window = gtk_window_new (GTK_WIDGET_TOPLEVEL);
     86 * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
     87 * GtkWidget *web_view = webkit_web_view_new ();
     88 *
     89 * /<!-- -->* Place the WebKitWebView in the GtkScrolledWindow *<!-- -->/
     90 * gtk_container_add (GTK_CONTAINER (scrolled_window), web_view);
     91 * gtk_container_add (GTK_CONTAINER (main_window), scrolled_window);
     92 *
     93 * /<!-- -->* Open a webpage *<!-- -->/
     94 * webkit_web_view_open (WEBKIT_WEB_VIEW (web_view), "http://www.gnome.org");
     95 *
     96 * /<!-- -->* Show the result *<!-- -->/
     97 * gtk_window_set_default_size (GTK_WINDOW (main_window), 800, 600);
     98 * gtk_widget_show_all (main_window);
     99 * </programlisting>
     100 */
    68101
    69102static const double defaultDPI = 96.0;
  • trunk/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp

    r38861 r39532  
    11/*
    22 * Copyright (C) 2008 Gustavo Noronha Silva <gns@gnome.org>
     3 * Copyright (C) 2008 Holger Hans Peter Freyther
    34 *
    45 * This library is free software; you can redistribute it and/or
     
    2324#include "webkitwebwindowfeatures.h"
    2425#include "webkitprivate.h"
     26
     27/**
     28 * SECTION:webkitwebwindowfeatures
     29 * @short_description: Window properties of a #WebKitWebView
     30 * @see_also: #WebKitWebView::web-view-ready
     31 *
     32 * The content of a #WebKitWebView can request to change certain
     33 * properties of a #WebKitWebView. This can include the x, y position
     34 * of the window, the width and height but also if a toolbar,
     35 * scrollbar, statusbar, locationbar should be visible to the user,
     36 * the request to show the #WebKitWebView fullscreen.
     37 *
     38 * In the normal case one will use #webkit_web_view_get_window_features
     39 * to get the #WebKitWebWindowFeatures and then monitor the property
     40 * changes. Be aware that the #WebKitWebWindowFeatures might change
     41 * change before #WebKitWebView::web-view-ready signal is emitted.
     42 * To be safe listen to the notify::window-features signal of the #WebKitWebView
     43 * and reconnect the signals whenever the #WebKitWebWindowFeatures of
     44 * a #WebKitWebView changes.
     45 *
     46 * <informalexample><programlisting>
     47 * /<!-- -->* Get the current WebKitWebWindowFeatures *<!-- -->/
     48 * WebKitWebWindowFeatures *features = webkit_web_view_get_window_features (my_webview);
     49 *
     50 * /<!-- -->* Connect to the property changes *<!-- -->/
     51 * g_signal_connect (G_OBJECT(features), "notify::menubar-visible", G_CALLBACK(make_menu_bar_visible), NULL);
     52 * g_signal_connect (G_OBJECT(features), "notify::statusbar-visible", G_CALLBACK(make_status_bar_visible), NULL);
     53 *
     54 * </programlisting></informalexample>
     55 */
    2556
    2657extern "C" {
Note: See TracChangeset for help on using the changeset viewer.