| Computers Forum Index » Computer - Emulators (MS Windows - Wine) » Help! Calling native function from a windows... |
|
Page 1 of 1 |
|
| Author |
Message |
| Joe... |
Posted: Sat Jul 25, 2009 11:13 pm |
|
|
|
Guest
|
Hi
I have a tool that I am running under Mac version of Wine. What I am
doing is installing the tool under wine (i.e wine <path to installer
pkg.exe>) and then running it from wine.
It uses an api to capture current screen (BitBlt api). Under Mac, it
is capturing the X windows frame buffer instead of native Quartz frame
buffer. I have source code for this tool. I am thinking of replacing
Windows api for screen capture with Mac's native apis.
I am wondering if someone can point me in right direction.
a) How do I find in code if I am running under regular win32 or wine?
If wine, how do I find host OS (i.e Is it Linux or OS X?)
b) Lets say I know some how what OS the exe is running. I want to call
say LeopardCaptureScreen() on Mac. One way is to include
corresponding .h and link implicitly. But it won't compile under
windows. Any pointers on how to separate this logic in such a way that
the mac code can be compiled on Mac and be loaded under wine.
c) Any pointers on how to capture current screen on Mac OS X. I know
it should be posted under Mac forum, thought of asking here as lot of
smart people are reading this forum.
Thanks for your help
Joe |
|
|
| Back to top |
|
|
|
| Mike Dee... |
Posted: Mon Jul 27, 2009 4:51 am |
|
|
|
Guest
|
Joe wrote:
Quote: Hi
I have a tool that I am running under Mac version of Wine. What I am doing
is installing the tool under wine (i.e wine <path to installer pkg.exe>)
and then running it from wine. It uses an api to capture current screen
(BitBlt api). Under Mac, it is capturing the X windows frame buffer
instead of native Quartz frame buffer. I have source code for this tool. I
am thinking of replacing Windows api for screen capture with Mac's native
apis. I am wondering if someone can point me in right direction.
a) How do I find in code if I am running under regular win32 or wine? If
wine, how do I find host OS (i.e Is it Linux or OS X?)
b) Lets say I know some how what OS the exe is running. I want to call say
LeopardCaptureScreen() on Mac. One way is to include corresponding .h and
link implicitly. But it won't compile under windows. Any pointers on how
to separate this logic in such a way that the mac code can be compiled on
Mac and be loaded under wine.
c) Any pointers on how to capture current screen on Mac OS X. I know it
should be posted under Mac forum, thought of asking here as lot of smart
people are reading this forum.
I can't help you with finding the codes you want and I'm not entirely
sure that what you are asking is for taking screenshots or plain dumps of
the screen, but screen capture in the Mac is "Shift + Command + 3" keys to
snap the entire screen and "Shift + Command + 4" to get a cross-hair
cursor to select a region of the screen. In Tiger and Leopard these result
in screenshots saved as .png onto the desktop by default IIRC
You can change the default file format to .jpg .tif or .pdf with a
Terminal entry - Google "Mac OS X Leopard screenshots" will get you plenty
of ideas. Or use a freeware GUI tool like "TinkerTool" to change the file
format for screenshots.
If what you are wanting to do is more complex, such as record your
onscreen actions to play back as in a presentation kind of thing, then you
can likely find something more suitable listed at Pure-Mac
<http://www.pure-mac.com/screen.html> (freeware, shareware and commercial).
--
dee |
|
|
| Back to top |
|
|
|
|