## EWebView EWebView |

## Synopsis

    struct              EWebView;
    GtkWidget *         e_web_view_new                      (void);
    void                e_web_view_clear                    (EWebView *web_view);
    void                e_web_view_load_string              (EWebView *web_view,
                                                             const gchar *string);
    void                e_web_view_load_uri                 (EWebView *web_view,
                                                             const gchar *uri);
    gchar *             e_web_view_redirect_uri             (EWebView *web_view,
                                                             const gchar *uri);
    gchar *             e_web_view_suggest_filename         (EWebView *web_view,
                                                             const gchar *uri);
    void                e_web_view_reload                   (EWebView *web_view);
    gchar *             e_web_view_get_html                 (EWebView *web_view);
    gboolean            e_web_view_get_caret_mode           (EWebView *web_view);
    void                e_web_view_set_caret_mode           (EWebView *web_view,
                                                             gboolean caret_mode);
    GtkTargetList *     e_web_view_get_copy_target_list     (EWebView *web_view);
    gboolean            e_web_view_get_disable_printing     (EWebView *web_view);
    void                e_web_view_set_disable_printing     (EWebView *web_view,
                                                             gboolean disable_printing);
    gboolean            e_web_view_get_disable_save_to_disk (EWebView *web_view);
    void                e_web_view_set_disable_save_to_disk (EWebView *web_view,
                                                             gboolean disable_save_to_disk);
    gboolean            e_web_view_get_editable             (EWebView *web_view);
    void                e_web_view_set_editable             (EWebView *web_view,
                                                             gboolean editable);
    gboolean            e_web_view_get_inline_spelling      (EWebView *web_view);
    void                e_web_view_set_inline_spelling      (EWebView *web_view,
                                                             gboolean inline_spelling);
    gboolean            e_web_view_get_magic_links          (EWebView *web_view);
    void                e_web_view_set_magic_links          (EWebView *web_view,
                                                             gboolean magic_links);
    gboolean            e_web_view_get_magic_smileys        (EWebView *web_view);
    void                e_web_view_set_magic_smileys        (EWebView *web_view,
                                                             gboolean magic_smileys);
    const gchar *       e_web_view_get_selected_uri         (EWebView *web_view);
    void                e_web_view_set_selected_uri         (EWebView *web_view,
                                                             const gchar *selected_uri);
    const gchar *       e_web_view_get_cursor_image_src     (EWebView *web_view);
    void                e_web_view_set_cursor_image_src     (EWebView *web_view,
                                                             const gchar *src_uri);
    GtkAction *         e_web_view_get_open_proxy           (EWebView *web_view);
    void                e_web_view_set_open_proxy           (EWebView *web_view,
                                                             GtkAction *open_proxy);
    GtkTargetList *     e_web_view_get_paste_target_list    (EWebView *web_view);
    GtkAction *         e_web_view_get_print_proxy          (EWebView *web_view);
    void                e_web_view_set_print_proxy          (EWebView *web_view,
                                                             GtkAction *print_proxy);
    GtkAction *         e_web_view_get_save_as_proxy        (EWebView *web_view);
    void                e_web_view_set_save_as_proxy        (EWebView *web_view,
                                                             GtkAction *save_as_proxy);
    void                e_web_view_add_highlight            (EWebView *web_view,
                                                             const gchar *highlight);
    void                e_web_view_clear_highlights         (EWebView *web_view);
    void                e_web_view_update_highlights        (EWebView *web_view);
    GtkAction *         e_web_view_get_action               (EWebView *web_view,
                                                             const gchar *action_name);
    GtkActionGroup *    e_web_view_get_action_group         (EWebView *web_view,
                                                             const gchar *group_name);
    void                e_web_view_copy_clipboard           (EWebView *web_view);
    void                e_web_view_cut_clipboard            (EWebView *web_view);
    gboolean            e_web_view_is_selection_active      (EWebView *web_view);
    void                e_web_view_paste_clipboard          (EWebView *web_view);
    gboolean            e_web_view_scroll_forward           (EWebView *web_view);
    gboolean            e_web_view_scroll_backward          (EWebView *web_view);
    void                e_web_view_select_all               (EWebView *web_view);
    void                e_web_view_unselect_all             (EWebView *web_view);
    void                e_web_view_zoom_100                 (EWebView *web_view);
    void                e_web_view_zoom_in                  (EWebView *web_view);
    void                e_web_view_zoom_out                 (EWebView *web_view);
    GtkUIManager *      e_web_view_get_ui_manager           (EWebView *web_view);
    GtkWidget *         e_web_view_get_popup_menu           (EWebView *web_view);
    void                e_web_view_show_popup_menu          (EWebView *web_view);
    EActivity *         e_web_view_new_activity             (EWebView *web_view);
    void                e_web_view_status_message           (EWebView *web_view,
                                                             const gchar *status_message);
    void                e_web_view_stop_loading             (EWebView *web_view);
    void                e_web_view_update_actions           (EWebView *web_view);
    gchar *             e_web_view_get_selection_html       (EWebView *web_view);
    void                e_web_view_update_fonts             (EWebView *web_view);
    void                e_web_view_cursor_image_copy        (EWebView *web_view);
    void                e_web_view_cursor_image_save        (EWebView *web_view);
    void                e_web_view_request                  (EWebView *web_view,
                                                             const gchar *uri,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);
    GInputStream *      e_web_view_request_finish           (EWebView *web_view,
                                                             GAsyncResult *result,
                                                             GError **error);
    void                e_web_view_install_request_handler  (EWebView *web_view,
                                                             GType handler_type);
    void                e_web_view_add_css_rule_into_style_sheet
                                                            (EWebView *web_view,
                                                             const gchar *style_sheet_id,
                                                             const gchar *selector,
                                                             const gchar *style);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----WebKitWebView
                               +----EWebView

## Implemented Interfaces

EWebView implements AtkImplementorIface, GtkBuildable, GtkScrollable, EExtensible, EAlertSink and ESelectable.

## Properties

      "caret-mode"               gboolean              : Read / Write
      "cursor-image-src"         gchar*                : Read / Write
      "disable-printing"         gboolean              : Read / Write / Construct
      "disable-save-to-disk"     gboolean              : Read / Write / Construct
      "inline-spelling"          gboolean              : Read / Write
      "magic-links"              gboolean              : Read / Write
      "magic-smileys"            gboolean              : Read / Write
      "open-proxy"               GtkAction*            : Read / Write
      "print-proxy"              GtkAction*            : Read / Write
      "save-as-proxy"            GtkAction*            : Read / Write
      "selected-uri"             gchar*                : Read / Write

## Signals

      "new-activity"                                   : Run Last
      "popup-event"                                    : Run Last
      "process-mailto"                                 : Run Last
      "status-message"                                 : Run Last
      "stop-loading"                                   : Run Last
      "update-actions"                                 : Run Last

## Description

## Details

### struct EWebView

    struct EWebView;

### e_web_view_new ()

    GtkWidget *         e_web_view_new                      (void);

### e_web_view_clear ()

    void                e_web_view_clear                    (EWebView *web_view);

### e_web_view_load_string ()

    void                e_web_view_load_string              (EWebView *web_view,
                                                             const gchar *string);

### e_web_view_load_uri ()

    void                e_web_view_load_uri                 (EWebView *web_view,
                                                             const gchar *uri);

### e_web_view_redirect_uri ()

    gchar *             e_web_view_redirect_uri             (EWebView *web_view,
                                                             const gchar *uri);

Replaces `uri` with a redirected URI as necessary, primarily for use with custom SoupRequest handlers. Typically this function would be called just prior to handing a request off to a SoupSession, such as from a WebKitWebView "resource-request-starting" signal handler.

A newly-allocated URI string is always returned, whether the `uri` was redirected or not. Free the returned string with `g_free()`.

`web_view` : | an EWebView
`uri` : | the requested URI
Returns : | the redirected URI or a copy of `uri`

### e_web_view_suggest_filename ()

    gchar *             e_web_view_suggest_filename         (EWebView *web_view,
                                                             const gchar *uri);

Attempts to derive a suggested filename from the `uri` for use in a "Save As" dialog.

By default the suggested filename is the last path segment of the `uri` (unless `uri` looks like a query), but subclasses can use other mechanisms for custom URI schemes. For example, "cid:" URIs in an email message may refer to a MIME part with a suggested filename in its Content-Disposition header.

The returned string should be freed with `g_free()` when finished with it, but callers should also be prepared for the function to return `NULL` if a filename cannot be determined.

`web_view` : | an EWebView
`uri` : | a URI string
Returns : | a suggested filename, or `NULL`

### e_web_view_reload ()

    void                e_web_view_reload                   (EWebView *web_view);

### e_web_view_get_html ()

    gchar *             e_web_view_get_html                 (EWebView *web_view);

### e_web_view_get_caret_mode ()

    gboolean            e_web_view_get_caret_mode           (EWebView *web_view);

### e_web_view_set_caret_mode ()

    void                e_web_view_set_caret_mode           (EWebView *web_view,
                                                             gboolean caret_mode);

### e_web_view_get_copy_target_list ()

    GtkTargetList *     e_web_view_get_copy_target_list     (EWebView *web_view);

### e_web_view_get_disable_printing ()

    gboolean            e_web_view_get_disable_printing     (EWebView *web_view);

### e_web_view_set_disable_printing ()

    void                e_web_view_set_disable_printing     (EWebView *web_view,
                                                             gboolean disable_printing);

### e_web_view_get_disable_save_to_disk ()

    gboolean            e_web_view_get_disable_save_to_disk (EWebView *web_view);

### e_web_view_set_disable_save_to_disk ()

    void                e_web_view_set_disable_save_to_disk (EWebView *web_view,
                                                             gboolean disable_save_to_disk);

### e_web_view_get_editable ()

    gboolean            e_web_view_get_editable             (EWebView *web_view);

### e_web_view_set_editable ()

    void                e_web_view_set_editable             (EWebView *web_view,
                                                             gboolean editable);

### e_web_view_get_inline_spelling ()

    gboolean            e_web_view_get_inline_spelling      (EWebView *web_view);

### e_web_view_set_inline_spelling ()

    void                e_web_view_set_inline_spelling      (EWebView *web_view,
                                                             gboolean inline_spelling);

### e_web_view_get_magic_links ()

    gboolean            e_web_view_get_magic_links          (EWebView *web_view);

### e_web_view_set_magic_links ()

    void                e_web_view_set_magic_links          (EWebView *web_view,
                                                             gboolean magic_links);

### e_web_view_get_magic_smileys ()

    gboolean            e_web_view_get_magic_smileys        (EWebView *web_view);

### e_web_view_set_magic_smileys ()

    void                e_web_view_set_magic_smileys        (EWebView *web_view,
                                                             gboolean magic_smileys);

### e_web_view_get_selected_uri ()

    const gchar *       e_web_view_get_selected_uri         (EWebView *web_view);

### e_web_view_set_selected_uri ()

    void                e_web_view_set_selected_uri         (EWebView *web_view,
                                                             const gchar *selected_uri);

### e_web_view_get_cursor_image_src ()

    const gchar *       e_web_view_get_cursor_image_src     (EWebView *web_view);

### e_web_view_set_cursor_image_src ()

    void                e_web_view_set_cursor_image_src     (EWebView *web_view,
                                                             const gchar *src_uri);

### e_web_view_get_open_proxy ()

    GtkAction *         e_web_view_get_open_proxy           (EWebView *web_view);

### e_web_view_set_open_proxy ()

    void                e_web_view_set_open_proxy           (EWebView *web_view,
                                                             GtkAction *open_proxy);

### e_web_view_get_paste_target_list ()

    GtkTargetList *     e_web_view_get_paste_target_list    (EWebView *web_view);

### e_web_view_get_print_proxy ()

    GtkAction *         e_web_view_get_print_proxy          (EWebView *web_view);

### e_web_view_set_print_proxy ()

    void                e_web_view_set_print_proxy          (EWebView *web_view,
                                                             GtkAction *print_proxy);

### e_web_view_get_save_as_proxy ()

    GtkAction *         e_web_view_get_save_as_proxy        (EWebView *web_view);

### e_web_view_set_save_as_proxy ()

    void                e_web_view_set_save_as_proxy        (EWebView *web_view,
                                                             GtkAction *save_as_proxy);

### e_web_view_add_highlight ()

    void                e_web_view_add_highlight            (EWebView *web_view,
                                                             const gchar *highlight);

### e_web_view_clear_highlights ()

    void                e_web_view_clear_highlights         (EWebView *web_view);

### e_web_view_update_highlights ()

    void                e_web_view_update_highlights        (EWebView *web_view);

### e_web_view_get_action ()

    GtkAction *         e_web_view_get_action               (EWebView *web_view,
                                                             const gchar *action_name);

### e_web_view_get_action_group ()

    GtkActionGroup *    e_web_view_get_action_group         (EWebView *web_view,
                                                             const gchar *group_name);

### e_web_view_copy_clipboard ()

    void                e_web_view_copy_clipboard           (EWebView *web_view);

### e_web_view_cut_clipboard ()

    void                e_web_view_cut_clipboard            (EWebView *web_view);

### e_web_view_is_selection_active ()

    gboolean            e_web_view_is_selection_active      (EWebView *web_view);

### e_web_view_paste_clipboard ()

    void                e_web_view_paste_clipboard          (EWebView *web_view);

### e_web_view_scroll_forward ()

    gboolean            e_web_view_scroll_forward           (EWebView *web_view);

### e_web_view_scroll_backward ()

    gboolean            e_web_view_scroll_backward          (EWebView *web_view);

### e_web_view_select_all ()

    void                e_web_view_select_all               (EWebView *web_view);

### e_web_view_unselect_all ()

    void                e_web_view_unselect_all             (EWebView *web_view);

### e_web_view_zoom_100 ()

    void                e_web_view_zoom_100                 (EWebView *web_view);

### e_web_view_zoom_in ()

    void                e_web_view_zoom_in                  (EWebView *web_view);

### e_web_view_zoom_out ()

    void                e_web_view_zoom_out                 (EWebView *web_view);

### e_web_view_get_ui_manager ()

    GtkUIManager *      e_web_view_get_ui_manager           (EWebView *web_view);

### e_web_view_get_popup_menu ()

    GtkWidget *         e_web_view_get_popup_menu           (EWebView *web_view);

### e_web_view_show_popup_menu ()

    void                e_web_view_show_popup_menu          (EWebView *web_view);

### e_web_view_new_activity ()

    EActivity *         e_web_view_new_activity             (EWebView *web_view);

Returns a new EActivity for an EWebView-related asynchronous operation, and emits the "new-activity" signal. By default the EActivity comes loaded with a GCancellable and sets the `web_view` itself as the "alert-sink" (which means alerts are displayed directly in the content area). The signal emission allows the EActivity to be further customized and/or tracked by the application.

`web_view` : | an EWebView
Returns : | an EActivity

### e_web_view_status_message ()

    void                e_web_view_status_message           (EWebView *web_view,
                                                             const gchar *status_message);

### e_web_view_stop_loading ()

    void                e_web_view_stop_loading             (EWebView *web_view);

### e_web_view_update_actions ()

    void                e_web_view_update_actions           (EWebView *web_view);

### e_web_view_get_selection_html ()

    gchar *             e_web_view_get_selection_html       (EWebView *web_view);

### e_web_view_update_fonts ()

    void                e_web_view_update_fonts             (EWebView *web_view);

### e_web_view_cursor_image_copy ()

    void                e_web_view_cursor_image_copy        (EWebView *web_view);

Asynchronously copies the image under the cursor to the clipboard.

This function triggers a "new-activity" signal emission so the asynchronous operation can be tracked and/or cancelled.

`web_view` : | an EWebView

### e_web_view_cursor_image_save ()

    void                e_web_view_cursor_image_save        (EWebView *web_view);

Prompts the user to choose a destination file and then asynchronously saves the image under the cursor to the destination file.

This function triggers a "new-activity" signal emission so the asynchronous operation can be tracked and/or cancelled.

`web_view` : | an EWebView

### e_web_view_request ()

    void                e_web_view_request                  (EWebView *web_view,
                                                             const gchar *uri,
                                                             GCancellable *cancellable,
                                                             GAsyncReadyCallback callback,
                                                             gpointer user_data);

Asynchronously requests data at `uri` by way of a SoupRequest to WebKit's default SoupSession, incorporating both `e_web_view_redirect_uri()` and the custom request handlers installed via `e_web_view_install_request_handler()`.

When the operation is finished, `callback` will be called. You can then call `e_web_view_request_finish()` to get the result of the operation.

`web_view` : | an EWebView
`uri` : | the URI to load
`cancellable` : | optional GCancellable object, or `NULL`
`callback` : | a GAsyncReadyCallback to call when the request is satisfied
`user_data` : | data to pass to the callback function

### e_web_view_request_finish ()

    GInputStream *      e_web_view_request_finish           (EWebView *web_view,
                                                             GAsyncResult *result,
                                                             GError **error);

Finishes the operation started with `e_web_view_request()`.

Unreference the returned GInputStream with `g_object_unref()` when finished with it. If an error occurred, the function will set `error` and return `NULL`.

`web_view` : | an EWebView
`result` : | a GAsyncResult
`error` : | return location for a GError, or `NULL`
Returns : | a GInputStream, or `NULL`

### e_web_view_install_request_handler ()

    void                e_web_view_install_request_handler  (EWebView *web_view,
                                                             GType handler_type);

### e_web_view_add_css_rule_into_style_sheet ()

    void                e_web_view_add_css_rule_into_style_sheet
                                                            (EWebView *web_view,
                                                             const gchar *style_sheet_id,
                                                             const gchar *selector,
                                                             const gchar *style);

Insert new CSS rule (defined with `selector` and `style`) into CSS style sheet with given `style_sheet_id`. If style sheet doesn't exist, it's created.

The rule is inserted to every DOM document that is in page. That means also into DOM documents inside iframe elements.

`web_view` : | an EWebView
`style_sheet_id` : | CSS style sheet's id
`selector` : | CSS selector
`style` : | style for given selector

## Property Details

### The `"caret-mode"` property

      "caret-mode"               gboolean              : Read / Write

Default value: FALSE

### The `"cursor-image-src"` property

      "cursor-image-src"         gchar*                : Read / Write

Default value: NULL

### The `"disable-printing"` property

      "disable-printing"         gboolean              : Read / Write / Construct

Default value: FALSE

### The `"disable-save-to-disk"` property

      "disable-save-to-disk"     gboolean              : Read / Write / Construct

Default value: FALSE

### The `"inline-spelling"` property

      "inline-spelling"          gboolean              : Read / Write

Default value: FALSE

### The `"magic-links"` property

      "magic-links"              gboolean              : Read / Write

Default value: FALSE

### The `"magic-smileys"` property

      "magic-smileys"            gboolean              : Read / Write

Default value: FALSE

### The `"open-proxy"` property

      "open-proxy"               GtkAction*            : Read / Write

### The `"print-proxy"` property

      "print-proxy"              GtkAction*            : Read / Write

### The `"save-as-proxy"` property

      "save-as-proxy"            GtkAction*            : Read / Write

### The `"selected-uri"` property

      "selected-uri"             gchar*                : Read / Write

Default value: NULL

## Signal Details

### The `"new-activity"` signal

    void                user_function                      (EWebView  *ewebview,
                                                            EActivity *arg1,
                                                            gpointer   user_data)      : Run Last

### The `"popup-event"` signal

    gboolean            user_function                      (EWebView *ewebview,
                                                            gchar    *arg1,
                                                            gpointer  user_data)      : Run Last

### The `"process-mailto"` signal

    gboolean            user_function                      (EWebView *ewebview,
                                                            gchar    *arg1,
                                                            gpointer  user_data)      : Run Last

### The `"status-message"` signal

    void                user_function                      (EWebView *ewebview,
                                                            gchar    *arg1,
                                                            gpointer  user_data)      : Run Last

### The `"stop-loading"` signal

    void                user_function                      (EWebView *ewebview,
                                                            gpointer  user_data)      : Run Last

### The `"update-actions"` signal

    void                user_function                      (EWebView *ewebview,
                                                            gpointer  user_data)      : Run Last