Is there a way to detect if the dock icon is displayed?

3 posts / 0 new
Last post
Hans
Hans's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2010-12-09 22:04
Is there a way to detect if the dock icon is displayed?

Is there a proper way to detect if your application's dock icon is displayed?

I know that you could simply check if the AMIDOCK AREXX port exists (or if AmiDock is registered as a commodity), but I'm wondering if there's a better way directly through the application.library. IIRC, RegisterApplication() will return success even if AmiDock isn't running.

Hans

hypex
hypex's picture
Offline
Last seen: 2 months 1 week ago
Joined: 2011-09-09 16:20
Re: Is there a way to detect if the dock icon is displayed?

The application API mentions the displayable state in the dock but not how:

- Functions for controlling the displayable state of
applications within a dock utility like AmiDock

The closest I can find is GetApplicationAttrs() with a APPATTR_Hidden tag:

APPATTR_Hidden - (BOOL)
Update this option each time you did (un)iconfied your
application as task bar applications may use this information for
displaying the hidden state visually.

The next logical place would be in the docky.library. But after a glance I can see no functions querying for any icon state. Seems an obvious question since the doc mentions it but gives no direct answers! :-D

Hans
Hans's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2010-12-09 22:04
Re: Is there a way to detect if the dock icon is displayed?

The closest I can find is GetApplicationAttrs() with a APPATTR_Hidden tag:

Hmmm. Will it reflect the actual display state? Or just mirror the application's use of the hidden flag?

Looks like some experimentation will be needed...

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
http://keasigmadelta.co.nz/ - more of my software.

Log in or register to post comments