
SBIsControlStripVisible() and
SBShowHideControlStrip() defined in the header file
<ControlStrip.h>.
When I try to link the PowerPC code, I get a link error on these routines.
Which library are they implemented in?
The following is an example of how you can call the Control Strip routines from PowerPC code:
/* Defined in current Universal Header */
#ifndef _ControlStripDispatch
enum {
_ControlStripDispatch = 0xAAF2
};
#endif
#if GENERATINGCFM
/* */
/* If we're not generating CFM, then assume the */
/* 68K inlines in the headers apply instead. */
/* */
#include <MixedMode.h>
#include <OSUtils.h>
pascal Boolean SBIsControlStripVisible ( void );
pascal void SBShowHideControlStrip(Boolean showIt);
/* SBIsControlStripVisible is a Pascal routine, */
/* dispatched from the selector in D0, returning */
/* a Boolean result */
pascal Boolean SBIsControlStripVisible ( void )
{
enum
{
uppSBIsControlStripVisibleInfo = kD0DispatchedPascalStackBased
| RESULT_SIZE (SIZE_CODE (sizeof(Boolean)))
| DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE (kFourByteCode)
};
return CallUniversalProc (
GetToolTrapAddress (_ControlStripDispatch),
uppSBIsControlStripVisibleInfo, 0x00);
}
pascal void SBShowHideControlStrip(Boolean showIt)
{
enum
{
uppSBShowHideControlStripInfo =
kD0DispatchedPascalStackBased
| DISPATCHED_STACK_ROUTINE_SELECTOR_SIZE (kFourByteCode)
| DISPATCHED_STACK_ROUTINE_PARAMETER
(1, SIZE_CODE (sizeof (showIt)))
};
CallUniversalProc (
GetToolTrapAddress (_ControlStripDispatch),
uppSBShowHideControlStripInfo, 0x01, showIt);
}
#else /* not GENERATINGCFM */
#include <ControlStrip.h>
#endif /* GENERATINGCFM */
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help