Re: Parsing PDF Content
Re: Parsing PDF Content
- Subject: Re: Parsing PDF Content
- From: David Duncan <email@hidden>
- Date: Wed, 10 Jan 2007 11:06:00 -0800
On Jan 10, 2007, at 10:38 AM, John Goodman wrote:
Everything is fine, but now I want to fold the code into an
existing C++ application. I would like to have a pointer to a C++
object passed to the callback.
I see that Apple's callback has an "void *info" parameter. The
documentation describes the pointer as "A pointer to data passed to
the callback."
I could use the "void *info" parameter to pass a "this" pointer,
but I don't see any way for me to set up this value. Can I set the
pointer value myself? If so, how?
You set the "info" parameter when you create the scanner (via
CGPDFScannerCreate). Just pass "this" for the info parameter, then
type cast the void* back to your C++ class pointer and use it.
PS: This is not really the best list for questions about Core
Graphics APIs without a Cocoa context - you should use the Quartz Dev
list instead.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden