EWebView

EWebView

Functions

void (*EWebViewElementClickedFunc) ()
GtkWidget * e_web_view_new ()
WebKitSettings * e_web_view_get_default_webkit_settings ()
void e_web_view_utils_apply_minimum_font_size ()
gint e_web_view_get_minimum_font_size ()
void e_web_view_set_minimum_font_size ()
GCancellable * e_web_view_get_cancellable ()
void e_web_view_register_content_request_for_scheme ()
void e_web_view_update_fonts_settings ()
void e_web_view_clear ()
void e_web_view_load_string ()
void e_web_view_load_uri ()
gchar * e_web_view_suggest_filename ()
void e_web_view_reload ()
gboolean e_web_view_get_caret_mode ()
void e_web_view_set_caret_mode ()
GtkTargetList * e_web_view_get_copy_target_list ()
gboolean e_web_view_get_disable_printing ()
void e_web_view_set_disable_printing ()
gboolean e_web_view_get_disable_save_to_disk ()
void e_web_view_set_disable_save_to_disk ()
gboolean e_web_view_get_editable ()
void e_web_view_set_editable ()
gboolean e_web_view_get_need_input ()
gboolean e_web_view_get_inline_spelling ()
void e_web_view_set_inline_spelling ()
gboolean e_web_view_get_magic_links ()
void e_web_view_set_magic_links ()
gboolean e_web_view_get_magic_smileys ()
void e_web_view_set_magic_smileys ()
const gchar * e_web_view_get_selected_uri ()
void e_web_view_set_selected_uri ()
const gchar * e_web_view_get_cursor_image_src ()
void e_web_view_set_cursor_image_src ()
EUIAction * e_web_view_get_open_proxy ()
void e_web_view_set_open_proxy ()
GtkTargetList * e_web_view_get_paste_target_list ()
EUIAction * e_web_view_get_print_proxy ()
void e_web_view_set_print_proxy ()
EUIAction * e_web_view_get_save_as_proxy ()
void e_web_view_set_save_as_proxy ()
void e_web_view_get_last_popup_place ()
void e_web_view_add_highlight ()
void e_web_view_clear_highlights ()
void e_web_view_update_highlights ()
void e_web_view_disable_highlights ()
EUIAction * e_web_view_get_action ()
EUIActionGroup * e_web_view_get_action_group ()
void e_web_view_copy_clipboard ()
void e_web_view_cut_clipboard ()
gboolean e_web_view_has_selection ()
void e_web_view_paste_clipboard ()
gboolean e_web_view_scroll_forward ()
gboolean e_web_view_scroll_backward ()
void e_web_view_select_all ()
void e_web_view_unselect_all ()
void e_web_view_zoom_100 ()
void e_web_view_zoom_in ()
void e_web_view_zoom_out ()
EUIManager * e_web_view_get_ui_manager ()
void e_web_view_show_popup_menu ()
EActivity * e_web_view_new_activity ()
void e_web_view_status_message ()
void e_web_view_stop_loading ()
void e_web_view_update_actions ()
void e_web_view_update_fonts ()
void e_web_view_cursor_image_copy ()
void e_web_view_cursor_image_save ()
void e_web_view_request ()
GInputStream * e_web_view_request_finish ()
void e_web_view_install_request_handler ()
const gchar * e_web_view_get_citation_color_for_level ()
void e_web_view_set_iframe_src ()
void e_web_view_register_element_clicked ()
void e_web_view_unregister_element_clicked ()
void e_web_view_set_element_hidden ()
void e_web_view_set_element_style_property ()
void e_web_view_set_element_attribute ()

Properties

gboolean caret-mode Read / Write
char * cursor-image-src Read / Write
gboolean disable-printing Read / Write / Construct
gboolean disable-save-to-disk Read / Write / Construct
gboolean has-selection Read
int minimum-font-size Read / Write
gboolean need-input Read
EUIAction * open-proxy Read / Write
EUIAction * print-proxy Read / Write
EUIAction * save-as-proxy Read / Write
char * selected-uri Read / Write

Signals

void before-popup-event Run Last
void content-loaded Run Last
void new-activity Run Last
gboolean popup-event Run Last
gboolean process-mailto Run Last
void resource-loaded Run Last
void set-fonts Action
void status-message Run Last
void stop-loading Run Last
void update-actions Run Last
void uri-requested Run Last

Types and Values

enum EURIScheme

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── WebKitWebViewBase
                    ╰── WebKitWebView
                        ╰── EWebView
                            ╰── EMailSignaturePreview

Description

Functions

EWebViewElementClickedFunc ()

void
(*EWebViewElementClickedFunc) (EWebView *web_view,
                               const gchar *iframe_id,
                               const gchar *element_id,
                               const gchar *element_class,
                               const gchar *element_value,
                               const GtkAllocation *element_position,
                               gpointer user_data);

The callback is called whenever an element of class element_class is clicked. The element_value is a content of the 'value' attribute of the clicked element. The element_position is the place of the element within the web page, already accounting scrollbar positions.

See: e_web_view_register_element_clicked, e_web_view_unregister_element_clicked

Parameters

web_view

an EWebView

 

iframe_id

an iframe ID in which the click happened; empty string for the main frame

 

element_id

an element ID

 

element_class

an element class, as set on the element which had been clicked

 

element_value

a 'value' attribute content of the clicked element

 

element_position

a GtkAllocation with the position of the clicked element

 

user_data

user data as provided in the e_web_view_register_element_clicked() call

 

Since: 3.22


e_web_view_new ()

GtkWidget *
e_web_view_new (void);

e_web_view_get_default_webkit_settings ()

WebKitSettings *
e_web_view_get_default_webkit_settings
                               (void);

e_web_view_utils_apply_minimum_font_size ()

void
e_web_view_utils_apply_minimum_font_size
                               (WebKitSettings *wk_settings);

e_web_view_get_minimum_font_size ()

gint
e_web_view_get_minimum_font_size (EWebView *web_view);

e_web_view_set_minimum_font_size ()

void
e_web_view_set_minimum_font_size (EWebView *web_view,
                                  gint pixels);

e_web_view_get_cancellable ()

GCancellable *
e_web_view_get_cancellable (EWebView *web_view);

e_web_view_register_content_request_for_scheme ()

void
e_web_view_register_content_request_for_scheme
                               (EWebView *web_view,
                                const gchar *scheme,
                                EContentRequest *content_request);

e_web_view_update_fonts_settings ()

void
e_web_view_update_fonts_settings (GSettings *font_settings,
                                  PangoFontDescription *ms_font,
                                  PangoFontDescription *vw_font,
                                  GtkWidget *view_widget);

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_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.

Parameters

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_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_need_input ()

gboolean
e_web_view_get_need_input (EWebView *web_view);

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 ()

EUIAction *
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,
                           EUIAction *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 ()

EUIAction *
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,
                            EUIAction *print_proxy);

e_web_view_get_save_as_proxy ()

EUIAction *
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,
                              EUIAction *save_as_proxy);

e_web_view_get_last_popup_place ()

void
e_web_view_get_last_popup_place (EWebView *web_view,
                                 gchar **out_iframe_src,
                                 gchar **out_iframe_id,
                                 gchar **out_element_id,
                                 gchar **out_link_uri);

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_disable_highlights ()

void
e_web_view_disable_highlights (EWebView *web_view);

e_web_view_get_action ()

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

e_web_view_get_action_group ()

EUIActionGroup *
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_has_selection ()

gboolean
e_web_view_has_selection (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 ()

EUIManager *
e_web_view_get_ui_manager (EWebView *web_view);

e_web_view_show_popup_menu ()

void
e_web_view_show_popup_menu (EWebView *web_view,
                            GdkEvent *event);

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.

Parameters

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_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 an “new-activity” signal emission so the asynchronous operation can be tracked and/or cancelled.

Parameters

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 an “new-activity” signal emission so the asynchronous operation can be tracked and/or cancelled.

Parameters

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 as displaed in the web_view .

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.

Parameters

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.

Parameters

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_get_citation_color_for_level ()

const gchar *
e_web_view_get_citation_color_for_level
                               (gint level);

e_web_view_set_iframe_src ()

void
e_web_view_set_iframe_src (EWebView *web_view,
                           const gchar *iframe_id,
                           const gchar *new_src);

Change IFrame source for the given document_uri IFrame to the new_iframe_src .

Parameters

web_view

an EWebView

 

document_uri

a document URI for whose IFrame change the source

 

src_uri

the source to change the IFrame to

 

Since: 3.22


e_web_view_register_element_clicked ()

void
e_web_view_register_element_clicked (EWebView *web_view,
                                     const gchar *element_class,
                                     EWebViewElementClickedFunc callback,
                                     gpointer user_data);

Registers a callback to be called when any element of the class element_class is clicked. If the element contains a 'value' attribute, then it is passed to the callback too. These callback are valid until a new content of the web_view is loaded, after which all the registered callbacks are forgotten.

Parameters

web_view

an EWebView

 

element_class

an element class on which to listen for clicking

 

callback

an EWebViewElementClickedFunc to call, when the element is clicked

 

user_data

user data to pass to callback

 

Since: 3.22


e_web_view_unregister_element_clicked ()

void
e_web_view_unregister_element_clicked (EWebView *web_view,
                                       const gchar *element_class,
                                       EWebViewElementClickedFunc callback,
                                       gpointer user_data);

Unregisters the callback for the element_class with the given user_data , which should be previously registered with e_web_view_register_element_clicked(). This unregister is usually not needed, because the web_view unregisters all callbacks when a new content is loaded.

Parameters

web_view

an EWebView

 

element_class

an element class on which to listen for clicking

 

callback

an EWebViewElementClickedFunc to call, when the element is clicked

 

user_data

user data to pass to callback

 

Since: 3.22


e_web_view_set_element_hidden ()

void
e_web_view_set_element_hidden (EWebView *web_view,
                               const gchar *element_id,
                               gboolean hidden);

e_web_view_set_element_style_property ()

void
e_web_view_set_element_style_property (EWebView *web_view,
                                       const gchar *element_id,
                                       const gchar *property_name,
                                       const gchar *value);

e_web_view_set_element_attribute ()

void
e_web_view_set_element_attribute (EWebView *web_view,
                                  const gchar *element_id,
                                  const gchar *namespace_uri,
                                  const gchar *qualified_name,
                                  const gchar *value);

Types and Values

enum EURIScheme

Members

CID_URI_SCHEME

   

FILE_URI_SCHEME

   

MAIL_URI_SCHEME

   

EVO_HTTP_URI_SCHEME

   

EVO_HTTPS_URI_SCHEME

   

GTK_STOCK_URI_SCHEME

   

Property Details

The “caret-mode” property

  “caret-mode”               gboolean

Owner: EWebView

Flags: Read / Write

Default value: FALSE


The “cursor-image-src” property

  “cursor-image-src”         char *

Owner: EWebView

Flags: Read / Write

Default value: NULL


The “disable-printing” property

  “disable-printing”         gboolean

Owner: EWebView

Flags: Read / Write / Construct

Default value: FALSE


The “disable-save-to-disk” property

  “disable-save-to-disk”     gboolean

Owner: EWebView

Flags: Read / Write / Construct

Default value: FALSE


The “has-selection” property

  “has-selection”            gboolean

Owner: EWebView

Flags: Read

Default value: FALSE


The “minimum-font-size” property

  “minimum-font-size”        int

Owner: EWebView

Flags: Read / Write

Default value: 0


The “need-input” property

  “need-input”               gboolean

Owner: EWebView

Flags: Read

Default value: FALSE


The “open-proxy” property

  “open-proxy”               EUIAction *

Owner: EWebView

Flags: Read / Write


The “print-proxy” property

  “print-proxy”              EUIAction *

Owner: EWebView

Flags: Read / Write


The “save-as-proxy” property

  “save-as-proxy”            EUIAction *

Owner: EWebView

Flags: Read / Write


The “selected-uri” property

  “selected-uri”             char *

Owner: EWebView

Flags: Read / Write

Default value: NULL

Signal Details

The “before-popup-event” signal

void
user_function (EWebView *ewebview,
               char     *arg1,
               gpointer  user_data)

Flags: Run Last


The “content-loaded” signal

void
user_function (EWebView *ewebview,
               char     *arg1,
               gpointer  user_data)

Flags: Run Last


The “new-activity” signal

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

Flags: Run Last


The “popup-event” signal

gboolean
user_function (EWebView *ewebview,
               char     *arg1,
               GdkEvent *arg2,
               gpointer  user_data)

Flags: Run Last


The “process-mailto” signal

gboolean
user_function (EWebView *ewebview,
               char     *arg1,
               gpointer  user_data)

Flags: Run Last


The “resource-loaded” signal

void
user_function (EWebView *ewebview,
               gpointer  user_data)

Flags: Run Last


The “set-fonts” signal

void
user_function (EWebView *ewebview,
               gpointer  arg1,
               gpointer  arg2,
               gpointer  user_data)

Flags: Action


The “status-message” signal

void
user_function (EWebView *ewebview,
               char     *arg1,
               gpointer  user_data)

Flags: Run Last


The “stop-loading” signal

void
user_function (EWebView *ewebview,
               gpointer  user_data)

Flags: Run Last


The “update-actions” signal

void
user_function (EWebView *ewebview,
               gpointer  user_data)

Flags: Run Last


The “uri-requested” signal

void
user_function (EWebView *ewebview,
               char     *arg1,
               gpointer  arg2,
               gpointer  user_data)

Flags: Run Last