Just wondering if it is possible to implement "OSD" in OS4: To display some message above all the graphics (with option to define font/size/position). Not just some window on specific screen, but above all screens.
Afaik, there's nothing like this yet.
TIA, Jack
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
AmiDock uses transparency, as do other items. Probably the easiest way to do this would be via a borderless window with an alpha channel. Just don't ask me how to enable transparency on windows.
No, not window. The goal is to display some stuff above the topmost screen, like stationary sprite...
Jack
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
AmiDock doesn't really use transparency, and I don't know if it's even possible to use alpha in an Amiga window. What Amidock does is grab a piece of the screen the same size and position as the window it's about to open, and puts that image in the background of the window to give the impression of transparency. That's pretty easy to do programming-wise, and you could even pop open a "stay on top" window on the frontmost screen if you liked - on a graphics card colour matching shouldn't be that important.
Without OS support for true alpha windows/screens I don't see how you'd do it on top of any screen, though it would be a nice feature...
No, not window. The goal is to display some stuff above the topmost screen, like stationary sprite...
It's not like anyone will know if it's a window or not. I'm just thinking about how to implement it. Drawing directly to the screen's rastport is rather naughty, and shouldn't be done. I don't know if you can create a layer (i.e., a layers.library layer) without it being a window. Using a window would be the easiest method to get the job done. Finding out which screen is on-top should be fairly easy too, and then you just need to worry about screen scrolling.
@Daedalus
Are you sure? Icons can have transparency too, as do pop-up menus (or menus in general). I know that the effect is incomplete as the background behind the window doesn't update, but, that doesn't mean that it has to be manually implemented via screen-grabs.
Are you sure? Icons can have transparency too, as do pop-up menus (or menus in general). I know that the effect is incomplete as the background behind the window doesn't update, but, that doesn't mean that it has to be manually implemented via screen-grabs.
Hans wrote: Using a window would be the easiest method to get the job done. Finding out which screen is on-top should be fairly easy too, and then you just need to worry about screen scrolling.
You might get problems if the top screen isn't a custom screen.
You could open a small screen on top of the top screen, at the bottom (a bit like DPaint's palette changer thingy). However, this will obliterate a lot of the screen, and even blank it if it isn't the same resolution as the one you just opened (OS4 doesn't do mode coercion like OS3 could AFAIK)
I offer no opinion on layers.library as I've never used it and have no idea what a layer in AmigaOS terms even is!
Some text message for starters, without stealing the focus, then go away after 5 seconds or so. Like osd in linux/X11:
echo "some text" | osd_cat -p middle -A center
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
There is a pretty simple OSD command included with HauppaugeIR on my website. I have no idea if it works on OS4 (HauppageIR itself definately won't, but OSD might).
Hmmmm... I guess you could be right. There seems to be proper support for transparency in the icon library, just Amidock "feels" like it cuts out the background - like so many programs I've written which do a similar thing for transparency. It's entirely possible that there's a function to do this in a library somewhere, but it needs some work if so.
I uploaded a new version of ShowMsg to os4depot. It has some new command line options. For example there's TOPMOST option to show a requester on a top most screen.
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
That was quick But I need it on whatever the topmost screen there is... Actually it's for AMuse (to display the change of the tune while on other-than-workbench screen) is there a timeout ?(like in requestchoice).
@Xeron Same here, WB screen only
Jack
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
to display the change of the tune while on other-than-workbench screen
One other option is you can use ScreenMonitor on another screen to watch what's happening on WB (or any other screen). Is that other-than-workbench screen always a public screen ?
Quote:
is there a timeout ?
No. (Not yet.)
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
One other option is you can use ScreenMonitor on another screen to watch what's happening on WB (or any other screen). Is that other-than-workbench screen always a public screen ?
Just saw "dprun" on Xeron's page, and it allows running a program on public screen. I tried with AWeb: all's well. Then I tried with Cygnix - seems to be not a public one...
Edit: definitely not public, KCon can't jump there.
Edit2: What about sprite idea? To draw into a bitmap and pass it as sprite....
Jack
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg
Edit2: What about sprite idea? To draw into a bitmap and pass it as sprite....
On most gfx cards there is only a single sprite, i.e. you'd have to replace the mouse pointer, it's way too small to display any readable text in it and has only 2 colours.
Hmmmm... I guess you could be right. There seems to be proper support for transparency in the icon library, just Amidock "feels" like it cuts out the background - like so many programs I've written which do a similar thing for transparency. It's entirely possible that there's a function to do this in a library somewhere, but it needs some work if so.
Well, even if the API is there, it's still fake transparency. Real transparency would need changes made to the layers library so that it does proper compositing. It would also require the graphics system to support hw-accelerated alpha blending or it would be slow.
I think it's possible to force a custom screen as public screen using Screens prefs editor.
Will ask Edgar if it will harm Cygnix functionality.
Jack
"the expression, 'atonal music,' is most unfortunate--it is on a par with calling flying 'the art of not falling,' or swimming 'the art of not drowning.'. A. Schoenberg