summaryrefslogtreecommitdiff
path: root/libview
AgeCommit message (Collapse)AuthorFilesLines
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-06ev-pixbuf-cache: Clear the selection region also when clearing the job selectionCarlos Garcia Campos1-0/+5
orign commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1a9ba34
2017-09-06ev-pixbuf-cache: fix the condition for when a new selection is neededCarlos Garcia Campos1-4/+4
If we don't have a selection surface/region and points has been set, we need a new selection surface/region even if the scale hasn't changed. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=ca60329
2017-09-06ev-view-accessible: Rewrite get_run_attributes to return the text attributes ↵Antia Puentes1-13/+111
from the document https://bugzilla.gnome.org/show_bug.cgi?id=639932 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=f8a0ce3
2017-09-06libview: Get text attributes from backend and save them in page cacheAntia Puentes5-8/+54
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4592007
2017-09-06libview: Emit the AtkText text-caret-moved and text-selection-changed signalsAntia Puentes1-0/+23
https://bugzilla.gnome.org/show_bug.cgi?id=701732 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=2590224
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 Campos2-5/+6
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: Pre-cache some prev/next pages to the current page range.Antia Puentes1-22/+48
https://bugzilla.gnome.org/show_bug.cgi?id=702767 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=ac3800a
2017-09-06ev-pixbuf-cache: schedule prev or next jobs first depending on the scroll ↵Carlos Garcia Campos1-14/+69
direction If we are scrolling down schedule next pages first, otherwise schedule the previous pages first. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=b6f27b6
2017-09-06ev-pixbuf-cache: Schedule jobs to render previous pages in inverse orderCarlos Garcia Campos1-1/+1
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=ceacd4e
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 Campos2-7/+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 Puentes2-1/+19
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 Campos2-8/+8
origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=c30e9b1
2017-09-06libview: Use GSlice to allocate EvViewSelectionCarlos Garcia Campos2-13/+10
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 Puentes3-24/+77
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 Campos3-47/+114
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 Campos3-40/+43
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 Crain3-36/+111
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 Crain3-40/+81
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
2017-09-06libview: Fix the damage area used to redraw the caret cursorCarlos Garcia Campos1-42/+40
Move to a helper function the code to get the exact area where the caret should be drawn and use it to draw the care cursor and to invalidate the area when blinking. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=f5e7eb4
2017-09-06libview: Actually update the page when moving the care from a different pageCarlos Garcia Campos1-22/+43
I removed the line to set the current page after moving the caret cursor by mistake. Add it back and change cursor_go_to_next/previous_page to not update the page, but only update the cursor_page so that we have a single place where the page is updated after caret cursor moves. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=bf85030
2017-09-06libview: Avoid to update the current page and scroll to the cursor position, ↵Antia Puentes2-106/+133
if the caret cursor was not updated Move the caret cursor only when requested by the user. Keep the page where the caret cursor is in addition to the offset inside that page. https://bugzilla.gnome.org/show_bug.cgi?id=702068 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=4d15ab5
2017-09-06libview: Make caret cursor blinkCarlos Garcia Campos2-84/+255
Based on GtkEntry and GtkTextView implementation, the caret cursor blinks when the view is active and caret navigation is enabled. It stops blinking after a while if there's no user interaction. It uses GtkSettings:gtk-cursor-blink-time and GtkSettings:gtk-cursor-blink-timeout. https://bugzilla.gnome.org/show_bug.cgi?id=702076 taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=e6f7250
2017-09-06libview: Use logical attributes instead text layout to move the caret cursorCarlos Garcia Campos1-102/+77
taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=95f661b
2017-09-06libview: Add a way to get the text logical attributes from the page cacheCarlos Garcia Campos4-10/+73
It returns an array of PangoLogAttr with the logical attributes of the text for the given page. taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=6870279
2017-09-06libview: Initial implementation of caret navigationCarlos Garcia Campos3-4/+462
Navigation by character, word, next/previous line and beginning/end of the line using the caret cursor. The routines to move the cursor don't use GtkTextBuffer to avoid the duplication of the text for every page. - Left/right arrow: Move one character to the left/right. - Up/down arrow: Move up/down one line. - Ctrl + left/right arrow: Move to the beginning/end of the previous/next word. - Home/End: Move to the beginning/end of the current line. https://bugzilla.gnome.org/show_bug.cgi?id=638905 taken from: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=1dc10fe
2017-09-06libview: Refactor code for drawing page and selection surfacesJosé Aliste1-43/+44
The code necessary to draw a page surface or a selection surface is the same. We factor this out to a new static method called draw_surface origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=3ab6ac1 libview: Fix rendering of the first visible page while resizing While we are resizing the view widget and waiting for a new surface rendered at the right size, we use old surfaces scaled to match the target size. When the begining of a page is not visible, the scaled surfaces are not placed correctly. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-8&id=72f2ae4
2017-08-31libview: only access the relevant page cache for the height requestTobias Mueller1-4/+6
In ev_view_get_height_to_page, the "height" or "dual_height" pointer can be set. If dual_height is set, the dual_height buffer is used. Using the "normal" height cache in dual view causes an out of bounds read. So we restrict the cache accesses to their relevant buffers. https://bugzilla.gnome.org/show_bug.cgi?id=771612 origin commit: https://git.gnome.org/browse/evince/commit/?id=0d44134
2017-08-31ev-view: Forward key events to the focused form fieldCarlos Garcia Campos1-20/+32
This allows to move between words with CTRL+Left/Right in text form fields instead of rotating the view. https://bugzilla.gnome.org/show_bug.cgi?id=699630 origin commit: https://git.gnome.org/browse/evince/commit/?id=ac22e8f
2017-08-31libview: Don't update current_page to negative numberGermán Poo-Caamaño1-1/+2
In continuous mode with dual page view, there is a chance that the pages were outside of the scroll view. When opening a document in such circumstances, the current page should not be updated to a negative number when already has the first page as default. This fixes a crash when searching with a negative current page. Fix https://bugzilla.gnome.org/show_bug.cgi?id=683172 origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=8fe6917