[cairo] [cairo osx] OS X example
Ipacs Péter
peter at ipacs.hu
Wed Jun 20 13:44:14 PDT 2007
Hi,
The solution works fine. Thanks:)
But ... something looks very strange. I have a feeling that the rendering
uses X11. Here is the list of files used runtime:
/Users/pedro/Desktop/freedesktop/CVS/cairo-demo/quartz
/Users/pedro/Desktop/freedesktop/CVS/cairo-demo/quartz/fdclock
/usr/X11R6/lib/libSM.6.0.dylib
/usr/X11R6/lib/libICE.6.3.dylib
/Library/Frameworks/Mono.framework/Versions/1.2.4/lib/libexpat.0.5.0.dylib
/Library/Frameworks/Mono.framework/Versions/1.2.4/lib/libfreetype.6.3.8.dylib
/opt/local/lib/libXrender.1.3.0.dylib
/opt/local/lib/libcairo.2.11.4.dylib
/opt/local/lib/libfontconfig.1.2.0.dylib
/Library/Frameworks/Mono.framework/Versions/1.2.4/lib/libpng12.0.0.0.dylib
/opt/local/lib/libz.1.2.3.dylib
/usr/X11R6/lib/libX11.6.2.dylib
/opt/local/lib/libfreetype.6.3.15.dylib
/opt/local/lib/libexpat.1.5.2.dylib
/opt/local/lib/iNode3486795
/opt/local/lib/iNode3486787
/opt/local/lib/libiconv.2.4.0.dylib
/System/Library/CoreServices/CharacterSets/CFUnicodeData-L.mapping
/System/Library/CoreServices/CharacterSets/CFCharacterSetBitmaps.bitmap
/Library/Caches/com.apple.LaunchServices-014501.csstore
/usr/lib/dyld
/usr/lib/libSystem.B.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
/usr/lib/libicucore.A.dylib
/usr/lib/libobjc.A.dylib
/usr/lib/libstdc++.6.0.4.dylib
/usr/lib/libgcc_s.1.dylib
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
/usr/lib/libauto.dylib
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
/usr/lib/libbsm.dylib
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
/System/Library/Frameworks/Security.framework/Versions/A/Security
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
/usr/lib/libxml2.2.dylib
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
/usr/lib/libcups.2.dylib
/usr/lib/libcrypto.0.9.7.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
/System/Library/CoreServices/Encodings/libLatin2Converter.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
/Library/Frameworks/ApplicationEnhancer.framework/Versions/A/ApplicationEnhancer
/dev/ttyp1
/dev/ttyp1
/dev/ttyp1
/tmp/com.apple.csseed.93
apple.shm.notification_center
Another funny thing: the clock goes anticlokcwise. Is it normal?
Thanks,
P
On 6/20/07, Ipacs Péter <peter at ipacs.hu> wrote:
>
> Hi Brain,
>
> On 6/20/07, Baz <brian.ewins at gmail.com > wrote:
> >
> > On 20/06/07, Ipacs Péter <peter at ipacs.hu> wrote:
> > > Hi there,
> > >
> > > I'm quite new to cairo so please excuse me if I ask obvious
> > questions:)
> >
> > No problem.
>
>
> Thx:)
>
> > I'm trying to build the quartz example from the CVS
> > > (http://webcvs.cairographics.org/cairo-demo/quartz/ ) but
> > > it fails.
> >
> > That is pretty old... its not been kept up-to-date.
>
>
> That's was my hunch as well.
>
> > This is what I get:
> > > cc -g -Wall -Wstrict-prototypes -Wmissing-prototypes
> > -Wmissing-declarations
> > > -Wredundant-decls `pkg-config --cflags cairo` -c -o main.o main.c
> > > main.c: In function 'TestWindowEventHandler':
> > > main.c:65: error: incompatible type for argument 1 of
> > > 'cairo_quartz_surface_create'
> >
> > Back in January or so the old quartz surface was replaced with a new
> > shiny one Vlad wrote. Its much faster but incompatible with the old
> > api (BTW quartz and atsui are still officially 'unsupported' at the
> > moment, which is why there's no docs for these apis on the website,
> > and why things became incompatible; this should change in the next
> > month or so. I hope).
> >
> > The new name for that function is:
> > cairo_quartz_surface_create_for_cg_context
>
>
> I'll try it as soon as I get back to my machine.
>
> > main.c: In function 'RedrawTimerCallback':
> > > main.c:188: warning: 'SetRect' is deprecated (declared at
> > >
> > /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:2401)
> >
> > > main.c: In function 'CreateTestWindow':
> > > main.c:205: warning: 'SetRect' is deprecated (declared at
> > >
> > /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:2401)
> >
> > > make: *** [main.o] Error 1
> > >
> > > What do you think about it?
> >
> > The warnings you can probably get past, so apart from creating the
> > surface the example should pretty much work.
> >
> > > Another question:
> > > Are there any OS X examples around that can be used out-of-the-box? I
> > mean
> > > examples that does not require hundreds of dependencies and can be
> > compiled
> > > by a simple 'make' or something.
> >
> > I don't think so, unless someone else has one handy? A gui for the
> > test suite, or a standalone svg viewer would be nice to have...
>
>
> I can give you a hand when I become a little bit more familiar with
> Cairo:)
>
> since
> > native os x apps just call quartz, the main use for cairo on os x is
> > to support cross-platform tools/toolkits, like mozilla, gtk, OOo, SWT,
> > python. So mostly users are porting apps rather than writing mini-apps
> > from scratch.
> >
> > We do have a neeed for a small demo app to figure out why all the
> > flipping is needed in the quartz code - I'm next at my mac tomorrow,
> > I'll try to put one together. If you still can't get that demo to
> > compile, let me know and I'll fix that too.
>
> > Cheers,
> > > Peter
> >
> > As Carl says to new users - have fun :)
>
>
> Will do for sure:)
>
> Cheers,
> > Baz
> >
>
> Cheers,
> P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cairographics.org/archives/cairo/attachments/20070620/fb494331/attachment-0001.htm
More information about the cairo
mailing list