2008-09-26 21:13:46 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2008 Christian Dywan <christian@twotoasts.de>
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
See the file COPYING for the full license text.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MIDORI_VIEW_H__
|
|
|
|
#define __MIDORI_VIEW_H__
|
|
|
|
|
|
|
|
#include "midori-websettings.h"
|
|
|
|
|
|
|
|
#include <katze/katze.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2011-10-30 13:29:04 +00:00
|
|
|
#define MIDORI_LOAD_PROVISIONAL WEBKIT_LOAD_PROVISIONAL
|
|
|
|
#define MIDORI_LOAD_COMMITTED WEBKIT_LOAD_COMMITTED
|
|
|
|
#define MIDORI_LOAD_FINISHED WEBKIT_LOAD_FINISHED
|
|
|
|
#define MidoriLoadStatus WebKitLoadStatus
|
|
|
|
#define MIDORI_TYPE_LOAD_STATUS WEBKIT_TYPE_LOAD_STATUS
|
2008-09-26 21:13:46 +00:00
|
|
|
|
2008-12-03 03:16:19 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
MIDORI_NEW_VIEW_TAB,
|
|
|
|
MIDORI_NEW_VIEW_BACKGROUND,
|
|
|
|
MIDORI_NEW_VIEW_WINDOW
|
|
|
|
} MidoriNewView;
|
|
|
|
|
|
|
|
GType
|
|
|
|
midori_new_view_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
#define MIDORI_TYPE_NEW_VIEW \
|
|
|
|
(midori_new_view_get_type ())
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
#define MIDORI_TYPE_VIEW \
|
|
|
|
(midori_view_get_type ())
|
2010-04-13 21:44:21 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
MIDORI_SECURITY_NONE, /* The connection is neither encrypted nor verified. */
|
|
|
|
MIDORI_SECURITY_UNKNOWN, /* The security is unknown, due to lack of validation. */
|
|
|
|
MIDORI_SECURITY_TRUSTED /* The security is validated and trusted. */
|
|
|
|
} MidoriSecurity;
|
|
|
|
|
|
|
|
GType
|
|
|
|
midori_security_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
#define MIDORI_TYPE_SECURITY \
|
|
|
|
(midori_security_get_type ())
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
#define MIDORI_VIEW(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), MIDORI_TYPE_VIEW, MidoriView))
|
|
|
|
#define MIDORI_VIEW_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST ((klass), MIDORI_TYPE_VIEW, MidoriViewClass))
|
|
|
|
#define MIDORI_IS_VIEW(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIDORI_TYPE_VIEW))
|
|
|
|
#define MIDORI_IS_VIEW_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), MIDORI_TYPE_VIEW))
|
|
|
|
#define MIDORI_VIEW_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), MIDORI_TYPE_VIEW, MidoriViewClass))
|
|
|
|
|
|
|
|
typedef struct _MidoriView MidoriView;
|
|
|
|
typedef struct _MidoriViewClass MidoriViewClass;
|
|
|
|
|
|
|
|
GType
|
2010-01-16 06:05:16 +00:00
|
|
|
midori_view_get_type (void) G_GNUC_CONST;
|
2008-09-26 21:13:46 +00:00
|
|
|
|
|
|
|
GtkWidget*
|
2008-10-27 03:23:41 +00:00
|
|
|
midori_view_new (KatzeNet* net);
|
2008-09-26 21:13:46 +00:00
|
|
|
|
2010-09-17 18:03:11 +00:00
|
|
|
GtkWidget*
|
2011-01-01 19:05:34 +00:00
|
|
|
midori_view_new_with_title (const gchar* title,
|
|
|
|
MidoriWebSettings* settings,
|
|
|
|
gboolean append);
|
2010-09-17 18:03:11 +00:00
|
|
|
|
2011-12-07 20:27:38 +00:00
|
|
|
GtkWidget*
|
|
|
|
midori_view_new_with_item (KatzeItem* item,
|
2011-12-07 22:15:04 +00:00
|
|
|
MidoriWebSettings* settings);
|
2011-12-07 20:27:38 +00:00
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
void
|
|
|
|
midori_view_set_settings (MidoriView* view,
|
|
|
|
MidoriWebSettings* settings);
|
|
|
|
|
|
|
|
gdouble
|
|
|
|
midori_view_get_progress (MidoriView* view);
|
|
|
|
|
|
|
|
MidoriLoadStatus
|
|
|
|
midori_view_get_load_status (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_set_uri (MidoriView* view,
|
|
|
|
const gchar* uri);
|
2012-03-16 15:52:55 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_set_overlay_text (MidoriView* view,
|
|
|
|
const gchar* text);
|
2008-09-26 21:13:46 +00:00
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_is_blank (MidoriView* view);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
midori_view_get_display_uri (MidoriView* view);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
midori_view_get_display_title (MidoriView* view);
|
|
|
|
|
|
|
|
GdkPixbuf*
|
|
|
|
midori_view_get_icon (MidoriView* view);
|
|
|
|
|
2010-03-11 22:27:37 +00:00
|
|
|
const gchar*
|
|
|
|
midori_view_get_icon_uri (MidoriView* view);
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
const gchar*
|
|
|
|
midori_view_get_link_uri (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_has_selection (MidoriView* view);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
midori_view_get_selected_text (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_cut_clipboard (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_copy_clipboard (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_paste_clipboard (MidoriView* view);
|
|
|
|
|
|
|
|
GtkWidget*
|
|
|
|
midori_view_get_proxy_menu_item (MidoriView* view);
|
|
|
|
|
2009-06-27 21:52:48 +00:00
|
|
|
GtkWidget*
|
|
|
|
midori_view_get_tab_menu (MidoriView* view);
|
|
|
|
|
2009-07-26 21:50:17 +00:00
|
|
|
PangoEllipsizeMode
|
|
|
|
midori_view_get_label_ellipsize (MidoriView* view);
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
GtkWidget*
|
|
|
|
midori_view_get_proxy_tab_label (MidoriView* view);
|
|
|
|
|
|
|
|
KatzeItem*
|
|
|
|
midori_view_get_proxy_item (MidoriView* view);
|
|
|
|
|
|
|
|
gfloat
|
|
|
|
midori_view_get_zoom_level (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_zoom_in (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_zoom_out (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_set_zoom_level (MidoriView* view,
|
|
|
|
gfloat zoom_level);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_reload (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_reload (MidoriView* view,
|
|
|
|
gboolean from_cache);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_stop_loading (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_go_back (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_go_back (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_go_forward (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_go_forward (MidoriView* view);
|
|
|
|
|
2012-03-22 21:10:17 +00:00
|
|
|
|
|
|
|
void midori_view_go_back_or_forward (MidoriView* view,
|
|
|
|
gint steps);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_go_back_or_forward (MidoriView* view,
|
|
|
|
gint steps);
|
|
|
|
|
2009-12-26 22:12:36 +00:00
|
|
|
const gchar*
|
|
|
|
midori_view_get_previous_page (MidoriView* view);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
midori_view_get_next_page (MidoriView* view);
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
gboolean
|
|
|
|
midori_view_can_print (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_print (MidoriView* view);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
midori_view_can_view_source (MidoriView* view);
|
|
|
|
|
2011-12-14 00:37:14 +00:00
|
|
|
gboolean
|
|
|
|
midori_view_can_save (MidoriView* view);
|
|
|
|
|
2012-02-19 21:43:38 +00:00
|
|
|
gchar*
|
|
|
|
midori_view_save_source (MidoriView* view,
|
|
|
|
const gchar* uri,
|
|
|
|
const gchar* outfile);
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
gboolean
|
|
|
|
midori_view_can_find (MidoriView* view);
|
|
|
|
|
2008-09-28 14:29:41 +00:00
|
|
|
void
|
|
|
|
midori_view_unmark_text_matches (MidoriView* view);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_search_text (MidoriView* view,
|
|
|
|
const gchar* text,
|
|
|
|
gboolean case_sensitive,
|
|
|
|
gboolean forward);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_mark_text_matches (MidoriView* view,
|
|
|
|
const gchar* text,
|
|
|
|
gboolean case_sensitive);
|
|
|
|
|
|
|
|
void
|
|
|
|
midori_view_set_highlight_text_matches (MidoriView* view,
|
|
|
|
gboolean highlight);
|
|
|
|
|
2008-11-23 04:19:43 +00:00
|
|
|
gboolean
|
|
|
|
midori_view_execute_script (MidoriView* view,
|
|
|
|
const gchar* script,
|
|
|
|
gchar** exception);
|
|
|
|
|
2009-10-27 21:58:11 +00:00
|
|
|
GdkPixbuf*
|
|
|
|
midori_view_get_snapshot (MidoriView* view,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
|
2010-03-30 20:38:45 +00:00
|
|
|
GtkWidget*
|
|
|
|
midori_view_get_web_view (MidoriView* view);
|
|
|
|
|
2012-03-25 17:35:58 +00:00
|
|
|
MidoriView*
|
|
|
|
midori_view_get_for_widget (GtkWidget* web_view);
|
|
|
|
|
2010-04-13 21:44:21 +00:00
|
|
|
MidoriSecurity
|
|
|
|
midori_view_get_security (MidoriView* view);
|
|
|
|
|
2010-04-29 00:19:20 +00:00
|
|
|
void
|
|
|
|
midori_view_populate_popup (MidoriView* view,
|
|
|
|
GtkWidget* menu,
|
|
|
|
gboolean manual);
|
|
|
|
|
2010-10-19 21:11:43 +00:00
|
|
|
GtkWidget*
|
|
|
|
midori_view_add_info_bar (MidoriView* view,
|
|
|
|
GtkMessageType message_type,
|
|
|
|
const gchar* message,
|
|
|
|
GCallback response_cb,
|
|
|
|
gpointer user_data,
|
|
|
|
const gchar* first_button_text,
|
|
|
|
...);
|
2010-04-29 00:19:20 +00:00
|
|
|
|
2011-10-07 19:07:21 +00:00
|
|
|
void
|
|
|
|
midori_view_save_speed_dial_config (MidoriView* view,
|
|
|
|
GKeyFile* key_file);
|
|
|
|
|
2008-09-26 21:13:46 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __MIDORI_VIEW_H__ */
|