Data Structures | |
struct | _Elm_Web_Frame_Load_Error |
Structure used to report load errors. More... | |
struct | _Elm_Web_Menu_Item |
Structure describing the items in a menu. More... | |
struct | _Elm_Web_Menu |
Structure describing the menu of a popup. More... | |
Typedefs | |
typedef struct _Elm_Web_Frame_Load_Error | Elm_Web_Frame_Load_Error |
Structure used to report load errors. More... | |
typedef struct _Elm_Web_Menu_Item | Elm_Web_Menu_Item |
Structure describing the items in a menu. | |
typedef struct _Elm_Web_Menu | Elm_Web_Menu |
Structure describing the menu of a popup. More... | |
typedef struct _Elm_Web_Window_Features | Elm_Web_Window_Features |
Opaque handler containing the features (such as statusbar, menubar, etc) that are to be set on a newly requested window. | |
typedef Evas_Object *(* | Elm_Web_Window_Open) (void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *window_features) |
Callback type for the create_window hook. More... | |
typedef Evas_Object *(* | Elm_Web_Dialog_Alert) (void *data, Evas_Object *obj, const char *message) |
Callback type for the JS alert hook. More... | |
typedef Evas_Object *(* | Elm_Web_Dialog_Confirm) (void *data, Evas_Object *obj, const char *message, Eina_Bool *ret) |
Callback type for the JS confirm hook. More... | |
typedef Evas_Object *(* | Elm_Web_Dialog_Prompt) (void *data, Evas_Object *obj, const char *message, const char *def_value, const char **value, Eina_Bool *ret) |
Callback type for the JS prompt hook. More... | |
typedef Evas_Object *(* | Elm_Web_Dialog_File_Selector) (void *data, Evas_Object *obj, Eina_Bool allows_multiple, Eina_List *accept_types, Eina_List **selected, Eina_Bool *ret) |
Callback type for the JS file selector hook. More... | |
typedef void(* | Elm_Web_Console_Message) (void *data, Evas_Object *obj, const char *message, unsigned int line_number, const char *source_id) |
Callback type for the JS console message hook. More... | |
Enumerations | |
enum | Elm_Web_Menu_Item_Type |
The possibles types that the items in a menu can be. | |
enum | Elm_Web_Zoom_Mode { ELM_WEB_ZOOM_MODE_MANUAL = 0, ELM_WEB_ZOOM_MODE_AUTO_FIT, ELM_WEB_ZOOM_MODE_AUTO_FILL, ELM_WEB_ZOOM_MODE_LAST } |
Types of zoom available. More... | |
enum | Elm_Web_Window_Feature_Flag |
Definitions of web window features. | |
Functions | |
Eina_Bool | elm_need_web (void) |
Request that your elementary application needs web support. More... | |
Eina_Bool | elm_web_window_features_property_get (const Elm_Web_Window_Features *wf, Elm_Web_Window_Feature_Flag flag) |
Get boolean properties from Elm_Web_Window_Features (such as statusbar, menubar, etc) that are on a window. More... | |
void | elm_web_window_features_region_get (const Elm_Web_Window_Features *wf, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) |
TODO : Add documentation. More... | |
Evas_Object * | elm_web_add (Evas_Object *parent) |
Add a new web object to the parent. More... | |
EINA_DEPRECATED Eina_Bool | elm_web_uri_set (Evas_Object *obj, const char *uri) |
Sets the URI for the web object. More... | |
EINA_DEPRECATED const char * | elm_web_uri_get (const Evas_Object *obj) |
Get the current URI for the object. More... | |
A web widget is used for displaying web pages (HTML/CSS/JS) using WebKit-EFL. You must have compiled Elementary with ewebkit support.
Signals that you can add callbacks for are:
EINA_TRUE
if the menubar is visible, or EINA_FALSE
in case it's not available styles:
An example of use of web:
typedef void(* Elm_Web_Console_Message) (void *data, Evas_Object *obj, const char *message, unsigned int line_number, const char *source_id) |
Callback type for the JS console message hook.
When a console message is added from JavaScript, any set function to the console message hook will be called for the user to handle. There is no default implementation of this hook.
data | User data pointer set when setting the hook function. |
obj | The elm_web object that originated the message. |
message | The message sent. |
line_number | The line number. |
source_id | Source id. |
typedef Evas_Object*(* Elm_Web_Dialog_Alert) (void *data, Evas_Object *obj, const char *message) |
Callback type for the JS alert hook.
data | User data pointer set when setting the hook function. |
obj | The elm_web object requesting the new window. |
message | The message to show in the alert dialog. |
NULL
the popup will be ignored.typedef Evas_Object*(* Elm_Web_Dialog_Confirm) (void *data, Evas_Object *obj, const char *message, Eina_Bool *ret) |
Callback type for the JS confirm hook.
data | User data pointer set when setting the hook function. |
obj | The elm_web object requesting the new window. |
message | The message to show in the confirm dialog. |
ret | Pointer to store the user selection. EINA_TRUE if the user selected Ok , EINA_FALSE otherwise. |
NULL
the popup will be ignored.typedef Evas_Object*(* Elm_Web_Dialog_File_Selector) (void *data, Evas_Object *obj, Eina_Bool allows_multiple, Eina_List *accept_types, Eina_List **selected, Eina_Bool *ret) |
Callback type for the JS file selector hook.
data | User data pointer set when setting the hook function. |
obj | The elm_web object requesting the new window. |
allows_multiple | EINA_TRUE if multiple files can be selected. |
accept_types | Mime types accepted. |
selected | Pointer to store the list of malloc'ed strings containing the path to each file selected. Must be NULL if the file dialog is canceled. |
ret | Pointer to store the user selection. EINA_TRUE if the user selected Ok , EINA_FALSE otherwise. |
NULL
the popup will be ignored.typedef Evas_Object*(* Elm_Web_Dialog_Prompt) (void *data, Evas_Object *obj, const char *message, const char *def_value, const char **value, Eina_Bool *ret) |
Callback type for the JS prompt hook.
data | User data pointer set when setting the hook function. |
obj | The elm_web object requesting the new window. |
message | The message to show in the prompt dialog. |
def_value | The default value to present the user in the entry |
value | Pointer to store the value given by the user. Must be a malloc'ed string or NULL if the user canceled the popup. |
ret | Pointer to store the user selection. EINA_TRUE if the user selected Ok , EINA_FALSE otherwise. |
NULL
the popup will be ignored.typedef struct _Elm_Web_Frame_Load_Error Elm_Web_Frame_Load_Error |
Structure used to report load errors.
Load errors are reported as signal by elm_web. All the strings are temporary references and should not be used after the signal callback returns. If it's required, make copies with strdup() or eina_stringshare_add() (they are not even guaranteed to be stringshared, so must use eina_stringshare_add() and not eina_stringshare_ref()).
typedef struct _Elm_Web_Menu Elm_Web_Menu |
Structure describing the menu of a popup.
This structure will be passed as the event_info
for the "popup,create" signal, which is emitted when a dropdown menu is opened. Users wanting to handle these popups by themselves should listen to this signal and set the handled
property of the struct to EINA_TRUE
. Leaving this property as EINA_FALSE
means that the user will not handle the popup and the default implementation will be used.
When the popup is ready to be dismissed, a "popup,willdelete" signal will be emitted to notify the user that it can destroy any objects and free all data related to it.
typedef Evas_Object*(* Elm_Web_Window_Open) (void *data, Evas_Object *obj, Eina_Bool js, const Elm_Web_Window_Features *window_features) |
Callback type for the create_window hook.
data | User data pointer set when setting the hook function. |
obj | The elm_web object requesting the new window. |
js | Set to EINA_TRUE if the request was originated from JavaScript. EINA_FALSE otherwise. |
window_features | A pointer of Elm_Web_Window_Features indicating the features requested for the new window. |
elm_web
widget where the request will be loaded. That is, if a new window or tab is created, the elm_web widget in it should be returned, and NOT the window object. Returning NULL
should cancel the request.enum Elm_Web_Zoom_Mode |
Eina_Bool elm_need_web | ( | void | ) |
Request that your elementary application needs web support.
This initializes the Ewebkit library when called and if support exists it returns EINA_TRUE
, otherwise returns EINA_FALSE
. This must be called before any other function that deals with elm_web objects or ewk_view instances.
Evas_Object* elm_web_add | ( | Evas_Object * | parent | ) |
Add a new web object to the parent.
parent | The parent object. |
NULL
if it cannot be created.EINA_DEPRECATED const char* elm_web_uri_get | ( | const Evas_Object * | obj | ) |
Get the current URI for the object.
The returned string must not be freed and is guaranteed to be stringshared.
obj | The web object |
NULL
on failureEINA_DEPRECATED Eina_Bool elm_web_uri_set | ( | Evas_Object * | obj, |
const char * | uri | ||
) |
Sets the URI for the web object.
It must be a full URI, with resource included, in the form http://www.enlightenment.org or file:///tmp/something.html
obj | The web object |
uri | The URI to set |
EINA_TRUE
if the URI could be set, EINA_FALSE
if an error occurred.Eina_Bool elm_web_window_features_property_get | ( | const Elm_Web_Window_Features * | wf, |
Elm_Web_Window_Feature_Flag | flag | ||
) |
Get boolean properties from Elm_Web_Window_Features (such as statusbar, menubar, etc) that are on a window.
wf | The web window features object |
flag | The web window feature flag whose value is required. |
EINA_TRUE
if the flag is set, EINA_FALSE
otherwise void elm_web_window_features_region_get | ( | const Elm_Web_Window_Features * | wf, |
Evas_Coord * | x, | ||
Evas_Coord * | y, | ||
Evas_Coord * | w, | ||
Evas_Coord * | h | ||
) |
TODO : Add documentation.
wf | The web window features object |
x,y,w,h | - the co-ordinates of the web view window. |