summaryrefslogtreecommitdiff
path: root/libview/ev-view.c
AgeCommit message (Collapse)AuthorFilesLines
2017-11-27view: set_caret_cursor_position should emit "cursor-moved" if appliesAlejandro Piñeiro1-0/+3
https://bugzilla.gnome.org/show_bug.cgi?id=701746 from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-12&id=9809525
2017-11-27ev-view-accessible: Clear the cached data when the current pageAntia Puentes1-0/+4
or document is updated. https://bugzilla.gnome.org/show_bug.cgi?id=704621 https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=d71e0d7
2017-09-06libview: Add ev_view_set_caret_cursor_positionCarlos Garcia Campos1-0/+18
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=b2597d
2017-09-06libview: Update the current page also when pending scroll is to find a locationCarlos Garcia Campos1-1/+2
Pending scroll SCROLL_TO_FIND_LOCATION, can jump to another page if the location is in a different page. We should change the current page in the model in this case too. Origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=8709b39
2017-09-06libview: Do not schedule a redraw when enabling/disabling caret navigationCarlos Garcia Campos1-1/+3
If the cursor is not in a visible page origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=c187766
2017-09-06libview: Stop caret cursor blinking when cursor is not in a visible pageCarlos Garcia Campos1-0/+14
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=570927e
2017-09-06libview: Add ev_view_supports_caret_navigation()Antia Puentes1-0/+15
https://bugzilla.gnome.org/show_bug.cgi?id=702079 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=6127a36
2017-09-06libview: Fix selections starting/ending in page marginsCarlos Garcia Campos1-0/+8
Do not take into account the page area borders when looking the pages where the selection starts or ends. This allows to start a new selection from a page margin and prevents selection from disappearing when selecting multiple pages and releasing the mouse between two pages. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4969e2b
2017-09-06libview: Reduce the pages to scan for selectionsCarlos Garcia Campos1-26/+58
when selection starts and ends at the same point We can use the current page range in this case, since this will only happen when starting a new word/line selection. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e92c98f
2017-09-06libview: Remove unused rectangle selection modeCarlos Garcia Campos1-59/+5
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=848459e
2017-09-06libview: Rework ev_view_accessible_get_selectionAntia Puentes1-7/+22
Actually return the text and offset range of the selected text in the current page. https://bugzilla.gnome.org/show_bug.cgi?id=704335 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=a178d26
2017-09-06libview: do not redraw the whole view when caret cursor movesCarlos Garcia Campos1-16/+33
Invalidate the previous and new regions instead. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e39ac99
2017-09-06libview: Update the cursor area after positioning the cursor when moving ↵Carlos Garcia Campos1-0/+3
between lines origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=074dfec
2017-09-06libview: Use error bell and return early when moving between lines failsCarlos Garcia Campos1-6/+11
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=3666096
2017-09-06libview: do not schedule a resize in ensure_rectangle_is_visibleCarlos Garcia Campos1-2/+0
It will be scheduled if the adjustments change. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=0597aa7
2017-09-06libview: Stop the cursor blink when there are selections activeCarlos Garcia Campos1-1/+5
Even though the caret cursor is not shown while there are active selections we don't want the cursor blink timeout running and scheduling redraws. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=41c660f
2017-09-06libview: Add more scroll key bindings to EvViewCarlos Garcia Campos1-0/+20
All keybindings currently used by EvWindow. Having them in the view makes them available to other EvView users and they can be overriden by the themes. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=660b741 Fix Return key bidings Do not use the helper function for keypad keys since Return doesn't have a key un the keypad. https://bugzilla.gnome.org/show_bug.cgi?id=704154
2017-09-06libview: Fix second parameter type of scroll signal for h, j, k and l bindingsCarlos Garcia Campos1-8/+12
We were still using G_TYPE_BOOLEAN instead of GTK_TYPE_ORIENTATION. It worked because both are integers in the end. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=f9a65d4
2017-09-06libview: Use merge_selection_region passing NULL to clear the selectionsCarlos Garcia Campos1-18/+6
This way only the regions affected by the selection are redrawn and we don't need to schedule a full redraw every time clear_selection is called. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4b4ea6c
2017-09-06libview: Get text attributes from backend and save them in page cacheAntia Puentes1-1/+2
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4592007
2017-09-06libview: clear the selection when cursor is movedCarlos Garcia Campos1-26/+75
If the cursor is moved with left/right arrow keys the cursor moves the beginning/end of the selection. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=9c3816b
2017-09-06libview: Do not show the caret cursor when there are active selectionsCarlos Garcia Campos1-1/+2
https://bugzilla.gnome.org/show_bug.cgi?id=702761 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=604cd6d
2017-09-06libview: Return NULL instead of empty regions from the pixbuf cacheCarlos Garcia Campos1-3/+2
This way we just need to check the pointer returned. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=bf18b54
2017-09-06libview: Don't draw the caret cursor when the view is not focusedCarlos Garcia Campos1-1/+11
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1691b14
2017-09-06libview: Fix moving caret cursor between lines in multicolumn documentsCarlos Garcia Campos1-30/+47
And also the caret cursor location when positioned with the mouse when clicking on areas with no text, like margins or even the space between columns. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=415ab07
2017-09-06libview: Added 'cursor-moved' signal to notify when the caret cursorAntia Puentes1-0/+14
has been moved. https://bugzilla.gnome.org/show_bug.cgi?id=702078 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4eecb33
2017-09-06libview: Avoid unnecessary region copies when selecting textCarlos Garcia Campos1-4/+4
Now that we always build a new damage region, we don't need to copy the selection covered region. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=7a7ebb8
2017-09-06libview: Use a larger damage area to redraw selectionsCarlos Garcia Campos1-27/+25
Depending on the zoom level the area actually drawn by cairo can be a bit larger than the selected region due to rounding errors or pixel alignment. We use the selected region to build the damage area to invalidate when drawing selections which in many cases is not large enough. This causes that sometimes when removing a selections some small rectangles keep drawn because they are not redrawn. To avoid this we grow the damage area computed from selected regions. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=a497fb4
2017-09-06libview: Don't queue a redraw when damaged region hasn't changedCarlos Garcia Campos1-24/+26
When the region covered by old and new selection is the same, don't schedule a new redraw for the union. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4093541
2017-09-06libview: Invalidate union of old and new selectionJason Crain1-4/+3
Instead of using xor, use the union of old_sel and new_sel to find what needs redrawing. https://bugzilla.gnome.org/show_bug.cgi?id=703024 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=9fd3d7d
2017-09-06libview: Move the caret cursor when clicking outside a selectionCarlos Garcia Campos1-12/+23
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=9a5e9df
2017-09-06libview: Remove unused in_selection member from SelectionInfo structCarlos Garcia Campos1-6/+2
This is currently unused and redundant, to know whether there are selections we use selection_info.selections. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=5503827
2017-09-06libview: Keep the offset inside a line when moving the caret between linesAntia Puentes1-1/+18
https://bugzilla.gnome.org/show_bug.cgi?id=702075 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=255b977
2017-09-06libview: Position the caret cursor at beginning/end of the lineCarlos Garcia Campos1-11/+37
when clicking outside the line Position the caret cursor also when not clicking over text if the line contains text. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=040a42d
2017-09-06libview: Do not schedule a redraw when selecting all textCarlos Garcia Campos1-1/+0
merge_selection_region already invalidates the damaged region. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1e3486e
2017-09-06libview: Use prepend + reverse instead of append to create selections listCarlos Garcia Campos1-4/+4
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=c30e9b1
2017-09-06libview: Use GSlice to allocate EvViewSelectionCarlos Garcia Campos1-10/+7
These structs are allocated and deallocated a lot while selecting text and merging selection regions. orign commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=dc1e75b7be87
2017-09-06libview: Text selection using the caret cursor.Antia Puentes1-22/+74
https://bugzilla.gnome.org/show_bug.cgi?id=702073 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=a6e3834
2017-09-06libview: Update the caret cursor after selecting text with the mouseCarlos Garcia Campos1-23/+29
If there's an active selection move the caret cursor to the location where the mouse is released. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=619c100
2017-09-06libview: Take page border into account when computing selectionsCarlos Garcia Campos1-2/+8
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=b9c32bc libview: Fix a crash when selecting more than one page https://bugzilla.gnome.org/show_bug.cgi?id=702874 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e6fd3ff Make sure we never use negative coordinates in selection rectangle https://bugzilla.gnome.org/show_bug.cgi?id=702874 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4a88904
2017-09-06libview: Make sure the cursor blinks after moving it by a clickCarlos Garcia Campos1-0/+4
The cursor blink is reset when the cursor is moved with the keyboard, but not when positioned with the mouse. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1435ace
2017-09-06libview: merge get_caret_cursor_rect_from_offset and get_caret_cursor_areaCarlos Garcia Campos1-34/+22
Into a single function and use get_caret_cursor_area everywhere. get_caret_cursor_rect_from_offset() was a bit confusing, because it didn't return the cursor_rect, but the bbox of the character where the cursor should be at. The method that actually returns the cursor_rect is get_caret_cursor_area. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=13a5978
2017-09-06libview: Notify about caret navigation errors using the error bell.Antia Puentes1-0/+3
https://bugzilla.gnome.org/show_bug.cgi?id=702650 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=d0f449d
2017-09-06libview: Do not redraw after a click if cursor position hasn't changedCarlos Garcia Campos1-1/+2
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e118165
2017-09-06libview: Use GtkBindings for caret navigationCarlos Garcia Campos1-30/+90
This allows themes to override the key bindings and API users to move the caret cursor programmatically using g_signal_emit_by_name. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1206ff1
2017-09-06libview: Rename EvView::binding-activated signal as EvView::scrollCarlos Garcia Campos1-37/+40
EvView::binding-activated is too generic name for scroll key bindings. Renamed as EvView::scroll and changed to use GtkOrientable instead of a gboolean. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=b70e413
2017-09-06libview: Position the caret cursor by clickingAntia Puentes1-0/+53
https://bugzilla.gnome.org/show_bug.cgi?id=702071 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=153e67d
2017-09-06libview: Use EvPixbufCache to find selection regionJason Crain1-15/+11
Using view->selection_info.selections is inaccurate if the zoom changes, causing drag and drop of selected text to fail. This changes location_in_selected_text function to use the more accurate ev_pixbuf_cache_get_selection_region to find the selection region. https://bugzilla.gnome.org/show_bug.cgi?id=702406 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=abedcbd
2017-09-06libview: Split ev_pixbuf_cache_get_selection_surface into two functionsJason Crain1-9/+9
ev_pixbuf_cache_get_selection_surface returns the selection surface, and new function ev_pixbuf_cache_get_selection_region returns the selection region. https://bugzilla.gnome.org/show_bug.cgi?id=669022 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=90d6580
2017-09-06libview: Draw selection highlight from regionJason Crain1-11/+60
Allows a fallback for backends which can implement get_selection_region but not render_selection. Changes ev-pixbuf-cache so a redraw is only done when the scale changes. https://bugzilla.gnome.org/show_bug.cgi?id=669022 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=9e89fb1