> On Aug 17, 2017, at 1:18 PM, Robert Ball <[email protected]> wrote: > > Hi all, > > This page: > > > https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOSX10_11/Objective-C/ApplicationServices.html > > lists the two calls QDBeginCGContext and QDEndCGContext as having been > removed in OS X v10.11 API. > > I have a pure Carbon test program, and need a replacement for these > calls. We do all of our own drawing, we just use Carbon to handle the > keyboard, mouse, and window resizing events, and to be able to hand > Carbon our image data for refreshing the image. > > What is the suggested replacement? Is it straight-forward?
The suggested replacement would be to enable compositing mode on your window, and put your drawing code into a custom HIView. Your kEventControlDraw handler on the HIView will receive a CGContextRef parameter in the event, so you can just draw into that context, and not create a context from the QuickDraw port. If it’s not feasible to switch to compositing mode, you can always just use dlopen/dlsym to load function pointers to those two APIs dynamically from QD.framework, and call them through the function pointers. -eric _______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/carbon-dev/archive%40mail-archive.com This email sent to [email protected]
