browser-eal/include/gwebengine.h

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the EAL package.
00015  *
00016  * The Initial Developer of the Original Code is Nokia Corporation.
00017  * Portions created by the Initial Developer are Copyright (C) 2005
00018  * the Initial Developer. All Rights Reserved.
00019  *
00020  * Contact: Leonid Zolotarev <leonid.zolotarev@nokia.com>
00021  *
00022  * ***** END LICENSE BLOCK ***** */
00023 
00024 #include <glib-object.h>
00025 #include "gwebwidget.h"
00026 #include "gwebhistorylist.h"
00027 
00028 #ifndef __GWEBENGINE_H__
00029 #define __GWEBENGINE_H__
00030 
00031 G_BEGIN_DECLS
00032 
00036 typedef enum
00037 {
00038         G_WEBENGINE_NO_SECURITY = 0,
00039         G_WEBENGINE_LOW_SECURITY,
00040         G_WEBENGINE_MEDIUM_SECURITY,
00041         G_WEBENGINE_HIGH_SECURITY,
00042         G_WEBENGINE_UNKNOWN_SECURITY
00043 } GWebEngineSecurityMode;
00044 
00048 typedef enum
00049 {
00051         G_WEBENGINE_POPUPMENU_NOTYPE         = 0x0000,
00053         G_WEBENGINE_POPUPMENU_DOCUMENT       = 0x0001,
00055         G_WEBENGINE_POPUPMENU_LINK           = 0x0002,
00057         G_WEBENGINE_POPUPMENU_IMAGE          = 0x0004,
00059         G_WEBENGINE_POPUPMENU_TEXTSELECTION  = 0x0008,
00061         G_WEBENGINE_POPUPMENU_MAILTO         = 0x0010,
00063         G_WEBENGINE_POPUPMENU_IFRAME         = 0x0020,
00065         G_WEBENGINE_POPUPMENU_UNKNOWN_PROTOCOL = 0x0040
00066 } GWebEnginePopupMenuType;
00067 
00071 typedef enum
00072 {
00074         G_WEBENGINE_LOADING_FINISH_SUCCESS,
00076         G_WEBENGINE_LOADING_FINISH_COULDNT_CONNECT,
00078         G_WEBENGINE_LOADING_FINISH_UNKNOWN
00079 }  GWebEngineLoadingFinishStatus;
00080 
00081 
00085 typedef enum
00086 {
00088         G_WEBENGINE_AUTHENTICATE = 0,
00090         G_WEBENGINE_AUTHENTICATION_WRONG,
00092         G_WEBENGINE_PROXY_AUTHENTICATE,
00094         G_WEBENGINE_PROXY_AUTHENTICATION_WRONG
00095 } GWebEngineAuthenticationType;
00096 
00097 #define G_TYPE_WEB_ENGINE             (g_web_engine_get_type ())
00098 #define G_WEB_ENGINE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_WEB_ENGINE, GWebEngine))
00099 #define G_WEB_ENGINE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), G_TYPE_WEB_ENGINE, GWebEngineIface))
00100 #define G_IS_WEB_ENGINE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_WEB_ENGINE))
00101 #define G_IS_WEB_ENGINE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), G_TYPE_WEB_ENGINE))
00102 #define G_WEB_ENGINE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), G_TYPE_WEB_ENGINE, GWebEngineIface))
00103 
00104 typedef struct _GWebEngine GWebEngine; /* dummy object */
00105 typedef struct _GWebEngineIface GWebEngineIface;
00106 
00114 struct _GWebEngineIface {
00115         GTypeInterface parent;
00116 
00117         void (*destroy) (GWebEngine *self);
00118         void (*reset) (GWebEngine *self);
00119         void (*load_url) (GWebEngine *self, const gchar *url); 
00120         GWebStatus (*load_follow_link) (GWebEngine *self, const gchar *url); 
00121         GWebStatus (*load_url_with_css) (GWebEngine *self, const gchar *url, const gchar *cssfile);
00122         void (*load_url_with_js) (GWebEngine *self, gboolean  enable);
00123         void (*load_home_page) (GWebEngine *self); 
00124         void (*stop_load) (GWebEngine *self);
00125         void (*reload) (GWebEngine *self); 
00126         void (*go_back) (GWebEngine *self, guint nsteps);
00127         void (*go_forward) (GWebEngine *self, guint nsteps); 
00128         gboolean (*can_go_back) (GWebEngine *self);
00129         gboolean (*can_go_forward) (GWebEngine *self);
00130         void (*set_zoom_level) (GWebEngine *self, gint level);
00131         void (*zoom_by_steps) (GWebEngine *self, guint relative_zoom, guint* legal_zoom_value);
00132         void (*new_zoom_by_steps) (GWebEngine *self, gboolean up, guint* legal_zoom_value);
00133         GWebStatus (*set_zoom_level_around_point) (GWebEngine *self, guint x, guint y, gint level);
00134         GWebStatus (*compare_frames_zoom_level) (GWebEngine *self, gboolean *equal);
00135         GWebStatus (*get_image_properties) (GWebEngine *self, const gchar *url, gchar **file_type, guint *file_size, guint *width, guint *height);
00136         GWebStatus (*get_frame_properties) (GWebEngine *self, gchar **file_type, guint *file_size, GWebEngineEncoding *file_encoding, guint *security, gboolean *automatic_encoding);
00137         GWebStatus (*load_image) (GWebEngine *self, const gchar* url);
00138         gint (*get_back_window_history_list) (GWebEngine *self, GWebHistoryList **history);
00139         gint (*get_forward_window_history_list) (GWebEngine *self, GWebHistoryList **history);
00140         guint (*get_zoom_level) (GWebEngine *self);
00141         void (*set_frame_zoom_level) (GWebEngine *self, guint level);
00142         guint (*get_frame_zoom_level) (GWebEngine *self);
00143         void (*set_layout_mode) (GWebEngine *self, GWebEngineLayoutMode mode);
00144         GWebEngineLayoutMode (*get_layout_mode) (GWebEngine *self);
00145         void (*set_load_images) (GWebEngine *self, GWebEngineImagePolicy level);
00146         GWebEngineImagePolicy (*get_load_images) (GWebEngine *self); 
00147         void (*set_frame_stacking) (GWebEngine *self, gboolean enabled);
00148         gboolean (*get_frame_stacking) (GWebEngine *self);
00149         GWebStatus (*save_web_page) (GWebEngine *self, GWebEngineSaveAction setting, const gchar *file_name_with_path);
00150         GWebStatus (*save_current_frame) (GWebEngine *self, GWebEngineSaveAction setting, const gchar *file_name_with_path);
00151         const gchar* (*get_frame_title) (GWebEngine *self, gint frame_number);
00152         gint (*get_frame_number) (GWebEngine *self);
00153         GWebStatus (*save_web_page_image) (GWebEngine *self, const gchar *url, const gchar* directory); 
00154         void (*select_all_text) (GWebEngine *self);
00155         void (*set_language_encoding) (GWebEngine *self, GWebEngineEncoding encoding);
00156         void (*set_frame_encoding) (GWebEngine *self, GWebEngineEncoding encoding);
00157         gboolean (*find_text) (GWebEngine *self, const gchar *string, gboolean reverse, gboolean whole_word, gboolean case_sensitive, gboolean restart);
00158         void (*authenticate) (GWebEngine *self, gboolean ok, const gchar *username, const gchar *password);
00159         GWebStatus (*cut) (GWebEngine *self);
00160         GWebStatus (*copy) (GWebEngine *self);
00161         GWebStatus (*paste) (GWebEngine *self);
00162         gboolean (*can_cut) (GWebEngine *self);
00163         gboolean (*can_paste) (GWebEngine *self);
00164         gboolean (*can_copy) (GWebEngine *self);
00165         gboolean (*can_selecttext) (GWebEngine *self);
00166         gchar* (*get_favicon_name) (GWebEngine *self, const gchar *favicon_folder);
00167         GObject* (*get_engine_widget) (GWebEngine *self);
00168         GObject* (*get_engine_notifier) (GWebEngine *self);
00169         void (*set_open_link_mode) (GWebEngine *self, gboolean in_new_window);
00170         GWebStatus (*set_true_zoom_mode) (GWebEngine *self, gboolean status);
00171         void (*notify_plugins) (GWebEngine *self, gint event);
00172         void (*preload_current_skin) (GWebEngine *self);
00173         void (*invoke_selectmatch) (GWebEngine *self);
00174         GObject* (*get_server_certificate) (GWebEngine *self);
00175         gboolean (*is_engine_editable_widget) (GWebEngine *self);
00176 };
00177 
00178 GType g_web_engine_get_type (void);
00179 
00183 void g_web_engine_destroy (GWebEngine *self);
00184 
00189 void g_web_engine_load_url (GWebEngine *self, const gchar *url); 
00190 
00197 GWebStatus g_web_engine_load_follow_link (GWebEngine *self, const gchar *url); 
00198 
00206 GWebStatus g_web_engine_load_url_with_css (GWebEngine *self, const gchar *url, const gchar *cssfile);
00207 
00214 void g_web_engine_load_url_with_js (GWebEngine *self, gboolean  enable);
00215 
00219 void g_web_engine_load_home_page (GWebEngine *self); 
00220 
00224 void g_web_engine_stop_load (GWebEngine *self);
00225 
00229 void g_web_engine_reload (GWebEngine *self); 
00230 
00240 void g_web_engine_go_back (GWebEngine *self, guint nsteps);
00241 
00250 void g_web_engine_go_forward (GWebEngine *self, guint nsteps); 
00251 
00256 gboolean g_web_engine_can_go_back (GWebEngine *self);
00257 
00262 gboolean g_web_engine_can_go_forward (GWebEngine *self);
00263 
00268 void g_web_engine_zoom_by_steps (GWebEngine *self, guint relative_zoom, guint* legal_zoom_value);
00269 
00274 void g_web_engine_new_zoom_by_steps (GWebEngine *self, gboolean up, guint* legal_zoom_value);
00275 
00276 
00281 void g_web_engine_set_zoom_level (GWebEngine *self, gint level);
00282 
00290 GWebStatus g_web_engine_set_zoom_level_around_point (GWebEngine *self, guint x, guint y, gint level);
00291 
00297 GWebStatus g_web_engine_compare_frames_zoom_level (GWebEngine *self, gboolean *equal);
00298 
00308 GWebStatus g_web_engine_get_image_properties (GWebEngine *self, const gchar *url, gchar **file_type, guint *file_size, guint *width, guint *height);
00309 
00319 GWebStatus g_web_engine_get_frame_properties (GWebEngine *self, gchar **file_type, guint *file_size, GWebEngineEncoding *file_encoding, guint *security, gboolean *automatic_encoding);
00320 
00326 GWebStatus g_web_engine_load_image (GWebEngine *self, const gchar* url);
00327 
00338 gint g_web_engine_get_back_window_history_list (GWebEngine *self, GWebHistoryList **history);
00339 
00349 gint g_web_engine_get_forward_window_history_list (GWebEngine *self, GWebHistoryList **history);
00350 
00355 guint g_web_engine_get_zoom_level (GWebEngine *self);
00356 
00361 void g_web_engine_set_frame_zoom_level (GWebEngine *self, guint level);
00362 
00367 guint g_web_engine_get_frame_zoom_level (GWebEngine *self);
00368 
00373 void g_web_engine_set_layout_mode (GWebEngine *self, GWebEngineLayoutMode mode);
00374 
00379 GWebEngineLayoutMode g_web_engine_get_layout_mode (GWebEngine *self);
00380 
00385 void g_web_engine_set_load_images (GWebEngine *self, GWebEngineImagePolicy level);
00386 
00391 GWebEngineImagePolicy g_web_engine_get_load_images (GWebEngine *self); 
00392 
00397 void g_web_engine_set_frame_stacking (GWebEngine *self, gboolean enabled);
00398 
00403 gboolean g_web_engine_get_frame_stacking (GWebEngine *self);
00404 
00411 GWebStatus g_web_engine_save_web_page (GWebEngine *self, GWebEngineSaveAction setting, const gchar *file_name_with_path);
00412 
00419 GWebStatus g_web_engine_save_current_frame (GWebEngine *self, GWebEngineSaveAction setting, const gchar *file_name_with_path);
00420 
00426 const gchar* g_web_engine_get_frame_title (GWebEngine *self, gint frame_number);
00427 
00432 gint g_web_engine_get_frame_number (GWebEngine *self);
00433 
00440 GWebStatus g_web_engine_save_web_page_image (GWebEngine *self, const gchar *url, const gchar* directory);
00441 
00445 void g_web_engine_select_all_text (GWebEngine *self);
00446 
00451 void g_web_engine_set_language_encoding (GWebEngine *self, GWebEngineEncoding encoding);
00452 
00457 void g_web_engine_set_frame_encoding (GWebEngine *self, GWebEngineEncoding encoding);
00458 
00469 gboolean g_web_engine_find_text (GWebEngine *self, const gchar *string, gboolean reverse, gboolean whole_word, gboolean case_sensitive, gboolean restart);
00470 
00477 void g_web_engine_authenticate (GWebEngine *self, gboolean ok, const gchar *username, const gchar *password);
00478 
00483 GWebStatus g_web_engine_cut (GWebEngine *self);
00484 
00489 GWebStatus g_web_engine_copy (GWebEngine *self);
00490 
00495 GWebStatus g_web_engine_paste (GWebEngine *self);
00496 
00501 gboolean g_web_engine_can_cut (GWebEngine *self);
00502 
00507 gboolean g_web_engine_can_paste (GWebEngine *self);
00508 
00513 gboolean g_web_engine_can_copy (GWebEngine *self);
00514 
00519 gboolean g_web_engine_can_selecttext (GWebEngine *self);
00520 
00526 gchar* g_web_engine_get_favicon_name (GWebEngine *self, const gchar *favicon_folder);
00527 
00532 GObject* g_web_engine_get_engine_widget (GWebEngine *self);
00533 
00538 GObject* g_web_engine_get_engine_notifier (GWebEngine *self);
00539 
00546 void g_web_engine_set_open_link_mode (GWebEngine *self, gboolean in_new_window);
00547 
00553 GWebStatus g_web_engine_set_true_zoom_mode (GWebEngine *self, gboolean status);
00554 
00562 void g_web_engine_notify_plugins(GWebEngine *self, gint event); 
00563 
00570 void g_web_engine_preload_current_skin(GWebEngine *self);
00571 
00577 void g_web_engine_invoke_selectmatch(GWebEngine *self);
00578 
00584 GObject* g_web_engine_get_server_certificate (GWebEngine *self);
00585 
00586 G_END_DECLS
00587 
00588 #endif /* __GWEBENGINE_H__ */

Generated on Tue Sep 25 10:37:04 2007 for browser-eal by  doxygen 1.5.1