Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument/ev-selection.h
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2007-08-31 20:37:24 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2007-08-31 20:37:24 (GMT)
commit982600bbceb76a22d5c7b3e0cbe6e20421105ad6 (patch)
tree1d233d670a447357a7d41044660881e4475f2658 /libdocument/ev-selection.h
parentf76fa765536d1f5875699606d0a78c6f132fce1e (diff)
Add support for double and triple click selections.
2007-08-31 Carlos Garcia Campos <carlosgc@gnome.org> * backend/dvi/dvi-document.c: (dvi_document_document_iface_init): * backend/impress/impress-document.c: (impress_document_document_iface_init): * backend/ps/ps-document.c: (ps_document_document_iface_init): * backend/djvu/djvu-document.c: (djvu_document_document_iface_init), (djvu_selection_get_selected_text), (djvu_selection_iface_init): * backend/tiff/tiff-document.c: (tiff_document_document_iface_init): * backend/pixbuf/pixbuf-document.c: (pixbuf_document_document_iface_init): * backend/comics/comics-document.c: (comics_document_document_iface_init): * backend/pdf/ev-poppler.cc: (pdf_document_document_iface_init), (pdf_selection_render_selection), (pdf_selection_get_selected_text), (pdf_selection_get_selection_region), (pdf_selection_get_selection_map), (pdf_selection_iface_init): * libdocument/ev-selection.[ch]: (ev_selection_get_selected_text), (ev_selection_get_selection_region), (ev_selection_get_selection_map): * libdocument/ev-document.[ch]: * shell/ev-pixbuf-cache.[ch]: (add_job), (ev_pixbuf_cache_get_selection_surface), (update_job_selection): * shell/ev-view-private.h: * shell/ev-jobs.[ch]: (ev_job_render_new), (ev_job_render_new), (ev_job_render_run): * shell/ev-window.c: (ev_window_setup_action_sensitivity): * shell/ev-view.c: (start_selection_for_event), (ev_view_button_press_event), (ev_view_drag_data_get), (ev_view_drag_data_received), (ev_view_button_release_event), (compute_new_selection_text), (compute_selections), (ev_view_select_all), (get_selected_text), (ev_view_copy), (ev_view_primary_get_cb): Add support for double and triple click selections. svn path=/trunk/; revision=2648
Diffstat (limited to 'libdocument/ev-selection.h')
-rw-r--r--libdocument/ev-selection.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/libdocument/ev-selection.h b/libdocument/ev-selection.h
index 5ba9776..0b2f41b 100644
--- a/libdocument/ev-selection.h
+++ b/libdocument/ev-selection.h
@@ -36,6 +36,12 @@ G_BEGIN_DECLS
#define EV_IS_SELECTION_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_SELECTION))
#define EV_SELECTION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_SELECTION, EvSelectionIface))
+typedef enum {
+ EV_SELECTION_STYLE_GLYPH,
+ EV_SELECTION_STYLE_WORD,
+ EV_SELECTION_STYLE_LINE
+} EvSelectionStyle;
+
typedef struct _EvSelection EvSelection;
typedef struct _EvSelectionIface EvSelectionIface;
@@ -48,12 +54,18 @@ struct _EvSelectionIface
cairo_surface_t **surface,
EvRectangle *points,
EvRectangle *old_points,
- GdkColor *text,
- GdkColor *base);
+ EvSelectionStyle style,
+ GdkColor *text,
+ GdkColor *base);
+ gchar * (* get_selected_text) (EvSelection *selection,
+ EvRenderContext *rc,
+ EvSelectionStyle style,
+ EvRectangle *points);
GdkRegion * (* get_selection_map) (EvSelection *selection,
EvRenderContext *rc);
GdkRegion * (* get_selection_region) (EvSelection *selection,
EvRenderContext *rc,
+ EvSelectionStyle style,
EvRectangle *points);
};
@@ -63,12 +75,18 @@ void ev_selection_render_selection (EvSelection *selection,
cairo_surface_t **surface,
EvRectangle *points,
EvRectangle *old_points,
+ EvSelectionStyle style,
GdkColor *text,
GdkColor *base);
+gchar *ev_selection_get_selected_text (EvSelection *selection,
+ EvRenderContext *rc,
+ EvSelectionStyle style,
+ EvRectangle *points);
GdkRegion *ev_selection_get_selection_map (EvSelection *selection,
EvRenderContext *rc);
GdkRegion *ev_selection_get_selection_region (EvSelection *selection,
EvRenderContext *rc,
+ EvSelectionStyle style,
EvRectangle *points);
G_END_DECLS