Hi, I would like to know how to read the position on an icon on the desktop in OSX? Or how do I get a list of all icons on the desktop + position.
Thanks in advance,
Omid
Hi, I would like to know how to read the position on an icon on the desktop in OSX? Or how do I get a list of all icons on the desktop + position.
Thanks in advance,
Omid
The solution for a folder is to use a catalog iterator to get the Finder info for every item in the folder. The Finder info is a FileInfo or FolderInfo structure that contains a QuickDraw Point
(integral co-ordinates, origin top-left, positive y down) specifying where the icon will appear.
I don't know how you would do this for the Desktop, though. There is a Desktop folder in the Home folder, but examining its contents will probably get you the positions that the Finder will use to display that folder in a window. It also will probably not include anything “on the Desktop” that isn't in the Desktop folder, such as mounted volumes.