Where are they? For example, I am trying to access the elements of
GrafPtr, but they are now Opaque in Carbon. I can't find any accessor
functions for opaque data types in Carbon.

Signature
Vincent
Chris Baum - 28 May 2004 07:14 GMT
> Where are they? For example, I am trying to access the elements of
> GrafPtr, but they are now Opaque in Carbon. I can't find any accessor
> functions for opaque data types in Carbon.
GrafPtr is now behind the iron curtain. In Carbon, you keep a
WindowRef and use accessor api's. Most of the fields from an old
GrafPort now have api's.
Look in Quickdraw.h for the struct GrafPort. The comment for each
field lists the Carbon accessor api you should use.
David Phillip Oster - 28 May 2004 07:26 GMT
> > Where are they? For example, I am trying to access the elements of
> > GrafPtr, but they are now Opaque in Carbon. I can't find any accessor
[quoted text clipped - 6 lines]
> Look in Quickdraw.h for the struct GrafPort. The comment for each
> field lists the Carbon accessor api you should use.
If you are writing a Carbon application, those accessors are defined in
CarbonLib. If you are writing a Classic application, those accessors are
defined in CarbonAccessors.o, which you add to your project.
Thorrsten Froehlich - 28 May 2004 08:26 GMT
> Where are they? For example, I am trying to access the elements of
> GrafPtr, but they are now Opaque in Carbon.
Didn't you look for them in the reference documentation? They are
called GetPortXXX and documented in
<http://developer.apple.com/documentation/Carbon/Reference/QuickDraw_Ref/qdref_ma
in/function_group_54.html>.
> I can't find any accessor
> functions for opaque data types in Carbon.
They are rather easy to find in the reference documentation as well.
Just start browsing the whole documentation at
<http://developer.apple.com/documentation/Carbon/Carbon.html> or the
reference documentation only at
<http://developer.apple.com/referencelibrary/API_Fundamentals/Carbon-api-date.html>.
Thorsten