[changeset] Missing ScreenSize & ScreenPixelsPerInch properties

Ben Abbott bpabbott at mac.com
Fri Jan 23 15:46:01 CST 2009


On Friday, January 23, 2009, at 04:29PM, "Thomas Treichl" <Thomas.Treichl at gmx.net> wrote:
>Ben Abbott schrieb:
>> On Thursday, January 22, 2009, at 03:07PM, "Thomas Treichl" <Thomas.Treichl at gmx.net> wrote:
>> 
>>> John, you were asking for CGDirectDisplay.h and CGDisplayConfiguration.h on all 
>>> systems? Generally yes, since MacOSX 10.3.9 and until at least 10.4.11 which is 
>>> my system (Ben can you please verify on your 10.5.x system). 
>> 
>> Yes they also exist for Leopard. I wrote the short script below to do the job.
>> 
>> #!/bin/sh -ev
>> export INC="/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Headers"
>> g++ try.cc -Wl,-framework,ApplicationServices -I$INC -o try
>
>Hi Ben,
>
>I had some problems with the example program that John wrote for us (also means 
>that I cannot compile the current Octave src/display.cc file). Can you please 
>verify my modified version that I attached to this email if this also works on 
>your 10.5 system (comments about what has been changed and what should be done 
>are included)... Does it compile and produce the same output?
>
>Another thing is that on Mac we might have Carbon && X11. If this is the case 
>then should we still use Carbon or should we use the traditional Unix way, cf. 
>src/display.cc line 31ff ?
>
>   Thomas
>

Nicely done.

$ g++ foo-osx.cc -framework Carbon -o foo-osx
$ ./foo-osx 
1280x1024 pixels
380x310 mm
83.9019 resx
85.5579 resx
84.7299 avg dpi
32 bit depth

I was thinking about the duality of the Mac as well. How are we to determine if X11 or Carbon is to be used?

Run time option?

Build time option?

I assume Carbon is the proper default?

Ben




More information about the Octave-maintainers mailing list