gtk-khtml.h

来自「khtml在gtk上的移植版本」· C头文件 代码 · 共 515 行 · 第 1/2 页

H
515
字号
   *   * @emited when there has been progres in the loading of current page.   * @param self the engine which sent the signal   * @param curprogress the amount of already loaded data   * @param maxprogress the amount of data the page contains   */  void (* progress) (GtkKHTML * self, gint curprogress, gint maxprogress);    /** Load start indication signal.   * @emited when page loading is started   * @param self the engine which sent the signal   */  void (* load_start) (GtkKHTML * self);    /** Load start indication signal.   * @emited when page loading is stopped.   * @emited on error      * @param self the engine which sent the signal   */  void (* load_stop) (GtkKHTML * self);  void (* load_item_start) (GtkKHTML* self, int item);  void (* load_item_progress) (GtkKHTML* self, int item);    void (* load_item_stop) (GtkKHTML* self, int item, int status);    /** javascript status change indication signal   * use \gtk_khtml_get_status_text() to get the status string   *   * @emited when javascript status changes.   * @param self the engine which sent the signal   */  void (* status_text) (GtkKHTML * self);  /** Page load status change indication signal   *   * @emited when page load status changes.   * @param self the engine which sent the signal   * @param status status of the engine.   */  void (* status) (GtkKHTML * self, GtkKHTMLLoadStatus * status);  /** javascript prompt and alert request signal   * must be synchronous   * @emited when javascript generates an alert    * @emited when javascript generates an prompt   *    * @param self the engine which sent the signal   * @param args used to pass information between browser and engine (in and out)   *        see #GtkKHTMLPromptAgs   */    void (* req_js_prompt) (GtkKHTML *self, GtkKHTMLPromptArgs* args);    /** HTTP Auth   * must be synchronous   * @emited when javascript generates an alert    * @emited when javascript generates an prompt   *    * @param self the engine which sent the signal   * @param args used to pass information between browser and engine (in and out)   *        see #GtkKHTMLPromptAgs   */    void (* req_auth_prompt) (GtkKHTML *self, GtkKHTMLAuthArgs* args);  /** javascript/html new window request signal   * must be synchronous   *   * @emited when javascript requests to create a new window   * @emited when html link contains target="_blank" -attribute   *   * @param self the engine which sent the signal   * @param newengine The new engine of the new window   *        or \NULL if new window creation is not allowed   * @return \FALSE if don't allow window to be opened   *         \TRUE if window was opened   */      gboolean (* req_new_window) (GtkKHTML *self, GtkKHTML* newengine);    void (* mouse_over) (GtkKHTML *self, const gchar* link_title, const gchar* link_label, const gchar* link_url, const gchar* link_target);  /** selection change signal*/  void (* selection) (GtkKHTML *self);#if 0  /* not implemented at the moment */  void (* req_file_attach) (GtkKHTML *self);    void (* file_upload_finished) (GtkKHTML *self);  void (* file_upload_finished) (GtkKHTML *self);#endif  };/* * Public methods *//** Returns GObject type for KHTML html renderer class * Returns GObject type for KHTML html renderer class. * * @return type for KHTML html renderer class  */GType gtk_khtml_get_type ();/** Creates new html rendering engine * Creates new html rendering engine widget. To be able to view web pages, * add returned widget to a container and show the container. *  * @return html rendering engine widget  */GtkWidget * gtk_khtml_new ();/** Starts loading of a new url * Starts loading of a new url. Loading is asynchronous. * * @emit "load-start" signal on start * @emit "load-stop"  signal when loading stops, ie. succesfully loaded page, or error * @param self the engine to use * @param url the url to load */void gtk_khtml_load_url (GtkKHTML * self, const gchar * url);/** Reloads current url * reloads current url */void gtk_khtml_refresh (GtkKHTML * self);/** Cancels the load currently in progress, if any * Cancels the load currently in progress, if any. * @emit "load-stop" * * @param self the engine to use */void gtk_khtml_stop_load (GtkKHTML * self);/** Checks the browsing history position relative to the beginning of the history * Checks if the engine is at the beginning of browsing history. * @return \TRUE if browsing history has previous elements *         \FALSE otherwise */gboolean gtk_khtml_can_go_back (GtkKHTML * self);/** Checks the browsing history position relative to the end of the history * Checks if the engine is at the end of browsing history. * @return \TRUE if browsing history has successive elements *         \FALSE otherwise */gboolean gtk_khtml_can_go_forward (GtkKHTML * self);/** Directs browser engine to the previous url in the browsing history * Directs browser engine to the previous url in the browsing history. * @emit "load-start" see \gtk_khtml_load_url * @emit "load-stop" see \gtk_khtml_load_url */void gtk_khtml_go_back (GtkKHTML * self);/** Directs browser engine to the next url in the browsing history * Directs browser engine to the next url in the browsing history. * * @emit "load-start" see \gtk_khtml_load_url * @emit "load-stop" see \gtk_khtml_load_url */void gtk_khtml_go_forward (GtkKHTML * self);/** Returns the url of the currently loaded page * Returns the url of the currently loaded page. * The string contains the full url used, including * the protocol. It can be absolute or relative. * The string must not be freed (const). * * @return  the url string of the currently loaded page. */const gchar* gtk_khtml_get_location (GtkKHTML * self);/** Returns the title of the currently loaded page * Returns the title of the currently loaded page. * If the page contains a frameset, title is the title of the * frameset. * * @return the title of the currently loaded page. */const gchar* gtk_khtml_get_title (GtkKHTML * self);/** Returns a status string set by javascript * Returns a string that javascript has set to be used * usually in the statusbar of the browser. * * @return javascript status string */const gchar* gtk_khtml_get_status_text (GtkKHTML * self);/** Returns internal representation of the engine * Returns internal representation of the engine. * Can be used in C++ code. Exposes the public NRCore api * to the user. This may be needed if certain functionality * is not implemented in C interface. * usage not recommended * Used with: * OSBB::Bridge* engine = 0; * GtkKHTML* khtml_engine = gtk_khtml_new(); * engine = static_cast<OSB::Bridge*>(gtk_khtml_get_internal (engine)); * */void* gtk_khtml_get_internal (GtkKHTML * self);  /** Sets the settings of the rendering engine * Sets the settings of the rendering engine. *  */void gtk_khtml_set_settings (GtkKHTML * self, const GtkKHTMLSettings* settings);/** Returns the current settings of the rendering engine * Returns the current settings of the rendering engine. Fields * are read only and must not b */ const GtkKHTMLSettings* gtk_khtml_get_settings (GtkKHTML * self);/**  Prints the internal render tree of the engine. *  * Can be used in C++ debug code. This  * usage not recommended * Used with: * GtkKHTML* khtml_engine = gtk_khtml_new(); * const gchar * url = "http://www.mysite.com/"; * const ghar* presentation = gtk_khtml_render_tree (engine, url)); * */const gchar* gtk_khtml_render_tree (GtkKHTML * self);/** Toggles the emission of internal constructed load status messages * Sets the emission of internal constructed load status messages * Signalö emitted is status-text * * @param flag \TRUE if you want to receive internal status messages                     for loading	       \FALSE if not */void gtk_khtml_set_emit_internal_status (GtkKHTML * self, gboolean flag);void gtk_khtml_set_group (GtkKHTML* self, const gchar* group);const gchar* gtk_khtml_get_group (GtkKHTML* self);void gtk_khtml_set_text_multiplier (GtkKHTML* self, gfloat multiplier);gfloat gtk_khtml_get_text_multiplier (GtkKHTML* self);gboolean gtk_khtml_find (GtkKHTML* self, const gchar* text, gboolean case_sensitive, gboolean dir_down);const gchar* gtk_khtml_get_current_selection_as_text(GtkKHTML* self);#ifdef __cplusplus}#endif /* __cplusplus */#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?