I think this is looking more like a question for a Mac specific channel. I suggest posting in Apple's forum: http://discussions.apple.com/index.jspa . When you've got a solution to your problem in Objective-C/C we can help you integrate/port it to Java and SWT.
On Apr 22, 2010, at 17:04, Belcher, Josh wrote: What about from a process that I start? I can start the application I want from my program, so I could store the process and access it – Do you have an example of how to access the window information with the current process? The bare minimum that would get me by would be to find it’s x,y screen coordinates… anything else beyond that is icing. ------------------------ I think it may be what he wants but I don't know how to get from a window number to an actual window. On Apr 21, 2010, at 03:54, Sky Yan wrote:
If the "any application" means the application in other process, the answer is: no. Mac do not have global window or control handle as HWND on win32. So you can just get window information within current process but have no idea about window in other process. But there is other method to get position of window in other process, you could try Accessibility API on Mac. You may need to write c code to use it. sendmsg in cocoa is object-c method. It is totally different with SendMessage on win32. I have been searching for awhile now for a Mac equivalent of the org.eclipse.swt.internal.win32 functions FindWindow() and GetWindowRect(). I would like to be able to launch any application, gain control of it and query it to find out where it’s top left position is. If there is a way to do it by setting its position, that would also work for me. In the org.eclipse.swt.internal.cocoa I have seen some things about sendmsg – but I haven’t been able to find any good examples of how that works in swt, or if that is even what I need. _______________________________________________ platform-swt-dev mailing list platform-swt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
--
Thanks,
Sky Yan
_______________________________________________ platform-swt-dev mailing list platform-swt-dev@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/platform-swt-dev
|