|
Mac OS 9
|
Window Manager Interfaces. More...
#include <MacTypes.h>#include <Aliases.h>#include <AppleEvents.h>#include <Collections.h>#include <Drag.h>#include <Events.h>#include <Menus.h>#include <MixedMode.h>#include <QDOffscreen.h>#include <Quickdraw.h>#include <TextCommon.h>#include <Icons.h>#include <MacErrors.h>#include <CFString.h>Go to the source code of this file.
Data Structures | |
| struct | GetWindowRegionRec |
| struct | SetupWindowProxyDragImageRec |
| struct | MeasureWindowTitleRec |
| struct | GetGrowImageRegionRec |
| struct | WinCTab |
| struct | WindowRecord |
| struct | CWindowRecord |
| struct | AuxWinRec |
| struct | BasicWindowDescription |
| struct | WStateData |
| struct | WindowDefSpec |
Macros | |
| #define | kFirstWindowOfClass ((WindowRef)(-1)) |
| #define | kLastWindowOfClass ((WindowRef)0) |
| #define | NewWindowDefUPP(userRoutine) |
| #define | NewDeskHookUPP(userRoutine) |
| #define | NewWindowPaintUPP(userRoutine) |
| #define | DisposeWindowDefUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | DisposeDeskHookUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | DisposeWindowPaintUPP(userUPP) DisposeRoutineDescriptor(userUPP) |
| #define | InvokeWindowDefUPP(varCode, window, message, param, userUPP) |
| #define | InvokeDeskHookUPP(mouseClick, theEvent, userUPP) |
| #define | InvokeWindowPaintUPP(device, qdContext, window, inClientPaintRgn, outSystemPaintRgn, refCon, userUPP) |
| #define | NewWindowDefProc(userRoutine) NewWindowDefUPP(userRoutine) |
| #define | NewDeskHookProc(userRoutine) NewDeskHookUPP(userRoutine) |
| #define | NewWindowPaintProc(userRoutine) NewWindowPaintUPP(userRoutine) |
| #define | CallWindowDefProc(userRoutine, varCode, window, message, param) InvokeWindowDefUPP(varCode, window, message, param, userRoutine) |
| #define | CallDeskHookProc(userRoutine, mouseClick, theEvent) InvokeDeskHookUPP(mouseClick, theEvent, userRoutine) |
| #define | CallWindowPaintProc(userRoutine, device, qdContext, window, inClientPaintRgn, outSystemPaintRgn, refCon) |
| #define | kFirstWindowOfGroup ((WindowRef)(-1)) |
| #define | kLastWindowOfGroup ((WindowRef)NULL) |
| #define | kFirstWindowGroup ((WindowGroupRef)(-1)) |
| #define | kLastWindowGroup ((WindowGroupRef)NULL) |
| #define | IsValidWindowRef IsValidWindowPtr |
Typedefs | |
| typedef OSType | PropertyCreator |
| typedef OSType | PropertyTag |
| typedef UInt32 | WindowClass |
| typedef UInt32 | WindowAttributes |
| typedef UInt32 | WindowPositionMethod |
| typedef UInt16 | WindowRegionCode |
| typedef struct GetWindowRegionRec | GetWindowRegionRec |
| typedef GetWindowRegionRec * | GetWindowRegionPtr |
| typedef GetWindowRegionRec * | GetWindowRegionRecPtr |
| typedef struct SetupWindowProxyDragImageRec | SetupWindowProxyDragImageRec |
| typedef struct MeasureWindowTitleRec | MeasureWindowTitleRec |
| typedef MeasureWindowTitleRec * | MeasureWindowTitleRecPtr |
| typedef struct GetGrowImageRegionRec | GetGrowImageRegionRec |
| typedef SInt16 | WindowPartCode |
| typedef SInt16 | WindowDefPartCode |
| typedef struct WinCTab | WinCTab |
| typedef WinCTab * | WCTabPtr |
| typedef WCTabPtr * | WCTabHandle |
| typedef struct WindowRecord | WindowRecord |
| typedef WindowRecord * | WindowPeek |
| typedef struct CWindowRecord | CWindowRecord |
| typedef CWindowRecord * | CWindowPeek |
| typedef struct AuxWinRec | AuxWinRec |
| typedef AuxWinRec * | AuxWinPtr |
| typedef AuxWinPtr * | AuxWinHandle |
| typedef struct BasicWindowDescription | BasicWindowDescription |
| typedef struct WStateData | WStateData |
| typedef WStateData * | WStateDataPtr |
| typedef WStateDataPtr * | WStateDataHandle |
| typedef WindowRef | window |
| typedef WindowRef short | message |
| typedef WindowRef short long | param |
| typedef GrafPtr | qdContext |
| typedef GrafPtr WindowRef RgnHandle | inClientPaintRgn |
| typedef GrafPtr WindowRef RgnHandle RgnHandle | outSystemPaintRgn |
| typedef GrafPtr WindowRef RgnHandle RgnHandle void * | refCon |
| typedef UInt32 | WindowDefType |
| typedef struct WindowDefSpec | WindowDefSpec |
| typedef WindowDefSpec * | WindowDefSpecPtr |
| typedef UInt32 | WindowModality |
| typedef struct OpaqueWindowGroupRef * | WindowGroupRef |
| typedef UInt32 | WindowGroupAttributes |
| typedef UInt32 | WindowActivationScope |
| typedef UInt32 | WindowGroupContentOptions |
| typedef OptionBits | WindowPaintProcOptions |
| typedef UInt32 | ScrollWindowOptions |
| typedef UInt32 | WindowTransitionEffect |
| typedef UInt32 | WindowTransitionAction |
| typedef UInt32 | WindowConstrainOptions |
| typedef UInt32 | WindowLatentVisibility |
Enumerations | |
| enum | { kAlertWindowClass = 1L , kMovableAlertWindowClass , kModalWindowClass = 3L , kMovableModalWindowClass = 4L , kFloatingWindowClass = 5L , kDocumentWindowClass = 6L , kUtilityWindowClass = 8L , kHelpWindowClass = 10L , kSheetWindowClass = 11L , kToolbarWindowClass = 12L , kPlainWindowClass = 13L , kOverlayWindowClass = 14L , kSheetAlertWindowClass = 15L , kAltPlainWindowClass , kAllWindowClasses } |
| enum | { kWindowNoAttributes = 0L , kWindowCloseBoxAttribute = (1L << 0) , kWindowHorizontalZoomAttribute = (1L << 1) , kWindowVerticalZoomAttribute = (1L << 2) , kWindowFullZoomAttribute , kWindowCollapseBoxAttribute = (1L << 3) , kWindowResizableAttribute = (1L << 4) , kWindowSideTitlebarAttribute = (1L << 5) , kWindowToolbarButtonAttribute = (1L << 6) , kWindowNoUpdatesAttribute = (1L << 16) , kWindowNoActivatesAttribute = (1L << 17) , kWindowOpaqueForEventsAttribute = (1L << 18) , kWindowNoShadowAttribute = (1L << 21) , kWindowHideOnSuspendAttribute = (1L << 24) , kWindowStandardHandlerAttribute = (1L << 25) , kWindowHideOnFullScreenAttribute = (1L << 26) , kWindowInWindowMenuAttribute = (1L << 27) , kWindowLiveResizeAttribute = (1L << 28) , kWindowNoConstrainAttribute = (unsigned long)((1L << 31)) , kWindowStandardDocumentAttributes , kWindowStandardFloatingAttributes } |
| enum | { kWindowDefProcType = FOUR_CHAR_CODE('WDEF') } |
| enum | { kStandardWindowDefinition = 0 , kRoundWindowDefinition = 1 , kFloatingWindowDefinition = 124 } |
| enum | { kDocumentWindowVariantCode = 0 , kModalDialogVariantCode = 1 , kPlainDialogVariantCode = 2 , kShadowDialogVariantCode = 3 , kMovableModalDialogVariantCode = 5 , kAlertVariantCode = 7 , kMovableAlertVariantCode = 9 , kSideFloaterVariantCode = 8 } |
| enum | { documentProc = 0 , dBoxProc = 1 , plainDBox = 2 , altDBoxProc = 3 , noGrowDocProc = 4 , movableDBoxProc = 5 , zoomDocProc = 8 , zoomNoGrow = 12 , floatProc = 1985 , floatGrowProc = 1987 , floatZoomProc = 1989 , floatZoomGrowProc = 1991 , floatSideProc = 1993 , floatSideGrowProc = 1995 , floatSideZoomProc = 1997 , floatSideZoomGrowProc = 1999 } |
| enum | { rDocProc = 16 } |
| enum | { kWindowDocumentDefProcResID = 64 , kWindowDialogDefProcResID = 65 , kWindowUtilityDefProcResID = 66 , kWindowUtilitySideTitleDefProcResID = 67 , kWindowSheetDefProcResID = 68 , kWindowSimpleDefProcResID = 69 , kWindowSheetAlertDefProcResID = 70 } |
| enum | { kWindowDocumentProc = 1024 , kWindowGrowDocumentProc = 1025 , kWindowVertZoomDocumentProc = 1026 , kWindowVertZoomGrowDocumentProc = 1027 , kWindowHorizZoomDocumentProc = 1028 , kWindowHorizZoomGrowDocumentProc = 1029 , kWindowFullZoomDocumentProc = 1030 , kWindowFullZoomGrowDocumentProc = 1031 } |
| enum | { kWindowPlainDialogProc = 1040 , kWindowShadowDialogProc = 1041 , kWindowModalDialogProc = 1042 , kWindowMovableModalDialogProc = 1043 , kWindowAlertProc = 1044 , kWindowMovableAlertProc = 1045 } |
| enum | { kWindowMovableModalGrowProc = 1046 } |
| enum | { kWindowFloatProc = 1057 , kWindowFloatGrowProc = 1059 , kWindowFloatVertZoomProc = 1061 , kWindowFloatVertZoomGrowProc = 1063 , kWindowFloatHorizZoomProc = 1065 , kWindowFloatHorizZoomGrowProc = 1067 , kWindowFloatFullZoomProc = 1069 , kWindowFloatFullZoomGrowProc = 1071 } |
| enum | { kWindowFloatSideProc = 1073 , kWindowFloatSideGrowProc = 1075 , kWindowFloatSideVertZoomProc = 1077 , kWindowFloatSideVertZoomGrowProc = 1079 , kWindowFloatSideHorizZoomProc = 1081 , kWindowFloatSideHorizZoomGrowProc = 1083 , kWindowFloatSideFullZoomProc = 1085 , kWindowFloatSideFullZoomGrowProc = 1087 } |
| enum | { kWindowSheetProc = 1088 , kWindowSheetAlertProc } |
| enum | { kWindowSimpleProc = 1104 , kWindowSimpleFrameProc = 1105 } |
| enum | { kWindowNoPosition = 0x0000 , kWindowDefaultPosition = 0x0000 , kWindowCenterMainScreen = 0x280A , kWindowAlertPositionMainScreen = 0x300A , kWindowStaggerMainScreen = 0x380A , kWindowCenterParentWindow = 0xA80A , kWindowAlertPositionParentWindow = 0xB00A , kWindowStaggerParentWindow = 0xB80A , kWindowCenterParentWindowScreen = 0x680A , kWindowAlertPositionParentWindowScreen = 0x700A , kWindowStaggerParentWindowScreen = 0x780A } |
| enum | { kWindowCenterOnMainScreen = 0x00000001 , kWindowCenterOnParentWindow = 0x00000002 , kWindowCenterOnParentWindowScreen = 0x00000003 , kWindowCascadeOnMainScreen = 0x00000004 , kWindowCascadeOnParentWindow = 0x00000005 , kWindowCascadeOnParentWindowScreen = 0x00000006 , kWindowAlertPositionOnMainScreen = 0x00000007 , kWindowAlertPositionOnParentWindow = 0x00000008 , kWindowAlertPositionOnParentWindowScreen = 0x00000009 } |
| enum | { kWindowTitleBarRgn = 0 , kWindowTitleTextRgn = 1 , kWindowCloseBoxRgn = 2 , kWindowZoomBoxRgn = 3 , kWindowDragRgn = 5 , kWindowGrowRgn = 6 , kWindowCollapseBoxRgn = 7 , kWindowTitleProxyIconRgn = 8 , kWindowStructureRgn = 32 , kWindowContentRgn , kWindowUpdateRgn = 34 , kWindowOpaqueRgn = 35 , kWindowGlobalPortRgn } |
| enum | { dialogKind = 2 , userKind = 8 , kDialogWindowKind = 2 , kApplicationWindowKind = 8 } |
| enum | { inDesk = 0 , inNoWindow = 0 , inMenuBar = 1 , inSysWindow = 2 , inContent = 3 , inDrag = 4 , inGrow = 5 , inGoAway = 6 , inZoomIn = 7 , inZoomOut = 8 , inCollapseBox = 11 , inProxyIcon = 12 , inToolbarButton = 13 , inStructure = 15 } |
| enum | { wNoHit = 0 , wInContent = 1 , wInDrag = 2 , wInGrow = 3 , wInGoAway = 4 , wInZoomIn = 5 , wInZoomOut = 6 , wInCollapseBox = 9 , wInProxyIcon = 10 , wInToolbarButton = 11 , wInStructure = 13 } |
| enum | { kWindowMsgDraw = 0 , kWindowMsgHitTest = 1 , kWindowMsgCalculateShape = 2 , kWindowMsgInitialize = 3 , kWindowMsgCleanUp = 4 , kWindowMsgDrawGrowOutline = 5 , kWindowMsgDrawGrowBox = 6 } |
| enum | { kWindowMsgGetFeatures = 7 , kWindowMsgGetRegion = 8 } |
| enum | { kWindowMsgDragHilite = 9 , kWindowMsgModified , kWindowMsgDrawInCurrentPort , kWindowMsgSetupProxyDragImage , kWindowMsgStateChanged , kWindowMsgMeasureTitle = 14 } |
| enum | { kWindowMsgGetGrowImageRegion } |
| enum | { wDraw = 0 , wHit = 1 , wCalcRgns = 2 , wNew = 3 , wDispose = 4 , wGrow = 5 , wDrawGIcon = 6 } |
| enum | { kWindowStateTitleChanged = (1 << 0) } |
| enum | { kWindowCanGrow = (1 << 0) , kWindowCanZoom = (1 << 1) , kWindowCanCollapse = (1 << 2) , kWindowIsModal = (1 << 3) , kWindowCanGetWindowRegion = (1 << 4) , kWindowIsAlert = (1 << 5) , kWindowHasTitleBar = (1 << 6) } |
| enum | { kWindowSupportsDragHilite , kWindowSupportsModifiedBit , kWindowCanDrawInCurrentPort , kWindowCanSetupProxyDragImage , kWindowCanMeasureTitle , kWindowWantsDisposeAtProcessDeath , kWindowSupportsGetGrowImageRegion , kWindowDefSupportsColorGrafPort = 0x40000002 } |
| enum | { kWindowIsOpaque } |
| enum | { kWindowSupportsSetGrowImageRegion = (1 << 13) } |
| enum | { deskPatID = 16 } |
| enum | { wContentColor = 0 , wFrameColor = 1 , wTextColor = 2 , wHiliteColor = 3 , wTitleBarColor = 4 } |
| enum | { kMouseUpOutOfSlop = (long)0x80008000 } |
| enum | { kWindowDefinitionVersionOne = 1 , kWindowDefinitionVersionTwo = 2 } |
| enum | { kWindowIsCollapsedState = (1 << 0L) } |
| enum | { kStoredWindowSystemTag , kStoredBasicWindowDescriptionID , kStoredWindowPascalTitleID = FOUR_CHAR_CODE('s255') } |
| enum | { uppWindowDefProcInfo = 0x00003BB0 } |
| enum | { uppDeskHookProcInfo = 0x00130802 } |
| enum | { uppWindowPaintProcInfo = 0x0003FFF0 } |
| enum | { kWindowDefProcPtr = 0 , kWindowDefObjectClass = 1 , kWindowDefProcID } |
| enum | { kWindowModalityNone = 0 , kWindowModalitySystemModal = 1 , kWindowModalityAppModal = 2 , kWindowModalityWindowModal = 3 } |
| enum | { kWindowGroupAttrSelectAsLayer = 1 << 0 , kWindowGroupAttrMoveTogether = 1 << 1 , kWindowGroupAttrLayerTogether = 1 << 2 , kWindowGroupAttrSharedActivation = 1 << 3 , kWindowGroupAttrHideOnCollapse = 1 << 4 } |
| enum | { kWindowActivationScopeNone = 0 , kWindowActivationScopeIndependent = 1 , kWindowActivationScopeAll = 2 } |
| enum | { kNextWindowGroup = true , kPreviousWindowGroup = false } |
| enum | { kWindowGroupContentsReturnWindows = 1 << 0 , kWindowGroupContentsRecurse = 1 << 1 , kWindowGroupContentsVisible = 1 << 2 } |
| enum | { kWindowPaintProcOptionsNone = 0 } |
| enum | { kScrollWindowNoOptions = 0 , kScrollWindowInvalidate , kScrollWindowEraseToPortBackground } |
| enum | { kWindowZoomTransitionEffect = 1 , kWindowSheetTransitionEffect = 2 , kWindowSlideTransitionEffect = 3 } |
| enum | { kWindowShowTransitionAction = 1 , kWindowHideTransitionAction = 2 , kWindowMoveTransitionAction = 3 , kWindowResizeTransitionAction = 4 } |
| enum | { kWindowConstrainMayResize = (1L << 0) , kWindowConstrainMoveRegardlessOfFit = (1L << 1) , kWindowConstrainAllowPartial = (1L << 2) , kWindowConstrainCalcOnly = (1L << 3) , kWindowConstrainUseTransitionWindow = (1L << 4) , kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit } |
| enum | { kWindowLatentVisibleFloater = 1 << 0 , kWindowLatentVisibleSuspend = 1 << 1 , kWindowLatentVisibleFullScreen = 1 << 2 , kWindowLatentVisibleAppHidden = 1 << 3 , kWindowLatentVisibleCollapsedOwner = 1 << 4 , kWindowLatentVisibleCollapsedGroup = 1 << 5 } |
| enum | { kWindowPropertyPersistent = 0x00000001 } |
| enum | { kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer , kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether , kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether } |
| enum | { kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer , kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether , kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether } |
Functions | |
| typedef | CALLBACK_API (long, WindowDefProcPtr)(short varCode |
| typedef | CALLBACK_API_REGISTER68K (void, DeskHookProcPtr,(Boolean mouseClick, EventRecord *theEvent)) |
| typedef | CALLBACK_API (OSStatus, WindowPaintProcPtr)(GDHandle device |
| typedef | STACK_UPP_TYPE (WindowDefProcPtr) WindowDefUPP |
| typedef | REGISTER_UPP_TYPE (DeskHookProcPtr) DeskHookUPP |
| typedef | STACK_UPP_TYPE (WindowPaintProcPtr) WindowPaintUPP |
| WindowDefUPP | NewWindowDefUPP (WindowDefProcPtr userRoutine) |
| DeskHookUPP | NewDeskHookUPP (DeskHookProcPtr userRoutine) |
| WindowPaintUPP | NewWindowPaintUPP (WindowPaintProcPtr userRoutine) |
| void | DisposeWindowDefUPP (WindowDefUPP userUPP) |
| void | DisposeDeskHookUPP (DeskHookUPP userUPP) |
| void | DisposeWindowPaintUPP (WindowPaintUPP userUPP) |
| long | InvokeWindowDefUPP (short varCode, WindowRef window, short message, long param, WindowDefUPP userUPP) |
| void | InvokeDeskHookUPP (Boolean mouseClick, EventRecord *theEvent, DeskHookUPP userUPP) |
| OSStatus | InvokeWindowPaintUPP (GDHandle device, GrafPtr qdContext, WindowRef window, RgnHandle inClientPaintRgn, RgnHandle outSystemPaintRgn, void *refCon, WindowPaintUPP userUPP) |
| WindowRef | GetNewCWindow (short windowID, void *wStorage, WindowRef behind) |
| WindowRef | NewWindow (void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowRef behind, Boolean goAwayFlag, long refCon) |
| WindowRef | GetNewWindow (short windowID, void *wStorage, WindowRef behind) |
| WindowRef | NewCWindow (void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short procID, WindowRef behind, Boolean goAwayFlag, long refCon) |
| void | DisposeWindow (WindowRef window) |
| void | MacCloseWindow (WindowRef window) |
| OSStatus | CreateNewWindow (WindowClass windowClass, WindowAttributes attributes, const Rect *contentBounds, WindowRef *outWindow) |
| OSStatus | CreateWindowFromResource (SInt16 resID, WindowRef *outWindow) |
| OSStatus | StoreWindowIntoCollection (WindowRef window, Collection collection) |
| OSStatus | CreateWindowFromCollection (Collection collection, WindowRef *outWindow) |
| OSStatus | GetWindowOwnerCount (WindowRef window, UInt32 *outCount) |
| OSStatus | CloneWindow (WindowRef window) |
| ItemCount | GetWindowRetainCount (WindowRef inWindow) |
| OSStatus | RetainWindow (WindowRef inWindow) |
| OSStatus | ReleaseWindow (WindowRef inWindow) |
| OSStatus | CreateCustomWindow (const WindowDefSpec *def, WindowClass windowClass, WindowAttributes attributes, const Rect *contentBounds, WindowRef *outWindow) |
| OSStatus | ReshapeCustomWindow (WindowRef window) |
| OSStatus | RegisterWindowDefinition (SInt16 inResID, const WindowDefSpec *inDefSpec) |
| OSStatus | GetWindowWidgetHilite (WindowRef inWindow, WindowDefPartCode *outHilite) |
| Boolean | IsValidWindowClass (WindowClass inClass) |
| WindowAttributes | GetAvailableWindowAttributes (WindowClass inClass) |
| OSStatus | GetWindowClass (WindowRef window, WindowClass *outClass) |
| OSStatus | GetWindowAttributes (WindowRef window, WindowAttributes *outAttributes) |
| OSStatus | ChangeWindowAttributes (WindowRef window, WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) |
| OSStatus | SetWindowClass (WindowRef inWindow, WindowClass inWindowClass) |
| OSStatus | SetWindowModality (WindowRef inWindow, WindowModality inModalKind, WindowRef inUnavailableWindow) |
| OSStatus | GetWindowModality (WindowRef inWindow, WindowModality *outModalKind, WindowRef *outUnavailableWindow) |
| OSStatus | ShowFloatingWindows (void) |
| OSStatus | HideFloatingWindows (void) |
| Boolean | AreFloatingWindowsVisible (void) |
| OSStatus | CreateWindowGroup (WindowGroupAttributes inAttributes, WindowGroupRef *outGroup) |
| OSStatus | RetainWindowGroup (WindowGroupRef inGroup) |
| OSStatus | ReleaseWindowGroup (WindowGroupRef inGroup) |
| ItemCount | GetWindowGroupRetainCount (WindowGroupRef inGroup) |
| WindowGroupRef | GetWindowGroupOfClass (WindowClass windowClass) |
| OSStatus | SetWindowGroupName (WindowGroupRef inGroup, CFStringRef inName) |
| OSStatus | CopyWindowGroupName (WindowGroupRef inGroup, CFStringRef *outName) |
| OSStatus | GetWindowGroupAttributes (WindowGroupRef inGroup, WindowGroupAttributes *outAttributes) |
| OSStatus | ChangeWindowGroupAttributes (WindowGroupRef inGroup, WindowGroupAttributes setTheseAttributes, WindowGroupAttributes clearTheseAttributes) |
| OSStatus | SetWindowGroupLevel (WindowGroupRef inGroup, SInt32 inLevel) |
| OSStatus | GetWindowGroupLevel (WindowGroupRef inGroup, SInt32 *outLevel) |
| OSStatus | SendWindowGroupBehind (WindowGroupRef inGroup, WindowGroupRef behindGroup) |
| WindowGroupRef | GetWindowGroup (WindowRef inWindow) |
| OSStatus | SetWindowGroup (WindowRef inWindow, WindowGroupRef inNewGroup) |
| Boolean | IsWindowContainedInGroup (WindowRef inWindow, WindowGroupRef inGroup) |
| WindowGroupRef | GetWindowGroupParent (WindowGroupRef inGroup) |
| OSStatus | SetWindowGroupParent (WindowGroupRef inGroup, WindowGroupRef inNewGroup) |
| WindowGroupRef | GetWindowGroupSibling (WindowGroupRef inGroup, Boolean inNextGroup) |
| WindowRef | GetWindowGroupOwner (WindowGroupRef inGroup) |
| OSStatus | SetWindowGroupOwner (WindowGroupRef inGroup, WindowRef inWindow) |
| ItemCount | CountWindowGroupContents (WindowGroupRef inGroup, WindowGroupContentOptions inOptions) |
| OSStatus | GetWindowGroupContents (WindowGroupRef inGroup, WindowGroupContentOptions inOptions, ItemCount inAllowedItems, ItemCount *outNumItems, void **outItems) |
| OSStatus | GetIndexedWindow (WindowGroupRef inGroup, UInt32 inIndex, WindowGroupContentOptions inOptions, WindowRef *outWindow) |
| OSStatus | GetWindowIndex (WindowRef inWindow, WindowGroupRef inStartGroup, WindowGroupContentOptions inOptions, UInt32 *outIndex) |
| WindowRef | ActiveNonFloatingWindow (void) |
| Boolean | IsWindowActive (WindowRef inWindow) |
| OSStatus | ActivateWindow (WindowRef inWindow, Boolean inActivate) |
| OSStatus | GetWindowActivationScope (WindowRef inWindow, WindowActivationScope *outScope) |
| OSStatus | SetWindowActivationScope (WindowRef inWindow, WindowActivationScope inScope) |
| void | DebugPrintWindowGroup (WindowGroupRef inGroup) |
| void | DebugPrintAllWindowGroups (void) |
| void | SetWinColor (WindowRef window, WCTabHandle newColorTable) |
| void | SetDeskCPat (PixPatHandle deskPixPat) |
| OSStatus | SetWindowContentColor (WindowRef window, const RGBColor *color) |
| OSStatus | GetWindowContentColor (WindowRef window, RGBColor *color) |
| OSStatus | GetWindowContentPattern (WindowRef window, PixPatHandle outPixPat) |
| OSStatus | SetWindowContentPattern (WindowRef window, PixPatHandle pixPat) |
| OSStatus | InstallWindowContentPaintProc (WindowRef window, WindowPaintUPP paintProc, WindowPaintProcOptions options, void *refCon) |
| OSStatus | ScrollWindowRect (WindowRef inWindow, const Rect *inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) |
| OSStatus | ScrollWindowRegion (WindowRef inWindow, RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) |
| void | ClipAbove (WindowRef window) |
| void | SaveOld (WindowRef window) |
| void | DrawNew (WindowRef window, Boolean update) |
| void | PaintOne (WindowRef window, RgnHandle clobberedRgn) |
| void | PaintBehind (WindowRef startWindow, RgnHandle clobberedRgn) |
| void | CalcVis (WindowRef window) |
| void | CalcVisBehind (WindowRef startWindow, RgnHandle clobberedRgn) |
| Boolean | CheckUpdate (EventRecord *theEvent) |
| WindowPartCode | MacFindWindow (Point thePoint, WindowRef *window) |
| WindowRef | FrontWindow (void) |
| Return a pointer to the frontmost window. More... | |
| void | BringToFront (WindowRef window) |
| void | SendBehind (WindowRef window, WindowRef behindWindow) |
| void | SelectWindow (WindowRef window) |
| WindowRef | FrontNonFloatingWindow (void) |
| WindowRef | GetNextWindowOfClass (WindowRef inWindow, WindowClass inWindowClass, Boolean mustBeVisible) |
| WindowRef | GetFrontWindowOfClass (WindowClass inWindowClass, Boolean mustBeVisible) |
| OSStatus | FindWindowOfClass (const Point *where, WindowClass inWindowClass, WindowRef *outWindow, WindowPartCode *outWindowPart) |
| OSStatus | CreateStandardWindowMenu (OptionBits inOptions, MenuRef *outMenu) |
| OSStatus | SetWindowAlternateTitle (WindowRef inWindow, CFStringRef inTitle) |
| OSStatus | CopyWindowAlternateTitle (WindowRef inWindow, CFStringRef *outTitle) |
| void | InitWindows (void) |
| void | GetWMgrPort (GrafPtr *wPort) |
| Obtain a pointer to the Window Manager port. More... | |
| void | GetCWMgrPort (CGrafPtr *wMgrCPort) |
| Obtain a pointer to the Window Manager port. More... | |
| Boolean | IsValidWindowPtr (WindowRef possibleWindow) |
| OSStatus | InitFloatingWindows (void) |
| void | HiliteWindow (WindowRef window, Boolean fHilite) |
| void | SetWRefCon (WindowRef window, long data) |
| Set the reference value (refCon) for a window. More... | |
| long | GetWRefCon (WindowRef window) |
| Return a window's reference value. More... | |
| void | SetWindowPic (WindowRef window, PicHandle pic) |
| Set a PicHandle for alternative updating. More... | |
| PicHandle | GetWindowPic (WindowRef window) |
| Obtain Handle of window picture, if any. More... | |
| short | GetWVariant (WindowRef window) |
| Get the variant code for a window. More... | |
| OSStatus | GetWindowFeatures (WindowRef window, UInt32 *outFeatures) |
| OSStatus | GetWindowRegion (WindowRef window, WindowRegionCode inRegionCode, RgnHandle ioWinRgn) |
| OSStatus | GetWindowStructureWidths (WindowRef inWindow, Rect *outRect) |
| void | InvalRect (const Rect *badRect) |
| void | InvalRgn (RgnHandle badRgn) |
| void | ValidRect (const Rect *goodRect) |
| void | ValidRgn (RgnHandle goodRgn) |
| void | BeginUpdate (WindowRef window) |
| void | EndUpdate (WindowRef window) |
| OSStatus | InvalWindowRgn (WindowRef window, RgnHandle region) |
| OSStatus | InvalWindowRect (WindowRef window, const Rect *bounds) |
| OSStatus | ValidWindowRgn (WindowRef window, RgnHandle region) |
| OSStatus | ValidWindowRect (WindowRef window, const Rect *bounds) |
| void | DrawGrowIcon (WindowRef window) |
| void | SetWTitle (WindowRef window, ConstStr255Param title) |
| OSStatus | SetWindowTitleWithCFString (WindowRef inWindow, CFStringRef inString) |
| Obtain the text of a window's title. More... | |
| OSStatus | CopyWindowTitleAsCFString (WindowRef inWindow, CFStringRef *outString) |
| OSStatus | SetWindowProxyFSSpec (WindowRef window, const FSSpec *inFile) |
| OSStatus | GetWindowProxyFSSpec (WindowRef window, FSSpec *outFile) |
| OSStatus | SetWindowProxyAlias (WindowRef window, AliasHandle alias) |
| OSStatus | GetWindowProxyAlias (WindowRef window, AliasHandle *alias) |
| OSStatus | SetWindowProxyCreatorAndType (WindowRef window, OSType fileCreator, OSType fileType, SInt16 vRefNum) |
| OSStatus | GetWindowProxyIcon (WindowRef window, IconRef *outIcon) |
| OSStatus | SetWindowProxyIcon (WindowRef window, IconRef icon) |
| OSStatus | RemoveWindowProxy (WindowRef window) |
| OSStatus | BeginWindowProxyDrag (WindowRef window, DragReference *outNewDrag, RgnHandle outDragOutlineRgn) |
| OSStatus | EndWindowProxyDrag (WindowRef window, DragReference theDrag) |
| OSStatus | TrackWindowProxyFromExistingDrag (WindowRef window, Point startPt, DragReference drag, RgnHandle inDragOutlineRgn) |
| OSStatus | TrackWindowProxyDrag (WindowRef window, Point startPt) |
| Boolean | IsWindowModified (WindowRef window) |
| OSStatus | SetWindowModified (WindowRef window, Boolean modified) |
| Boolean | IsWindowPathSelectClick (WindowRef window, const EventRecord *event) |
| OSStatus | WindowPathSelect (WindowRef window, MenuRef menu, SInt32 *outMenuResult) |
| Boolean | IsWindowPathSelectEvent (WindowRef window, EventRef inEvent) |
| OSStatus | HiliteWindowFrameForDrag (WindowRef window, Boolean hilited) |
| OSStatus | TransitionWindow (WindowRef inWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, const Rect *inRect) |
| OSStatus | TransitionWindowAndParent (WindowRef inWindow, WindowRef inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, const Rect *inRect) |
| void | MacMoveWindow (WindowRef window, short hGlobal, short vGlobal, Boolean front) |
| void | SizeWindow (WindowRef window, short w, short h, Boolean fUpdate) |
| long | GrowWindow (WindowRef window, Point startPt, const Rect *bBox) |
| void | DragWindow (WindowRef window, Point startPt, const Rect *boundsRect) |
| void | ZoomWindow (WindowRef window, WindowPartCode partCode, Boolean front) |
| Boolean | IsWindowCollapsable (WindowRef window) |
| Boolean | IsWindowCollapsed (WindowRef window) |
| OSStatus | CollapseWindow (WindowRef window, Boolean collapse) |
| OSStatus | CollapseAllWindows (Boolean collapse) |
| OSStatus | CreateQDContextForCollapsedWindowDockTile (WindowRef inWindow, CGrafPtr *outContext) |
| OSStatus | ReleaseQDContextForCollapsedWindowDockTile (WindowRef inWindow, CGrafPtr inContext) |
| OSStatus | UpdateCollapsedWindowDockTile (WindowRef inWindow) |
| OSStatus | GetWindowBounds (WindowRef window, WindowRegionCode regionCode, Rect *globalBounds) |
| Boolean | ResizeWindow (WindowRef window, Point startPoint, const Rect *sizeConstraints, Rect *newContentRect) |
| OSStatus | SetWindowBounds (WindowRef window, WindowRegionCode regionCode, const Rect *globalBounds) |
| OSStatus | RepositionWindow (WindowRef window, WindowRef parentWindow, WindowPositionMethod method) |
| OSStatus | MoveWindowStructure (WindowRef window, short hGlobal, short vGlobal) |
| Boolean | IsWindowInStandardState (WindowRef window, Point *idealSize, Rect *idealStandardState) |
| OSStatus | ZoomWindowIdeal (WindowRef window, WindowPartCode partCode, Point *ioIdealSize) |
| OSStatus | GetWindowIdealUserState (WindowRef window, Rect *userState) |
| OSStatus | SetWindowIdealUserState (WindowRef window, const Rect *userState) |
| OSStatus | GetWindowGreatestAreaDevice (WindowRef inWindow, WindowRegionCode inRegion, GDHandle *outGreatestDevice, Rect *outGreatestDeviceRect) |
| OSStatus | ConstrainWindowToScreen (WindowRef inWindowRef, WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, const Rect *inScreenRect, Rect *outStructure) |
| OSStatus | GetAvailableWindowPositioningBounds (GDHandle inDevice, Rect *availableRect) |
| void | HideWindow (WindowRef window) |
| void | MacShowWindow (WindowRef window) |
| void | ShowHide (WindowRef window, Boolean showFlag) |
| Boolean | MacIsWindowVisible (WindowRef window) |
| DEFINE_API (Boolean) MacIsWindowVisible(WindowRef window) | |
| Boolean | IsWindowLatentVisible (WindowRef inWindow, WindowLatentVisibility *outLatentVisible) |
| OSStatus | ShowSheetWindow (WindowRef inSheet, WindowRef inParentWindow) |
| OSStatus | HideSheetWindow (WindowRef inSheet) |
| OSStatus | GetSheetWindowParent (WindowRef inSheet, WindowRef *outParentWindow) |
| OSStatus | DisableScreenUpdates (void) |
| OSStatus | EnableScreenUpdates (void) |
| OSStatus | GetWindowProperty (WindowRef window, PropertyCreator propertyCreator, PropertyTag propertyTag, UInt32 bufferSize, UInt32 *actualSize, void *propertyBuffer) |
| OSStatus | GetWindowPropertySize (WindowRef window, PropertyCreator creator, PropertyTag tag, UInt32 *size) |
| OSStatus | SetWindowProperty (WindowRef window, PropertyCreator propertyCreator, PropertyTag propertyTag, UInt32 propertySize, void *propertyBuffer) |
| OSStatus | RemoveWindowProperty (WindowRef window, PropertyCreator propertyCreator, PropertyTag propertyTag) |
| OSStatus | GetWindowPropertyAttributes (WindowRef window, OSType propertyCreator, OSType propertyTag, UInt32 *attributes) |
| OSStatus | ChangeWindowPropertyAttributes (WindowRef window, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) |
| long | PinRect (const Rect *theRect, Point thePt) |
| Find point on a rectangle's border near point. More... | |
| RgnHandle | GetGrayRgn (void) |
| Boolean | TrackBox (WindowRef window, Point thePt, WindowPartCode partCode) |
| Boolean | TrackGoAway (WindowRef window, Point thePt) |
| long | DragGrayRgn (RgnHandle theRgn, Point startPt, const Rect *limitRect, const Rect *slopRect, short axis, DragGrayRgnUPP actionProc) |
| long | DragTheRgn (RgnHandle theRgn, Point startPt, const Rect *limitRect, const Rect *slopRect, short axis, DragGrayRgnUPP actionProc) |
| Boolean | GetAuxWin (WindowRef window, AuxWinHandle *awHndl) |
| Supply an auxiliary window record if one exists. More... | |
| void | setwtitle (WindowRef window, const char *title) |
| Boolean | trackgoaway (WindowRef window, Point *thePt) |
| short | findwindow (Point *thePoint, WindowRef *window) |
| void | getwtitle (WindowRef window, char *title) |
| long | growwindow (WindowRef window, Point *startPt, const Rect *bBox) |
| WindowRef | newwindow (void *wStorage, const Rect *boundsRect, const char *title, Boolean visible, short theProc, WindowRef behind, Boolean goAwayFlag, long refCon) |
| WindowRef | newcwindow (void *wStorage, const Rect *boundsRect, const char *title, Boolean visible, short procID, WindowRef behind, Boolean goAwayFlag, long refCon) |
| long | pinrect (const Rect *theRect, Point *thePt) |
| Boolean | trackbox (WindowRef window, Point *thePt, short partCode) |
| long | draggrayrgn (RgnHandle theRgn, Point *startPt, const Rect *boundsRect, const Rect *slopRect, short axis, DragGrayRgnUPP actionProc) |
| void | dragwindow (WindowRef window, Point *startPt, const Rect *boundsRect) |
| Boolean | GetWindowGoAwayFlag (WindowRef window) |
| Boolean | GetWindowSpareFlag (WindowRef window) |
| WindowRef | GetWindowList (void) |
| CGrafPtr | GetWindowPort (WindowRef window) |
| DEFINE_API (CGrafPtr) GetWindowPort(WindowRef window) | |
| CGrafPtr | GetWindowStructurePort (WindowRef inWindow) |
| short | GetWindowKind (WindowRef window) |
| DEFINE_API (short) GetWindowKind(WindowRef window) | |
| Boolean | IsWindowHilited (WindowRef window) |
| Boolean | IsWindowUpdatePending (WindowRef window) |
| WindowRef | MacGetNextWindow (WindowRef window) |
| DEFINE_API (WindowRef) MacGetNextWindow(WindowRef window) | |
| Rect * | GetWindowStandardState (WindowRef window, Rect *rect) |
| DEFINE_API (Rect *) GetWindowStandardState(WindowRef window | |
| Rect * | GetWindowUserState (WindowRef window, Rect *rect) |
| void | SetWindowKind (WindowRef window, short kind) |
| DEFINE_API (void) SetWindowKind(WindowRef window | |
| void | SetWindowStandardState (WindowRef window, const Rect *rect) |
| if (stateRects !=NULL) stateRects[1] = *rect | |
| void | SetWindowUserState (WindowRef window, const Rect *rect) |
| void | SetPortWindowPort (WindowRef window) |
| Rect * | GetWindowPortBounds (WindowRef window, Rect *bounds) |
| WindowRef | GetWindowFromPort (CGrafPtr port) |
| Handle | GetWindowDataHandle (WindowRef window) |
| void | SetWindowDataHandle (WindowRef window, Handle data) |
| Boolean | GetWindowZoomFlag (WindowRef window) |
| void | GetWindowStructureRgn (WindowRef window, RgnHandle r) |
| void | GetWindowContentRgn (WindowRef window, RgnHandle r) |
| void | GetWindowUpdateRgn (WindowRef window, RgnHandle r) |
| SInt16 | GetWindowTitleWidth (WindowRef window) |
Variables | |
| Rect * | rect |
| short | kind |
| Rect * | bounds |
Window Manager Interfaces.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| #define CallWindowPaintProc | ( | userRoutine, | |
| device, | |||
| qdContext, | |||
| window, | |||
| inClientPaintRgn, | |||
| outSystemPaintRgn, | |||
| refCon | |||
| ) |
| #define InvokeDeskHookUPP | ( | mouseClick, | |
| theEvent, | |||
| userUPP | |||
| ) |
| #define InvokeWindowDefUPP | ( | varCode, | |
| window, | |||
| message, | |||
| param, | |||
| userUPP | |||
| ) |
| #define kFirstWindowGroup ((WindowGroupRef)(-1)) |
may be passed as the "behindGroup" parameter to SendWindowGroupBehind
| #define kFirstWindowOfClass ((WindowRef)(-1)) |
Special cases for the ©behind© parameter in window creation calls.
| #define kFirstWindowOfGroup ((WindowRef)(-1)) |
may be passed as the "behindWindow" parameter to NewCWindow and SendBehind
| #define NewDeskHookUPP | ( | userRoutine | ) |
register no_return_value Func(1_byte:D0, 4_bytes:A0)
| #define NewWindowDefProc | ( | userRoutine | ) | NewWindowDefUPP(userRoutine) |
support for pre-Carbon UPP routines: New...Proc and Call...Proc
| #define NewWindowDefUPP | ( | userRoutine | ) |
pascal 4_bytes Func(2_bytes, 4_bytes, 2_bytes, 4_bytes)
| #define NewWindowPaintUPP | ( | userRoutine | ) |
pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes)
| typedef struct CWindowRecord CWindowRecord |
!OPAQUE_TOOLBOX_STRUCTS
| typedef OSType PropertyCreator |
Current documentation for the Mac OS Window Manager is available on the web: http://developer.apple.com/techpubs/macos8/HumanInterfaceToolbox/WindowManager/windowmanager.html
| typedef UInt32 ScrollWindowOptions |
can be NULL
| typedef UInt32 WindowActivationScope |
WindowActivationScope
Discussion: Every window has a WindowActivationScope. It defines how windows are activated by the Window Manager with respect to other windows in the window©s group and in the current process.
| typedef UInt32 WindowConstrainOptions |
can be NULL WindowConstrainOptions
| typedef UInt32 WindowGroupAttributes |
WindowGroupAttributes
Summary: These are attributes that may be applied to a window group.
| typedef UInt32 WindowGroupContentOptions |
WindowGroupContentOptions
Discussion: Window group contents options are used to control what group content is counted or returned by the CountWindowGroupContents and GetWindowGroupContents APIs.
| typedef struct OpaqueWindowGroupRef* WindowGroupRef |
The Window Group API allows the creation and management of groups of windows,
allowing control of the z-order, activation, and positioning of the windows. Internally to the Window Manager, each of the standard window tiers (document,
toolbar, floating, modal, utility, help, and overlay) is implemented as a window
group; you can access the window group for a class with GetWindowGroupOfClass.
You can create your own window groups, if you would like your windows to float,
for example, above the floating window layer but below the modal layer. It is
also possible to create more complex hierarchical arrangements of window groups.
| typedef UInt32 WindowLatentVisibility |
©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© ©©Latent window visibility ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© WindowLatentVisibility
Summary: Reasons why a window is currently invisible when ordinarily it would be visible.
| typedef UInt32 WindowModality |
© Window Modality WindowModality
| typedef OptionBits WindowPaintProcOptions |
Routines available from Mac OS 9.0 forward
| typedef UInt32 WindowPositionMethod |
Positioning methods passed to RepositionWindow. Do not use them in WIND, ALRT, DLOG templates. Do not confuse these constants with the constants above
| typedef UInt32 WindowTransitionAction |
WindowTransitionAction
Summary: Modifications to window state that are provided by TransitionWindow
| typedef UInt32 WindowTransitionEffect |
TransitionWindow displays a window with accompanying animation and sound. WindowTransitionEffect
Summary: Visual effects that are provided by TransitionWindow
| anonymous enum |
| anonymous enum |
Summary: Window attributes
| anonymous enum |
| anonymous enum |
| anonymous enum |
The rDocProc (rounded WDEF, ala calculator) is not supported in Carbon.
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
Passed into StandardAlert and used in ©WIND©, ©DLOG©, and ©ALRT© templates StandardAlert uses zero to specify the default position. Other calls use zero to
specify ©no position©. Do not pass these constants to RepositionWindow. Do not
store these constants in the BasicWindowDescription of a ©wind© resource.
| Enumerator | |
|---|---|
| kWindowCenterMainScreen | used by StandardAlert |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
Messages available from Mac OS 8.0 forward
| anonymous enum |
Messages available from Mac OS 8.5 forward
| Enumerator | |
|---|---|
| kWindowMsgModified | parameter boolean indicating on or off |
| kWindowMsgDrawInCurrentPort | parameter boolean indicating saved (false) or modified (true) |
| kWindowMsgSetupProxyDragImage | same as kWindowMsgDraw, but must draw in current port |
| kWindowMsgStateChanged | parameter pointer to SetupWindowProxyDragImageRec |
| kWindowMsgMeasureTitle | something about the window's state has changed |
| anonymous enum |
Messages only available in Carbon
| anonymous enum |
old names
| anonymous enum |
Feature bits available from Mac OS 8.5 forward
| anonymous enum |
Feature bits for post MacOS 10.0
| anonymous enum |
THIS CONSTANT IS GOING AWAY. IT IS NAMED INCORRECTLY. USE THE GETGROWIMAGE CONSTANT ABOVE INSTEAD. DO YOU HEAR ME! AM I YELLING LOUD ENOUGH?!
| anonymous enum |
© Region Dragging Constants
| anonymous enum |
!OPAQUE_TOOLBOX_STRUCTS © BasicWindowDescription Contains statically-sized basic attributes of the window, for storage in a collection item. constants for the version field
| anonymous enum |
constants for the stateflags bit field
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
Summary: These are constants that can be used for the inNextGroup parameter to GetSiblingWindowGroup.
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
| anonymous enum |
©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© Obsolete symbolic names ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©
| anonymous enum |
©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© Obsolete symbolic names ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©
Summary: Activates or deactivates a window.
Discussion: Window activation consists of two steps: hiliting the window frame and sending an activate event to the window. ActivateWindow handles both of these steps and also updates internal Window Manager state. If you just need to hilite the window frame, you may use HiliteWindow. If you need to send an activate event, you should always use ActivateWindow rather than creating and sending the event yourself.
Parameters:
inWindow: The window to activate or deactivate.
inActivate: Whether to activate or deactivate the window.
| WindowRef ActiveNonFloatingWindow | ( | void | ) |
©©Window activation
Summary: Returns the window, among all windows with activation scope of kWindowActivationScopeAll, that is considered active.
Discussion: The Mac OS 8.5 Window Manager introduced the FrontNonFloatingWindow API, which was designed to return the window that should be considered active by the application. With the advent of window groups, it is now possible to have a window that looks active (is highlighted, and accepts keyboard input) but to have other non-floating windows grouped above the active window. The ActiveNonFloatingWindow API returns the active window regardless of where it is positioned in the z-order. Most code that currently uses FrontNonFloatingWindow or GetFrontWindowOfClass(kDocumentClass) to get the active window should use ActiveNonFloatingWindow instead.
| Boolean AreFloatingWindowsVisible | ( | void | ) |
| void BeginUpdate | ( | WindowRef | window | ) |
CALL_NOT_IN_CARBON BeginUpdate()
| OSStatus BeginWindowProxyDrag | ( | WindowRef | window, |
| DragReference * | outNewDrag, | ||
| RgnHandle | outDragOutlineRgn | ||
| ) |
| void BringToFront | ( | WindowRef | window | ) |
| void CalcVis | ( | WindowRef | window | ) |
| clobberedRgn | can be NULL |
| OSStatus ChangeWindowAttributes | ( | WindowRef | window, |
| WindowAttributes | setTheseAttributes, | ||
| WindowAttributes | clearTheseAttributes | ||
| ) |
Routines available from Mac OS 9.0 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward ChangeWindowAttributes()
| OSStatus ChangeWindowGroupAttributes | ( | WindowGroupRef | inGroup, |
| WindowGroupAttributes | setTheseAttributes, | ||
| WindowGroupAttributes | clearTheseAttributes | ||
| ) |
Summary: Changes the attributes of a window group.
Parameters:
inGroup: The group whose attributes to change.
setTheseAttributes: The attributes to set.
clearTheseAttributes: The attributes to clear.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus ChangeWindowPropertyAttributes | ( | WindowRef | window, |
| OSType | propertyCreator, | ||
| OSType | propertyTag, | ||
| UInt32 | attributesToSet, | ||
| UInt32 | attributesToClear | ||
| ) |
ChangeWindowPropertyAttributes()
| Boolean CheckUpdate | ( | EventRecord * | theEvent | ) |
| void ClipAbove | ( | WindowRef | window | ) |
can be NULL ClipAbove()
| OSStatus CloneWindow | ( | WindowRef | window | ) |
| OSStatus CollapseAllWindows | ( | Boolean | collapse | ) |
| OSStatus ConstrainWindowToScreen | ( | WindowRef | inWindowRef, |
| WindowRegionCode | inRegionCode, | ||
| WindowConstrainOptions | inOptions, | ||
| const Rect * | inScreenRect, | ||
| Rect * | outStructure | ||
| ) |
Summary: Moves and resizes a window so that it's contained entirely on a single screen.
Parameters:
inWindowRef: The window to constrain.
inRegionCode: The window region to constrain.
inOptions: Flags controlling how the window is constrained.
inScreenRect: A rectangle, in global coordinates, in which to constrain the window. May be NULL. If NULL, the window is constrained to the screen with the greatest intersection with the specified window region.
outStructure: On exit, contains the new structure bounds of the window, in global coordinates. May be NULL.
| outStructure | can be NULL |
| OSStatus CopyWindowAlternateTitle | ( | WindowRef | inWindow, |
| CFStringRef * | outTitle | ||
| ) |
Discussion: This API gets the alternate title for a window. See the discussion of SetWindowAlternateTitle for more info.
Parameters:
inWindow: The window to get the alternate title from.
outTitle: Receives the alternate title for the window. If the window does not have an alternate title, NULL will be returned in outTitle.
Result: An operating system status code.
| OSStatus CopyWindowGroupName | ( | WindowGroupRef | inGroup, |
| CFStringRef * | outName | ||
| ) |
Summary: Returns a copy of the name of a window group.
Parameters:
inGroup: The group whose name to retrieve.
outName: On exit, contains the name of the group. It is the caller's responsibility to release the name.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus CopyWindowTitleAsCFString | ( | WindowRef | inWindow, |
| CFStringRef * | outString | ||
| ) |
| ItemCount CountWindowGroupContents | ( | WindowGroupRef | inGroup, |
| WindowGroupContentOptions | inOptions | ||
| ) |
© Inspection of group contents
Summary: Counts the windows or groups contained in a group.
Parameters:
inGroup: The group whose contents to count.
inOptions: Specifies how to count the group©s contents.
| OSStatus CreateCustomWindow | ( | const WindowDefSpec * | def, |
| WindowClass | windowClass, | ||
| WindowAttributes | attributes, | ||
| const Rect * | contentBounds, | ||
| WindowRef * | outWindow | ||
| ) |
Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward CreateCustomWindow()
| OSStatus CreateNewWindow | ( | WindowClass | windowClass, |
| WindowAttributes | attributes, | ||
| const Rect * | contentBounds, | ||
| WindowRef * | outWindow | ||
| ) |
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward CALL_NOT_IN_CARBON CreateNewWindow()
Routines available on Mac OS X CreateQDContextForCollapsedWindowDockTile()
Discussion: Creates and returns a CGrafPtr for a collapsed window's tile in the dock. You can use this port to draw into your window's dock tile with Quickdraw. You MUST call ReleaseQDContextForCollapsedWindowDockTile and NOT DisposePort when using this API, as it maintains more state than just the port. If you call DisposePort, you may leak system resources.
Parameters:
inWindow: The window to create the dock tile port for. If this window is not collapsed, an error is returned.
outContext: The Quickdraw port for you to use to draw into. If you wish to use CoreGraphics (Quartz) drawing, call CreateCGContextForPort with this port to obtain a CGContext.
Result: An operating system result code.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus CreateStandardWindowMenu | ( | OptionBits | inOptions, |
| MenuRef * | outMenu | ||
| ) |
can be NULL Carbon only CreateStandardWindowMenu()
Discussion: Creates a standard Window menu for your application. You can call this to create a window menu for your application and insert it in your menu bar (typically at the end of your menu list). To register a window to be tracked by this menu, you either create your window with CreateNewWindow, passing the kWindowInWindowMenuAttribute, or you can use ChangeWindowAttributes after the window is created. The Toolbox takes care of acting on the standard items such as zoom and minimize, as well as bringing selected windows to the front. All you need to do is install it and register your windows and the Toolbox does the rest.
Parameters:
inOptions: Currently you must pass zero for this parameter.
outMenu: Receives a new menu reference which contains the standard window menu items and commands.
Result: An operating system status code.
| OSStatus CreateWindowFromCollection | ( | Collection | collection, |
| WindowRef * | outWindow | ||
| ) |
| OSStatus CreateWindowFromResource | ( | SInt16 | resID, |
| WindowRef * | outWindow | ||
| ) |
Routines available from Mac OS 8.5 forward Create a window from a ©wind© resource CreateWindowFromResource()
| OSStatus CreateWindowGroup | ( | WindowGroupAttributes | inAttributes, |
| WindowGroupRef * | outGroup | ||
| ) |
© Group creation, destruction, and refcounting
Summary: Creates a new window group.
Parameters:
inAttributes: Attributes for the new window group.
outGroup: On exit, contains the new window group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| void DebugPrintAllWindowGroups | ( | void | ) |
Summary: Prints the full window group hierarchy, starting at the root group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| void DebugPrintWindowGroup | ( | WindowGroupRef | inGroup | ) |
©©Debugging Utilities
Summary: Prints the contents of a window group to stdout.
Parameters:
inGroup: The group whose contents to print.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus DisableScreenUpdates | ( | void | ) |
disable and enable screen updates for changes to the current application©s windows (OS X only for now) DisableScreenUpdates()
| void DisposeDeskHookUPP | ( | DeskHookUPP | userUPP | ) |
| void DisposeWindow | ( | WindowRef | window | ) |
| void DisposeWindowDefUPP | ( | WindowDefUPP | userUPP | ) |
| void DisposeWindowPaintUPP | ( | WindowPaintUPP | userUPP | ) |
CALL_NOT_IN_CARBON DisposeWindowPaintUPP()
| long draggrayrgn | ( | RgnHandle | theRgn, |
| Point * | startPt, | ||
| const Rect * | boundsRect, | ||
| const Rect * | slopRect, | ||
| short | axis, | ||
| DragGrayRgnUPP | actionProc | ||
| ) |
| long DragGrayRgn | ( | RgnHandle | theRgn, |
| Point | startPt, | ||
| const Rect * | limitRect, | ||
| const Rect * | slopRect, | ||
| short | axis, | ||
| DragGrayRgnUPP | actionProc | ||
| ) |
| long DragTheRgn | ( | RgnHandle | theRgn, |
| Point | startPt, | ||
| const Rect * | limitRect, | ||
| const Rect * | slopRect, | ||
| short | axis, | ||
| DragGrayRgnUPP | actionProc | ||
| ) |
Note: boundsRect can only be NULL when linking to CarbonLib 1.0 forward DragWindow()
| void DrawGrowIcon | ( | WindowRef | window | ) |
DrawGrowIcon is deprecated from Mac OS 8.0 forward. Theme-savvy window defprocs
include the grow box in the window frame. DrawGrowIcon()
| OSStatus EnableScreenUpdates | ( | void | ) |
| void EndUpdate | ( | WindowRef | window | ) |
| OSStatus EndWindowProxyDrag | ( | WindowRef | window, |
| DragReference | theDrag | ||
| ) |
| OSStatus FindWindowOfClass | ( | const Point * | where, |
| WindowClass | inWindowClass, | ||
| WindowRef * | outWindow, | ||
| WindowPartCode * | outWindowPart | ||
| ) |
| WindowRef FrontNonFloatingWindow | ( | void | ) |
Routines available from Mac OS 8.6 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward FrontNonFloatingWindow()
| WindowRef FrontWindow | ( | void | ) |
Return a pointer to the frontmost window.
FrontWindow will return the next lower window. Under MultiFinder , this function (and many others) apply only to the current window layer (usually the caller's application). Thus, you may get a NIL return value even if there are many windows visible. Under Finder, you may get a WindowPtr to a DA.
| Boolean GetAuxWin | ( | WindowRef | window, |
| AuxWinHandle * | awHndl | ||
| ) |
Supply an auxiliary window record if one exists.
© GetAuxWin GetAuxWin is not available in Carbon
@par Non-Carbon CFM: in InterfaceLib 7.1 and later
| WindowAttributes GetAvailableWindowAttributes | ( | WindowClass | inClass | ) |
GetAvailableWindowAttributes()
Summary: Returns the window attributes that are valid for a window class.
Discussion: This API is useful because some window classes support different attributes on different platforms (for example, floating windows can have collapse boxes on 9, but not on X), and the Window Manager will return an error if you attempt to create a window with attributes that aren't supported for the requested window class. You can use this API to remove attributes that are not supported by the current platform before calling CreateNewWindow.
Parameters:
inClass: The window class.
Result: The window attributes that are supported for the specified window class.
can be NULL GetAvailableWindowPositioningBounds()
Summary: Returns the available window positioning bounds on the given screen (i.e., the screen rect minus the MenuBar and Dock if located on that screen).
Parameters:
inDevice: The device for which to find the available bounds.
availableRect: On exit, contains the available bounds for the given device.
| void GetCWMgrPort | ( | CGrafPtr * | wMgrCPort | ) |
Obtain a pointer to the Window Manager port.
@par Non-Carbon CFM: in InterfaceLib 7.1 and later
| RgnHandle GetGrayRgn | ( | void | ) |
| OSStatus GetIndexedWindow | ( | WindowGroupRef | inGroup, |
| UInt32 | inIndex, | ||
| WindowGroupContentOptions | inOptions, | ||
| WindowRef * | outWindow | ||
| ) |
Summary: Retrieves a specified window from a group.
Discussion: GetIndexedWindow is provided as an easier way to get a particular window from a group than using GetWindowGroupContents. If you only need to retrieve, say, the last window in a group, it is easier and more efficient to use GetIndexedWindow. If you need to retrieve all the windows in a group, it is more efficient to use GetWindowGroupContents.
Parameters:
inGroup: The group containing the window to retrieve.
inIndex: The index of the window. This parameter may range from 1 to CountWindowGroupContents( inGroup, kWindowGroupContentsReturnWindows | inOptions );
inOptions: Indicates how to locate the specified window. kWindowGroupContentsReturnWindows is implied by this API and does not need to be explicitly specified.
outWindow: On exit, the window at the specified index.
| WindowRef GetNextWindowOfClass | ( | WindowRef | inWindow, |
| WindowClass | inWindowClass, | ||
| Boolean | mustBeVisible | ||
| ) |
Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward GetNextWindowOfClass()
Summary: Returns the parent window of a sheet.
Parameters:
inSheet: The sheet window whose parent to retrieve.
outParentWindow: On exit, contains the parent window of the sheet.
| OSStatus GetWindowActivationScope | ( | WindowRef | inWindow, |
| WindowActivationScope * | outScope | ||
| ) |
Summary: Retrieves a window©s activation scope.
Parameters:
inWindow: The window whose activation scope to retrieve.
outScope: On exit, the window©s activation scope.
| OSStatus GetWindowAttributes | ( | WindowRef | window, |
| WindowAttributes * | outAttributes | ||
| ) |
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward GetWindowBounds()
| OSStatus GetWindowClass | ( | WindowRef | window, |
| WindowClass * | outClass | ||
| ) |
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward GetWindowClass()
| OSStatus GetWindowContentPattern | ( | WindowRef | window, |
| PixPatHandle | outPixPat | ||
| ) |
Routines available from Mac OS 8.5 forward GetWindowContentPattern()
|
inline |
old accessors GetWindowDataHandle()
| OSStatus GetWindowFeatures | ( | WindowRef | window, |
| UInt32 * | outFeatures | ||
| ) |
Routines available from Mac OS 8.0 (Appearance 1.0) forward GetWindowFeatures()
Discussion: Needed to ©cast up© to a WindowRef from a GrafPtr
Discussion: use GetWindowAttributes in Carbon
| OSStatus GetWindowGreatestAreaDevice | ( | WindowRef | inWindow, |
| WindowRegionCode | inRegion, | ||
| GDHandle * | outGreatestDevice, | ||
| Rect * | outGreatestDeviceRect | ||
| ) |
Routines available in CarbonLib 1.1 and later GetWindowGreatestAreaDevice()
Summary: Returns the graphics device with the greatest area of intersection with a specified window region.
Parameters:
inWindow: The window to compare against.
inRegion: The window region to compare against.
outGreatestDevice: On exit, the graphics device with the greatest intersection. May be NULL.
outGreatestDeviceRect: On exit, the bounds of the graphics device with the greatest intersection. May be NULL. If the device with the greatest intersection also contains the menu bar, the device rect will exclude the menu bar area.
| outGreatestDeviceRect | can be NULL |
| WindowGroupRef GetWindowGroup | ( | WindowRef | inWindow | ) |
©©Group containment hierarchy manipulation
Summary: Gets the window group that contains a window.
Discussion: The refcount of the group returned by this API is not incremented, and the caller does not need to release the reference.
Parameters:
inWindow: The window whose containing group to retrieve.
| OSStatus GetWindowGroupAttributes | ( | WindowGroupRef | inGroup, |
| WindowGroupAttributes * | outAttributes | ||
| ) |
Summary: Retrieves the attributes of a window group.
Parameters:
inGroup: The group whose attributes to retrieve.
outAttributes: On exit, the group©s attributes.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus GetWindowGroupContents | ( | WindowGroupRef | inGroup, |
| WindowGroupContentOptions | inOptions, | ||
| ItemCount | inAllowedItems, | ||
| ItemCount * | outNumItems, | ||
| void ** | outItems | ||
| ) |
Summary: Retrieves the windows or groups contained in a group.
Discussion: The windows or groups returned by this API will be placed into the output buffer in z-order, from highest to lowest.
Parameters:
inGroup: The group whose contents to retrieve.
inOptions: Specifies which content to retrieve.
inAllowedItems: The number of items that will fit in the output buffer.
outNumItems: On exit, the number of items that were returned. May be NULL.
outItems: On entry, points to enough memory to hold inAllowedSize WindowRefs or WindowGroupRefs. On exit, contains *outNumItems WindowRefs or WindowGroupRefs.
| outItems | can be NULL |
| OSStatus GetWindowGroupLevel | ( | WindowGroupRef | inGroup, |
| SInt32 * | outLevel | ||
| ) |
Summary: Gets the CoreGraphics window group level of windows in a group.
Parameters:
inGroup: The window group whose level to return.
outLevel: On exit, contains the window level of the windows in this group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| WindowGroupRef GetWindowGroupOfClass | ( | WindowClass | windowClass | ) |
Summary: Gets the window group in which windows of a given class are placed.
Discussion: The Window Manager uses window groups internally to manage the ordering of windows of different classes. In some cases, multiple classes are placed within the same group; for example, windows from all of the modal and alert window classes are placed into the same modal window group. The refcount of the group returned by this API is not incremented, and the caller does not need to release the reference.
Parameters:
windowClass: The class whose window group to retrieve. You may pass kAllWindowClasses to retrieve the root window group.
| WindowRef GetWindowGroupOwner | ( | WindowGroupRef | inGroup | ) |
Summary: Returns the window that owns a window group, or NULL if none.
Discussion: A window may own one or more window groups. The windows in an owned window group will always be z-ordered above the owner window. Whenever the owner window changes z-order, the windows in the groups owned by the window will be moved also.
Parameters:
inGroup: The group whose owner to retrieve.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| WindowGroupRef GetWindowGroupParent | ( | WindowGroupRef | inGroup | ) |
Summary: Gets the window group that contains a group.
Parameters:
inGroup: The group whose containing group to retrieve.
outGroup: On exit, the containing window group of the group. The group©s refcount is not incremented by this API, and the caller does not need to release the reference.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| ItemCount GetWindowGroupRetainCount | ( | WindowGroupRef | inGroup | ) |
Summary: Returns the refcount of a window group.
Parameters:
inGroup: The group whose refcount to return.
| WindowGroupRef GetWindowGroupSibling | ( | WindowGroupRef | inGroup, |
| Boolean | inNextGroup | ||
| ) |
Summary: Returns the next or previous group of a window group.
Parameters:
inGroup: The group whose sibling to return.
inNextGroup: True to return the next sibling, false to return the previous sibling.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus GetWindowIndex | ( | WindowRef | inWindow, |
| WindowGroupRef | inStartGroup, | ||
| WindowGroupContentOptions | inOptions, | ||
| UInt32 * | outIndex | ||
| ) |
Summary: Retrieves the z-order index of a window inside a group.
Discussion: The z-order index of a window is its relative position in z-order inside a group. The index ranges from 1 to the number of windows in the group.
Parameters:
inWindow: The window whose z-order index to retrieve.
inStartGroup: The group on which to base the z-order index. This should be either the containing group of the window, or NULL. If NULL, this API returns the z-order index of the window across the entire process.
inOptions: Indicates how to enumerate the specified window. kWindowGroupContentsReturnWindows is implied by this API and does not need to be explicitly specified.
outIndex: On exit, contains the window©s z-order index.
| short GetWindowKind | ( | WindowRef | window | ) |
| WindowRef GetWindowList | ( | void | ) |
| OSStatus GetWindowModality | ( | WindowRef | inWindow, |
| WindowModality * | outModalKind, | ||
| WindowRef * | outUnavailableWindow | ||
| ) |
Summary: Retrieves the modality of a window.
Parameters:
inWindow: The window whose modality to retrieve.
outModalKind: On exit, contains the modality of the window.
outUnavailableWindow: On exit, if©the window is window-modal, contains the target window of the specified window's modality.
| OSStatus GetWindowOwnerCount | ( | WindowRef | window, |
| UInt32 * | outCount | ||
| ) |
window refcounting GetWindowOwnerCount()
Obtain Handle of window picture, if any.
GetWindowPic returns a PicHandle of the picture that defines the contents of a window. In most cases, it returns NIL, indicating that no such picture exists.
the value found in the windowPic field of theWindow 's WindowRecord . A non-NIL value indicates that a previous call to SetWindowPic has defined such a picture.
This routine can be used as part of a speed-optimization technique you can use to avoid time-consuming updates on windows that do not change, or windows that have been saved temporarily as a bit image. Use SetWindowPic to install a picture defining a window. See that topic for related information.
| OSStatus GetWindowProperty | ( | WindowRef | window, |
| PropertyCreator | propertyCreator, | ||
| PropertyTag | propertyTag, | ||
| UInt32 | bufferSize, | ||
| UInt32 * | actualSize, | ||
| void * | propertyBuffer | ||
| ) |
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward GetWindowProperty()
| propertyBuffer | can be NULL |
| OSStatus GetWindowPropertyAttributes | ( | WindowRef | window, |
| OSType | propertyCreator, | ||
| OSType | propertyTag, | ||
| UInt32 * | attributes | ||
| ) |
| OSStatus GetWindowPropertySize | ( | WindowRef | window, |
| PropertyCreator | creator, | ||
| PropertyTag | tag, | ||
| UInt32 * | size | ||
| ) |
| OSStatus GetWindowProxyAlias | ( | WindowRef | window, |
| AliasHandle * | alias | ||
| ) |
| OSStatus GetWindowProxyFSSpec | ( | WindowRef | window, |
| FSSpec * | outFile | ||
| ) |
| OSStatus GetWindowProxyIcon | ( | WindowRef | window, |
| IconRef * | outIcon | ||
| ) |
| ItemCount GetWindowRetainCount | ( | WindowRef | inWindow | ) |
Summary: Returns the retain count of a window.
Discussion: This API is equivalent to GetWindowOwnerCount. For consistency with CoreFoundation and Carbon Events, it is preferred over GetWindowOwnerCount. Both APIs will continue to be supported.
Parameters:
inWindow: The window whose retain count to retrieve.
Discussion: use GetWindowAttributes in Carbon
|
inline |
| OSStatus GetWindowWidgetHilite | ( | WindowRef | inWindow, |
| WindowDefPartCode * | outHilite | ||
| ) |
Routines available from Mac OS 8.5 forward (or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward) GetWindowWidgetHilite()
| void GetWMgrPort | ( | GrafPtr * | wPort | ) |
Obtain a pointer to the Window Manager port.
The window manager port does not exist in Carbon.
We are investigating replacement technologies.
use the WMgrPort directly and you shouldn't call GetWMgrPort ever. Rules Only draw to the whole screen in a "modal" way. This could be an animation across windows or visual feedback from dragging from one to another. It is important to know that no other application, including the Finder, will draw until you have finished. In the case of an animation effect, the drawing shouldn't take much time. In the case of a drag, you should only draw while the mouse button is down. All operations should end with nothing left drawn outside your windows. Under MultiFinder it is alright not to call GetNextEvent, EventAvail or WaitNextEvent while drawing outside your windows. Use the StillDown or WaitMouseUp functions for loops that wait for the mouse button to go up. Never draw something on the desktop and leave it there. There is no way to tell the system that you have drawn on the desktop, so the Finder may draw
| long GetWRefCon | ( | WindowRef | window | ) |
Return a window's reference value.
NewWindow ). Use SetWRefCon to change it. Use GetWRefCon to obtain its current value, or just read it directly from the window record: wPeek = ( WindowPeek )theWindow; myRefCon = wPeek -> refCon; This user-defined value is often used as a good place to store a Handle leading to additional information about the window. For instance, such a handle could contain information to help you keep track of the scrolling position or the name and reference of a file read to obtain the contents of the window, etc. Note: if you do maintain such a Handle, be sure to dispose of it before you close the window.
| void getwtitle | ( | WindowRef | window, |
| char * | title | ||
| ) |
| short GetWVariant | ( | WindowRef | window | ) |
Get the variant code for a window.
GetWVariant returns a variant code for the window pointed to by whichWindow . Use this function to determine the type of a particular window. whichWin is the window whose variant code you wish to find.
a short indicating the variant code of the window.
The variant code allows a single window definition function ('WDEF') to
implement several related types of windows as "variations on a theme". For
example, the dBoxProc type of window is a variation of the standard
document window; both use the window definition function whose resource
ID is 0, but the document window has a variation code of 0 while the
dBoxProc window has a variation code of 1. See Window Types for more
information.
Note: bBox can only be NULL when linking to CarbonLib 1.0 forward GrowWindow()
| OSStatus HideFloatingWindows | ( | void | ) |
| OSStatus HideSheetWindow | ( | WindowRef | inSheet | ) |
Summary: Hides a sheet window using appropriate visual effects.
Parameters:
inSheet: The sheet window to hide.
| void HideWindow | ( | WindowRef | window | ) |
CALL_NOT_IN_CARBON HiliteWindow()
© HiliteWindowFrameForDrag If you call ShowDragHilite and HideDragHilite, you don©t need to use this routine.
If you implement custom drag hiliting, you should call HiliteWindowFrameForDrag
when the drag is tracking inside a window with drag-hilited content. Routines available from Mac OS 8.5 forward HiliteWindowFrameForDrag()
| OSStatus InitFloatingWindows | ( | void | ) |
Routines available from Mac OS 8.6 forward InitFloatingWindows is not available in Carbon; window ordering is always active for Carbon clients InitFloatingWindows()
| void InitWindows | ( | void | ) |
| OSStatus InstallWindowContentPaintProc | ( | WindowRef | window, |
| WindowPaintUPP | paintProc, | ||
| WindowPaintProcOptions | options, | ||
| void * | refCon | ||
| ) |
InstallWindowContentPaintProc()
| void InvalRect | ( | const Rect * | badRect | ) |
These aren't present in Carbon. Please use the InvalWindowRect, etc. routines below instead. InvalRect()
| void InvalRgn | ( | RgnHandle | badRgn | ) |
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward InvalWindowRgn()
| void InvokeDeskHookUPP | ( | Boolean | mouseClick, |
| EventRecord * | theEvent, | ||
| DeskHookUPP | userUPP | ||
| ) |
| long InvokeWindowDefUPP | ( | short | varCode, |
| WindowRef | window, | ||
| short | message, | ||
| long | param, | ||
| WindowDefUPP | userUPP | ||
| ) |
| OSStatus InvokeWindowPaintUPP | ( | GDHandle | device, |
| GrafPtr | qdContext, | ||
| WindowRef | window, | ||
| RgnHandle | inClientPaintRgn, | ||
| RgnHandle | outSystemPaintRgn, | ||
| void * | refCon, | ||
| WindowPaintUPP | userUPP | ||
| ) |
CALL_NOT_IN_CARBON InvokeWindowPaintUPP()
| Boolean IsValidWindowClass | ( | WindowClass | inClass | ) |
Summary: Indicates whether a window class is supported by the Window Manager.
Parameters:
inClass: The window class.
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward CALL_NOT_IN_CARBON IsValidWindowPtr()
Summary: Indicates whether a window is active.
Discussion: The active state of a window is simply determined by whether its window frame is drawn using an active appearance. This does not indicate whether the window has keyboard focus. To get the window with keyboard focus, use GetUserFocusWindow().
Parameters:
inWindow: The window whose active state to retrieve.
Routines available from Mac OS 8.0 (Appearance 1.0) forward IsWindowCollapsable()
| Boolean IsWindowContainedInGroup | ( | WindowRef | inWindow, |
| WindowGroupRef | inGroup | ||
| ) |
Summary: Indicates whether a window is contained within a group or any of its subgroups.
Parameters:
inWindow: The window whose containment to examine.
inGroup: The group that might contain the window.
Routines available from Mac OS 8.5 forward, or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward IsWindowInStandardState()
| idealStandardState | can be NULL |
| Boolean IsWindowLatentVisible | ( | WindowRef | inWindow, |
| WindowLatentVisibility * | outLatentVisible | ||
| ) |
Summary: Indicates whether a window is visible onscreen and also whether it is latently visible but not currently onscreen.
Discussion: All windows are either onscreen or offscreen. A window that is offscreen may still be latently visible; this occurs, for example, when a floating window is hidden as an application is suspended. The floating window is not visible onscreen, but it is latently visible and is only hidden due to the suspended state of the application; when the application becomes active again, the floating window will be placed back onscreen. IsWindowLatentVisible may be used to determine both the window's onscreen/offscreen status and its latent visibility (if the window is offscreen).
Parameters:
inWindow: The window whose visibility to return.
outLatentVisible: If the window is onscreen, the latent visibility is zero. If the window is offscreen, this parameter is used to return the latent visibility flags of the window. If any of the flags are set, then the window is latently visible.
Result: Indicates whether the window is currently onscreen.
| Boolean IsWindowPathSelectClick | ( | WindowRef | window, |
| const EventRecord * | event | ||
| ) |
| void MacCloseWindow | ( | WindowRef | window | ) |
[Mac]CloseWindow()
[Mac]FindWindow()
| OSStatus MoveWindowStructure | ( | WindowRef | window, |
| short | hGlobal, | ||
| short | vGlobal | ||
| ) |
| WindowRef newcwindow | ( | void * | wStorage, |
| const Rect * | boundsRect, | ||
| const char * | title, | ||
| Boolean | visible, | ||
| short | procID, | ||
| WindowRef | behind, | ||
| Boolean | goAwayFlag, | ||
| long | refCon | ||
| ) |
| WindowRef NewCWindow | ( | void * | wStorage, |
| const Rect * | boundsRect, | ||
| ConstStr255Param | title, | ||
| Boolean | visible, | ||
| short | procID, | ||
| WindowRef | behind, | ||
| Boolean | goAwayFlag, | ||
| long | refCon | ||
| ) |
| DeskHookUPP NewDeskHookUPP | ( | DeskHookProcPtr | userRoutine | ) |
| WindowRef newwindow | ( | void * | wStorage, |
| const Rect * | boundsRect, | ||
| const char * | title, | ||
| Boolean | visible, | ||
| short | theProc, | ||
| WindowRef | behind, | ||
| Boolean | goAwayFlag, | ||
| long | refCon | ||
| ) |
| WindowRef NewWindow | ( | void * | wStorage, |
| const Rect * | boundsRect, | ||
| ConstStr255Param | title, | ||
| Boolean | visible, | ||
| short | theProc, | ||
| WindowRef | behind, | ||
| Boolean | goAwayFlag, | ||
| long | refCon | ||
| ) |
| WindowDefUPP NewWindowDefUPP | ( | WindowDefProcPtr | userRoutine | ) |
| WindowPaintUPP NewWindowPaintUPP | ( | WindowPaintProcPtr | userRoutine | ) |
CALL_NOT_IN_CARBON NewWindowPaintUPP()
| clobberedRgn | can be NULL |
CALL_NOT_IN_CARBON PaintOne()
| clobberedRgn | can be NULL |
Find point on a rectangle's border near point.
PinRect returns the coordinates inside a rectangle that most-closely match the coordinates of a specified point. If the point is inside the rectangle, it is returned unchanged. If the point is outside the rectangle, the return value is a position on the border of the rectangle that is closest the point. theRectis a pointer to a rectangle. thePoint is any point (typically the position of a mouse-down event), in local window coordinates.
a 32-bit long integer, defined as two 16-bit words that indicate the coordinates of the point, pinned to the rectangle. The return value may be cast as a Point; it is broken up as follows: high word the vertical coordinate low word the horizontal coordinate
After a mouse-down event, you may use PinRect to determine if the point is inside theRect or to determine the point on the rectangle that is nearest to the mouse. This could be used when limiting mouse drawing to a defined area - if the mouse has moved outside of a specified area you can assume that the edge of the area was desired. Note that the return value is in the same order as a Point data type, so it may be cast as such for comparisons or for use in functions that need that type of parameter.
| OSStatus RegisterWindowDefinition | ( | SInt16 | inResID, |
| const WindowDefSpec * | inDefSpec | ||
| ) |
Summary: Registers or unregisters a binding between a resource ID and a window definition function.
Discussion: In the Mac OS 8.x Window Manager, a 'WIND' resource can contain an embedded WDEF procID that is used by the Window Manager as the resource ID of an 'WDEF' resource to lay out and draw the window. The 'WDEF' resource is loaded by the Window Manager when you load the menu with GetNewWindow. Since WDEFs can no longer be packaged as code resources on Carbon, the procID can no longer refer directly to a WDEF resource. However, using RegisterWindowDefinition you can instead specify a UniversalProcPtr pointing to code in your application code fragment. RegisterWindowDefinition is available when linking to CarbonLib 1.1 forward.
Parameters:
inResID: A WDEF proc ID, as used in a 'WIND' resource.
inDefSpec: Specifies the WindowDefUPP that should be used for windows with the given WDEF proc ID. Passing NULL allows you to unregister the window definition that had been associated with the given WDEF proc ID.
ReleaseQDContextForCollapsedWindowDockTile()
Discussion: Releases a port and other state created by the CreateQDContextForCollapsedWindowDockTile API. You MUST call this instead of DisposePort directly, or you may leak system resources.
Parameters:
inWindow: The window you created the port for. If this window is not collapsed, an error is returned.
inContext: The Quickdraw context to dispose.
Result: An operating system result code.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus ReleaseWindow | ( | WindowRef | inWindow | ) |
Summary: Decrements the retain count of a window, and destroys the window if the retain count falls to zero.
Discussion: This API is equivalent to DisposeWindow. For consistency with CoreFoundation and Carbon Events, it is preferred over DisposeWindow. Both APIs will continue to be supported.
Parameters:
inWindow: The window whose retain count to decrement.
| OSStatus ReleaseWindowGroup | ( | WindowGroupRef | inGroup | ) |
Summary: Releases a refcount on a window group. If the refcount goes to zero, the group is destroyed, and a refcount is released from all contained objects.
Parameters:
inGroup: The group whose refcount to decrement.
| OSStatus RemoveWindowProperty | ( | WindowRef | window, |
| PropertyCreator | propertyCreator, | ||
| PropertyTag | propertyTag | ||
| ) |
| OSStatus RemoveWindowProxy | ( | WindowRef | window | ) |
| OSStatus RepositionWindow | ( | WindowRef | window, |
| WindowRef | parentWindow, | ||
| WindowPositionMethod | method | ||
| ) |
Routines available from Mac OS 8.5 forward RepositionWindow()
| OSStatus ReshapeCustomWindow | ( | WindowRef | window | ) |
| Boolean ResizeWindow | ( | WindowRef | window, |
| Point | startPoint, | ||
| const Rect * | sizeConstraints, | ||
| Rect * | newContentRect | ||
| ) |
Note: newContentRect can only be NULL when linking to CarbonLib 1.0 forward ResizeWindow()
| newContentRect | can be NULL |
| OSStatus RetainWindow | ( | WindowRef | inWindow | ) |
Summary: Increments the retain count of a window.
Discussion: This API is equivalent to CloneWindow. For consistency with CoreFoundation and Carbon Events, it is preferred over CloneWindow. Both APIs will continue to be supported.
Parameters:
inWindow: The window whose retain count to increment.
| OSStatus RetainWindowGroup | ( | WindowGroupRef | inGroup | ) |
Summary: Increments the refcount of a window group.
Parameters:
inGroup: The group whose refcount to increment.
| void SaveOld | ( | WindowRef | window | ) |
SaveOld/DrawNew are not available in Carbon. Use ReshapeCustomWindow instead. SaveOld()
| OSStatus ScrollWindowRect | ( | WindowRef | inWindow, |
| const Rect * | inScrollRect, | ||
| SInt16 | inHPixels, | ||
| SInt16 | inVPixels, | ||
| ScrollWindowOptions | inOptions, | ||
| RgnHandle | outExposedRgn | ||
| ) |
Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward ScrollWindowRect()
| OSStatus ScrollWindowRegion | ( | WindowRef | inWindow, |
| RgnHandle | inScrollRgn, | ||
| SInt16 | inHPixels, | ||
| SInt16 | inVPixels, | ||
| ScrollWindowOptions | inOptions, | ||
| RgnHandle | outExposedRgn | ||
| ) |
can be NULL ScrollWindowRegion()
| void SelectWindow | ( | WindowRef | window | ) |
| OSStatus SendWindowGroupBehind | ( | WindowGroupRef | inGroup, |
| WindowGroupRef | behindGroup | ||
| ) |
©©Group z-ordering
Summary: Changes the z-order of a group, if the group does not have the kWindowGroupAttributeLayerTogether attribute set.
Discussion: SendWindowGroupBehind currently requires that the group being moved and the behindGroup have the same parent group.
Parameters:
inGroup: The group whose z-order to change.
behindGroup: The group behind which to position the specified group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| void SetDeskCPat | ( | PixPatHandle | deskPixPat | ) |
SetDeskCPat is not available in Carbon. SetDeskCPat()
| void SetPortWindowPort | ( | WindowRef | window | ) |
Discussion: set the current QuickDraw port to the port associated with the window
| void SetWinColor | ( | WindowRef | window, |
| WCTabHandle | newColorTable | ||
| ) |
SetWinColor is not available in Carbon. SetWinColor()
| OSStatus SetWindowActivationScope | ( | WindowRef | inWindow, |
| WindowActivationScope | inScope | ||
| ) |
Summary: Sets a window©s activation scope.
Parameters:
inWindow: The window whose activation scope to set.
inScope: The new activation scope.
| OSStatus SetWindowAlternateTitle | ( | WindowRef | inWindow, |
| CFStringRef | inTitle | ||
| ) |
Discussion: This API sets an alternate title for a window. The alternate title overrides what is displayed in the Window menu. If you do not set an alternate title, the normal window title is used. You would normally use this if the window title was not expressive enough to be used in the Window menu (or similar text-only situation).
Parameters:
inWindow: The window to set the alternate title.
inTitle: The alternate title for the window. Passing NULL for this parameter will remove any alternate title that might be present.
Result: An operating system status code.
| OSStatus SetWindowBounds | ( | WindowRef | window, |
| WindowRegionCode | regionCode, | ||
| const Rect * | globalBounds | ||
| ) |
can be NULL Routines available from Mac OS 8.5 forward, or from Mac OS 8.1 forward when linking to CarbonLib 1.0.2 forward SetWindowBounds()
| OSStatus SetWindowClass | ( | WindowRef | inWindow, |
| WindowClass | inWindowClass | ||
| ) |
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
SetWindowClass will disappear in the near future. Instead of SetWindowClass, you should use SetWindowGroup to move a window into the group of the desired class. This API is very dangerous in that is actually does change the class of the window, but class was meant to be an immutable property of the window. At the very least, this API will be modified to only change the layer of the window to match the layer that the specified class normally lives in. Consider yourself warned!
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING SetWindowClass()
Summary: Changes the window class of a window.
Discussion: SetWindowClass changes the class of a window. It also changes the window's z-order so that it is grouped with other windows of the same class. It does not change the visual appearance of the window. In CarbonLib, SetWindowClass may not be used to change a non-utility window to have utility window class, or to make a utility window have non-utility class. SetWindowClass is available from CarbonLib 1.1 forward.
Parameters:
inWindow: The window whose class to change.
inWindowClass: The new window class.
Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward CALL_NOT_IN_CARBON SetWindowContentColor()
| OSStatus SetWindowContentPattern | ( | WindowRef | window, |
| PixPatHandle | pixPat | ||
| ) |
|
inline |
| OSStatus SetWindowGroup | ( | WindowRef | inWindow, |
| WindowGroupRef | inNewGroup | ||
| ) |
Summary: Sets the window group that contains a window.
Discussion: The window©s z-order relative to windows in the current process may also be changed by this API. If the new window group is z-ordered above the window©s current group, the window will be placed at the end of the new group. If the new window group is z-ordered below the window©s current group, the window will be placed at the top of the new group. You may not place a window directly into the root group.
Parameters:
inWindow: The window whose group to change.
inNewGroup: The new containing group.
| OSStatus SetWindowGroupLevel | ( | WindowGroupRef | inGroup, |
| SInt32 | inLevel | ||
| ) |
Summary: Sets the CoreGraphics window group level of windows in a group.
Discussion: CoreGraphics windows (used to implement all windows in Carbon and Cocoa applications on Mac OS X) are divided into layers specified by a window level. Standard window levels are listed in <CoreGraphics/CGWindowLevel.h>. By default, a new window group has a window level of kCGNormalWindowLevel. When a window is placed into a window group, its window level is determined by the window level of its "base group". This is the containing group that is a child of the root group. For example, if group A is a child of the root group, and group B is a child of group A, and window C is in group B, then window C's base group is group A, and group A's window level determines the level of window C. SetWindowGroupLevel only allows changing the window level of groups that are children of the root group. It returns paramErr for other groups, since a group that is not a child of the root group is not a base group and changing its level has no effect. Changing the level of a group also changes the level of all windows currently contained by the group.
Parameters:
inGroup: The window group whose level to change.
inLevel: The new level for the windows in this group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus SetWindowGroupName | ( | WindowGroupRef | inGroup, |
| CFStringRef | inName | ||
| ) |
©©Group name, attributes, and level
Summary: Sets the name of a window group.
Discussion: The name of a window group is never displayed to the user. However, it is displayed by debugging functions such as DebugPrintWindowGroup. This can be very useful when debugging the structure of your window groups.
Parameters:
inGroup: The group whose name to set.
inName: The name of the group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus SetWindowGroupOwner | ( | WindowGroupRef | inGroup, |
| WindowRef | inWindow | ||
| ) |
Summary: Sets the window that owns a window group.
Discussion: The group and the window must have the same parent group. SetWindowGroupOwner currently requires that the group have no windows in it.
Parameters:
inGroup: The group whose owner to set.
inWindow: The group's new owner.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| OSStatus SetWindowGroupParent | ( | WindowGroupRef | inGroup, |
| WindowGroupRef | inNewGroup | ||
| ) |
Summary: Sets the window group that contains a group.
Discussion: SetWindowGroupParent currently requires that the group have no windows in it.
Parameters:
inGroup: The group whose containing group to change.
inNewGroup: The new containing group.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| void SetWindowKind | ( | WindowRef | window, |
| short | kind | ||
| ) |
| OSStatus SetWindowModality | ( | WindowRef | inWindow, |
| WindowModality | inModalKind, | ||
| WindowRef | inUnavailableWindow | ||
| ) |
Summary: Sets the modality of a window.
Discussion: The modality of a window is used by the Carbon event manager to automatically determine appropriate event handling.
Parameters:
inWindow: The window whose modality to set.
inModalKind: The new modality for the window.
inUnavailableWindow: If the window is becoming window-modal, this parameter specifies the window to which the inWindow parameter is modal. The unavailableWindow will not be available while inWindow is in window-modal state.
Set a PicHandle for alternative updating.
SetWindowPic stores a PicHandle into the WindowRecord . A non-NIL value causes the Window Manager to draw that picture instead of generating an update event. You will no longer receive update events for theWindow . theWindow is a WindowPtr obtained via NewWindow or GetNewWindow . thePicture is a handle of a picture that will be drawn automatically when the window needs to be updated.
none
This function causes thePicture to be stored in the windowPic field of the WindowRecord structure of theWindow . When that field is an address (as opposed to the default value of NIL), update events will not get generated when that window is moved, sized, uncovered, etc. Instead, thePicture is drawn. SetWindowPic is typically used for windows that are never changed; for instance, an introduction window or a one-screen help window. It can also be used to force fast screen updates, at the expense of extravagant memory usage. For instance, you could use CopyBits to generate a picture of the content region of your window and use SetWindowPic to point to that picture. Now you will find that moving, uncovering, or sizing the window will go faster than would be possible when an update event occurred and you needed to redraw it from scratch. Use SetWindowPic again, setting thePicture = NIL in order to resume normal generation of update events.
| OSStatus SetWindowProperty | ( | WindowRef | window, |
| PropertyCreator | propertyCreator, | ||
| PropertyTag | propertyTag, | ||
| UInt32 | propertySize, | ||
| void * | propertyBuffer | ||
| ) |
| OSStatus SetWindowProxyAlias | ( | WindowRef | window, |
| AliasHandle | alias | ||
| ) |
| OSStatus SetWindowProxyCreatorAndType | ( | WindowRef | window, |
| OSType | fileCreator, | ||
| OSType | fileType, | ||
| SInt16 | vRefNum | ||
| ) |
SetWindowProxyCreatorAndType()
| OSStatus SetWindowProxyFSSpec | ( | WindowRef | window, |
| const FSSpec * | inFile | ||
| ) |
Routines available from Mac OS 8.5 forward SetWindowProxyFSSpec()
| OSStatus SetWindowProxyIcon | ( | WindowRef | window, |
| IconRef | icon | ||
| ) |
| OSStatus SetWindowTitleWithCFString | ( | WindowRef | inWindow, |
| CFStringRef | inString | ||
| ) |
Obtain the text of a window's title.
GetWTitle obtains the title of the specified window. theWindow is a WindowPtr obtained via NewWindow or GetNewWindow . theTitle is the address of a pointer to a Str255. Upon return, it will contain a pointer to the text of the title.
none Example #include < Windows.h > WindowPtr myWindow; Str255 *theTitle; ... GetWTitle(myWindow, &theTitle); PtoCstr(theTitle); // ASCIIZ for printf() printf("The current title is %s\n", theTitle); </ pre>
later
later
later
/
void
GetWTitle(WindowRef window, Str255 title);
/**
SetWindowTitleWithCFString()
@par Non-Carbon CFM: not available
@par Carbon Lib: in CarbonLib 1.1 and later
@par Mac OS X: in version 10.0 and later
| void SetWRefCon | ( | WindowRef | window, |
| long | data | ||
| ) |
Set the reference value (refCon) for a window.
SetWRefCon sets the "reference constant" (the WindowRecord .refCon value) for the selected window. The reference constant is an application-defined value you can use for any purpose. theWindow is a WindowPtr obtained via NewWindow or GetNewWindow . newRefis a 4-byte value for the private use of your application. This value will be stored in the WindowRecord and will be available via GetWRefCon .
none
Use this to store some identifier or other information so that you can more easily classify or identify the window later. You may wish to use the WindowRecord .refCon field to hold a pointer or Handle to additional information about the window. Just allocate some storage on the heap and save its address using this call. Be sure to free the allocation when you close the window.
| void setwtitle | ( | WindowRef | window, |
| const char * | title | ||
| ) |
| void SetWTitle | ( | WindowRef | window, |
| ConstStr255Param | title | ||
| ) |
| OSStatus ShowFloatingWindows | ( | void | ) |
can be NULL Routines available from Mac OS 8.6 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward ShowFloatingWindows()
can be NULL © Sheets
Sheets are a new user interface object in Mac OS X. A sheet is a modal alert or dialog, but unlike a traditional alert or dialog window (which is visually separate from the frontmost document window), a sheet appears to be attached to its parent window; it moves and z-orders simultaneously with its parent. Furthermore, sheets on Mac OS X use a new type of modality called window modality. A traditional alert or dialog is app-modal; it prevents user interaction with all other windows in the current application. A sheet is window-modal; it only prevents user interaction with its parent window, and events continue to flow to other windows in the application.
© Sheet Event Handling
Implementing a sheet window in your application generally requires some modifications to your event-handling code. A traditional app-modal window is implemented using a modal event loop; your application starts a new event loop (either by processing events itself, or by calling ModalDialog), which does not return back to your application's main event loop until the app-modal window has closed.
Starting a new event loop doesn't work with sheets, because typically the modal event loop will only handle events destined for the sheet, and not events for other windows, but a sheet only blocks events for its parent window, and your application must still handle events for the rest of its windows as normal. Therefore, you will usually not use a modal event loop to handle events in a sheet. Rather, you will show the sheet window, and then return directly back to your main event loop. The Carbon Event Manager automatically prevents events in the sheet's parent window from reaching it; events in your application's other windows are still returned to you via WaitNextEvent or your application's Carbon event handlers, where you can process them as normal.
You have several choices for handling events in the sheet itself. A sheet is, at the most basic level, simply another window in your application, and you can use any of the standard event-handling APIs to receive events in the sheet. For example, you can:
- receive events in the sheet via WaitNextEvent, and handle them
directly in your main event loop
- create the sheet using Dialog Manager APIs, and use IsDialogEvent
and DialogSelect to handle events in the sheet
- install Carbon event handlers on the sheet, and respond to events in
your handlers
Which approach you choose is up to you.
© Sheets in CarbonLib
The sheet window class, sheet WDEF procIDs, and ShowSheetWindow, HideSheetWindow, and GetSheetWindowParent APIs are implemented in CarbonLib starting with version 1.3. However, since Mac OS 8 and 9 do not traditionally support a window-modal user interface, sheet windows are displayed as app-modal windows by CarbonLib. From your application's perspective, event handling for a sheet in CarbonLib is the same as event handling for a sheet on X; ShowSheetWindow still returns immediately, and your application should still return back to its main event loop and be prepared to handle events in other windows. On CarbonLib, your application will simply never receive an user input in any of your other windows; since the sheet has application modality, the Carbon Event Manager will discard events in any windows other than the sheet.
©©Creating a Sheet
A sheet is just a normal window with a special window class: kSheetWindowClass or kSheetAlertWindowClass. As such, it can be created in any of the ways you might create a window: NewWindow, NewCWindow, CreateNewWindow, GetNewWindow, GetNewCWindow, CreateWindowFromCollection, CreateWindowFromResource, CreateWindowFromNib, NewDialog, NewColorDialog, NewFeaturesDialog, or GetNewDialog.
The Window Manager defines two window classes and two WDEF procIDs for sheets:
- kSheetWindowClass and kSheetAlertWindowClass - kWindowSheetProc and kWindowSheetAlertProc
The window classes may be used with CreateNewWindow, CreateWindowFromCollection, and CreateWindowFromResource; the WDEF procIDs may be used with NewWindow, NewCWindow, NewDialog, NewColorDialog, NewFeaturesDialog, and in 'WDEF' and 'DLOG' resources.
The first release of Mac OS X only supports kSheetWindowClass and kWindowSheetProc; it does not support kSheetAlertWindowClass or kWindowSheetAlertProc. The latter window class and procID were added in CarbonLib 1.3 and will be added to a future version of Mac OS X. A new window class and procID were necessary for CarbonLib support because sheets can be used for both alerts ("Do you want to save changes before closing this window?") and dialogs (a Navigation Services PutFile dialog). On Mac OS X, sheet windows have the same appearance when used for either an alert or a dialog, but on Mac OS 8 and 9, alert windows have a different appearance from dialog windows. Two separate window classes are necessary for CarbonLib to know whether to display a sheet using a movable alert or a movable dialog window. Therefore, it is recommended that you use kSheetAlertWindowClass when creating a sheet window that will be used to display an alert, although this is not required.
© Displaying a Sheet
A sheet is made visible by calling the ShowSheetWindow API. This API shows the sheet, using whatever visual effects are appropriate for the platform, and then returns immediately. On Mac OS X, it creates a window group and places the sheet and its parent window into the group; it also marks the sheet as window-modal. On CarbonLib, it marks the sheet as app-modal but does not create a window group.
On Mac OS X, before the sheet window is actually made visible, ShowSheetWindow sends a kEventWindowDrawContent event to the sheet window, asking it to draw its content into the window's offscreen buffer. The sheet must handle this event, or its content area will be blank after the sheet becomes visible.
In some cases, this handler is automatically provided for you:
- If you create your sheet window using the Dialog Manager, the Dialog
Manager automatically installs a handler for this event that calls DrawDialog, so you don't need to install the handler yourself.
- If you install the standard Carbon window event handler on your
sheet window (using kWindowStandardHandlerAttribute or InstallStandardEventHandler), the standard handler automatically handles this event and calls DrawControls.
Typically, your event handling code (whether it uses WaitNextEvent, the Dialog Manager, or Carbon event handlers) will receive and respond to events in the sheet until the user does something that should cause the sheet to close. This might be clicking in an OK or Cancel button, for example. At that time, your event handling code should call HideSheetWindow. The sheet window will hide, but will not be destroyed, so you can use it again later if you want. ShowSheetWindow()
Summary: Shows a sheet window using appropriate visual effects.
Discussion: ShowSheetWindow is implemented in both CarbonLib 1.3 and Mac OS X. Since Mac OS 9 does not use a window-modal user interface for alerts and dialogs, ShowSheetWindow in CarbonLib does not bind the sheet to the parent window in the same way that it does on Mac OS X; instead, it shows the sheet like a standard movable-modal dialog window. Sheet windows must use the window classes kSheetWindowClass or kSheetAlertWindowClass to get the right appearance on both platforms.
Parameters:
inSheet: The sheet window to show.
inParentWindow: The sheet's parent window.
| OSStatus StoreWindowIntoCollection | ( | WindowRef | window, |
| Collection | collection | ||
| ) |
window persistence StoreWindowIntoCollection()
| OSStatus TrackWindowProxyFromExistingDrag | ( | WindowRef | window, |
| Point | startPt, | ||
| DragReference | drag, | ||
| RgnHandle | inDragOutlineRgn | ||
| ) |
TrackWindowProxyFromExistingDrag()
| OSStatus TransitionWindow | ( | WindowRef | inWindow, |
| WindowTransitionEffect | inEffect, | ||
| WindowTransitionAction | inAction, | ||
| const Rect * | inRect | ||
| ) |
Summary: Shows, hides, moves, or resizes a window with appropriate animation and sound.
Parameters:
inWindow: The window on which to act.
inEffect: The type of visual effect to use. TransitionWindow supports the Zoom and Slide transition effects. The Slide effect is supported on Mac OS X and in CarbonLib 1.5 and later.
inAction: The action to take on the window. TransitionWindow supports the Show, Hide, Move, and Resize actions. The Move and Resize actions are supported on Mac OS X and in CarbonLib 1.5 and later.
inRect: A screen rect in global coordinates. The interpretation of the rect is dependent on the transition action; see the documentation for each action for details. May be NULL for some transition actions.
| OSStatus TransitionWindowAndParent | ( | WindowRef | inWindow, |
| WindowRef | inParentWindow, | ||
| WindowTransitionEffect | inEffect, | ||
| WindowTransitionAction | inAction, | ||
| const Rect * | inRect | ||
| ) |
can be NULL TransitionWindowAndParent()
Summary: Shows or hides a window, potentially also moving a second window, with appropriate animation and sound.
Parameters:
inWindow: The window on which to act.
inParentWindow: The window to which the primary window is related.
inEffect: The type of visual effect to use. TransitionWindowAndParent supports the Sheet transition effect.
inAction: The action to take on the window. TransitionWindowAndParent supports the Show and Hide actions.
inRect: A screen rect in global coordinates. The interpretation of the rect is dependent on the transition action; see the documentation for each action for details. May be NULL for some transition actions.
| OSStatus UpdateCollapsedWindowDockTile | ( | WindowRef | inWindow | ) |
UpdateCollapsedWindowDockTile()
Discussion: Automatically updates the image of a particular window in the dock to the current contents of the window. Use this for periodic updates, etc. Do not use this for animation purposes, if you want animation, use the above create/release drawing context APIs.
Parameters:
inWindow: The window to update the dock tile for. If this window is not collapsed, an error is returned.
Result: An operating system result code.
@par Non-Carbon CFM: not available @par Carbon Lib: not available in CarbonLib 1.x, is available on Mac OS
X version 10.0 and later
| void ValidRect | ( | const Rect * | goodRect | ) |
| void ValidRgn | ( | RgnHandle | goodRgn | ) |
| outMenuResult | can be NULL |
can be NULL ZoomWindowIdeal()
| short kind |
| const Rect* rect |