How can I get the layout of the foreground application?
My question was asked 2 years ago by another member: [URL="http://www.developer.nokia.com/Community/Discussion/showthread.php?223186-How-can-I-get-the-layout-of-the-foreground-application"]http://www.developer.nokia.com/Community/Discussion/showthread.php?223186-How-can-I-get-the-layout-of-the-foreground-application[/URL]
But there was no answer, and as I'm facing the same problem I hope someone managed to find a solution for it:
[QUOTE]Actually, I am using ScreenDevice to get the screen size. But it's not accurate. For example, my application supports landscape and runs at background. When it is in landscape mode, the screen size which is got from ScreenDevice is 640*360(width*height). But the foreground app only supports portrait mode. When I draw something on the screen, it is drawn as portrait mode. If I put a sprite on the position that x coordinate is larger than 360, it can not be seen. As the screen size I got is (640*360), I thought it was in the screen. But it's not because the foreground app is in portrait mode. So I just want to know the layout of the foreground app. The ScreenDevice is only useful when my app is in at foreground.[/QUOTE]
My best regards, and many thanks in advance.
Re: How can I get the layout of the foreground application?
I've found this qt implementation:
[url]http://qt.gitorious.org/qt-components/qt-components/blobs/162b28b70435be9d0fb66a4270376fa1b873048d/src/symbian/sdeclarativescreen_p_sensor.cpp[/url] (line 99)
could it be useful?