10-13-2018, 08:02 PM | #1 |
Guru
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Lazy Sunday idea - launching scripts/apps from Nickel
WARNING: The following post is a Lazy Sunday Idea. Something may or may not come of it.
So, this post sparked off an idea about a possible method of launching scripts or programs from within Nickel, without needing to monitor files. The idea is as follows:
So, there's my idea for the day. Please feel free to poke holes in it, or suggest improvements. If someone wants to run with it, go ahead. Otherwise, I may give it a go myself. |
10-13-2018, 11:13 PM | #2 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
We're still stuck on the "have to check the screen regularly" and/or "polling the screen even when not on the Home screen" issue, though, no?
And then you'd have to make up an UI yourself, too, although that may be the fun part for some . Last edited by NiLuJe; 10-13-2018 at 11:17 PM. |
Advert | |
|
10-13-2018, 11:52 PM | #3 |
Guru
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
I'm making a huge assumption that reading input events isn't a mess of expensive polling. If this is the case, there is no need to constantly check the screen, as the idea is to only check when a touch event occurs.
As far as I can tell, the status bar never vanishes of it's own accord when reading a book - only when one touches the screen. Therefore, one does not need to check regularly if the status bar is still available. In other words, why bother with the homescreen if the status bar is available? One only needs room on the status bar for one icon for this idea to work. As for creating the UI, that could actually be kind of fun. Can't be any harder than the on-screen keyboard I created (easier in fact), especially when a simple grid would suffice. |
10-14-2018, 12:51 AM | #4 |
BLAM!
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Oops, rereading my previous message, yeah, I meant "polling the input device at all times", of course .
Because yeah, making the input poll the main looping mechanism is the "least worst" solution that came to mind the last time this came up . (i.e., what I was actually meaning to say is: it'd be great if we actually *could* manage to only have to poll the input device while on the Homescreen, since that's the only place we're going to be caring about, but we're kind of stuck in a catch-22 ). Last edited by NiLuJe; 10-14-2018 at 12:56 AM. |
10-14-2018, 01:36 AM | #5 |
Guru
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Ah, but combined with the idea in the thread that sparked this one (exclusive input grabbing), doing stuff while in a book suddenly becomes a lot more feasible. Just have to remember to save the state of the framebuffer (if needed) before launching any graphics is all.
(I'm going to do a bit of experimentation I think) |
Advert | |
|
10-14-2018, 03:43 AM | #6 |
Guru
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
A simple blocking read of the touch event file seems to do the trick just fine. No need for any polling, and Nickel is happy to keep processing touch events while doing so.
The test program doesn't even register in 'top', so hopefully this approach wouldn't be a battery hog. Oh, and I've basically created a simple C touch "driver" that applications can integrate if they so desire (I ported my Go code to C). It needs a bit of tidying up before release however, and I'm not sure if I've accounted for all the different "protocols" correctly. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Western Bower, B. M: Jean of the Lazy A. Jean of the Lazy A. v1. 11 Mar 2015 | crutledge | ePub Books | 0 | 03-11-2015 05:50 PM |
[Tutorial] - QT Apps without nickel | koenieee | Kobo Developer's Corner | 3 | 01-04-2013 08:48 AM |
Eink stanalone demo Qt eink driver for standalone qt apps ie no nickel nickel | tonyv | Kobo Developer's Corner | 2 | 12-27-2012 09:35 AM |
Kindle, Audible apps not launching | tomsem | enTourage eDGe | 13 | 10-03-2012 02:27 PM |
Those Lazy Sundays - Horror Novel - Free until Sunday, 5/20/2012 | rooster3888 | Self-Promotions by Authors and Publishers | 7 | 05-19-2012 10:04 AM |