#199750 - 20/01/2004 16:45
Hijack Wishes for 2K4
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Okay, so maybe last year's thread was a little overzealous. Maybe coming up with an entire new way for Hijack to manage multiple user applications (and thus managing input and display focus separately) is a little too much, at least at one time. So this year, I'm going to try the incremental steps approach for my wish list.
I'll start out with two of the big ones that would help me out the most for what I'm writing:
1) Something like ioctl(fd, EMPEG_HIJACK_APPSWITCH, NULL) that will allow an app to automatically focus itself, rather than needing to do an EMPEG_HIJACK_WAITMENU. If multiple apps try this, the first one wins, others get an error result code back.
2) Allow background apps to call EMPEG_HIJACK_SETGEOM even if they're not focused, and subsequently EMPEG_HIJACK_DISPWRITE to that area of the screen. If a background app and a foreground app each try to claim the same section of screen real-estate, the foreground app wins. If two background apps try to claim the same area, the first one wins, the second one gets back an error result code.
The second one would also, I think, be useful in a situation where GPSapp (running in background) wanted to update a little window with coordinates, etc. while another app (say, emphatic) was running in the foreground doing its thing.
I submit these requests for your approval, M'Lud.
|
Top
|
|
|
|
#199751 - 20/01/2004 17:08
Re: Hijack Wishes for 2K4
[Re: tonyc]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
My Hijack wish for 2004 is to get a "site exec" command in the ftp server.
Another minor wish is to be able to ;@EXEC commands after the player starts.
|
Top
|
|
|
|
#199752 - 21/01/2004 02:11
Re: Hijack Wishes for 2K4
[Re: tonyc]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
why not do it like how palmOS does it? application forms and notification popups of other apps when an event in the background happens.
|
Top
|
|
|
|
#199753 - 21/01/2004 08:16
Re: Hijack Wishes for 2K4
[Re: tonyc]
|
old hand
Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
|
I vote for a way to make an ir_translation that would open a certain userland app registered in the hijack menu. It would be nice to open GPSApp or other apps without all the fuss.
|
Top
|
|
|
|
#199754 - 21/01/2004 08:45
Re: Hijack Wishes for 2K4
[Re: siberia37]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
I vote for a way to make an ir_translation that would open a certain userland app registered in the hijack menu. It would be nice to open GPSApp or other apps without all the fuss. This wish can be done already today.
GRANTED!!!
|
Top
|
|
|
|
#199755 - 21/01/2004 09:13
Re: Hijack Wishes for 2K4
[Re: tonyc]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Well, SITE EXEC and it's offspring are at the top of my own list, so that chunk of functionality will appear first.
After that, I probably will tackle the crazy apps question, but the thing that holds me back there is that I personally do not use any of the add-on apps, and most of Hijack development is geared solely towards what I need on my players.
But.. here's how it will work. "Foreground" means the app has access to the physical display and buttons, "background" means it does not have access.
The way I see this happening is that each app will have it's own screen buffer within Hijack, 100% exclusive of all other apps. This implies that two apps cannot share a common display screen, unless somebody writes a third app that manages this on their behalf.
The baseline content of each app's screen will be the current pixel output of the Empeg player app, on which user apps can overlay as they see fit when active. So any single app can show the player's data with their own overlay when they are in the foreground. Or, alternatively, we could just give each app a blank screen, and access to the player's screen, and let the app do its own overlay. Preference?
When in the background, a user app's screen does not show, and the app does not "see" any buttons being pressed/released. In the foreground, the app's screen is what shows on the physical display, and all button presses can be intercepted by the app.
A foreground app is fed (most) button events as they happen, and can choose whether to modify or delete them from the player's input stream, but only on a 1:1 or 1:0 basis. That is, it can do a 1:1 substitution, or simply "eat" a button event (not pass it on to the player). A background app doesn't see any button presses, and so cannot affect the button stream at all.
Hijack will provide some virtual button codes which bring individual apps to the foreground, replacing whatever (app, player) was previously in the foreground. These will be dynamic strings that match the app name, like "GPSapp", "Asteroids", and "PacMan".
There will also be an ioctl() by which a background app can request to become the foreground app (if not already in the foreground). Hijack will do it's best to respect this, but the app cannot actually tell the difference.. This way Hijack could defer such actions when the user is in the midst of player menu navigation, for example.
User apps can be launched from config.ini, and/or on-demand from the Hijack menu (courtesy of the EXEC stuff that comes first). This area might still be a little hairy, so initially I think apps may ONLY launch from the Hijack menu, rather than during the preinit phase from config.ini. We'll see.
Coding this is easy (for me).. it's agreeing on the details that's the tough part.
|
Top
|
|
|
|
#199756 - 21/01/2004 09:20
Re: Hijack Wishes for 2K4
[Re: mlord]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
There will also be an ioctl() by which a background app can request to become the foreground app (if not already in the foreground). Hijack will do it's best to respect this, but the app cannot actually tell the difference.. This way Hijack could defer such actions when the user is in the midst of player menu navigation, for example. Mmmm.. this still needs work.
Okay, how about: An app can request via ioctl() that it be placed in the foreground. This just sets an "activate me" bit in a data structure within Hijack. A similar ioctl() will exist to clear this bit, forcing the app to the background (or cancelling any prior request to be foregrounded).
The ioctl() always completes (returns) immediately, and Hijack will at some point attempt to "foreground" the app. When an app eventually DOES transition to foreground or background, it will receive a virtual button event indicating such.
Cheers
|
Top
|
|
|
|
#199757 - 21/01/2004 10:18
Re: Hijack Wishes for 2K4
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
and most of Hijack development is geared solely towards what I need on my players. I understand this, but I know you've already implemented a lot of stuff you don't have any use for in response to other requests, and I think in this case, it benefits a lot of people, since it provides a framework for developers to implement things that people want, ultimately reducing the number of times you'll be asked to put something into Hijack. Coding this is easy (for me).. it's agreeing on the details that's the tough part. Agreed... With that in mind, let me throw in my $0.026 CAD on the scheme you've outlined. The way I see this happening is that each app will have it's own screen buffer within Hijack, 100% exclusive of all other apps. Sounds great! This implies that two apps cannot share a common display screen, unless somebody writes a third app that manages this on their behalf. Hmm... How would this theoretical app (akin to a "window manager" or "display server" I guess) get access to the display buffers of other apps so it can present them on the screen at the same time? The baseline content of each app's screen will be the current pixel output of the Empeg player app, on which user apps can overlay as they see fit when active. So any single app can show the player's data with their own overlay when they are in the foreground. Or, alternatively, we could just give each app a blank screen, and access to the player's screen, and let the app do its own overlay. Preference? Starting out with the player's screen seems best, we can always clear out the buffer if we want a blank screen. When in the background, a user app's screen does not show, and the app does not "see" any buttons being pressed/released. In the foreground, the app's screen is what shows on the physical display, and all button presses can be intercepted by the app. This works fine for me, though this still leaves background apps without a way of putting anything on the screen. My thinking was that a background app could claim a section of the screen and then that would be mixed in with the player's display buffer, so that if a foreground app wanted to overlay on top of the player's contents, it could also have a background app displayed in sort of an "iconified" state. Something like this, maybe:
1. GPSApp is running in the foreground, updating its display buffer, handling input, etc.
2. User selects an option in GPSapp's menu like "iconify" or "minimize" or something.
3. GPSApp selects a window geometry in the corner, sends itself to the "background" (gives up button presses and its primary display buffer), and starts writing to the player's display buffer (the one you're copying into each of the user app's buffers so they can overlay.)
4. Another app (say, emphatic) receives the "bring to foreground" button code. When it goes to overlay on top of the player's display buffer, the contents of the GPSApp window are already there in a corner of the display.
This would also allow for other cool functionality, like the RDS info being displayed while the player is active (someone asked for this so they can display temperature) or even an app that pops up reminders on the screen at designated times (I could modify my alarm clock app to do this.). A foreground app is fed (most) button events as they happen, and can choose whether to modify or delete them from the player's input stream, but only on a 1:1 or 1:0 basis. That is, it can do a 1:1 substitution, or simply "eat" a button event (not pass it on to the player). A background app doesn't see any button presses, and so cannot affect the button stream at all. Sounds great to me. Hijack will provide some virtual button codes which bring individual apps to the foreground, replacing whatever (app, player) was previously in the foreground. These will be dynamic strings that match the app name, like "GPSapp", "Asteroids", and "PacMan". I like this idea a lot. User apps can be launched from config.ini, and/or on-demand from the Hijack menu (courtesy of the EXEC stuff that comes first). This area might still be a little hairy, so initially I think apps may ONLY launch from the Hijack menu, rather than during the preinit phase from config.ini. We'll see. Okay, I look forward to seeing how this shapes up. Okay, how about: An app can request via ioctl() that it be placed in the foreground. This just sets an "activate me" bit in a data structure within Hijack. A similar ioctl() will exist to clear this bit, forcing the app to the background (or cancelling any prior request to be foregrounded).
The ioctl() always completes (returns) immediately, and Hijack will at some point attempt to "foreground" the app. When an app eventually DOES transition to foreground or background, it will receive a virtual button event indicating such. Sounds perfect to me.
Anyway, do you think it'll be possible to make this whole scheme backward-compatible with the existing API's? It'd suck if people had to have to rewrite their existing apps to take advantage of the new functionality, but I'm also not sure how much can be done without tweaking the behavior of the existing calls. Any thoughts?
Finally, thanks for considering this, I really think it'll make people more likely to take advantage of the apps people have written.
|
Top
|
|
|
|
#199758 - 21/01/2004 11:35
Re: Hijack Wishes for 2K4
[Re: tonyc]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Finally, thanks for considering this, I really think it'll make people more likely to take advantage of the apps people have written.
And with site exec already in the works, this will make installing said apps much, much easier. Thanks, Mark!
|
Top
|
|
|
|
#199759 - 21/01/2004 11:46
Re: Hijack Wishes for 2K4
[Re: cushman]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
And with site exec already in the works, this will make installing said apps much, much easier. Thanks, Mark! Yeah, definitely. Now we just need that installer project to get off the ground.
|
Top
|
|
|
|
#199760 - 21/01/2004 12:17
Re: Hijack Wishes for 2K4
[Re: mlord]
|
old hand
Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
|
In reply to:
This wish can be done already today.
I'm glad it was easy for you. Any clues on how to do it? I've done a fair amount of searching.. maybe I missed some ir_translate command..
|
Top
|
|
|
|
#199761 - 21/01/2004 17:04
Re: Hijack Wishes for 2K4
[Re: siberia37]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
In reply to:
> This wish can be done already today.
I'm glad it was easy for you. Any clues on how to do it? I've done a fair amount of searching.. maybe I missed some ir_translate command..
Not an end-user thing. But apps can probably achieve this behaviour with the interface that already exists. Or not.
Cheers
|
Top
|
|
|
|
#199762 - 22/01/2004 07:26
Re: Hijack Wishes for 2K4
[Re: mlord]
|
member
Registered: 28/08/2003
Posts: 149
Loc: Isle of Wight, UK
|
Damn, I'm glad you guys are still putting effort into the empeg!
It's a continually fascinating experience to own one
It would have been easy to move on to other projects and leave the empeg to slowly die, but with your ongoing development and ideas, it's never a dull place to be.
I'm only a user, but I'm sure I speak for the rest of the users when I say "Thank you. Please continue!"
_________________________
Steve
|
Top
|
|
|
|
#199763 - 22/01/2004 11:34
Re: Hijack Wishes for 2K4
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Not an end-user thing. But apps can probably achieve this behaviour with the interface that already exists. Or not. I don't believe this one is possible with the current setup of the Hijack API's.
|
Top
|
|
|
|
#199764 - 22/01/2004 13:32
Re: Hijack Wishes for 2K4
[Re: mlord]
|
old hand
Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
|
In reply to:
Not an end-user thing. But apps can probably achieve this behaviour with the interface that already exists. Or not.
After researching it only seems possible if you have a complex multithreaded app setup- because an app usually waits on the ioctl(HIJACK_WAIT_MENU)- at this point it can't bind an IR command and have it activated since it's stuck in the WAIT_MENU. Or am I missing something?
|
Top
|
|
|
|
#199765 - 23/01/2004 17:01
Re: Hijack Wishes for 2K4
[Re: mlord]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Oh, one more request for the queue... Currently, when an app is active (accessing the display) and the user puts the empeg into standby (holds down the top button) the app can't recover when it comes back from standby. It'd be nice if apps could deal with standby mode more gracefully.
|
Top
|
|
|
|
|
|