Commit Graph

58 Commits (863255c9f426bdd6845f3f3eced4f270f1baecee)

Author SHA1 Message Date
zwim debf5dc550
Footer: add Warmth as footer item (#8060) 3 years ago
Martín Fernández 990b6768f4
disable battery level on desktop Linux (#8026)
This also include ChromeOS laptops (chromebooks) since the power sysfs attributes don't exist in linux containers.
3 years ago
poire-z 16ab5aa194 SDL keyboard input: should go to top level widget only
Avoid the typed input to be added to all
InputText present on the stack: only the
top one should handle it.
3 years ago
poire-z 4b6b12b799 Remove unused "pan_delayed_interval" support 3 years ago
poire-z d0165f8bd1 Fix scrolling, add inertial scroll on non-eInk devices
Add a new reader module: ReaderScrolling, that exposes
some Scrolling options to the menu (which are to be used
by and implemented in ReaderPaging and ReaderRolling
themselves) and implement some inertial scrolling logic
used by both of them.
Default to "Classic scrolling" which is the expected
behaviour on phones and tablets.
The old CreDocument buggy behaviour is available as
"Turbo scrolling" for both Paging and Rolling documents.
Added a "On release scrolling" option that might be
useful on eInk to avoid dynamic pan/scrolling.

Try to avoid bad interactions between pan and swipe,
cancelling unwanted panning if we ended up doing a
swipe or multiswipe.
3 years ago
Martín Fernández 53234fcdc1
add hasSystemFonts device property (#7535)
Add system + user paths to the ReMarkable (has normal linux paths)
3 years ago
NiLuJe 3274183466 Minor Input & TimeVal cleanups
* Input: Don't create a new TimeVal object for input frame timestamps, just promote our existing table by assigning it the `TimeVal` metatable.
* TimeVal: Export (const) `zero` & `huge` TimeVal objects, because they're common enough in our codebase. (NOTE: not actually const, that's a Lua 5.4 feature ;p).
* GestureDetector: Explain the behavior of the `last_tevs` & `first_tevs` tables, and why one needs a new object and not the other.
* Speaking of, simplify the copy method for `first_tevs`, because it doesn't need to create a new TimeVal object, we can just reference the original, it's unique and re-assigned for each frame.
3 years ago
NiLuJe bf6c0cdd6c
LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
3 years ago
yparitcher dc964f3941
reader.lua: rework file/directory argument handling. (#7053)
platform: do not pass a directory on the command line.
The home directory will be properly set by Device.home_dir.

It was sometimes crashing when opened with no args.

Fixes: #7049
3 years ago
John Beard 0e494169f2
Keyboard input in InputText (#7037)
For text input, use the SDL events, which contain the decoded
strings.

Still handle keypresses for non-text input.
3 years ago
Martín Fernández d914476973
sdl: resize FM (#6882)
Required after #6309.

Uses the same logic as in android (I cannot locate the PR right now). Tested on a mac.
4 years ago
ezdiy ef8d2d0d6e
linuxfb: is_always_portrait must be passed to screen init() from all frontends. (#6712)
This is because fb driver should not be inspecting self.device for low level
caps anymore.

Fixes #6711
4 years ago
yparitcher 3e063498fc
FrontLight: fix footer update on FL on/off toggle (#6664)
move state change event to higher level function so it will be called after powerd.is_fl_on is updated.

makes _setIntensity redundant so get rid of it

obsoletes #6667
4 years ago
poire-z f15aa7103f
Allow following links and footnotes with keys (#6619)
Only with CreDocuments (as no way currently to highlight links
in PDFs).
Tab or Shift-Tab to select next or previous links.
Press to follow (or show footnote in popup, and in there Press
to follow), back to go back.
4 years ago
Martín Fernández c7f77de72a
refactor thirdparty app integration (#6513)
* refactor thirdparty app integration
* Fix fora package name
4 years ago
Martín Fernández b9ffb2e0d0
pocketbook: warmth lights support (#6531)
* also enables natural light controls for the emulator
4 years ago
Martín Fernández d935ca6937
sdl: keep track of window position and size (#6495) 4 years ago
Martín Fdez bdbebb9e08 standalone osx application bundle 4 years ago
Frans de Jonge 7c1a716d57
Fake battery status in readerfooter_spec to succeed on devices with batteries (#6417)
Cf. <https://github.com/koreader/koreader/pull/6370#issuecomment-662382487>.
4 years ago
Martín Fernández ca21d1401a SDL: use platform as model for desktop computers, report battery if available 4 years ago
Martín Fdez fca7f9e7d5 desktop/emulator 4 years ago
Martín Fernández 1adea4a497 Add macOS target
Co-authored-by: Jason Benwell <jbenwell@hotmail.com>
4 years ago
Martín Fdez a376a52c3a easier user font paths with Device.home_dir 4 years ago
Martín Fernández 32207523b0
emulator: add fake network manager (#6314) 4 years ago
Martín Fernández 2e731dd4dd
[chore] Device abstraction (#6280)
* generic Device:info() function which returns the model

* add Device:canSuspend() and make it true in all devices that have suspend routines and the emulator

* also enable fake poweroff/reboot on the emulator

* add Device.home_dir

* add Device:hasExitOptions() and update menus & comments
4 years ago
Martín Fdez 3e3ddbfc4b desktop: don't show which results on console 4 years ago
Martín Fernández 3a4b5d3cab
desktop: add support for 3rd party dictionary apps (#6167) 4 years ago
Martín Fernández 5704f63bfc
fix openLink on linux (#6161) 4 years ago
Martín Fdez 8e831eb756 desktop: disable battery on touch menu and reader footer
isDesktop and isEmulator are now different entities
4 years ago
Frans de Jonge f7861bc1eb
[feat] Add haptic feedback (#5380)
References <https://github.com/koreader/koreader/issues/5374>.
5 years ago
Frans de Jonge 7019ff15bd
[chore] Drop SDL 1.2 (#5324)
Depends on https://github.com/koreader/koreader-base/pull/963.

Also includes Initial import of <linux/rtc.h> related stuff https://github.com/koreader/koreader-base/pull/965
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Martín Fernández 3a957d71e3 [Desktop] Open writable font dir, toggle system+user/user fonts, fix openLink on mac (#5220)
Fixes #5093
5 years ago
Robert 803a143764 [sdl] Add support arrow key for next/prev page (#5149)
Close: #4997 
This PR add support arrow key and mouse scroll wheel for next/previous page.

- Document in page mode:

PageDown, Arrow down, Arrow right - go to next page
PageUp, Arrow up, arrow left - go to prev page
Mouse scroll wheel down - go to next page
Mouse scroll wheel up - go to prev page

- Document in scroll mode:

PageDown, Arrow right - go to next page
PageUp, Arrow, arrow left - go to prev page
Arrow down - scroll document down
Arrow up - scroll document up
Mouse scroll wheel down - scroll document down
Mouse scroll wheel up - scroll document up
5 years ago
Frans de Jonge 709207a621
[feat, UX] Add external link to Wallabag (#4863)
Offers a choice when Wallabag is available.
5 years ago
Frans de Jonge b1ed2838c8
[UX] Add Device:openLink() stub for Linux SDL (#4822)
References #4821.
5 years ago
Frans de Jonge 728bb187fa
[UX] Gesture manager: add two-finger swipe left and right (#4815)
Also add Device:hasMultitouch() to control whether the configuration menu is shown.

Cf. #4727.
5 years ago
Frans de Jonge 2cbec1b54e
[fix] Add fake delayed pan to SDL scroll event (#4758)
Not actually delayed. Avoids a crash otherwise caused by #4666.
5 years ago
Frans de Jonge 8e5c1addf5
[feat] Update check (#4620)
The concept is quite simple: stick a file on the OTA server named
something like `koreader-appimage-latest-stable` (by analogy with
`koreader-cervantes-latest-stable.zsync`), which contains nothing
but a filename.

The difference with the zsync update is that the link is then launched
in the user's browser (AppImage) or DownloadManager (Android, not yet
implemented).

* Android hasOTAUpdate = no for the moment
5 years ago
Martín Fernández 04e17424d0 display network settings based on device capabilities + fix android basic network info 5 years ago
Martín Fernández 19d13b1876 [feat, Android] Add basic support for android eink refreshes on some rockchip devices (#4517)
Supported devices:

- Boyue T61 and *some* clones
- Boyue T62 and *some* clones
- Onyx C67
- Energy Sistem (which are in fact Boyue T62 clones). Was tested on a energy pro 4.

Others may work with the same controller too, but are disabled by default.

Requires https://github.com/koreader/koreader-base/pull/798
Requires https://github.com/koreader/android-luajit-launcher/pull/96

Fixes #4373 
Fixes #1613 (supported devices will show the "full refresh rate" option under eink settings. Others won't)

Related #4228 (need to add support for this specific device to work)
5 years ago
Martín Fernández 6de5927dc2 [build] Add support for Debian packages (#4434)
* Add support for Debian packages

* SDL: add device probe
5 years ago
Frans de Jonge 88dee4194d
[feat] SDL2: add window icon (new logo) (#3884)
Also update Ubuntu Touch icon

Fixes #2000, fixes #3858
6 years ago
Frans de Jonge 086ced07f9
[feat, UX] SDL: add Gtk3 filechooser (#3827)
The specifics for other implementations are easy to change in the backend.
6 years ago
Frans de Jonge 7f4be45d4e
[chore] Handle SDL_MOUSEWHEEL and less hackish SDL events (#3826) 6 years ago
onde2rock 74a06d98a2 [chore] Code cleanup : deprecate the 'Enter' event, replaced with 'Press' (#3815)
'Escape' now do 'Back' on SDL
'Enter' now do 'Press' on SDL
6 years ago
Frans de Jonge 7e6de30889
[feat, UX] SDL2: drop file to open (#3793)
Includes:

* crengine: use cache files renamed as .cr3.keep https://github.com/koreader/crengine/pull/137
6 years ago
Frans de Jonge f1aae6a03c [UX, fix] Redraw PdfDocument and DjvuDocument after resizing window 6 years ago
Frans de Jonge 24c0132744
[feat] SDL2: resize window (#3775)
References #1417 

Bumps base for https://github.com/koreader/koreader-base/pull/614

Also includes:
* Speedup loading from cache EPUB with many files https://github.com/koreader/crengine/pull/133
* Avoid rewriting cache file when no change were made https://github.com/koreader/crengine/pull/134
6 years ago
Frans de Jonge 06dfe4fb78
[feat] Add Device:hasClipboard() (#3465)
References https://github.com/koreader/koreader/issues/3441
7 years ago