Mac OS 9
MacWindows.h File Reference

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 GetWindowRegionRecGetWindowRegionPtr
 
typedef GetWindowRegionRecGetWindowRegionRecPtr
 
typedef struct SetupWindowProxyDragImageRec SetupWindowProxyDragImageRec
 
typedef struct MeasureWindowTitleRec MeasureWindowTitleRec
 
typedef MeasureWindowTitleRecMeasureWindowTitleRecPtr
 
typedef struct GetGrowImageRegionRec GetGrowImageRegionRec
 
typedef SInt16 WindowPartCode
 
typedef SInt16 WindowDefPartCode
 
typedef struct WinCTab WinCTab
 
typedef WinCTabWCTabPtr
 
typedef WCTabPtrWCTabHandle
 
typedef struct WindowRecord WindowRecord
 
typedef WindowRecordWindowPeek
 
typedef struct CWindowRecord CWindowRecord
 
typedef CWindowRecordCWindowPeek
 
typedef struct AuxWinRec AuxWinRec
 
typedef AuxWinRecAuxWinPtr
 
typedef AuxWinPtrAuxWinHandle
 
typedef struct BasicWindowDescription BasicWindowDescription
 
typedef struct WStateData WStateData
 
typedef WStateDataWStateDataPtr
 
typedef WStateDataPtrWStateDataHandle
 
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 WindowDefSpecWindowDefSpecPtr
 
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)
 
RectGetWindowStandardState (WindowRef window, Rect *rect)
 
 DEFINE_API (Rect *) GetWindowStandardState(WindowRef window
 
RectGetWindowUserState (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)
 
RectGetWindowPortBounds (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

Rectrect
 
short kind
 
Rectbounds
 

Detailed Description

Window Manager Interfaces.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1997-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ CallWindowPaintProc

#define CallWindowPaintProc (   userRoutine,
  device,
  qdContext,
  window,
  inClientPaintRgn,
  outSystemPaintRgn,
  refCon 
)
Value:
InvokeWindowPaintUPP(device, qdContext, window, inClientPaintRgn, \
outSystemPaintRgn, refCon, userRoutine)
OSStatus InvokeWindowPaintUPP(GDHandle device, GrafPtr qdContext, WindowRef window, RgnHandle inClientPaintRgn, RgnHandle outSystemPaintRgn, void *refCon, WindowPaintUPP userUPP)
Definition: Quickdraw.h:1648

◆ InvokeDeskHookUPP

#define InvokeDeskHookUPP (   mouseClick,
  theEvent,
  userUPP 
)
Value:
CALL_TWO_PARAMETER_UPP((userUPP), uppDeskHookProcInfo, (mouseClick), \
Definition: Events.h:224

◆ InvokeWindowDefUPP

#define InvokeWindowDefUPP (   varCode,
  window,
  message,
  param,
  userUPP 
)
Value:
(long)CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowDefProcInfo, (varCode), \
(window), (message), (param))

◆ InvokeWindowPaintUPP

#define InvokeWindowPaintUPP (   device,
  qdContext,
  window,
  inClientPaintRgn,
  outSystemPaintRgn,
  refCon,
  userUPP 
)
Value:
(OSStatus) CALL_SIX_PARAMETER_UPP( \
(userUPP), uppWindowPaintProcInfo, (device), (qdContext), (window), \
(inClientPaintRgn), (outSystemPaintRgn), (refCon))

◆ kFirstWindowGroup

#define kFirstWindowGroup   ((WindowGroupRef)(-1))

may be passed as the "behindGroup" parameter to SendWindowGroupBehind

◆ kFirstWindowOfClass

#define kFirstWindowOfClass   ((WindowRef)(-1))

Special cases for the ©behind© parameter in window creation calls.

◆ kFirstWindowOfGroup

#define kFirstWindowOfGroup   ((WindowRef)(-1))

may be passed as the "behindWindow" parameter to NewCWindow and SendBehind

◆ NewDeskHookUPP

#define NewDeskHookUPP (   userRoutine)
Value:
(DeskHookUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppDeskHookProcInfo, GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

register no_return_value Func(1_byte:D0, 4_bytes:A0)

◆ NewWindowDefProc

#define NewWindowDefProc (   userRoutine)    NewWindowDefUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewWindowDefUPP

#define NewWindowDefUPP (   userRoutine)
Value:
(WindowDefUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppWindowDefProcInfo, GetCurrentArchitecture())

pascal 4_bytes Func(2_bytes, 4_bytes, 2_bytes, 4_bytes)

◆ NewWindowPaintUPP

#define NewWindowPaintUPP (   userRoutine)
Value:
(WindowPaintUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowPaintProcInfo, \
GetCurrentArchitecture())

pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes)

Typedef Documentation

◆ AuxWinRec

typedef struct AuxWinRec AuxWinRec

!OPAQUE_TOOLBOX_STRUCTS

◆ CWindowRecord

typedef struct CWindowRecord CWindowRecord

!OPAQUE_TOOLBOX_STRUCTS

◆ PropertyCreator

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

◆ ScrollWindowOptions

typedef UInt32 ScrollWindowOptions

can be NULL

◆ WindowActivationScope

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.

◆ WindowConstrainOptions

typedef UInt32 WindowConstrainOptions

can be NULL WindowConstrainOptions

◆ WindowGroupAttributes

typedef UInt32 WindowGroupAttributes

WindowGroupAttributes

Summary: These are attributes that may be applied to a window group.

◆ WindowGroupContentOptions

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.

◆ WindowGroupRef

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.

◆ WindowLatentVisibility

typedef UInt32 WindowLatentVisibility

©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© ©©Latent window visibility ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© WindowLatentVisibility

Summary: Reasons why a window is currently invisible when ordinarily it would be visible.

◆ WindowModality

typedef UInt32 WindowModality

© Window Modality WindowModality

◆ WindowPaintProcOptions

typedef OptionBits WindowPaintProcOptions

Routines available from Mac OS 9.0 forward

◆ WindowPositionMethod

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

◆ WindowTransitionAction

typedef UInt32 WindowTransitionAction

WindowTransitionAction

Summary: Modifications to window state that are provided by TransitionWindow

◆ WindowTransitionEffect

typedef UInt32 WindowTransitionEffect

TransitionWindow displays a window with accompanying animation and sound. WindowTransitionEffect

Summary: Visual effects that are provided by TransitionWindow

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMovableAlertWindowClass 

©I need your attention now.©

kModalWindowClass 

©I need your attention now, but I©m kind enough to let you switch out of this app to do other things.©

kMovableModalWindowClass 

system modal, not draggable

kFloatingWindowClass 

application modal, draggable

kDocumentWindowClass 

floats above all other application windows

kUtilityWindowClass 

document windows

kHelpWindowClass 

system-wide floating windows (TSM, AppleGuide) (available in CarbonLib 1.1)

kSheetWindowClass 

help window (no frame; coachmarks, help tags ) (available in CarbonLib 1.1)

kToolbarWindowClass 

sheet windows for dialogs (available in Mac OS X and CarbonLib 1.3)

kPlainWindowClass 

toolbar windows (above documents, below floating windows) (available in CarbonLib 1.1)

kOverlayWindowClass 

plain window (in document layer)

kSheetAlertWindowClass 

transparent window which allows 'screen' drawing via CoreGraphics (Mac OS X only)

kAltPlainWindowClass 

sheet windows for alerts (available in Mac OS X after 10.0.x and CarbonLib 1.3)

kAllWindowClasses 

alternate plain window (in document layer) (available in Mac OS X after 10.0.x and CarbonLib 1.3)

◆ anonymous enum

anonymous enum

Summary: Window attributes

Enumerator
kWindowNoAttributes 

A constant with value zero; the lack of any attributes.

kWindowCloseBoxAttribute 

This window has a close box. Available for windows of kDocumentWindowClass, kFloatingWindowClass, and kUtilityWindowClass.

kWindowHorizontalZoomAttribute 

This window changes width when zooming. Available for windows of kDocumentWindowClass, kFloatingWindowClass, and kUtilityWindowClass.

kWindowVerticalZoomAttribute 

This window changes height when zooming. Available for windows of kDocumentWindowClass, kFloatingWindowClass, and kUtilityWindowClass.

kWindowFullZoomAttribute 

This window changes both width and height when zooming. Available for windows of kDocumentWindowClass, kFloatingWindowClass, and kUtilityWindowClass.

kWindowCollapseBoxAttribute 

This window has a collapse box. Available for windows of kDocumentWindowClass and, on Mac OS 9, kFloatingWindowClass and kUtilityWindowClass; not available for windows of kFloatingWindowClass or kUtilityWindowClass on Mac OS X.

kWindowResizableAttribute 

This window can be resized. Available for windows of kDocumentWindowClass, kMovableModalWindowClass, kFloatingWindowClass, kUtilityWindowClass, and kSheetWindowClass.

kWindowSideTitlebarAttribute 

This window has a vertical titlebar on the side of the window. Available for windows of kFloatingWindowClass and kUtilityWindowClass.

kWindowToolbarButtonAttribute 

This window has a toolbar button. Available for windows of kDocumentWindowClass on Mac OS X.

kWindowNoUpdatesAttribute 

This window receives no update events. Available for all windows.

kWindowNoActivatesAttribute 

This window receives no activate events. Available for all windows.

kWindowOpaqueForEventsAttribute 

This window receives mouse events even for areas of the window that are transparent (have an alpha channel component of zero). Available for windows of kOverlayWindowClass on Mac OS X.

kWindowNoShadowAttribute 

This window has no shadow. Available for all windows on Mac OS X. This attribute is automatically given to windows of kOverlayWindowClass.

kWindowHideOnSuspendAttribute 

This window is automatically hidden on suspend and shown on resume. Available for all windows. This attribute is automatically given to windows of kFloatingWindowClass, kHelpWindowClass, and kToolbarWindowClass.

kWindowStandardHandlerAttribute 

This window has the standard Carbon window event handler installed. Available for all windows.

kWindowHideOnFullScreenAttribute 

This window is automatically hidden during fullscreen mode (when the menubar is invisible) and shown afterwards. Available for all windows. This attribute is automatically given to windows of kUtilityWindowClass.

kWindowInWindowMenuAttribute 

This window is added to the standard Window menu. Available for windows of kDocumentWindowClass. This attribute is automatically given to windows of kDocumentWindowClass.

kWindowLiveResizeAttribute 

This window supports live resizing. Available for all windows on Mac OS X.

kWindowNoConstrainAttribute 

This window will not be repositioned by the default kEventWindowConstrain handler in response to changes in monitor size, Dock position, and so on. Available for all windows on Mac OS X after 10.0.x.

kWindowStandardDocumentAttributes 

The minimum set of window attributes commonly used by document windows.

kWindowStandardFloatingAttributes 

The minimum set of window attributes commonly used by floating windows.

◆ anonymous enum

anonymous enum
Enumerator
kRoundWindowDefinition 

for document windows and dialogs

kFloatingWindowDefinition 

old da-style window

◆ anonymous enum

anonymous enum
Enumerator
kDocumentWindowVariantCode 

for use with kStandardWindowDefinition

kSideFloaterVariantCode 

for use with kFloatingWindowDefinition

◆ anonymous enum

anonymous enum
Enumerator
documentProc 

classic ids

floatProc 

floating window defproc ids

◆ anonymous enum

anonymous enum

The rDocProc (rounded WDEF, ala calculator) is not supported in Carbon.

◆ anonymous enum

anonymous enum

CALL_NOT_IN_CARBON

Enumerator
kWindowDocumentDefProcResID 

Resource IDs for theme-savvy window defprocs

◆ anonymous enum

anonymous enum
Enumerator
kWindowDocumentProc 

Proc IDs for theme-savvy windows

◆ anonymous enum

anonymous enum
Enumerator
kWindowPlainDialogProc 

Proc IDs for theme-savvy dialogs

◆ anonymous enum

anonymous enum
Enumerator
kWindowMovableModalGrowProc 

procIDs available from Mac OS 8.1 (Appearance 1.0.1) forward

◆ anonymous enum

anonymous enum
Enumerator
kWindowFloatProc 

Proc IDs for top title bar theme-savvy floating windows

◆ anonymous enum

anonymous enum
Enumerator
kWindowFloatSideProc 

Proc IDs for side title bar theme-savvy floating windows

◆ anonymous enum

anonymous enum
Enumerator
kWindowSheetProc 

Proc IDs for sheet windows

kWindowSheetAlertProc 

available in Mac OS X and CarbonLib 1.3

◆ anonymous enum

anonymous enum

Discussion: Window defproc IDs for simple windows

Enumerator
kWindowSimpleProc 

Proc IDs for simple windows A window that has no structure region; the content covers the entire window.

kWindowSimpleFrameProc 

A window that has a 1-pixel black frame as its structure.

◆ 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
Enumerator
kWindowTitleBarRgn 

Region values to pass into GetWindowRegion & GetWindowBounds

kWindowStructureRgn 

Mac OS 8.5 forward

kWindowUpdateRgn 

Content area of the window; empty when the window is collapsed

kWindowOpaqueRgn 

Carbon forward

kWindowGlobalPortRgn 
Mac OS X: Area of window considered to be opaque.
Only valid for windows with alpha channels.

◆ anonymous enum

anonymous enum
Enumerator
inProxyIcon 

Mac OS 8.0 forward

inToolbarButton 

Mac OS 8.5 forward

inStructure 

Mac OS X forward

◆ anonymous enum

anonymous enum
Enumerator
wInProxyIcon 

Mac OS 8.0 forward

wInToolbarButton 

Mac OS 8.5 forward

wInStructure 

Mac OS X forward

◆ anonymous enum

anonymous enum

Messages available from Mac OS 8.0 forward

◆ anonymous enum

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

anonymous enum

Messages only available in Carbon

◆ anonymous enum

anonymous enum

old names

◆ anonymous enum

anonymous enum

Feature bits available from Mac OS 8.5 forward

Enumerator
kWindowSupportsModifiedBit 

window definition supports kWindowMsgDragHilite

kWindowCanDrawInCurrentPort 

window definition supports kWindowMsgModified

kWindowCanSetupProxyDragImage 

window definition supports kWindowMsgDrawInCurrentPort

kWindowCanMeasureTitle 

window definition supports kWindowMsgSetupProxyDragImage

kWindowWantsDisposeAtProcessDeath 

window definition supports kWindowMsgMeasureTitle

kWindowSupportsGetGrowImageRegion 

window definition wants a Dispose message for windows still extant during ExitToShell

kWindowDefSupportsColorGrafPort 

window definition will calculate the grow image region manually.

◆ anonymous enum

anonymous enum

Feature bits for post MacOS 10.0

◆ anonymous enum

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

anonymous enum

© Region Dragging Constants

◆ anonymous enum

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

anonymous enum

constants for the stateflags bit field

◆ anonymous enum

anonymous enum

the window manager stores the default collection items using these IDs

Enumerator
kStoredBasicWindowDescriptionID 

Only Apple collection items will be of this tag

kStoredWindowPascalTitleID 

BasicWindowDescription

◆ anonymous enum

anonymous enum

CALL_NOT_IN_CARBON

Enumerator
kWindowDefObjectClass 

raw proc-ptr based access

kWindowDefProcID 

event-based definition (Carbon 1.1 or later)

◆ anonymous enum

anonymous enum
Enumerator
kWindowModalityNone 

A window does not prevent interaction with any other window in the system.

kWindowModalitySystemModal 

A window prevents interaction with all other windows in the system. Only available in CarbonLib. Mapped to kWindowModalityAppModal in Mac OS X.

kWindowModalityAppModal 

A window prevents interaction with other windows in the same process.

kWindowModalityWindowModal 

A window prevents interaction with a single other window.

◆ anonymous enum

anonymous enum
Enumerator
kWindowGroupAttrSelectAsLayer 

Makes the group behave somewhat as a layer of windows that move together. When any window in the group is brought to the front of the group, the entire group will also be brought to the front of the containing group's child hierarchy.

kWindowGroupAttrMoveTogether 

The positions of the contents of this group with respect to each other cannot be changed. When one item moves, all other items are moved simultaneously.

kWindowGroupAttrLayerTogether 

The z-order of the contents of this group with respect to each other cannot be changed. When one item changes z-order, all other items are moved simulataneously. For purposes of z-ordering, the group and all its subgroups are effectively treated as if they were a single window in the parent group of this group.

kWindowGroupAttrSharedActivation 

The active state of the windows in this group is shared. The windows in the group are activated or deactivated according to the activation scope of the group, but when any window in the group changes activation, all other windows change to match.

kWindowGroupAttrHideOnCollapse 

When any window in this group is collapsed, all other windows in this group are hidden. All subgroups of this group are also examined for the HideOnCollapse attribute, and any the windows of any subgroup with this attribute are also hidden. All windows will be shown again when the collapsed window is expanded.

◆ anonymous enum

anonymous enum
Enumerator
kWindowActivationScopeNone 

Windows with this scope are never activated by the Window Manager. This should be used when the window©s visual state does not change based on activation (for example, tooltip windows), or when the client wishes to manually control all activation. The window owner is free to explicitly activate windows using the ActivateWindow and DeactivateWindow APIs.

kWindowActivationScopeIndependent 

Windows with this scope are always active if visible. Windows with this scope are unaffected by the activation state of other windows. This activation scope is automatically used by floating windows.

kWindowActivationScopeAll 

Windows with this scope are activated relative to other windows with the same scope in the current process. Only one window with this scope can be active in the entire process. This activation scope is automatically used by document and dialog windows.

◆ anonymous enum

anonymous enum

Summary: These are constants that can be used for the inNextGroup parameter to GetSiblingWindowGroup.

Enumerator
kNextWindowGroup 

Indicates that GetSiblingWindowGroup should return the next deeper sibling group in the z-order.

kPreviousWindowGroup 

Indicates that GetSiblingWindowGroup should return the next higher sibling group in the z-order.

◆ anonymous enum

anonymous enum
Enumerator
kWindowGroupContentsReturnWindows 

Indicates that Count/GetWindowGroupContents should return the windows in a group. If this option is not set, these APIs return the groups in a group.

kWindowGroupContentsRecurse 

Indicates that Count/GetWindowGroupContents should include the contents of groups contained by the specified group. If this option is not set, these APIs only return information about the specified group©s contents.

kWindowGroupContentsVisible 

Indicates that Count/GetWindowGroupContents should only include visible windows. Only valid when kWindowGroupContentsReturnWindows is specified.

◆ anonymous enum

anonymous enum
Enumerator
kScrollWindowEraseToPortBackground 

add the exposed area to the window©s update region

◆ anonymous enum

anonymous enum
Enumerator
kWindowZoomTransitionEffect 

Finder-like zoom rectangles. Use with TransitionWindow and Show or Hide transition actions

kWindowSheetTransitionEffect 

Zoom in/out from parent. Use with TransitionWindowAndParent and Show or Hide transition actions. Available in Mac OS X, and in CarbonLib 1.5 and later.

kWindowSlideTransitionEffect 

Slide the window into its new position. Use with TransitionWindow and Move or Resize transition actions. Available in Mac OS X, and in CarbonLib 1.5 and later.

◆ anonymous enum

anonymous enum
Enumerator
kWindowShowTransitionAction 

Shows the window. Use with the Zoom or Sheet transition effects. The inRect parameter is the global coordinates from which to start the animation; if inRect is NULL, the animation begins at the center of the window.

kWindowHideTransitionAction 

Hides the window. Use with the Zoom or Sheet transition effects. The inRect parameter is the global coordinates at which to end the animation; if inRect is NULL, the animation ends at the center of the window.

kWindowMoveTransitionAction 

Moves the window. Use with the Slide transition effect. The inRect parameter is the global coordinates of the window's new structure bounds; inRect must be non-NULL. Available in Mac OS X, and in CarbonLib 1.5 and later.

kWindowResizeTransitionAction 

Resizes the window. Use with the Slide transition effect. The inRect parameter is the global coordinates of the window's new structure bounds; inRect must be non-NULL. Available in Mac OS X, and in CarbonLib 1.5 and later.

◆ anonymous enum

anonymous enum
Enumerator
kWindowConstrainMayResize 

The window may be resized if necessary to make it fit onscreen.

kWindowConstrainMoveRegardlessOfFit 

The window will be moved even if it doesn't fit entirely onscreen.

kWindowConstrainAllowPartial 

Allow partial intersection of the specified window region with the screen, instead of requiring total intersection.

kWindowConstrainCalcOnly 

Only calculate the new window bounds; don't actually move the window.

kWindowConstrainUseTransitionWindow 

Use TransitionWindow with kWindowSlideTransitionEffect to move windows onscreen.

kWindowConstrainStandardOptions 

The most common options: don't resize the window, move the window regardless of fit to the screen, require total intersection of the specified window region with the screen, and do actually move the window.

◆ anonymous enum

anonymous enum
Enumerator
kWindowLatentVisibleFloater 

Window is a floater and floating windows are hidden

kWindowLatentVisibleSuspend 

Window has HideOnSuspend and we are suspended

kWindowLatentVisibleFullScreen 

Window has HideOnFullScreen and we are full-screen

kWindowLatentVisibleAppHidden 

Window's process is hidden

kWindowLatentVisibleCollapsedOwner 

Window is in an owned group and the owner was collapsed

kWindowLatentVisibleCollapsedGroup 

Window is in a HideOnCollapse group and another window in the group was collapsed

◆ anonymous enum

anonymous enum

Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward

◆ anonymous enum

anonymous enum

©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© Obsolete symbolic names ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©

◆ anonymous enum

anonymous enum

©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© Obsolete symbolic names ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©

Function Documentation

◆ ActivateWindow()

OSStatus ActivateWindow ( WindowRef  inWindow,
Boolean  inActivate 
)

ActivateWindow()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ ActiveNonFloatingWindow()

WindowRef ActiveNonFloatingWindow ( void  )

©©Window activation


ActiveNonFloatingWindow()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ AreFloatingWindowsVisible()

Boolean AreFloatingWindowsVisible ( void  )

AreFloatingWindowsVisible()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ BeginUpdate()

void BeginUpdate ( WindowRef  window)

CALL_NOT_IN_CARBON BeginUpdate()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ BeginWindowProxyDrag()

OSStatus BeginWindowProxyDrag ( WindowRef  window,
DragReference outNewDrag,
RgnHandle  outDragOutlineRgn 
)

BeginWindowProxyDrag()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ BringToFront()

void BringToFront ( WindowRef  window)

BringToFront()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CalcVis()

void CalcVis ( WindowRef  window)

CalcVis()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CalcVisBehind()

void CalcVisBehind ( WindowRef  startWindow,
RgnHandle  clobberedRgn 
)

CalcVisBehind()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
clobberedRgncan be NULL

◆ ChangeWindowAttributes()

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()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ChangeWindowGroupAttributes()

OSStatus ChangeWindowGroupAttributes ( WindowGroupRef  inGroup,
WindowGroupAttributes  setTheseAttributes,
WindowGroupAttributes  clearTheseAttributes 
)

ChangeWindowGroupAttributes()

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

Mac OS X: in version 10.0 and later

◆ ChangeWindowPropertyAttributes()

OSStatus ChangeWindowPropertyAttributes ( WindowRef  window,
OSType  propertyCreator,
OSType  propertyTag,
UInt32  attributesToSet,
UInt32  attributesToClear 
)

ChangeWindowPropertyAttributes()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CheckUpdate()

Boolean CheckUpdate ( EventRecord theEvent)

CheckUpdate()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ClipAbove()

void ClipAbove ( WindowRef  window)

can be NULL ClipAbove()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CloneWindow()

OSStatus CloneWindow ( WindowRef  window)

CloneWindow()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CollapseAllWindows()

OSStatus CollapseAllWindows ( Boolean  collapse)

CollapseAllWindows()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CollapseWindow()

OSStatus CollapseWindow ( WindowRef  window,
Boolean  collapse 
)

CollapseWindow()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ConstrainWindowToScreen()

OSStatus ConstrainWindowToScreen ( WindowRef  inWindowRef,
WindowRegionCode  inRegionCode,
WindowConstrainOptions  inOptions,
const Rect inScreenRect,
Rect outStructure 
)

ConstrainWindowToScreen()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later
Parameters
outStructurecan be NULL

◆ CopyWindowAlternateTitle()

OSStatus CopyWindowAlternateTitle ( WindowRef  inWindow,
CFStringRef *  outTitle 
)

CopyWindowAlternateTitle()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ CopyWindowGroupName()

OSStatus CopyWindowGroupName ( WindowGroupRef  inGroup,
CFStringRef *  outName 
)

CopyWindowGroupName()

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

Mac OS X: in version 10.0 and later

◆ CopyWindowTitleAsCFString()

OSStatus CopyWindowTitleAsCFString ( WindowRef  inWindow,
CFStringRef *  outString 
)

CopyWindowTitleAsCFString()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ CountWindowGroupContents()

ItemCount CountWindowGroupContents ( WindowGroupRef  inGroup,
WindowGroupContentOptions  inOptions 
)

© Inspection of group contents


CountWindowGroupContents()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ CreateCustomWindow()

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()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateNewWindow()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateQDContextForCollapsedWindowDockTile()

OSStatus CreateQDContextForCollapsedWindowDockTile ( WindowRef  inWindow,
CGrafPtr outContext 
)

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

Mac OS X: in version 10.0 and later

◆ CreateStandardWindowMenu()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ CreateWindowFromCollection()

OSStatus CreateWindowFromCollection ( Collection  collection,
WindowRef outWindow 
)

CreateWindowFromCollection()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateWindowFromResource()

OSStatus CreateWindowFromResource ( SInt16  resID,
WindowRef outWindow 
)

Routines available from Mac OS 8.5 forward Create a window from a ©wind© resource CreateWindowFromResource()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateWindowGroup()

OSStatus CreateWindowGroup ( WindowGroupAttributes  inAttributes,
WindowGroupRef outGroup 
)

© Group creation, destruction, and refcounting


CreateWindowGroup()

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

Mac OS X: in version 10.0 and later

◆ DebugPrintAllWindowGroups()

void DebugPrintAllWindowGroups ( void  )

DebugPrintAllWindowGroups()

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

Mac OS X: in version 10.0 and later

◆ DebugPrintWindowGroup()

void DebugPrintWindowGroup ( WindowGroupRef  inGroup)

©©Debugging Utilities


DebugPrintWindowGroup()

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

Mac OS X: in version 10.0 and later

◆ DisableScreenUpdates()

OSStatus DisableScreenUpdates ( void  )

disable and enable screen updates for changes to the current application©s windows (OS X only for now) DisableScreenUpdates()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ DisposeDeskHookUPP()

void DisposeDeskHookUPP ( DeskHookUPP  userUPP)

DisposeDeskHookUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ DisposeWindow()

void DisposeWindow ( WindowRef  window)

DisposeWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeWindowDefUPP()

void DisposeWindowDefUPP ( WindowDefUPP  userUPP)

DisposeWindowDefUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeWindowPaintUPP()

void DisposeWindowPaintUPP ( WindowPaintUPP  userUPP)

CALL_NOT_IN_CARBON DisposeWindowPaintUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ draggrayrgn()

long draggrayrgn ( RgnHandle  theRgn,
Point startPt,
const Rect boundsRect,
const Rect slopRect,
short  axis,
DragGrayRgnUPP  actionProc 
)

draggrayrgn()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DragGrayRgn()

long DragGrayRgn ( RgnHandle  theRgn,
Point  startPt,
const Rect limitRect,
const Rect slopRect,
short  axis,
DragGrayRgnUPP  actionProc 
)

DragGrayRgn()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DragTheRgn()

long DragTheRgn ( RgnHandle  theRgn,
Point  startPt,
const Rect limitRect,
const Rect slopRect,
short  axis,
DragGrayRgnUPP  actionProc 
)

DragTheRgn()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ dragwindow()

void dragwindow ( WindowRef  window,
Point startPt,
const Rect boundsRect 
)

dragwindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DragWindow()

void DragWindow ( WindowRef  window,
Point  startPt,
const Rect boundsRect 
)

Note: boundsRect can only be NULL when linking to CarbonLib 1.0 forward DragWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
can be NULL

◆ DrawGrowIcon()

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()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DrawNew()

void DrawNew ( WindowRef  window,
Boolean  update 
)

DrawNew()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ EnableScreenUpdates()

OSStatus EnableScreenUpdates ( void  )

EnableScreenUpdates()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ EndUpdate()

void EndUpdate ( WindowRef  window)

EndUpdate()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EndWindowProxyDrag()

OSStatus EndWindowProxyDrag ( WindowRef  window,
DragReference  theDrag 
)

EndWindowProxyDrag()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ findwindow()

short findwindow ( Point thePoint,
WindowRef window 
)

findwindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ FindWindowOfClass()

OSStatus FindWindowOfClass ( const Point where,
WindowClass  inWindowClass,
WindowRef outWindow,
WindowPartCode *  outWindowPart 
)

FindWindowOfClass()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FrontNonFloatingWindow()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FrontWindow()

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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetAuxWin()

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
Carbon Lib: not available
Mac OS X: not available

◆ GetAvailableWindowAttributes()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.1 and later

◆ GetAvailableWindowPositioningBounds()

OSStatus GetAvailableWindowPositioningBounds ( GDHandle  inDevice,
Rect availableRect 
)

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ GetCWMgrPort()

void GetCWMgrPort ( CGrafPtr wMgrCPort)

Obtain a pointer to the Window Manager port.

  @par Non-Carbon CFM:   in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetFrontWindowOfClass()

WindowRef GetFrontWindowOfClass ( WindowClass  inWindowClass,
Boolean  mustBeVisible 
)

GetFrontWindowOfClass()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetGrayRgn()

RgnHandle GetGrayRgn ( void  )

GetGrayRgn()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetIndexedWindow()

OSStatus GetIndexedWindow ( WindowGroupRef  inGroup,
UInt32  inIndex,
WindowGroupContentOptions  inOptions,
WindowRef outWindow 
)

GetIndexedWindow()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ GetNewCWindow()

WindowRef GetNewCWindow ( short  windowID,
void *  wStorage,
WindowRef  behind 
)

GetNewCWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetNewWindow()

WindowRef GetNewWindow ( short  windowID,
void *  wStorage,
WindowRef  behind 
)

GetNewWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetNextWindowOfClass()

WindowRef GetNextWindowOfClass ( WindowRef  inWindow,
WindowClass  inWindowClass,
Boolean  mustBeVisible 
)

Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward GetNextWindowOfClass()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetSheetWindowParent()

OSStatus GetSheetWindowParent ( WindowRef  inSheet,
WindowRef outParentWindow 
)

GetSheetWindowParent()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ GetWindowActivationScope()

OSStatus GetWindowActivationScope ( WindowRef  inWindow,
WindowActivationScope outScope 
)

GetWindowActivationScope()

Summary: Retrieves a window©s activation scope.

Parameters:

inWindow: The window whose activation scope to retrieve.

outScope: On exit, the window©s activation scope.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ GetWindowAttributes()

OSStatus GetWindowAttributes ( WindowRef  window,
WindowAttributes *  outAttributes 
)

GetWindowAttributes()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowBounds()

OSStatus GetWindowBounds ( WindowRef  window,
WindowRegionCode  regionCode,
Rect globalBounds 
)

Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward GetWindowBounds()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowClass()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowContentColor()

OSStatus GetWindowContentColor ( WindowRef  window,
RGBColor color 
)

GetWindowContentColor()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowContentPattern()

OSStatus GetWindowContentPattern ( WindowRef  window,
PixPatHandle  outPixPat 
)

Routines available from Mac OS 8.5 forward GetWindowContentPattern()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowContentRgn()

void GetWindowContentRgn ( WindowRef  window,
RgnHandle  r 
)
inline

GetWindowContentRgn()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowDataHandle()

*Handle GetWindowDataHandle ( WindowRef  window)
inline

old accessors GetWindowDataHandle()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowFeatures()

OSStatus GetWindowFeatures ( WindowRef  window,
UInt32 *  outFeatures 
)

Routines available from Mac OS 8.0 (Appearance 1.0) forward GetWindowFeatures()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowFromPort()

WindowRef GetWindowFromPort ( CGrafPtr  port)

GetWindowFromPort()

Discussion: Needed to ©cast up© to a WindowRef from a GrafPtr

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowGoAwayFlag()

Boolean GetWindowGoAwayFlag ( WindowRef  window)

GetWindowGoAwayFlag()

Discussion: use GetWindowAttributes in Carbon

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowGreatestAreaDevice()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later
Parameters
outGreatestDeviceRectcan be NULL

◆ GetWindowGroup()

WindowGroupRef GetWindowGroup ( WindowRef  inWindow)

©©Group containment hierarchy manipulation


GetWindowGroup()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ GetWindowGroupAttributes()

OSStatus GetWindowGroupAttributes ( WindowGroupRef  inGroup,
WindowGroupAttributes outAttributes 
)

GetWindowGroupAttributes()

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

Mac OS X: in version 10.0 and later

◆ GetWindowGroupContents()

OSStatus GetWindowGroupContents ( WindowGroupRef  inGroup,
WindowGroupContentOptions  inOptions,
ItemCount  inAllowedItems,
ItemCount *  outNumItems,
void **  outItems 
)

GetWindowGroupContents()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later
Parameters
outItemscan be NULL

◆ GetWindowGroupLevel()

OSStatus GetWindowGroupLevel ( WindowGroupRef  inGroup,
SInt32 *  outLevel 
)

GetWindowGroupLevel()

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

Mac OS X: in version 10.0 and later

◆ GetWindowGroupOfClass()

WindowGroupRef GetWindowGroupOfClass ( WindowClass  windowClass)

GetWindowGroupOfClass()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ GetWindowGroupOwner()

WindowRef GetWindowGroupOwner ( WindowGroupRef  inGroup)

GetWindowGroupOwner()

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

Mac OS X: in version 10.0 and later

◆ GetWindowGroupParent()

WindowGroupRef GetWindowGroupParent ( WindowGroupRef  inGroup)

GetWindowGroupParent()

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

Mac OS X: in version 10.0 and later

◆ GetWindowGroupRetainCount()

ItemCount GetWindowGroupRetainCount ( WindowGroupRef  inGroup)

GetWindowGroupRetainCount()

Summary: Returns the refcount of a window group.

Parameters:

inGroup: The group whose refcount to return.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.1 and later

◆ GetWindowGroupSibling()

WindowGroupRef GetWindowGroupSibling ( WindowGroupRef  inGroup,
Boolean  inNextGroup 
)

GetWindowGroupSibling()

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

Mac OS X: in version 10.0 and later

◆ GetWindowIdealUserState()

OSStatus GetWindowIdealUserState ( WindowRef  window,
Rect userState 
)

GetWindowIdealUserState()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowIndex()

OSStatus GetWindowIndex ( WindowRef  inWindow,
WindowGroupRef  inStartGroup,
WindowGroupContentOptions  inOptions,
UInt32 *  outIndex 
)

GetWindowIndex()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ GetWindowKind()

short GetWindowKind ( WindowRef  window)

GetWindowKind()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowList()

WindowRef GetWindowList ( void  )

GetWindowList()

Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowModality()

OSStatus GetWindowModality ( WindowRef  inWindow,
WindowModality outModalKind,
WindowRef outUnavailableWindow 
)

GetWindowModality()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ GetWindowOwnerCount()

OSStatus GetWindowOwnerCount ( WindowRef  window,
UInt32 *  outCount 
)

window refcounting GetWindowOwnerCount()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowPic()

PicHandle GetWindowPic ( WindowRef  window)

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.
Returns
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.
Note
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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowPort()

CGrafPtr GetWindowPort ( WindowRef  window)

GetWindowPort()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowPortBounds()

Rect* GetWindowPortBounds ( WindowRef  window,
Rect bounds 
)

GetWindowPortBounds()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowProperty()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
propertyBuffercan be NULL

◆ GetWindowPropertyAttributes()

OSStatus GetWindowPropertyAttributes ( WindowRef  window,
OSType  propertyCreator,
OSType  propertyTag,
UInt32 *  attributes 
)

GetWindowPropertyAttributes()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowPropertySize()

OSStatus GetWindowPropertySize ( WindowRef  window,
PropertyCreator  creator,
PropertyTag  tag,
UInt32 *  size 
)

GetWindowPropertySize()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowProxyAlias()

OSStatus GetWindowProxyAlias ( WindowRef  window,
AliasHandle alias 
)

GetWindowProxyAlias()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowProxyFSSpec()

OSStatus GetWindowProxyFSSpec ( WindowRef  window,
FSSpec *  outFile 
)

GetWindowProxyFSSpec()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowProxyIcon()

OSStatus GetWindowProxyIcon ( WindowRef  window,
IconRef *  outIcon 
)

GetWindowProxyIcon()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowRegion()

OSStatus GetWindowRegion ( WindowRef  window,
WindowRegionCode  inRegionCode,
RgnHandle  ioWinRgn 
)

GetWindowRegion()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowRetainCount()

ItemCount GetWindowRetainCount ( WindowRef  inWindow)

GetWindowRetainCount()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ GetWindowSpareFlag()

Boolean GetWindowSpareFlag ( WindowRef  window)

GetWindowSpareFlag()

Discussion: use GetWindowAttributes in Carbon

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowStandardState()

Rect* GetWindowStandardState ( WindowRef  window,
Rect rect 
)

GetWindowStandardState()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowStructurePort()

CGrafPtr GetWindowStructurePort ( WindowRef  inWindow)

GetWindowStructurePort()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.1 and later

◆ GetWindowStructureRgn()

void GetWindowStructureRgn ( WindowRef  window,
RgnHandle  r 
)
inline

GetWindowStructureRgn()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowStructureWidths()

OSStatus GetWindowStructureWidths ( WindowRef  inWindow,
Rect outRect 
)

GetWindowStructureWidths()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowTitleWidth()

SInt16 GetWindowTitleWidth ( WindowRef  window)
inline

GetWindowTitleWidth()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowUpdateRgn()

void GetWindowUpdateRgn ( WindowRef  window,
RgnHandle  r 
)
inline

GetWindowUpdateRgn()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWindowUserState()

Rect* GetWindowUserState ( WindowRef  window,
Rect rect 
)

GetWindowUserState()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowWidgetHilite()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetWindowZoomFlag()

Boolean GetWindowZoomFlag ( WindowRef  window)
inline

GetWindowZoomFlag()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ GetWMgrPort()

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
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetWRefCon()

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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ getwtitle()

void getwtitle ( WindowRef  window,
char *  title 
)

getwtitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetWVariant()

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.
Returns
a short indicating the variant code of the window.
Note
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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ growwindow()

long growwindow ( WindowRef  window,
Point startPt,
const Rect bBox 
)

growwindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GrowWindow()

long GrowWindow ( WindowRef  window,
Point  startPt,
const Rect bBox 
)

Note: bBox can only be NULL when linking to CarbonLib 1.0 forward GrowWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
can be NULL

◆ HideFloatingWindows()

OSStatus HideFloatingWindows ( void  )

HideFloatingWindows()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HideSheetWindow()

OSStatus HideSheetWindow ( WindowRef  inSheet)

HideSheetWindow()

Summary: Hides a sheet window using appropriate visual effects.

Parameters:

inSheet: The sheet window to hide.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ HideWindow()

void HideWindow ( WindowRef  window)

HideWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HiliteWindow()

void HiliteWindow ( WindowRef  window,
Boolean  fHilite 
)

CALL_NOT_IN_CARBON HiliteWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HiliteWindowFrameForDrag()

OSStatus HiliteWindowFrameForDrag ( WindowRef  window,
Boolean  hilited 
)

© 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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InitFloatingWindows()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: not available
Mac OS X: not available

◆ InitWindows()

void InitWindows ( void  )

InitWindows()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InstallWindowContentPaintProc()

OSStatus InstallWindowContentPaintProc ( WindowRef  window,
WindowPaintUPP  paintProc,
WindowPaintProcOptions  options,
void *  refCon 
)

InstallWindowContentPaintProc()

Non-Carbon CFM: in WindowsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvalRect()

void InvalRect ( const Rect badRect)

These aren't present in Carbon. Please use the InvalWindowRect, etc. routines below instead. InvalRect()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InvalRgn()

void InvalRgn ( RgnHandle  badRgn)

InvalRgn()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ InvalWindowRect()

OSStatus InvalWindowRect ( WindowRef  window,
const Rect bounds 
)

InvalWindowRect()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvalWindowRgn()

OSStatus InvalWindowRgn ( WindowRef  window,
RgnHandle  region 
)

Routines available from Mac OS 8.5 forward or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward InvalWindowRgn()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeDeskHookUPP()

void InvokeDeskHookUPP ( Boolean  mouseClick,
EventRecord theEvent,
DeskHookUPP  userUPP 
)

InvokeDeskHookUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ InvokeWindowDefUPP()

long InvokeWindowDefUPP ( short  varCode,
WindowRef  window,
short  message,
long  param,
WindowDefUPP  userUPP 
)

InvokeWindowDefUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeWindowPaintUPP()

OSStatus InvokeWindowPaintUPP ( GDHandle  device,
GrafPtr  qdContext,
WindowRef  window,
RgnHandle  inClientPaintRgn,
RgnHandle  outSystemPaintRgn,
void *  refCon,
WindowPaintUPP  userUPP 
)

CALL_NOT_IN_CARBON InvokeWindowPaintUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsValidWindowClass()

Boolean IsValidWindowClass ( WindowClass  inClass)

IsValidWindowClass()

Summary: Indicates whether a window class is supported by the Window Manager.

Parameters:

inClass: The window class.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.1 and later

◆ IsValidWindowPtr()

Boolean IsValidWindowPtr ( WindowRef  possibleWindow)

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsWindowActive()

Boolean IsWindowActive ( WindowRef  inWindow)

IsWindowActive()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ IsWindowCollapsable()

Boolean IsWindowCollapsable ( WindowRef  window)

Routines available from Mac OS 8.0 (Appearance 1.0) forward IsWindowCollapsable()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsWindowCollapsed()

Boolean IsWindowCollapsed ( WindowRef  window)

IsWindowCollapsed()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsWindowContainedInGroup()

Boolean IsWindowContainedInGroup ( WindowRef  inWindow,
WindowGroupRef  inGroup 
)

IsWindowContainedInGroup()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ IsWindowHilited()

Boolean IsWindowHilited ( WindowRef  window)

IsWindowHilited()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsWindowInStandardState()

Boolean IsWindowInStandardState ( WindowRef  window,
Point idealSize,
Rect idealStandardState 
)

Routines available from Mac OS 8.5 forward, or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward IsWindowInStandardState()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
idealStandardStatecan be NULL

◆ IsWindowLatentVisible()

Boolean IsWindowLatentVisible ( WindowRef  inWindow,
WindowLatentVisibility outLatentVisible 
)

IsWindowLatentVisible()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.1 and later

◆ IsWindowModified()

Boolean IsWindowModified ( WindowRef  window)

IsWindowModified()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsWindowPathSelectClick()

Boolean IsWindowPathSelectClick ( WindowRef  window,
const EventRecord event 
)

IsWindowPathSelectClick()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsWindowPathSelectEvent()

Boolean IsWindowPathSelectEvent ( WindowRef  window,
EventRef  inEvent 
)

IsWindowPathSelectEvent()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ IsWindowUpdatePending()

Boolean IsWindowUpdatePending ( WindowRef  window)

IsWindowUpdatePending()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MacCloseWindow()

void MacCloseWindow ( WindowRef  window)

[Mac]CloseWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ MacFindWindow()

WindowPartCode MacFindWindow ( Point  thePoint,
WindowRef window 
)

[Mac]FindWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MoveWindowStructure()

OSStatus MoveWindowStructure ( WindowRef  window,
short  hGlobal,
short  vGlobal 
)

MoveWindowStructure()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ newcwindow()

WindowRef newcwindow ( void *  wStorage,
const Rect boundsRect,
const char *  title,
Boolean  visible,
short  procID,
WindowRef  behind,
Boolean  goAwayFlag,
long  refCon 
)

newcwindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NewCWindow()

WindowRef NewCWindow ( void *  wStorage,
const Rect boundsRect,
ConstStr255Param  title,
Boolean  visible,
short  procID,
WindowRef  behind,
Boolean  goAwayFlag,
long  refCon 
)

NewCWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewDeskHookUPP()

DeskHookUPP NewDeskHookUPP ( DeskHookProcPtr  userRoutine)

NewDeskHookUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ newwindow()

WindowRef newwindow ( void *  wStorage,
const Rect boundsRect,
const char *  title,
Boolean  visible,
short  theProc,
WindowRef  behind,
Boolean  goAwayFlag,
long  refCon 
)

newwindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NewWindow()

WindowRef NewWindow ( void *  wStorage,
const Rect boundsRect,
ConstStr255Param  title,
Boolean  visible,
short  theProc,
WindowRef  behind,
Boolean  goAwayFlag,
long  refCon 
)

NewWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewWindowDefUPP()

WindowDefUPP NewWindowDefUPP ( WindowDefProcPtr  userRoutine)

NewWindowDefUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewWindowPaintUPP()

WindowPaintUPP NewWindowPaintUPP ( WindowPaintProcPtr  userRoutine)

CALL_NOT_IN_CARBON NewWindowPaintUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ PaintBehind()

void PaintBehind ( WindowRef  startWindow,
RgnHandle  clobberedRgn 
)

PaintBehind()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
clobberedRgncan be NULL

◆ PaintOne()

void PaintOne ( WindowRef  window,
RgnHandle  clobberedRgn 
)

CALL_NOT_IN_CARBON PaintOne()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
clobberedRgncan be NULL

◆ pinrect()

long pinrect ( const Rect theRect,
Point thePt 
)

pinrect()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ PinRect()

long PinRect ( const Rect theRect,
Point  thePt 
)

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.
Returns
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
Note
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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RegisterWindowDefinition()

OSStatus RegisterWindowDefinition ( SInt16  inResID,
const WindowDefSpec inDefSpec 
)

RegisterWindowDefinition()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ ReleaseQDContextForCollapsedWindowDockTile()

OSStatus ReleaseQDContextForCollapsedWindowDockTile ( WindowRef  inWindow,
CGrafPtr  inContext 
)

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

Mac OS X: in version 10.0 and later

◆ ReleaseWindow()

OSStatus ReleaseWindow ( WindowRef  inWindow)

ReleaseWindow()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ ReleaseWindowGroup()

OSStatus ReleaseWindowGroup ( WindowGroupRef  inGroup)

ReleaseWindowGroup()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ RemoveWindowProperty()

OSStatus RemoveWindowProperty ( WindowRef  window,
PropertyCreator  propertyCreator,
PropertyTag  propertyTag 
)

RemoveWindowProperty()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RemoveWindowProxy()

OSStatus RemoveWindowProxy ( WindowRef  window)

RemoveWindowProxy()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RepositionWindow()

OSStatus RepositionWindow ( WindowRef  window,
WindowRef  parentWindow,
WindowPositionMethod  method 
)

Routines available from Mac OS 8.5 forward RepositionWindow()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ReshapeCustomWindow()

OSStatus ReshapeCustomWindow ( WindowRef  window)

ReshapeCustomWindow()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ResizeWindow()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
newContentRectcan be NULL

◆ RetainWindow()

OSStatus RetainWindow ( WindowRef  inWindow)

RetainWindow()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ RetainWindowGroup()

OSStatus RetainWindowGroup ( WindowGroupRef  inGroup)

RetainWindowGroup()

Summary: Increments the refcount of a window group.

Parameters:

inGroup: The group whose refcount to increment.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ SaveOld()

void SaveOld ( WindowRef  window)

SaveOld/DrawNew are not available in Carbon. Use ReshapeCustomWindow instead. SaveOld()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ScrollWindowRect()

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()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ScrollWindowRegion()

OSStatus ScrollWindowRegion ( WindowRef  inWindow,
RgnHandle  inScrollRgn,
SInt16  inHPixels,
SInt16  inVPixels,
ScrollWindowOptions  inOptions,
RgnHandle  outExposedRgn 
)

can be NULL ScrollWindowRegion()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SelectWindow()

void SelectWindow ( WindowRef  window)

SelectWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SendBehind()

void SendBehind ( WindowRef  window,
WindowRef  behindWindow 
)

SendBehind()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SendWindowGroupBehind()

OSStatus SendWindowGroupBehind ( WindowGroupRef  inGroup,
WindowGroupRef  behindGroup 
)

©©Group z-ordering


SendWindowGroupBehind()

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

Mac OS X: in version 10.0 and later

◆ SetDeskCPat()

void SetDeskCPat ( PixPatHandle  deskPixPat)

SetDeskCPat is not available in Carbon. SetDeskCPat()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetPortWindowPort()

void SetPortWindowPort ( WindowRef  window)

SetPortWindowPort()

Discussion: set the current QuickDraw port to the port associated with the window

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWinColor()

void SetWinColor ( WindowRef  window,
WCTabHandle  newColorTable 
)

SetWinColor is not available in Carbon. SetWinColor()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetWindowActivationScope()

OSStatus SetWindowActivationScope ( WindowRef  inWindow,
WindowActivationScope  inScope 
)

SetWindowActivationScope()

Summary: Sets a window©s activation scope.

Parameters:

inWindow: The window whose activation scope to set.

inScope: The new activation scope.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ SetWindowAlternateTitle()

OSStatus SetWindowAlternateTitle ( WindowRef  inWindow,
CFStringRef  inTitle 
)

SetWindowAlternateTitle()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ SetWindowBounds()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowClass()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ SetWindowContentColor()

OSStatus SetWindowContentColor ( WindowRef  window,
const RGBColor color 
)

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowContentPattern()

OSStatus SetWindowContentPattern ( WindowRef  window,
PixPatHandle  pixPat 
)

SetWindowContentPattern()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowDataHandle()

void SetWindowDataHandle ( WindowRef  window,
Handle  data 
)
inline

SetWindowDataHandle()

Non-Carbon CFM: available as macro/inline
Carbon Lib: not available
Mac OS X: not available

◆ SetWindowGroup()

OSStatus SetWindowGroup ( WindowRef  inWindow,
WindowGroupRef  inNewGroup 
)

SetWindowGroup()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ SetWindowGroupLevel()

OSStatus SetWindowGroupLevel ( WindowGroupRef  inGroup,
SInt32  inLevel 
)

SetWindowGroupLevel()

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

Mac OS X: in version 10.0 and later

◆ SetWindowGroupName()

OSStatus SetWindowGroupName ( WindowGroupRef  inGroup,
CFStringRef  inName 
)

©©Group name, attributes, and level


SetWindowGroupName()

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

Mac OS X: in version 10.0 and later

◆ SetWindowGroupOwner()

OSStatus SetWindowGroupOwner ( WindowGroupRef  inGroup,
WindowRef  inWindow 
)

SetWindowGroupOwner()

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

Mac OS X: in version 10.0 and later

◆ SetWindowGroupParent()

OSStatus SetWindowGroupParent ( WindowGroupRef  inGroup,
WindowGroupRef  inNewGroup 
)

SetWindowGroupParent()

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

Mac OS X: in version 10.0 and later

◆ SetWindowIdealUserState()

OSStatus SetWindowIdealUserState ( WindowRef  window,
const Rect userState 
)

SetWindowIdealUserState()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowKind()

void SetWindowKind ( WindowRef  window,
short  kind 
)

SetWindowKind()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowModality()

OSStatus SetWindowModality ( WindowRef  inWindow,
WindowModality  inModalKind,
WindowRef  inUnavailableWindow 
)

SetWindowModality()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ SetWindowModified()

OSStatus SetWindowModified ( WindowRef  window,
Boolean  modified 
)

SetWindowModified()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowPic()

void SetWindowPic ( WindowRef  window,
PicHandle  pic 
)

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.
Returns
none
Note
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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowProperty()

OSStatus SetWindowProperty ( WindowRef  window,
PropertyCreator  propertyCreator,
PropertyTag  propertyTag,
UInt32  propertySize,
void *  propertyBuffer 
)

SetWindowProperty()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowProxyAlias()

OSStatus SetWindowProxyAlias ( WindowRef  window,
AliasHandle  alias 
)

SetWindowProxyAlias()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowProxyCreatorAndType()

OSStatus SetWindowProxyCreatorAndType ( WindowRef  window,
OSType  fileCreator,
OSType  fileType,
SInt16  vRefNum 
)

SetWindowProxyCreatorAndType()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowProxyFSSpec()

OSStatus SetWindowProxyFSSpec ( WindowRef  window,
const FSSpec *  inFile 
)

Routines available from Mac OS 8.5 forward SetWindowProxyFSSpec()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowProxyIcon()

OSStatus SetWindowProxyIcon ( WindowRef  window,
IconRef  icon 
)

SetWindowProxyIcon()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowStandardState()

void SetWindowStandardState ( WindowRef  window,
const Rect rect 
)

SetWindowStandardState()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWindowTitleWithCFString()

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.
Returns
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>
                
Copyright: THINK Reference © 1991 - 1992 Symantec Corporation
                                                             
Non-Carbon CFM: in InterfaceLib 7.1 and
      later
               
Carbon Lib: in CarbonLib 1.0 and
      later
               
Mac OS X: in version 10.0 and
      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

◆ SetWindowUserState()

void SetWindowUserState ( WindowRef  window,
const Rect rect 
)

SetWindowUserState()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetWRefCon()

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 .
Returns
none
Note
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.
Copyright: THINK Reference © 1991-1992 Symantec Corporation
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ setwtitle()

void setwtitle ( WindowRef  window,
const char *  title 
)

setwtitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetWTitle()

void SetWTitle ( WindowRef  window,
ConstStr255Param  title 
)

SetWTitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShowFloatingWindows()

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()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShowHide()

void ShowHide ( WindowRef  window,
Boolean  showFlag 
)

ShowHide()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShowSheetWindow()

OSStatus ShowSheetWindow ( WindowRef  inSheet,
WindowRef  inParentWindow 
)

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.3 and later
Mac OS X: in version 10.0 and later

◆ SizeWindow()

void SizeWindow ( WindowRef  window,
short  w,
short  h,
Boolean  fUpdate 
)

SizeWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ StoreWindowIntoCollection()

OSStatus StoreWindowIntoCollection ( WindowRef  window,
Collection  collection 
)

window persistence StoreWindowIntoCollection()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ trackbox()

Boolean trackbox ( WindowRef  window,
Point thePt,
short  partCode 
)

trackbox()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ TrackBox()

Boolean TrackBox ( WindowRef  window,
Point  thePt,
WindowPartCode  partCode 
)

TrackBox()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ trackgoaway()

Boolean trackgoaway ( WindowRef  window,
Point thePt 
)

trackgoaway()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ TrackGoAway()

Boolean TrackGoAway ( WindowRef  window,
Point  thePt 
)

TrackGoAway()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ TrackWindowProxyDrag()

OSStatus TrackWindowProxyDrag ( WindowRef  window,
Point  startPt 
)

TrackWindowProxyDrag()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ TrackWindowProxyFromExistingDrag()

OSStatus TrackWindowProxyFromExistingDrag ( WindowRef  window,
Point  startPt,
DragReference  drag,
RgnHandle  inDragOutlineRgn 
)

TrackWindowProxyFromExistingDrag()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ TransitionWindow()

OSStatus TransitionWindow ( WindowRef  inWindow,
WindowTransitionEffect  inEffect,
WindowTransitionAction  inAction,
const Rect inRect 
)

TransitionWindow()

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.

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ TransitionWindowAndParent()

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.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.0 and later

◆ UpdateCollapsedWindowDockTile()

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

Mac OS X: in version 10.0 and later

◆ ValidRect()

void ValidRect ( const Rect goodRect)

ValidRect()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ValidRgn()

void ValidRgn ( RgnHandle  goodRgn)

ValidRgn()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ ValidWindowRect()

OSStatus ValidWindowRect ( WindowRef  window,
const Rect bounds 
)

ValidWindowRect()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ValidWindowRgn()

OSStatus ValidWindowRgn ( WindowRef  window,
RgnHandle  region 
)

ValidWindowRgn()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ WindowPathSelect()

OSStatus WindowPathSelect ( WindowRef  window,
MenuRef  menu,
SInt32 *  outMenuResult 
)

WindowPathSelect()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
Parameters
outMenuResultcan be NULL

◆ ZoomWindow()

void ZoomWindow ( WindowRef  window,
WindowPartCode  partCode,
Boolean  front 
)

ZoomWindow()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ZoomWindowIdeal()

OSStatus ZoomWindowIdeal ( WindowRef  window,
WindowPartCode  partCode,
Point ioIdealSize 
)

can be NULL ZoomWindowIdeal()

Non-Carbon CFM: in WindowsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

Variable Documentation

◆ bounds

Rect* bounds
Initial value:
{
return ((*(bounds) = (window)->portRect)), (bounds)

◆ kind

short kind
Initial value:
{
((WindowPeek)window)->windowKind = kind
Definition: MacWindows.h:754

◆ rect

const Rect* rect
Initial value:
{
return (*(rect) = ((*(((WindowPeek)window)->dataHandle) == NULL)
? *(rect)
: ((Rect *)(*(((WindowPeek)window)->dataHandle)))[1])),
(rect)
#define NULL
Definition: MacTypes.h:61
Definition: MacTypes.h:527