I am not necessarily complaining but two functions are missing, or have yet to
be added to the plugin sdk:
Boolean REALObjectIsa(REALobject object, REALclassRef ref)
{
static long (*pIsa)(REALobject, REALclassRef) = nil;
if (!pIsa)
pIsa = (long (*)(REALobject, REALclassRef))
CallResolver("RuntimeObjectIsa");
if (pIsa) return (Boolean)pIsa(object, ref);
else return (Boolean)0;
}
Boolean REALIsClassOf(REALstring name, REALclassRef ref)
{
static long (*pIsa)(REALstring, REALclassRef) = nil;
if (!pIsa)
pIsa = (long (*)(REALstring, REALclassRef))
CallResolver("RuntimeClassOf");
if (pIsa) return (Boolean)pIsa(name, ref);
else return (Boolean)0;
}
Then there are a number of changes related to REALpicture API's. These changes
relate to target specificity,
The new SDK tells that REALBuildPictureFromPicHandle is valid for cocoa:
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON || TARGET_COCOA)
REALpicture REALBuildPictureFromPicHandle(PicHandle pic, Boolean bPassOwnership)
but the older SDK, forbids usage of a PicHandle (Handle)
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) && !TARGET_COCOA
REALpicture REALBuildPictureFromPicHandle(PicHandle pic, Boolean bPassOwnership)
I am in principle fine with such a change, but does the rb framework really
creates a REALpicture from a handle, which then can be converted to a
CGImageRef?
The answer to this might be yes given that
REALpicture REALBuildPictureFromGWorld(void *world, Boolean bPassOwnership)
is a valid SDK call for every target (Windows, Linux etc), but does it really
work for every target?
Another one:
new
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) || TARGET_COCOA
void REALDrawPicturePrimitive(REALpicture pic, const Rect *rBounds, int
bTransparent)
old
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) && !TARGET_COCOA
void REALDrawPicturePrimitive(REALpicture pic, const Rect *rBounds, int
bTransparent)
I presume this will work on cocoa.
Here are changes with respect to the graphics object:
new
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) || TARGET_COCOA
void REALSelectGraphics(REALgraphics context)
old
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) && !TARGET_COCOA
void REALSelectGraphics(REALgraphics context)
new
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) || TARGET_COCOA
void REALGraphicsDrawOffscreenMacControl(REALgraphics context, ControlHandle mh)
old
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) && !TARGET_COCOA
void REALSelectGraphics(REALgraphics context)
new
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) || TARGET_COCOA
void REALGraphicsDrawOffscreenMacControl(REALgraphics context, ControlHandle mh)
old
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) && !TARGET_COCOA
void REALGraphicsDrawOffscreenMacControl(REALgraphics context, ControlHandle mh)
ControlHandle?? should that be an NSView* or shouldn't this be changed to a
void* ?
And what about
new
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) || TARGET_COCOA
void REALSetSpecialBackground(REALcontrolInstance instance)
old
#if (TARGET_68K || TARGET_PPC || TARGET_CARBON) && !TARGET_COCOA
void REALSetSpecialBackground(REALcontrolInstance instance)
will this work for cocoa?
Oh, and possibly a serious one:
new
#if TARGET_COCOA
CGContextRef REALGraphicsDC(REALgraphics context)
{
static unsigned long (*pGraphicsCGContext)(REALgraphics) = nil;
if (!pGraphicsCGContext)
pGraphicsCGContext = (unsigned long (*)(REALgraphics))
CallResolver("REALGraphicsDC");
if (pGraphicsCGContext) return
(CGContextRef)pGraphicsCGContext(context);
else return (CGContextRef)0;
}
#endif
old
#if COCOA
CGContextRef REALGraphicsCGContext(REALgraphics context)
{
static unsigned long (*pGraphicsCGContext)(REALgraphics) = nil;
if (!pGraphicsCGContext)
pGraphicsCGContext = (unsigned long (*)(REALgraphics))
CallResolver("REALGraphicsCGContext");
if (pGraphicsCGContext) return
(CGContextRef)pGraphicsCGContext(context);
else return (CGContextRef)0;
}
#endif
Note the different EntryPoints! A "REALGraphicsDC" on a cocoa target.
Regards....
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>