Mac OS 9
MacWindows.h
Go to the documentation of this file.
1 
19 #ifndef __MACWINDOWS__
20 #define __MACWINDOWS__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __ALIASES__
27 #include <Aliases.h>
28 #endif
29 
30 #ifndef __APPLEEVENTS__
31 #include <AppleEvents.h>
32 #endif
33 
34 #ifndef __COLLECTIONS__
35 #include <Collections.h>
36 #endif
37 
38 #ifndef __DRAG__
39 #include <Drag.h>
40 #endif
41 
42 #ifndef __EVENTS__
43 #include <Events.h>
44 #endif
45 
46 #ifndef __MENUS__
47 #include <Menus.h>
48 #endif
49 
50 #ifndef __MIXEDMODE__
51 #include <MixedMode.h>
52 #endif
53 
54 #ifndef __QDOFFSCREEN__
55 #include <QDOffscreen.h>
56 #endif
57 
58 #ifndef __QUICKDRAW__
59 #include <Quickdraw.h>
60 #endif
61 
62 #ifndef __TEXTCOMMON__
63 #include <TextCommon.h>
64 #endif
65 
66 #ifndef __ICONS__
67 #include <Icons.h>
68 #endif
69 
70 #ifndef __MACERRORS__
71 #include <MacErrors.h>
72 #endif
73 
74 #ifndef __CFSTRING__
75 #include <CFString.h>
76 #endif
77 
78 #if PRAGMA_ONCE
79 #pragma once
80 #endif
81 
82 #ifdef __cplusplus
83 extern "C"
84 {
85 #endif
86 
87 #if PRAGMA_IMPORT
88 #pragma import on
89 #endif
90 
91 #if PRAGMA_STRUCT_ALIGN
92 #pragma options align = mac68k
93 #elif PRAGMA_STRUCT_PACKPUSH
94 #pragma pack(push, 2)
95 #elif PRAGMA_STRUCT_PACK
96 #pragma pack(2)
97 #endif
98 
107  typedef OSType PropertyCreator;
108  typedef OSType PropertyTag;
109 
110  typedef UInt32 WindowClass;
111  enum
112  {
113  kAlertWindowClass = 1L,
115  2L,
135  16L,
138  (unsigned long)0xFFFFFFFF
140  };
141 
142  typedef UInt32 WindowAttributes;
143 
148  enum
149  {
150 
155 
162 
169 
176 
184 
192 
199 
206 
212 
217 
222 
229 
236 
244 
250 
258 
265 
271 
278  kWindowNoConstrainAttribute = (unsigned long)((1L << 31)),
279 
287 
294  };
295 
296  enum
297  {
298  kWindowDefProcType = FOUR_CHAR_CODE('WDEF')
299  };
300 
301  enum
302  {
303  kStandardWindowDefinition = 0,
306  };
307 
308  enum
309  {
312  kModalDialogVariantCode = 1,
313  kPlainDialogVariantCode = 2,
314  kShadowDialogVariantCode = 3,
315  kMovableModalDialogVariantCode = 5,
316  kAlertVariantCode = 7,
317  kMovableAlertVariantCode = 9,
319  };
320 
321  enum
322  {
325  dBoxProc = 1,
326  plainDBox = 2,
327  altDBoxProc = 3,
328  noGrowDocProc = 4,
329  movableDBoxProc = 5,
330  zoomDocProc = 8,
331  zoomNoGrow = 12,
332  floatProc = 1985,
333  floatGrowProc = 1987,
334  floatZoomProc = 1989,
335  floatZoomGrowProc = 1991,
336  floatSideProc = 1993,
337  floatSideGrowProc = 1995,
338  floatSideZoomProc = 1997,
339  floatSideZoomGrowProc = 1999
340  };
341 
342 #if CALL_NOT_IN_CARBON
344  enum
345  {
346  rDocProc = 16
347  };
348 
349 #endif
351  enum
352  {
355  kWindowDialogDefProcResID = 65,
356  kWindowUtilityDefProcResID = 66,
357  kWindowUtilitySideTitleDefProcResID = 67,
358  kWindowSheetDefProcResID = 68,
359  kWindowSimpleDefProcResID = 69,
360  kWindowSheetAlertDefProcResID = 70
361  };
362 
363  enum
364  {
367  kWindowGrowDocumentProc = 1025,
368  kWindowVertZoomDocumentProc = 1026,
369  kWindowVertZoomGrowDocumentProc = 1027,
370  kWindowHorizZoomDocumentProc = 1028,
371  kWindowHorizZoomGrowDocumentProc = 1029,
372  kWindowFullZoomDocumentProc = 1030,
373  kWindowFullZoomGrowDocumentProc = 1031
374  };
375 
376  enum
377  {
380  kWindowShadowDialogProc = 1041,
381  kWindowModalDialogProc = 1042,
382  kWindowMovableModalDialogProc = 1043,
383  kWindowAlertProc = 1044,
384  kWindowMovableAlertProc = 1045
385  };
386 
387  enum
388  {
391  };
392 
393  enum
394  {
397  kWindowFloatGrowProc = 1059,
398  kWindowFloatVertZoomProc = 1061,
399  kWindowFloatVertZoomGrowProc = 1063,
400  kWindowFloatHorizZoomProc = 1065,
401  kWindowFloatHorizZoomGrowProc = 1067,
402  kWindowFloatFullZoomProc = 1069,
403  kWindowFloatFullZoomGrowProc = 1071
404  };
405 
406  enum
407  {
410  kWindowFloatSideGrowProc = 1075,
411  kWindowFloatSideVertZoomProc = 1077,
412  kWindowFloatSideVertZoomGrowProc = 1079,
413  kWindowFloatSideHorizZoomProc = 1081,
414  kWindowFloatSideHorizZoomGrowProc = 1083,
415  kWindowFloatSideFullZoomProc = 1085,
416  kWindowFloatSideFullZoomGrowProc = 1087
417  };
418 
419  enum
420  {
424  1120
425  };
426 
431  enum
432  {
440 
445  };
446 
456  enum
457  {
458  kWindowNoPosition = 0x0000,
459  kWindowDefaultPosition = 0x0000,
461  kWindowAlertPositionMainScreen = 0x300A,
462  kWindowStaggerMainScreen = 0x380A,
463  kWindowCenterParentWindow = 0xA80A,
464  kWindowAlertPositionParentWindow = 0xB00A,
465  kWindowStaggerParentWindow = 0xB80A,
466  kWindowCenterParentWindowScreen = 0x680A,
467  kWindowAlertPositionParentWindowScreen = 0x700A,
468  kWindowStaggerParentWindowScreen = 0x780A
469  };
470 
476  typedef UInt32 WindowPositionMethod;
477  enum
478  {
479  kWindowCenterOnMainScreen = 0x00000001,
480  kWindowCenterOnParentWindow = 0x00000002,
481  kWindowCenterOnParentWindowScreen = 0x00000003,
482  kWindowCascadeOnMainScreen = 0x00000004,
483  kWindowCascadeOnParentWindow = 0x00000005,
484  kWindowCascadeOnParentWindowScreen = 0x00000006,
485  kWindowAlertPositionOnMainScreen = 0x00000007,
486  kWindowAlertPositionOnParentWindow = 0x00000008,
487  kWindowAlertPositionOnParentWindowScreen = 0x00000009
488  };
489 
490  typedef UInt16 WindowRegionCode;
491  enum
492  {
495  kWindowTitleTextRgn = 1,
496  kWindowCloseBoxRgn = 2,
497  kWindowZoomBoxRgn = 3,
498  kWindowDragRgn = 5,
499  kWindowGrowRgn = 6,
500  kWindowCollapseBoxRgn = 7,
501  kWindowTitleProxyIconRgn = 8,
503  kWindowContentRgn =
504  33,
509  40
511  };
512 
516  {
517  RgnHandle winRgn;
518  WindowRegionCode regionCode;
519  };
520  typedef struct GetWindowRegionRec GetWindowRegionRec;
523 
533  {
534  GWorldPtr imageGWorld;
541  };
546  {
548  SInt16 fullTitleWidth;
549  SInt16 titleTextWidth;
550  };
562  {
563  Rect growRect;
564  RgnHandle growImageRegion;
565  };
567 
568  enum
569  {
570  dialogKind = 2,
571  userKind = 8,
572  kDialogWindowKind = 2,
573  kApplicationWindowKind = 8
574  };
575 
576  typedef SInt16 WindowPartCode;
577  enum
578  {
579  inDesk = 0,
580  inNoWindow = 0,
581  inMenuBar = 1,
582  inSysWindow = 2,
583  inContent = 3,
584  inDrag = 4,
585  inGrow = 5,
586  inGoAway = 6,
587  inZoomIn = 7,
588  inZoomOut = 8,
589  inCollapseBox = 11,
590  inProxyIcon = 12,
592  inStructure = 15
593  };
594 
595  typedef SInt16 WindowDefPartCode;
596  enum
597  {
598  wNoHit = 0,
599  wInContent = 1,
600  wInDrag = 2,
601  wInGrow = 3,
602  wInGoAway = 4,
603  wInZoomIn = 5,
604  wInZoomOut = 6,
605  wInCollapseBox = 9,
608  wInStructure = 13
609  };
610 
611  enum
612  {
613  kWindowMsgDraw = 0,
614  kWindowMsgHitTest = 1,
615  kWindowMsgCalculateShape = 2,
616  kWindowMsgInitialize = 3,
617  kWindowMsgCleanUp = 4,
618  kWindowMsgDrawGrowOutline = 5,
619  kWindowMsgDrawGrowBox = 6
620  };
621 
623  enum
624  {
625  kWindowMsgGetFeatures = 7,
626  kWindowMsgGetRegion = 8
627  };
628 
630  enum
631  {
632  kWindowMsgDragHilite = 9,
634  10,
636  11,
638  12,
640  13,
642  };
643 
645  enum
646  {
647  kWindowMsgGetGrowImageRegion =
648  19
650  };
651 
653  enum
654  {
655  wDraw = 0,
656  wHit = 1,
657  wCalcRgns = 2,
658  wNew = 3,
659  wDispose = 4,
660  wGrow = 5,
661  wDrawGIcon = 6
662  };
663 
664  enum
665  {
666  kWindowStateTitleChanged = (1 << 0)
667  };
668 
669  enum
670  {
671  kWindowCanGrow = (1 << 0),
672  kWindowCanZoom = (1 << 1),
673  kWindowCanCollapse = (1 << 2),
674  kWindowIsModal = (1 << 3),
675  kWindowCanGetWindowRegion = (1 << 4),
676  kWindowIsAlert = (1 << 5),
677  kWindowHasTitleBar = (1 << 6)
678  };
679 
681  enum
682  {
683  kWindowSupportsDragHilite =
684  (1 << 7),
686  (1 << 8),
688  (1 << 9),
690  (1 << 10),
692  (1 << 11),
694  (1 << 12),
697  (1 << 13),
700  };
701 
703  enum
704  {
705  kWindowIsOpaque =
706  (1 << 14)
707  };
708 
713  enum
714  {
715  kWindowSupportsSetGrowImageRegion = (1 << 13)
716  };
717 
718  enum
719  {
720  deskPatID = 16
721  };
722 
723  enum
724  {
725  wContentColor = 0,
726  wFrameColor = 1,
727  wTextColor = 2,
728  wHiliteColor = 3,
729  wTitleBarColor = 4
730  };
731 
734  enum
735  {
736  kMouseUpOutOfSlop = (long)0x80008000
737  };
738 
739  struct WinCTab
740  {
741  long wCSeed;
742  short wCReserved;
743  short ctSize;
745  };
746  typedef struct WinCTab WinCTab;
747  typedef WinCTab *WCTabPtr;
748  typedef WCTabPtr *WCTabHandle;
749 
750 #if !OPAQUE_TOOLBOX_STRUCTS
751  typedef struct WindowRecord WindowRecord;
754  {
755  GrafPort port;
756  short windowKind;
757  Boolean
765  Handle windowDefProc;
766  Handle dataHandle;
767  StringHandle titleHandle;
768  short titleWidth;
769  Handle controlList;
772  long refCon;
773  };
774 
775 #endif
777 #if !OPAQUE_TOOLBOX_STRUCTS
778  typedef struct CWindowRecord CWindowRecord;
781  {
782  CGrafPort port;
783  short windowKind;
784  Boolean
792  Handle windowDefProc;
793  Handle dataHandle;
794  StringHandle titleHandle;
795  short titleWidth;
796  Handle controlList;
799  long refCon;
800  };
801 
802 #endif
804 #if !OPAQUE_TOOLBOX_STRUCTS
805  typedef struct AuxWinRec AuxWinRec;
806  typedef AuxWinRec *AuxWinPtr;
807  typedef AuxWinPtr *AuxWinHandle;
808  struct AuxWinRec
809  {
810  AuxWinHandle awNext;
814  Handle reserved;
815  long awFlags;
817  long awRefCon;
819  };
820 
821 #endif
830  enum
831  {
832  kWindowDefinitionVersionOne = 1,
833  kWindowDefinitionVersionTwo = 2
834  };
835 
837  enum
838  {
839  kWindowIsCollapsedState = (1 << 0L)
840  };
841 
843  {
844  UInt32 descriptionSize;
848  UInt32 windowRefCon;
855  union
856  {
857  struct
858  {
859  SInt16 windowDefProc;
861  } versionOne;
862 
863  struct
864  {
865  WindowClass windowClass;
866  WindowAttributes windowAttributes;
867  } versionTwo;
868 
869  } windowDefinition;
870  };
873  enum
874  {
875  kStoredWindowSystemTag = FOUR_CHAR_CODE(
876  'appl'),
878  FOUR_CHAR_CODE('sbas'),
879  kStoredWindowPascalTitleID = FOUR_CHAR_CODE('s255')
880  };
881 
885 #define kFirstWindowOfClass ((WindowRef)(-1))
886 #define kLastWindowOfClass ((WindowRef)0)
887 
888  struct WStateData
889  {
890  Rect userState;
892  };
893  typedef struct WStateData WStateData;
894  typedef WStateData *WStateDataPtr;
896 
897  typedef CALLBACK_API(long, WindowDefProcPtr)(short varCode, WindowRef window,
898  short message, long param);
899  typedef CALLBACK_API_REGISTER68K(void, DeskHookProcPtr,
900  (Boolean mouseClick, EventRecord *theEvent));
901  typedef CALLBACK_API(OSStatus, WindowPaintProcPtr)(
903  RgnHandle inClientPaintRgn, RgnHandle outSystemPaintRgn, void *refCon);
904  typedef STACK_UPP_TYPE(WindowDefProcPtr) WindowDefUPP;
905  typedef REGISTER_UPP_TYPE(DeskHookProcPtr) DeskHookUPP;
906  typedef STACK_UPP_TYPE(WindowPaintProcPtr) WindowPaintUPP;
915  WindowDefUPP
916  NewWindowDefUPP(WindowDefProcPtr userRoutine);
917 #if !OPAQUE_UPP_TYPES
918  enum
919  {
920  uppWindowDefProcInfo = 0x00003BB0
921  };
922 #ifdef __cplusplus
923  inline WindowDefUPP NewWindowDefUPP(WindowDefProcPtr userRoutine)
924  {
925  return (WindowDefUPP)NewRoutineDescriptor(
926  (ProcPtr)(userRoutine), uppWindowDefProcInfo, GetCurrentArchitecture());
927  }
928 #else
929 #define NewWindowDefUPP(userRoutine) \
930  (WindowDefUPP) NewRoutineDescriptor( \
931  (ProcPtr)(userRoutine), uppWindowDefProcInfo, GetCurrentArchitecture())
932 #endif
933 #endif
934 
935 #if CALL_NOT_IN_CARBON
944  DeskHookUPP
945  NewDeskHookUPP(DeskHookProcPtr userRoutine);
946 #if !OPAQUE_UPP_TYPES
947  enum
948  {
949  uppDeskHookProcInfo = 0x00130802
950  };
951 #ifdef __cplusplus
952  inline DeskHookUPP NewDeskHookUPP(DeskHookProcPtr userRoutine)
953  {
954  return (DeskHookUPP)NewRoutineDescriptor(
955  (ProcPtr)(userRoutine), uppDeskHookProcInfo, GetCurrentArchitecture());
956  }
957 #else
958 #define NewDeskHookUPP(userRoutine) \
959  (DeskHookUPP) NewRoutineDescriptor( \
960  (ProcPtr)(userRoutine), uppDeskHookProcInfo, GetCurrentArchitecture())
961 #endif
962 #endif
963 
964 #endif
974  WindowPaintUPP
975  NewWindowPaintUPP(WindowPaintProcPtr userRoutine);
976 #if !OPAQUE_UPP_TYPES
977  enum
978  {
979  uppWindowPaintProcInfo = 0x0003FFF0
980  };
982 #ifdef __cplusplus
983  inline WindowPaintUPP NewWindowPaintUPP(WindowPaintProcPtr userRoutine)
984  {
985  return (WindowPaintUPP)NewRoutineDescriptor(
986  (ProcPtr)(userRoutine), uppWindowPaintProcInfo, GetCurrentArchitecture());
987  }
988 #else
989 #define NewWindowPaintUPP(userRoutine) \
990  (WindowPaintUPP) \
991  NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowPaintProcInfo, \
992  GetCurrentArchitecture())
993 #endif
994 #endif
995 
1004  void
1005  DisposeWindowDefUPP(WindowDefUPP userUPP);
1006 #if !OPAQUE_UPP_TYPES
1007 #ifdef __cplusplus
1008  inline void DisposeWindowDefUPP(WindowDefUPP userUPP)
1009  {
1010  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1011  }
1012 #else
1013 #define DisposeWindowDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1014 #endif
1015 #endif
1016 
1017 #if CALL_NOT_IN_CARBON
1026  void
1027  DisposeDeskHookUPP(DeskHookUPP userUPP);
1028 #if !OPAQUE_UPP_TYPES
1029 #ifdef __cplusplus
1030  inline void DisposeDeskHookUPP(DeskHookUPP userUPP)
1031  {
1032  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1033  }
1034 #else
1035 #define DisposeDeskHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1036 #endif
1037 #endif
1038 
1039 #endif
1049  void
1050  DisposeWindowPaintUPP(WindowPaintUPP userUPP);
1051 #if !OPAQUE_UPP_TYPES
1052 #ifdef __cplusplus
1053  inline void DisposeWindowPaintUPP(WindowPaintUPP userUPP)
1054  {
1055  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1056  }
1057 #else
1058 #define DisposeWindowPaintUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1059 #endif
1060 #endif
1061 
1070  long
1071  InvokeWindowDefUPP(short varCode, WindowRef window, short message, long param,
1072  WindowDefUPP userUPP);
1073 #if !OPAQUE_UPP_TYPES
1074 #ifdef __cplusplus
1075  inline long InvokeWindowDefUPP(short varCode, WindowRef window, short message,
1076  long param, WindowDefUPP userUPP)
1077  {
1078  return (long)CALL_FOUR_PARAMETER_UPP(userUPP, uppWindowDefProcInfo, varCode,
1079  window, message, param);
1080  }
1081 #else
1082 #define InvokeWindowDefUPP(varCode, window, message, param, userUPP) \
1083  (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowDefProcInfo, (varCode), \
1084  (window), (message), (param))
1085 #endif
1086 #endif
1087 
1088 #if CALL_NOT_IN_CARBON
1097 #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
1098 #pragma parameter InvokeDeskHookUPP(__D0, __A0, __A1)
1099 #endif
1100  void
1102  DeskHookUPP userUPP);
1103 #if !OPAQUE_UPP_TYPES && \
1104  (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
1105 #ifdef __cplusplus
1106  inline void InvokeDeskHookUPP(Boolean mouseClick, EventRecord *theEvent,
1107  DeskHookUPP userUPP)
1108  {
1109  CALL_TWO_PARAMETER_UPP(userUPP, uppDeskHookProcInfo, mouseClick, theEvent);
1110  }
1111 #else
1112 #define InvokeDeskHookUPP(mouseClick, theEvent, userUPP) \
1113  CALL_TWO_PARAMETER_UPP((userUPP), uppDeskHookProcInfo, (mouseClick), \
1114  (theEvent))
1115 #endif
1116 #endif
1117 
1118 #endif
1128  OSStatus
1130  RgnHandle inClientPaintRgn, RgnHandle outSystemPaintRgn,
1131  void *refCon, WindowPaintUPP userUPP);
1132 #if !OPAQUE_UPP_TYPES
1133 #ifdef __cplusplus
1134  inline OSStatus InvokeWindowPaintUPP(GDHandle device, GrafPtr qdContext,
1135  WindowRef window,
1136  RgnHandle inClientPaintRgn,
1137  RgnHandle outSystemPaintRgn, void *refCon,
1138  WindowPaintUPP userUPP)
1139  {
1140  return (OSStatus)CALL_SIX_PARAMETER_UPP(
1141  userUPP, uppWindowPaintProcInfo, device, qdContext, window,
1142  inClientPaintRgn, outSystemPaintRgn, refCon);
1143  }
1144 #else
1145 #define InvokeWindowPaintUPP(device, qdContext, window, inClientPaintRgn, \
1146  outSystemPaintRgn, refCon, userUPP) \
1147  (OSStatus) CALL_SIX_PARAMETER_UPP( \
1148  (userUPP), uppWindowPaintProcInfo, (device), (qdContext), (window), \
1149  (inClientPaintRgn), (outSystemPaintRgn), (refCon))
1150 #endif
1151 #endif
1152 
1153 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1155 #define NewWindowDefProc(userRoutine) NewWindowDefUPP(userRoutine)
1156 #define NewDeskHookProc(userRoutine) NewDeskHookUPP(userRoutine)
1157 #define NewWindowPaintProc(userRoutine) NewWindowPaintUPP(userRoutine)
1158 #define CallWindowDefProc(userRoutine, varCode, window, message, param) \
1159  InvokeWindowDefUPP(varCode, window, message, param, userRoutine)
1160 #define CallDeskHookProc(userRoutine, mouseClick, theEvent) \
1161  InvokeDeskHookUPP(mouseClick, theEvent, userRoutine)
1162 #define CallWindowPaintProc(userRoutine, device, qdContext, window, \
1163  inClientPaintRgn, outSystemPaintRgn, refCon) \
1164  InvokeWindowPaintUPP(device, qdContext, window, inClientPaintRgn, \
1165  outSystemPaintRgn, refCon, userRoutine)
1166 #endif
1168  enum
1169  {
1170  kWindowDefProcPtr = 0,
1173  2
1174  };
1175 
1176  typedef UInt32 WindowDefType;
1178  {
1179  WindowDefType defType;
1180  union
1181  {
1182  WindowDefUPP defProc;
1183  void *classRef;
1184  short procID;
1185  } u;
1186  };
1187  typedef struct WindowDefSpec WindowDefSpec;
1189 
1198  WindowRef
1199  GetNewCWindow(short windowID, void *wStorage, WindowRef behind);
1200 
1209  WindowRef
1210  NewWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title,
1211  Boolean visible, short theProc, WindowRef behind, Boolean goAwayFlag,
1212  long refCon);
1213 
1222  WindowRef
1223  GetNewWindow(short windowID, void *wStorage, WindowRef behind);
1224 
1233  WindowRef
1234  NewCWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title,
1235  Boolean visible, short procID, WindowRef behind, Boolean goAwayFlag,
1236  long refCon);
1237 
1246  void
1248 
1249 #if CALL_NOT_IN_CARBON
1258 #if TARGET_OS_MAC
1259 #define MacCloseWindow CloseWindow
1260 #endif
1261  void
1263 
1269 #endif
1279  OSStatus
1280  CreateNewWindow(WindowClass windowClass, WindowAttributes attributes,
1281  const Rect *contentBounds, WindowRef *outWindow);
1282 
1294  OSStatus
1295  CreateWindowFromResource(SInt16 resID, WindowRef *outWindow);
1296 
1306  OSStatus
1308 
1317  OSStatus
1319 
1329  OSStatus
1331 
1340  OSStatus
1342 
1364  ItemCount
1366 
1388  OSStatus
1390 
1413  OSStatus
1415 
1427  OSStatus
1428  CreateCustomWindow(const WindowDefSpec *def, WindowClass windowClass,
1429  WindowAttributes attributes, const Rect *contentBounds,
1430  WindowRef *outWindow);
1431 
1440  OSStatus
1442 
1479  OSStatus
1480  RegisterWindowDefinition(SInt16 inResID, const WindowDefSpec *inDefSpec);
1481 
1495  OSStatus
1496  GetWindowWidgetHilite(WindowRef inWindow, WindowDefPartCode *outHilite);
1497 
1515  Boolean
1516  IsValidWindowClass(WindowClass inClass);
1517 
1547  WindowAttributes
1548  GetAvailableWindowAttributes(WindowClass inClass);
1549 
1562  OSStatus
1563  GetWindowClass(WindowRef window, WindowClass *outClass);
1564 
1573  OSStatus
1574  GetWindowAttributes(WindowRef window, WindowAttributes *outAttributes);
1575 
1588  OSStatus
1589  ChangeWindowAttributes(WindowRef window, WindowAttributes setTheseAttributes,
1590  WindowAttributes clearTheseAttributes);
1591 
1635  OSStatus
1636  SetWindowClass(WindowRef inWindow, WindowClass inWindowClass);
1637 
1644  typedef UInt32 WindowModality;
1645  enum
1646  {
1647 
1653 
1660 
1666 
1671  };
1672 
1702  OSStatus
1704  WindowRef inUnavailableWindow);
1705 
1729  OSStatus
1730  GetWindowModality(WindowRef inWindow, WindowModality *outModalKind,
1731  WindowRef *outUnavailableWindow);
1746  OSStatus
1748 
1757  OSStatus
1759 
1768  Boolean
1770 
1789  typedef struct OpaqueWindowGroupRef *WindowGroupRef;
1791 #define kFirstWindowOfGroup ((WindowRef)(-1))
1792 #define kLastWindowOfGroup ((WindowRef)NULL)
1794 #define kFirstWindowGroup ((WindowGroupRef)(-1))
1795 #define kLastWindowGroup ((WindowGroupRef)NULL)
1796 
1803  typedef UInt32 WindowGroupAttributes;
1804  enum
1805  {
1806 
1814 
1821 
1830 
1838 
1847  };
1848 
1857  typedef UInt32 WindowActivationScope;
1858  enum
1859  {
1860 
1870 
1878 
1886  };
1887 
1893  enum
1894  {
1895 
1901 
1906  kPreviousWindowGroup = false
1907  };
1908 
1918  enum
1919  {
1920 
1927 
1935 
1942  };
1943 
1967  OSStatus
1969 
1986  OSStatus
1988 
2007  OSStatus
2009 
2026  ItemCount
2028 
2057  GetWindowGroupOfClass(WindowClass windowClass);
2058 
2088  OSStatus
2089  SetWindowGroupName(WindowGroupRef inGroup, CFStringRef inName);
2090 
2112  OSStatus
2113  CopyWindowGroupName(WindowGroupRef inGroup, CFStringRef *outName);
2114 
2135  OSStatus
2137  WindowGroupAttributes *outAttributes);
2138 
2162  OSStatus
2164  WindowGroupAttributes setTheseAttributes,
2165  WindowGroupAttributes clearTheseAttributes);
2166 
2206  OSStatus
2207  SetWindowGroupLevel(WindowGroupRef inGroup, SInt32 inLevel);
2208 
2229  OSStatus
2230  GetWindowGroupLevel(WindowGroupRef inGroup, SInt32 *outLevel);
2231 
2260  OSStatus
2262 
2289 
2318  OSStatus
2319  SetWindowGroup(WindowRef inWindow, WindowGroupRef inNewGroup);
2320 
2341  Boolean
2343 
2368 
2393  OSStatus
2395 
2419 
2443  WindowRef
2445 
2471  OSStatus
2473 
2497  ItemCount
2499  WindowGroupContentOptions inOptions);
2500 
2535  OSStatus
2537  WindowGroupContentOptions inOptions,
2538  ItemCount inAllowedItems,
2539  ItemCount *outNumItems,
2540  void **outItems);
2541 
2579  OSStatus
2580  GetIndexedWindow(WindowGroupRef inGroup, UInt32 inIndex,
2581  WindowGroupContentOptions inOptions, WindowRef *outWindow);
2582 
2618  OSStatus
2619  GetWindowIndex(WindowRef inWindow, WindowGroupRef inStartGroup,
2620  WindowGroupContentOptions inOptions, UInt32 *outIndex);
2621 
2650  WindowRef
2652 
2675  Boolean
2677 
2706  OSStatus
2707  ActivateWindow(WindowRef inWindow, Boolean inActivate);
2708 
2728  OSStatus
2730 
2750  OSStatus
2752 
2773  void
2775 
2789  void
2791 
2793 #if CALL_NOT_IN_CARBON
2802  void
2804 
2814  void
2816 
2821 #endif
2831  OSStatus
2833 
2842  OSStatus
2844 
2854  OSStatus
2856 
2865  OSStatus
2867 
2869  typedef OptionBits WindowPaintProcOptions;
2870  enum
2871  {
2872  kWindowPaintProcOptionsNone = 0
2873  };
2874 
2883  OSStatus
2885  WindowPaintProcOptions options,
2886  void *refCon);
2888  typedef UInt32 ScrollWindowOptions;
2889  enum
2890  {
2891  kScrollWindowNoOptions = 0,
2892  kScrollWindowInvalidate =
2893  (1L << 0),
2895  (1L << 1)
2897  };
2898 
2910  OSStatus
2911  ScrollWindowRect(WindowRef inWindow, const Rect *inScrollRect, SInt16 inHPixels,
2912  SInt16 inVPixels, ScrollWindowOptions inOptions,
2913  RgnHandle outExposedRgn);
2923  OSStatus
2924  ScrollWindowRegion(WindowRef inWindow, RgnHandle inScrollRgn, SInt16 inHPixels,
2925  SInt16 inVPixels, ScrollWindowOptions inOptions,
2926  RgnHandle outExposedRgn);
2936  void
2938 
2941 #if CALL_NOT_IN_CARBON
2950  void
2952 
2961  void
2963 
2964 #endif
2974  void
2976  RgnHandle clobberedRgn);
2977 
2986  void
2987  PaintBehind(WindowRef startWindow,
2988  RgnHandle clobberedRgn);
2989 
2998  void
3000 
3009  void
3010  CalcVisBehind(WindowRef startWindow,
3011  RgnHandle clobberedRgn);
3012 
3021  Boolean
3023 
3032 #if TARGET_OS_MAC
3033 #define MacFindWindow FindWindow
3034 #endif
3035  WindowPartCode
3037 
3052  WindowRef
3054 
3063  void
3065 
3074  void
3076 
3085  void
3087 
3101  WindowRef
3103 
3115  WindowRef
3116  GetNextWindowOfClass(WindowRef inWindow, WindowClass inWindowClass,
3117  Boolean mustBeVisible);
3118 
3127  WindowRef
3128  GetFrontWindowOfClass(WindowClass inWindowClass, Boolean mustBeVisible);
3129 
3138  OSStatus
3139  FindWindowOfClass(const Point *where, WindowClass inWindowClass,
3140  WindowRef *outWindow,
3141  WindowPartCode *outWindowPart);
3177  OSStatus
3178  CreateStandardWindowMenu(OptionBits inOptions, MenuRef *outMenu);
3179 
3208  OSStatus
3209  SetWindowAlternateTitle(WindowRef inWindow, CFStringRef inTitle);
3210 
3235  OSStatus
3236  CopyWindowAlternateTitle(WindowRef inWindow, CFStringRef *outTitle);
3237 
3238 #if CALL_NOT_IN_CARBON
3247  void
3249 
3276  void
3278 
3287  void
3288  GetCWMgrPort(CGrafPtr *wMgrCPort);
3289 
3294 #endif
3304  Boolean
3305  IsValidWindowPtr(WindowRef possibleWindow);
3306 
3307 #define IsValidWindowRef IsValidWindowPtr
3313 #if CALL_NOT_IN_CARBON
3322  OSStatus
3324 
3325 #endif
3335  void
3337 
3363  void
3365 
3386  long
3388 
3422  void
3424 
3447  PicHandle
3449 
3473  short
3475 
3485  OSStatus
3486  GetWindowFeatures(WindowRef window, UInt32 *outFeatures);
3487 
3496  OSStatus
3497  GetWindowRegion(WindowRef window, WindowRegionCode inRegionCode,
3498  RgnHandle ioWinRgn);
3499 
3508  OSStatus
3510 
3515 #if CALL_NOT_IN_CARBON
3524  void
3525  InvalRect(const Rect *badRect);
3526 
3535  void
3537 
3546  void
3547  ValidRect(const Rect *goodRect);
3548 
3557  void
3559 
3560 #endif
3570  void
3572 
3581  void
3583 
3597  OSStatus
3599 
3608  OSStatus
3610 
3619  OSStatus
3621 
3630  OSStatus
3632 
3646  void
3648 
3657  void
3658  SetWTitle(WindowRef window, ConstStr255Param title);
3659 
3697  OSStatus
3698  SetWindowTitleWithCFString(WindowRef inWindow, CFStringRef inString);
3699 
3708  OSStatus
3709  CopyWindowTitleAsCFString(WindowRef inWindow, CFStringRef *outString);
3710 
3721  OSStatus
3722  SetWindowProxyFSSpec(WindowRef window, const FSSpec *inFile);
3723 
3732  OSStatus
3734 
3743  OSStatus
3745 
3754  OSStatus
3756 
3765  OSStatus
3767  OSType fileType, SInt16 vRefNum);
3768 
3777  OSStatus
3779 
3788  OSStatus
3790 
3799  OSStatus
3801 
3810  OSStatus
3812  RgnHandle outDragOutlineRgn);
3813 
3822  OSStatus
3824 
3833  OSStatus
3835  DragReference drag,
3836  RgnHandle inDragOutlineRgn);
3837 
3846  OSStatus
3848 
3857  Boolean
3859 
3868  OSStatus
3870 
3879  Boolean
3881 
3890  OSStatus
3892  SInt32 *outMenuResult);
3893 
3902  Boolean
3904 
3923  OSStatus
3925 
3936  typedef UInt32 WindowTransitionEffect;
3937  enum
3938  {
3939 
3945 
3952 
3959  };
3960 
3968  typedef UInt32 WindowTransitionAction;
3969  enum
3970  {
3971 
3979 
3987 
3995 
4003  };
4004 
4039  OSStatus
4041  WindowTransitionAction inAction,
4042  const Rect *inRect);
4078  OSStatus
4080  WindowTransitionEffect inEffect,
4081  WindowTransitionAction inAction,
4082  const Rect *inRect);
4092 #if TARGET_OS_MAC
4093 #define MacMoveWindow MoveWindow
4094 #endif
4095  void
4096  MacMoveWindow(WindowRef window, short hGlobal, short vGlobal, Boolean front);
4097 
4106  void
4107  SizeWindow(WindowRef window, short w, short h, Boolean fUpdate);
4108 
4118  long
4120  const Rect *bBox) ;
4121 
4131  void
4133  const Rect *boundsRect) ;
4134 
4143  void
4144  ZoomWindow(WindowRef window, WindowPartCode partCode, Boolean front);
4145 
4155  Boolean
4157 
4166  Boolean
4168 
4177  OSStatus
4179 
4188  OSStatus
4190 
4224  OSStatus
4226  CGrafPtr *outContext);
4227 
4254  OSStatus
4256  CGrafPtr inContext);
4257 
4282  OSStatus
4284 
4298  OSStatus
4299  GetWindowBounds(WindowRef window, WindowRegionCode regionCode,
4300  Rect *globalBounds);
4301 
4312  Boolean
4314  const Rect *sizeConstraints,
4315  Rect *newContentRect);
4330  OSStatus
4331  SetWindowBounds(WindowRef window, WindowRegionCode regionCode,
4332  const Rect *globalBounds);
4333 
4344  OSStatus
4347 
4356  OSStatus
4357  MoveWindowStructure(WindowRef window, short hGlobal, short vGlobal);
4358 
4372  Boolean
4374  Rect *idealStandardState);
4384  OSStatus
4385  ZoomWindowIdeal(WindowRef window, WindowPartCode partCode, Point *ioIdealSize);
4386 
4395  OSStatus
4397 
4406  OSStatus
4408 
4441  OSStatus
4442  GetWindowGreatestAreaDevice(WindowRef inWindow, WindowRegionCode inRegion,
4443  GDHandle *outGreatestDevice,
4444  Rect *outGreatestDeviceRect);
4450  typedef UInt32 WindowConstrainOptions;
4451  enum
4452  {
4453 
4458 
4463 
4469 
4475 
4481 
4489  };
4490 
4524  OSStatus
4525  ConstrainWindowToScreen(WindowRef inWindowRef, WindowRegionCode inRegionCode,
4526  WindowConstrainOptions inOptions,
4527  const Rect *inScreenRect,
4528  Rect *outStructure);
4551  OSStatus
4553 
4562  void
4564 
4573 #if TARGET_OS_MAC
4574 #define MacShowWindow ShowWindow
4575 #endif
4576  void
4577  MacShowWindow(WindowRef window);
4578 
4587  void
4589 
4598 #if TARGET_OS_MAC
4599 #define MacIsWindowVisible IsWindowVisible
4600 #endif
4601  Boolean
4602  MacIsWindowVisible(WindowRef window);
4603 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
4604 #ifdef __cplusplus
4605  inline DEFINE_API(Boolean) MacIsWindowVisible(WindowRef window)
4606  {
4607  return ((WindowPeek)window)->visible != 0;
4608  }
4609 #else
4610 #if TARGET_OS_MAC
4611 #define IsWindowVisible(window) (((WindowPeek)window)->visible != 0)
4612 #else
4613 #define MacIsWindowVisible(window) (((WindowPeek)window)->visible != 0)
4614 #endif
4615 #endif
4616 #endif
4617 
4631  typedef UInt32 WindowLatentVisibility;
4632  enum
4633  {
4634 
4639 
4644 
4649 
4654 
4659 
4665  };
4666 
4705  Boolean
4707  WindowRef inWindow,
4708  WindowLatentVisibility *outLatentVisible);
4873  OSStatus
4874  ShowSheetWindow(WindowRef inSheet, WindowRef inParentWindow);
4875 
4892  OSStatus
4894 
4914  OSStatus
4915  GetSheetWindowParent(WindowRef inSheet, WindowRef *outParentWindow);
4916 
4930  OSStatus
4932 
4941  OSStatus
4943 
4957  OSStatus
4959  PropertyTag propertyTag, UInt32 bufferSize,
4960  UInt32 *actualSize,
4961  void *propertyBuffer);
4962 
4971  OSStatus
4973  PropertyTag tag, UInt32 *size);
4974 
4983  OSStatus
4985  PropertyTag propertyTag, UInt32 propertySize,
4986  void *propertyBuffer);
4987 
4996  OSStatus
4998  PropertyTag propertyTag);
4999 
5003  enum
5004  {
5005  kWindowPropertyPersistent = 0x00000001
5007  };
5008 
5017  OSStatus
5019  OSType propertyTag, UInt32 *attributes);
5020 
5029  OSStatus
5031  OSType propertyTag, UInt32 attributesToSet,
5032  UInt32 attributesToClear);
5033 
5066  long
5067  PinRect(const Rect *theRect, Point thePt);
5068 
5077  RgnHandle
5078  GetGrayRgn(void);
5079 
5088  Boolean
5089  TrackBox(WindowRef window, Point thePt, WindowPartCode partCode);
5090 
5099  Boolean
5101 
5110  long
5111  DragGrayRgn(RgnHandle theRgn, Point startPt, const Rect *limitRect,
5112  const Rect *slopRect, short axis, DragGrayRgnUPP actionProc);
5113 
5122  long
5123  DragTheRgn(RgnHandle theRgn, Point startPt, const Rect *limitRect,
5124  const Rect *slopRect, short axis, DragGrayRgnUPP actionProc);
5125 
5130 #if !OPAQUE_TOOLBOX_STRUCTS
5131 #if CALL_NOT_IN_CARBON
5132 
5141  Boolean
5143 
5144 #endif
5146 #endif
5148 #if CALL_NOT_IN_CARBON
5157  void
5158  setwtitle(WindowRef window, const char *title);
5159 
5168  Boolean
5170 
5179  short
5181 
5190  void
5191  getwtitle(WindowRef window, char *title);
5192 
5201  long
5203 
5212  WindowRef
5213  newwindow(void *wStorage, const Rect *boundsRect, const char *title,
5214  Boolean visible, short theProc, WindowRef behind, Boolean goAwayFlag,
5215  long refCon);
5216 
5225  WindowRef
5226  newcwindow(void *wStorage, const Rect *boundsRect, const char *title,
5227  Boolean visible, short procID, WindowRef behind, Boolean goAwayFlag,
5228  long refCon);
5229 
5238  long
5239  pinrect(const Rect *theRect, Point *thePt);
5240 
5249  Boolean
5250  trackbox(WindowRef window, Point *thePt, short partCode);
5251 
5260  long
5261  draggrayrgn(RgnHandle theRgn, Point *startPt, const Rect *boundsRect,
5262  const Rect *slopRect, short axis, DragGrayRgnUPP actionProc);
5263 
5272  void
5273  dragwindow(WindowRef window, Point *startPt, const Rect *boundsRect);
5274 
5275 #endif
5277 #if CALL_NOT_IN_CARBON
5289  Boolean
5291 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5292 #ifdef __cplusplus
5293  inline DEFINE_API(Boolean) GetWindowGoAwayFlag(WindowRef window)
5294  {
5295  return ((WindowPeek)window)->goAwayFlag;
5296  }
5297 #else
5298 #define GetWindowGoAwayFlag(window) (((WindowPeek)window)->goAwayFlag)
5299 #endif
5300 #endif
5301 
5313  Boolean
5315 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5316 #ifdef __cplusplus
5317  inline DEFINE_API(Boolean) GetWindowSpareFlag(WindowRef window)
5318  {
5319  return ((WindowPeek)window)->spareFlag;
5320  }
5321 #else
5322 #define GetWindowSpareFlag(window) (((WindowPeek)window)->spareFlag)
5323 #endif
5324 #endif
5325 
5326 #endif
5336  WindowRef
5338 
5347  CGrafPtr
5349 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5350 #ifdef __cplusplus
5351  inline DEFINE_API(CGrafPtr) GetWindowPort(WindowRef window)
5352  {
5353  return (CGrafPtr)window;
5354  }
5355 #else
5356 #define GetWindowPort(window) ((CGrafPtr)window)
5357 #endif
5358 #endif
5359 
5368  CGrafPtr
5370 
5379  short
5381 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5382 #ifdef __cplusplus
5383  inline DEFINE_API(short) GetWindowKind(WindowRef window)
5384  {
5385  return ((WindowPeek)window)->windowKind;
5386  }
5387 #else
5388 #define GetWindowKind(window) (((WindowPeek)window)->windowKind)
5389 #endif
5390 #endif
5391 
5400  Boolean
5402 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5403 #ifdef __cplusplus
5404  inline DEFINE_API(Boolean) IsWindowHilited(WindowRef window)
5405  {
5406  return ((WindowPeek)window)->hilited != 0;
5407  }
5408 #else
5409 #define IsWindowHilited(window) (((WindowPeek)window)->hilited != 0)
5410 #endif
5411 #endif
5412 
5421  Boolean
5423 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5424 #ifdef __cplusplus
5425  inline DEFINE_API(Boolean) IsWindowUpdatePending(WindowRef window)
5426  {
5427  return (((WindowPeek)window)->updateRgn != NULL) &&
5428  !EmptyRgn(((WindowPeek)window)->updateRgn);
5429  }
5430 #else
5431 #define IsWindowUpdatePending(window) \
5432  ((((WindowPeek)window)->updateRgn != NULL) && \
5433  !EmptyRgn(((WindowPeek)window)->updateRgn))
5434 #endif
5435 #endif
5436 
5445 #if TARGET_OS_MAC
5446 #define MacGetNextWindow GetNextWindow
5447 #endif
5448  WindowRef
5449  MacGetNextWindow(WindowRef window);
5450 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5451 #ifdef __cplusplus
5452  inline DEFINE_API(WindowRef) MacGetNextWindow(WindowRef window)
5453  {
5454  return (WindowRef)(((WindowPeek)window)->nextWindow);
5455  }
5456 #else
5457 #if TARGET_OS_MAC
5458 #define GetNextWindow(window) ((WindowRef)(((WindowPeek)window)->nextWindow))
5459 #else
5460 #define MacGetNextWindow(window) ((WindowRef)(((WindowPeek)window)->nextWindow))
5461 #endif
5462 #endif
5463 #endif
5464 
5473  Rect *
5475 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5476 #ifdef __cplusplus
5477  inline DEFINE_API(Rect *) GetWindowStandardState(WindowRef window, Rect *rect)
5478  {
5479  return (*(rect) = ((*(((WindowPeek)window)->dataHandle) == NULL)
5480  ? *(rect)
5481  : ((Rect *)(*(((WindowPeek)window)->dataHandle)))[1])),
5482  (rect);
5483  }
5484 #else
5485 #define GetWindowStandardState(window, rect) \
5486  ((*(rect) = ((*(((WindowPeek)window)->dataHandle) == NULL) \
5487  ? *(rect) \
5488  : ((Rect *)(*(((WindowPeek)window)->dataHandle)))[1])), \
5489  (rect))
5490 #endif
5491 #endif
5492 
5501  Rect *
5503 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5504 #ifdef __cplusplus
5505  inline DEFINE_API(Rect *) GetWindowUserState(WindowRef window, Rect *rect)
5506  {
5507  return (*(rect) = ((*(((WindowPeek)window)->dataHandle) == NULL)
5508  ? *(rect)
5509  : ((Rect *)(*(((WindowPeek)window)->dataHandle)))[0])),
5510  (rect);
5511  }
5512 #else
5513 #define GetWindowUserState(window, rect) \
5514  ((*(rect) = ((*(((WindowPeek)window)->dataHandle) == NULL) \
5515  ? *(rect) \
5516  : ((Rect *)(*(((WindowPeek)window)->dataHandle)))[0])), \
5517  (rect))
5518 #endif
5519 #endif
5520 
5529  void
5531 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5532 #ifdef __cplusplus
5533  inline DEFINE_API(void) SetWindowKind(WindowRef window, short kind)
5534  {
5535  ((WindowPeek)window)->windowKind = kind;
5536  }
5537 #else
5538 #define SetWindowKind(window, kind) (((WindowPeek)window)->windowKind = kind)
5539 #endif
5540 #endif
5541 
5550  void
5552 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5553 #ifdef __cplusplus
5554  inline DEFINE_API(void)
5556  {
5557  Rect *stateRects = (Rect *)(*(((WindowPeek)window)->dataHandle));
5558  if (stateRects != NULL)
5559  stateRects[1] = *rect;
5560  }
5561 #else
5562 #define SetWindowStandardState(window, rect) \
5563  do \
5564  { \
5565  Rect *stateRects = (Rect *)(*(((WindowPeek)window)->dataHandle)); \
5566  if (stateRects != NULL) \
5567  stateRects[1] = *rect; \
5568  } while (false)
5569 #endif
5570 #endif
5571 
5580  void
5582 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5583 #ifdef __cplusplus
5584  inline DEFINE_API(void) SetWindowUserState(WindowRef window, const Rect *rect)
5585  {
5586  Rect *stateRects = (Rect *)(*(((WindowPeek)window)->dataHandle));
5587  if (stateRects != NULL)
5588  stateRects[0] = *rect;
5589  }
5590 #else
5591 #define SetWindowUserState(window, rect) \
5592  do \
5593  { \
5594  Rect *stateRects = (Rect *)(*(((WindowPeek)window)->dataHandle)); \
5595  if (stateRects != NULL) \
5596  stateRects[0] = *rect; \
5597  } while (false)
5598 #endif
5599 #endif
5600 
5613  void
5615 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5616 #ifdef __cplusplus
5617  inline DEFINE_API(void) SetPortWindowPort(WindowRef window)
5618  {
5620  }
5621 #else
5622 #define SetPortWindowPort(window) (MacSetPort((GrafPtr)window))
5623 #endif
5624 #endif
5625 
5634  Rect *
5636 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5637 #ifdef __cplusplus
5638  inline DEFINE_API(Rect *) GetWindowPortBounds(WindowRef window, Rect *bounds)
5639  {
5640  return ((*(bounds) = (window)->portRect)), (bounds);
5641  }
5642 #else
5643 #define GetWindowPortBounds(window, bounds) \
5644  (((*(bounds) = (window)->portRect)), (bounds))
5645 #endif
5646 #endif
5647 
5659  WindowRef
5661 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5662 #ifdef __cplusplus
5663  inline DEFINE_API(WindowRef) GetWindowFromPort(CGrafPtr port)
5664  {
5665  return (WindowRef)port;
5666  }
5667 #else
5668 #define GetWindowFromPort(port) ((WindowRef)port)
5669 #endif
5670 #endif
5671 
5674 #if CALL_NOT_IN_CARBON
5683  Handle
5685 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5686 #ifdef __cplusplus
5688  {
5689  return ((WindowPeek)window)->dataHandle;
5690  }
5691 #else
5692 #define GetWindowDataHandle(window) (((WindowPeek)window)->dataHandle)
5693 #endif
5694 #endif
5695 
5704  void
5705  SetWindowDataHandle(WindowRef window, Handle data);
5706 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5707 #ifdef __cplusplus
5708  inline void SetWindowDataHandle(WindowRef window, Handle data)
5709  {
5710  ((WindowPeek)window)->dataHandle = data;
5711  }
5712 #else
5713 #define SetWindowDataHandle(window, data) \
5714  (((WindowPeek)window)->dataHandle = data)
5715 #endif
5716 #endif
5717 
5726  Boolean
5728 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5729 #ifdef __cplusplus
5731  {
5732  return ((WindowPeek)window)->spareFlag;
5733  }
5734 #else
5735 #define GetWindowZoomFlag(window) (((WindowPeek)window)->spareFlag)
5736 #endif
5737 #endif
5738 
5747  void
5749 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5750 #ifdef __cplusplus
5752  {
5753  MacCopyRgn(((WindowPeek)window)->strucRgn, r);
5754  }
5755 #else
5756 #define GetWindowStructureRgn(window, r) \
5757  (MacCopyRgn(((WindowPeek)window)->strucRgn, r))
5758 #endif
5759 #endif
5760 
5769  void
5771 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5772 #ifdef __cplusplus
5774  {
5775  MacCopyRgn(((WindowPeek)window)->contRgn, r);
5776  }
5777 #else
5778 #define GetWindowContentRgn(window, r) \
5779  (MacCopyRgn(((WindowPeek)window)->contRgn, r))
5780 #endif
5781 #endif
5782 
5791  void
5793 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5794 #ifdef __cplusplus
5796  {
5797  MacCopyRgn(((WindowPeek)window)->updateRgn, r);
5798  }
5799 #else
5800 #define GetWindowUpdateRgn(window, r) \
5801  (MacCopyRgn(((WindowPeek)window)->updateRgn, r))
5802 #endif
5803 #endif
5804 
5813  SInt16
5815 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5816 #ifdef __cplusplus
5818  {
5819  return ((WindowPeek)window)->titleWidth;
5820  }
5821 #else
5822 #define GetWindowTitleWidth(window) (((WindowPeek)window)->titleWidth)
5823 #endif
5824 #endif
5825 
5829 #endif
5831  enum
5832  {
5833  kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer,
5834  kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether,
5835  kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether
5836  };
5837 
5838 #if PRAGMA_STRUCT_ALIGN
5839 #pragma options align = reset
5840 #elif PRAGMA_STRUCT_PACKPUSH
5841 #pragma pack(pop)
5842 #elif PRAGMA_STRUCT_PACK
5843 #pragma pack()
5844 #endif
5845 
5846 #ifdef PRAGMA_IMPORT_OFF
5847 #pragma import off
5848 #elif PRAGMA_IMPORT
5849 #pragma import reset
5850 #endif
5851 
5852 #ifdef __cplusplus
5853 }
5854 #endif
5855 
5856 #endif
5857 * /
5858  inline Handle GetWindowDataHandle(WindowRef window)
5859 {
5860  return ((WindowPeek)window)->dataHandle;
5861 }
5862 #else
5863 #define GetWindowDataHandle(window) (((WindowPeek)window)->dataHandle)
5864 #endif
5865 #endif
5866 
5875 void SetWindowDataHandle(WindowRef window, Handle data);
5876 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5877 #ifdef __cplusplus
5878 inline void SetWindowDataHandle(WindowRef window, Handle data)
5879 {
5880  ((WindowPeek)window)->dataHandle = data;
5881 }
5882 #else
5883 #define SetWindowDataHandle(window, data) \
5884  (((WindowPeek)window)->dataHandle = data)
5885 #endif
5886 #endif
5887 
5896 Boolean
5898 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5899 #ifdef __cplusplus
5901 {
5902  return ((WindowPeek)window)->spareFlag;
5903 }
5904 #else
5905 #define GetWindowZoomFlag(window) (((WindowPeek)window)->spareFlag)
5906 #endif
5907 #endif
5908 
5918 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5919 #ifdef __cplusplus
5921 {
5922  MacCopyRgn(((WindowPeek)window)->strucRgn, r);
5923 }
5924 #else
5925 #define GetWindowStructureRgn(window, r) \
5926  (MacCopyRgn(((WindowPeek)window)->strucRgn, r))
5927 #endif
5928 #endif
5929 
5939 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5940 #ifdef __cplusplus
5942 {
5943  MacCopyRgn(((WindowPeek)window)->contRgn, r);
5944 }
5945 #else
5946 #define GetWindowContentRgn(window, r) \
5947  (MacCopyRgn(((WindowPeek)window)->contRgn, r))
5948 #endif
5949 #endif
5950 
5960 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5961 #ifdef __cplusplus
5963 {
5964  MacCopyRgn(((WindowPeek)window)->updateRgn, r);
5965 }
5966 #else
5967 #define GetWindowUpdateRgn(window, r) \
5968  (MacCopyRgn(((WindowPeek)window)->updateRgn, r))
5969 #endif
5970 #endif
5971 
5980 SInt16
5982 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
5983 #ifdef __cplusplus
5984 inline SInt16 GetWindowTitleWidth(WindowRef window)
5985 {
5986  return ((WindowPeek)window)->titleWidth;
5987 }
5988 #else
5989 #define GetWindowTitleWidth(window) (((WindowPeek)window)->titleWidth)
5990 #endif
5991 #endif
5992 
5996 #endif
5998 enum
5999 {
6000  kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer,
6001  kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether,
6002  kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether
6003 };
6004 
6005 #if PRAGMA_STRUCT_ALIGN
6006 #pragma options align = reset
6007 #elif PRAGMA_STRUCT_PACKPUSH
6008 #pragma pack(pop)
6009 #elif PRAGMA_STRUCT_PACK
6010 #pragma pack()
6011 #endif
6012 
6013 #ifdef PRAGMA_IMPORT_OFF
6014 #pragma import off
6015 #elif PRAGMA_IMPORT
6016 #pragma import reset
6017 #endif
6018 
6019 #ifdef __cplusplus
6020 }
6021 #endif
6022 
6023 #endif
6024 * / if PRAGMA_IMPORT
6025 #pragma import reset
6026 #endif
6027 
6028 #ifdef __cplusplus
6029 }
6030 #endif
6031 
6032 #endif
6033 * /*/*/ * /*/*/ * /*/*/
Alias Manager Interfaces.
AppleEvent Package Interfaces.
Collection Manager Interfaces.
struct OpaqueCollection * Collection
Definition: Collections.h:158
Drag and Drop Interfaces.
DragRef DragReference
Definition: Drag.h:1472
Event Manager Interfaces.
struct OpaqueEventRef * EventRef
Definition: Events.h:1081
Icon Utilities and Icon Services Interfaces.
OSErr codes.
Basic Macintosh data types.
#define NULL
Definition: MacTypes.h:61
unsigned char Boolean
Definition: MacTypes.h:318
OSStatus GetWindowProperty(WindowRef window, PropertyCreator propertyCreator, PropertyTag propertyTag, UInt32 bufferSize, UInt32 *actualSize, void *propertyBuffer)
@ kWindowActivationScopeIndependent
Definition: MacWindows.h:1877
@ kWindowActivationScopeAll
Definition: MacWindows.h:1885
@ kWindowActivationScopeNone
Definition: MacWindows.h:1869
Boolean IsWindowLatentVisible(WindowRef inWindow, WindowLatentVisibility *outLatentVisible)
short findwindow(Point *thePoint, WindowRef *window)
OSStatus GetWindowWidgetHilite(WindowRef inWindow, WindowDefPartCode *outHilite)
Boolean GetWindowGoAwayFlag(WindowRef window)
Rect * GetWindowPortBounds(WindowRef window, Rect *bounds)
void GetWindowUpdateRgn(WindowRef window, RgnHandle r)
Definition: MacWindows.h:5795
long PinRect(const Rect *theRect, Point thePt)
Find point on a rectangle's border near point.
OSStatus CopyWindowTitleAsCFString(WindowRef inWindow, CFStringRef *outString)
OSStatus GetWindowGroupAttributes(WindowGroupRef inGroup, WindowGroupAttributes *outAttributes)
OSStatus CreateCustomWindow(const WindowDefSpec *def, WindowClass windowClass, WindowAttributes attributes, const Rect *contentBounds, WindowRef *outWindow)
void SendBehind(WindowRef window, WindowRef behindWindow)
void SetWindowPic(WindowRef window, PicHandle pic)
Set a PicHandle for alternative updating.
UInt32 WindowLatentVisibility
Definition: MacWindows.h:4631
void DisposeDeskHookUPP(DeskHookUPP userUPP)
OSStatus GetWindowPropertyAttributes(WindowRef window, OSType propertyCreator, OSType propertyTag, UInt32 *attributes)
void GetWMgrPort(GrafPtr *wPort)
Obtain a pointer to the Window Manager port.
#define NewWindowPaintUPP(userRoutine)
Definition: MacWindows.h:989
OSStatus GetWindowOwnerCount(WindowRef window, UInt32 *outCount)
@ kWindowMsgModified
Definition: MacWindows.h:633
@ kWindowMsgDrawInCurrentPort
Definition: MacWindows.h:635
@ kWindowMsgMeasureTitle
Definition: MacWindows.h:641
@ kWindowMsgSetupProxyDragImage
Definition: MacWindows.h:637
@ kWindowMsgStateChanged
Definition: MacWindows.h:639
OSStatus CopyWindowGroupName(WindowGroupRef inGroup, CFStringRef *outName)
Boolean IsWindowActive(WindowRef inWindow)
WindowRef GetWindowList(void)
OSStatus SetWindowActivationScope(WindowRef inWindow, WindowActivationScope inScope)
@ kWindowConstrainAllowPartial
Definition: MacWindows.h:4468
@ kWindowConstrainMayResize
Definition: MacWindows.h:4457
@ kWindowConstrainCalcOnly
Definition: MacWindows.h:4474
@ kWindowConstrainUseTransitionWindow
Definition: MacWindows.h:4480
@ kWindowConstrainStandardOptions
Definition: MacWindows.h:4488
@ kWindowConstrainMoveRegardlessOfFit
Definition: MacWindows.h:4462
PicHandle GetWindowPic(WindowRef window)
Obtain Handle of window picture, if any.
@ inStructure
Definition: MacWindows.h:592
@ inToolbarButton
Definition: MacWindows.h:591
@ inProxyIcon
Definition: MacWindows.h:590
OSStatus StoreWindowIntoCollection(WindowRef window, Collection collection)
WindowRef GetFrontWindowOfClass(WindowClass inWindowClass, Boolean mustBeVisible)
void GetWindowStructureRgn(WindowRef window, RgnHandle r)
Definition: MacWindows.h:5751
OSStatus GetWindowRegion(WindowRef window, WindowRegionCode inRegionCode, RgnHandle ioWinRgn)
OSStatus SetWindowModified(WindowRef window, Boolean modified)
OSStatus SetWindowContentPattern(WindowRef window, PixPatHandle pixPat)
@ kWindowDocumentDefProcResID
Definition: MacWindows.h:354
OSStatus GetWindowActivationScope(WindowRef inWindow, WindowActivationScope *outScope)
OSStatus HiliteWindowFrameForDrag(WindowRef window, Boolean hilited)
OSStatus TrackWindowProxyFromExistingDrag(WindowRef window, Point startPt, DragReference drag, RgnHandle inDragOutlineRgn)
OSStatus InstallWindowContentPaintProc(WindowRef window, WindowPaintUPP paintProc, WindowPaintProcOptions options, void *refCon)
OSStatus RetainWindow(WindowRef inWindow)
WindowGroupRef GetWindowGroupOfClass(WindowClass windowClass)
UInt32 WindowModality
Definition: MacWindows.h:1644
WindowGroupRef GetWindowGroupParent(WindowGroupRef inGroup)
OSStatus GetWindowGreatestAreaDevice(WindowRef inWindow, WindowRegionCode inRegion, GDHandle *outGreatestDevice, Rect *outGreatestDeviceRect)
Boolean IsValidWindowClass(WindowClass inClass)
void ValidRgn(RgnHandle goodRgn)
UInt32 WindowConstrainOptions
Definition: MacWindows.h:4450
OSStatus CreateWindowFromCollection(Collection collection, WindowRef *outWindow)
void SetWindowStandardState(WindowRef window, const Rect *rect)
ItemCount CountWindowGroupContents(WindowGroupRef inGroup, WindowGroupContentOptions inOptions)
void SelectWindow(WindowRef window)
@ kWindowDocumentProc
Definition: MacWindows.h:366
CGrafPtr GetWindowStructurePort(WindowRef inWindow)
RgnHandle GetGrayRgn(void)
@ kScrollWindowEraseToPortBackground
Definition: MacWindows.h:2894
OSStatus GetWindowIdealUserState(WindowRef window, Rect *userState)
@ kWindowFloatSideProc
Definition: MacWindows.h:409
void ValidRect(const Rect *goodRect)
@ kStoredBasicWindowDescriptionID
Definition: MacWindows.h:877
@ kStoredWindowPascalTitleID
Definition: MacWindows.h:879
OSStatus ShowFloatingWindows(void)
long GrowWindow(WindowRef window, Point startPt, const Rect *bBox)
void CalcVisBehind(WindowRef startWindow, RgnHandle clobberedRgn)
@ kWindowCenterMainScreen
Definition: MacWindows.h:460
OSStatus ShowSheetWindow(WindowRef inSheet, WindowRef inParentWindow)
@ kWindowUpdateRgn
Definition: MacWindows.h:505
@ kWindowGlobalPortRgn
Definition: MacWindows.h:508
@ kWindowOpaqueRgn
Definition: MacWindows.h:506
@ kWindowStructureRgn
Definition: MacWindows.h:502
@ kWindowTitleBarRgn
Definition: MacWindows.h:494
struct OpaqueWindowGroupRef * WindowGroupRef
Definition: MacWindows.h:1789
void SetWRefCon(WindowRef window, long data)
Set the reference value (refCon) for a window.
WindowRef GetNewCWindow(short windowID, void *wStorage, WindowRef behind)
OSStatus UpdateCollapsedWindowDockTile(WindowRef inWindow)
Handle GetWindowDataHandle(WindowRef window)
Definition: MacWindows.h:5687
OSStatus CloneWindow(WindowRef window)
OSStatus GetAvailableWindowPositioningBounds(GDHandle inDevice, Rect *availableRect)
OSStatus ReleaseWindowGroup(WindowGroupRef inGroup)
@ kSideFloaterVariantCode
Definition: MacWindows.h:318
@ kDocumentWindowVariantCode
Definition: MacWindows.h:311
OSStatus ValidWindowRgn(WindowRef window, RgnHandle region)
WindowRef NewWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowRef behind, Boolean goAwayFlag, long refCon)
UInt32 ScrollWindowOptions
Definition: MacWindows.h:2888
void DisposeWindowDefUPP(WindowDefUPP userUPP)
CGrafPtr GetWindowPort(WindowRef window)
Boolean trackbox(WindowRef window, Point *thePt, short partCode)
void EndUpdate(WindowRef window)
Boolean AreFloatingWindowsVisible(void)
void GetCWMgrPort(CGrafPtr *wMgrCPort)
Obtain a pointer to the Window Manager port.
OSStatus RemoveWindowProxy(WindowRef window)
OSStatus GetWindowIndex(WindowRef inWindow, WindowGroupRef inStartGroup, WindowGroupContentOptions inOptions, UInt32 *outIndex)
@ kWindowGroupContentsRecurse
Definition: MacWindows.h:1934
@ kWindowGroupContentsReturnWindows
Definition: MacWindows.h:1926
@ kWindowGroupContentsVisible
Definition: MacWindows.h:1941
WindowRef newwindow(void *wStorage, const Rect *boundsRect, const char *title, Boolean visible, short theProc, WindowRef behind, Boolean goAwayFlag, long refCon)
@ kWindowModalityAppModal
Definition: MacWindows.h:1665
@ kWindowModalityWindowModal
Definition: MacWindows.h:1670
@ kWindowModalitySystemModal
Definition: MacWindows.h:1659
@ kWindowModalityNone
Definition: MacWindows.h:1652
OSStatus RegisterWindowDefinition(SInt16 inResID, const WindowDefSpec *inDefSpec)
OSStatus GetWindowAttributes(WindowRef window, WindowAttributes *outAttributes)
OSStatus SetWindowProxyFSSpec(WindowRef window, const FSSpec *inFile)
OSStatus InvalWindowRgn(WindowRef window, RgnHandle region)
#define NewDeskHookUPP(userRoutine)
Definition: MacWindows.h:958
OSStatus RepositionWindow(WindowRef window, WindowRef parentWindow, WindowPositionMethod method)
OSStatus SetWindowAlternateTitle(WindowRef inWindow, CFStringRef inTitle)
WindowGroupRef GetWindowGroupSibling(WindowGroupRef inGroup, Boolean inNextGroup)
void SetWTitle(WindowRef window, ConstStr255Param title)
void BeginUpdate(WindowRef window)
OSStatus ChangeWindowAttributes(WindowRef window, WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes)
void DragWindow(WindowRef window, Point startPt, const Rect *boundsRect)
void MacCloseWindow(WindowRef window)
short GetWVariant(WindowRef window)
Get the variant code for a window.
WindowPartCode MacFindWindow(Point thePoint, WindowRef *window)
ItemCount GetWindowGroupRetainCount(WindowGroupRef inGroup)
void ShowHide(WindowRef window, Boolean showFlag)
ItemCount GetWindowRetainCount(WindowRef inWindow)
OSStatus ScrollWindowRegion(WindowRef inWindow, RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn)
OSStatus SetWindowProxyCreatorAndType(WindowRef window, OSType fileCreator, OSType fileType, SInt16 vRefNum)
OSStatus ScrollWindowRect(WindowRef inWindow, const Rect *inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn)
Boolean IsWindowHilited(WindowRef window)
@ kWindowDefObjectClass
Definition: MacWindows.h:1171
@ kWindowDefProcID
Definition: MacWindows.h:1172
long pinrect(const Rect *theRect, Point *thePt)
Rect * GetWindowStandardState(WindowRef window, Rect *rect)
Boolean GetWindowZoomFlag(WindowRef window)
Definition: MacWindows.h:5730
OSStatus EndWindowProxyDrag(WindowRef window, DragReference theDrag)
void DrawGrowIcon(WindowRef window)
short GetWindowKind(WindowRef window)
long growwindow(WindowRef window, Point *startPt, const Rect *bBox)
OSStatus ConstrainWindowToScreen(WindowRef inWindowRef, WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, const Rect *inScreenRect, Rect *outStructure)
OSStatus GetWindowGroupLevel(WindowGroupRef inGroup, SInt32 *outLevel)
@ wInStructure
Definition: MacWindows.h:608
@ wInToolbarButton
Definition: MacWindows.h:607
@ wInProxyIcon
Definition: MacWindows.h:606
OSStatus ChangeWindowGroupAttributes(WindowGroupRef inGroup, WindowGroupAttributes setTheseAttributes, WindowGroupAttributes clearTheseAttributes)
Boolean CheckUpdate(EventRecord *theEvent)
OSType PropertyCreator
Definition: MacWindows.h:107
OptionBits WindowPaintProcOptions
Definition: MacWindows.h:2869
@ kWindowSheetProc
Definition: MacWindows.h:422
@ kWindowSheetAlertProc
Definition: MacWindows.h:423
WindowRef GetWindowGroupOwner(WindowGroupRef inGroup)
Boolean IsWindowCollapsable(WindowRef window)
Boolean IsWindowContainedInGroup(WindowRef inWindow, WindowGroupRef inGroup)
@ kAltPlainWindowClass
Definition: MacWindows.h:134
@ kModalWindowClass
Definition: MacWindows.h:117
@ kSheetWindowClass
Definition: MacWindows.h:125
@ kToolbarWindowClass
Definition: MacWindows.h:127
@ kDocumentWindowClass
Definition: MacWindows.h:120
@ kUtilityWindowClass
Definition: MacWindows.h:121
@ kOverlayWindowClass
Definition: MacWindows.h:130
@ kAllWindowClasses
Definition: MacWindows.h:137
@ kMovableModalWindowClass
Definition: MacWindows.h:118
@ kMovableAlertWindowClass
Definition: MacWindows.h:114
@ kSheetAlertWindowClass
Definition: MacWindows.h:132
@ kHelpWindowClass
Definition: MacWindows.h:123
@ kFloatingWindowClass
Definition: MacWindows.h:119
@ kPlainWindowClass
Definition: MacWindows.h:129
WindowRef GetNextWindowOfClass(WindowRef inWindow, WindowClass inWindowClass, Boolean mustBeVisible)
WindowAttributes GetAvailableWindowAttributes(WindowClass inClass)
OSStatus GetWindowStructureWidths(WindowRef inWindow, Rect *outRect)
@ floatProc
Definition: MacWindows.h:332
@ documentProc
Definition: MacWindows.h:324
OSStatus SetWindowContentColor(WindowRef window, const RGBColor *color)
void setwtitle(WindowRef window, const char *title)
Boolean trackgoaway(WindowRef window, Point *thePt)
OSStatus SetWindowClass(WindowRef inWindow, WindowClass inWindowClass)
OSStatus TransitionWindow(WindowRef inWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, const Rect *inRect)
OSStatus GetWindowClass(WindowRef window, WindowClass *outClass)
Boolean GetAuxWin(WindowRef window, AuxWinHandle *awHndl)
Supply an auxiliary window record if one exists.
void HiliteWindow(WindowRef window, Boolean fHilite)
OSStatus CreateStandardWindowMenu(OptionBits inOptions, MenuRef *outMenu)
Rect * GetWindowUserState(WindowRef window, Rect *rect)
OSStatus SetWindowGroupOwner(WindowGroupRef inGroup, WindowRef inWindow)
void DebugPrintWindowGroup(WindowGroupRef inGroup)
OSStatus SetWindowBounds(WindowRef window, WindowRegionCode regionCode, const Rect *globalBounds)
OSStatus RetainWindowGroup(WindowGroupRef inGroup)
@ kFloatingWindowDefinition
Definition: MacWindows.h:305
@ kRoundWindowDefinition
Definition: MacWindows.h:304
OSStatus ReleaseWindow(WindowRef inWindow)
WindowRef ActiveNonFloatingWindow(void)
void SetDeskCPat(PixPatHandle deskPixPat)
OSStatus GetWindowBounds(WindowRef window, WindowRegionCode regionCode, Rect *globalBounds)
OSStatus GetWindowProxyFSSpec(WindowRef window, FSSpec *outFile)
@ kWindowCanDrawInCurrentPort
Definition: MacWindows.h:687
@ kWindowCanMeasureTitle
Definition: MacWindows.h:691
@ kWindowSupportsModifiedBit
Definition: MacWindows.h:685
@ kWindowWantsDisposeAtProcessDeath
Definition: MacWindows.h:693
@ kWindowDefSupportsColorGrafPort
Definition: MacWindows.h:699
@ kWindowSupportsGetGrowImageRegion
Definition: MacWindows.h:696
@ kWindowCanSetupProxyDragImage
Definition: MacWindows.h:689
OSStatus CollapseAllWindows(Boolean collapse)
OSStatus SetWindowGroupName(WindowGroupRef inGroup, CFStringRef inName)
void PaintOne(WindowRef window, RgnHandle clobberedRgn)
@ kPreviousWindowGroup
Definition: MacWindows.h:1906
@ kNextWindowGroup
Definition: MacWindows.h:1900
void SizeWindow(WindowRef window, short w, short h, Boolean fUpdate)
@ kWindowShowTransitionAction
Definition: MacWindows.h:3978
@ kWindowResizeTransitionAction
Definition: MacWindows.h:4002
@ kWindowMoveTransitionAction
Definition: MacWindows.h:3994
@ kWindowHideTransitionAction
Definition: MacWindows.h:3986
long DragGrayRgn(RgnHandle theRgn, Point startPt, const Rect *limitRect, const Rect *slopRect, short axis, DragGrayRgnUPP actionProc)
#define NewWindowDefUPP(userRoutine)
Definition: MacWindows.h:929
void HideWindow(WindowRef window)
OSStatus ReleaseQDContextForCollapsedWindowDockTile(WindowRef inWindow, CGrafPtr inContext)
void SetWinColor(WindowRef window, WCTabHandle newColorTable)
void SaveOld(WindowRef window)
Boolean TrackBox(WindowRef window, Point thePt, WindowPartCode partCode)
void SetWindowUserState(WindowRef window, const Rect *rect)
void ZoomWindow(WindowRef window, WindowPartCode partCode, Boolean front)
void DebugPrintAllWindowGroups(void)
@ kWindowNoAttributes
Definition: MacWindows.h:154
@ kWindowNoConstrainAttribute
Definition: MacWindows.h:278
@ kWindowToolbarButtonAttribute
Definition: MacWindows.h:211
@ kWindowHideOnFullScreenAttribute
Definition: MacWindows.h:257
@ kWindowCollapseBoxAttribute
Definition: MacWindows.h:191
@ kWindowNoUpdatesAttribute
Definition: MacWindows.h:216
@ kWindowSideTitlebarAttribute
Definition: MacWindows.h:205
@ kWindowStandardFloatingAttributes
Definition: MacWindows.h:292
@ kWindowLiveResizeAttribute
Definition: MacWindows.h:270
@ kWindowInWindowMenuAttribute
Definition: MacWindows.h:264
@ kWindowCloseBoxAttribute
Definition: MacWindows.h:161
@ kWindowOpaqueForEventsAttribute
Definition: MacWindows.h:228
@ kWindowHorizontalZoomAttribute
Definition: MacWindows.h:168
@ kWindowHideOnSuspendAttribute
Definition: MacWindows.h:243
@ kWindowStandardHandlerAttribute
Definition: MacWindows.h:249
@ kWindowVerticalZoomAttribute
Definition: MacWindows.h:175
@ kWindowResizableAttribute
Definition: MacWindows.h:198
@ kWindowFullZoomAttribute
Definition: MacWindows.h:182
@ kWindowStandardDocumentAttributes
Definition: MacWindows.h:284
@ kWindowNoShadowAttribute
Definition: MacWindows.h:235
@ kWindowNoActivatesAttribute
Definition: MacWindows.h:221
OSStatus MoveWindowStructure(WindowRef window, short hGlobal, short vGlobal)
OSStatus InitFloatingWindows(void)
OSStatus EnableScreenUpdates(void)
UInt32 WindowTransitionEffect
Definition: MacWindows.h:3936
OSStatus ReshapeCustomWindow(WindowRef window)
void dragwindow(WindowRef window, Point *startPt, const Rect *boundsRect)
long GetWRefCon(WindowRef window)
Return a window's reference value.
OSStatus CopyWindowAlternateTitle(WindowRef inWindow, CFStringRef *outTitle)
UInt32 WindowPositionMethod
Definition: MacWindows.h:476
OSStatus SetWindowProperty(WindowRef window, PropertyCreator propertyCreator, PropertyTag propertyTag, UInt32 propertySize, void *propertyBuffer)
void InvalRect(const Rect *badRect)
@ kWindowFloatProc
Definition: MacWindows.h:396
void GetWindowContentRgn(WindowRef window, RgnHandle r)
Definition: MacWindows.h:5773
void InitWindows(void)
void BringToFront(WindowRef window)
WindowRef newcwindow(void *wStorage, const Rect *boundsRect, const char *title, Boolean visible, short procID, WindowRef behind, Boolean goAwayFlag, long refCon)
@ kWindowZoomTransitionEffect
Definition: MacWindows.h:3944
@ kWindowSheetTransitionEffect
Definition: MacWindows.h:3951
@ kWindowSlideTransitionEffect
Definition: MacWindows.h:3958
WindowRef GetNewWindow(short windowID, void *wStorage, WindowRef behind)
@ kWindowMovableModalGrowProc
Definition: MacWindows.h:390
WindowRef GetWindowFromPort(CGrafPtr port)
void PaintBehind(WindowRef startWindow, RgnHandle clobberedRgn)
OSStatus CreateQDContextForCollapsedWindowDockTile(WindowRef inWindow, CGrafPtr *outContext)
OSStatus GetWindowModality(WindowRef inWindow, WindowModality *outModalKind, WindowRef *outUnavailableWindow)
OSStatus SetWindowProxyAlias(WindowRef window, AliasHandle alias)
OSStatus GetWindowGroupContents(WindowGroupRef inGroup, WindowGroupContentOptions inOptions, ItemCount inAllowedItems, ItemCount *outNumItems, void **outItems)
OSStatus SetWindowTitleWithCFString(WindowRef inWindow, CFStringRef inString)
Obtain the text of a window's title.
void DisposeWindowPaintUPP(WindowPaintUPP userUPP)
Boolean IsWindowCollapsed(WindowRef window)
OSStatus SetWindowGroupParent(WindowGroupRef inGroup, WindowGroupRef inNewGroup)
OSStatus TransitionWindowAndParent(WindowRef inWindow, WindowRef inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, const Rect *inRect)
OSStatus CreateWindowFromResource(SInt16 resID, WindowRef *outWindow)
OSStatus ZoomWindowIdeal(WindowRef window, WindowPartCode partCode, Point *ioIdealSize)
UInt32 WindowGroupAttributes
Definition: MacWindows.h:1803
Boolean IsWindowPathSelectEvent(WindowRef window, EventRef inEvent)
SInt16 GetWindowTitleWidth(WindowRef window)
Definition: MacWindows.h:5817
Boolean IsWindowInStandardState(WindowRef window, Point *idealSize, Rect *idealStandardState)
Boolean IsWindowModified(WindowRef window)
void SetWindowKind(WindowRef window, short kind)
UInt32 WindowTransitionAction
Definition: MacWindows.h:3968
Boolean GetWindowSpareFlag(WindowRef window)
@ kWindowGroupAttrLayerTogether
Definition: MacWindows.h:1829
@ kWindowGroupAttrHideOnCollapse
Definition: MacWindows.h:1846
@ kWindowGroupAttrSelectAsLayer
Definition: MacWindows.h:1813
@ kWindowGroupAttrSharedActivation
Definition: MacWindows.h:1837
@ kWindowGroupAttrMoveTogether
Definition: MacWindows.h:1820
void getwtitle(WindowRef window, char *title)
WindowGroupRef GetWindowGroup(WindowRef inWindow)
OSStatus SetWindowModality(WindowRef inWindow, WindowModality inModalKind, WindowRef inUnavailableWindow)
OSStatus HideFloatingWindows(void)
OSStatus GetWindowProxyAlias(WindowRef window, AliasHandle *alias)
Boolean TrackGoAway(WindowRef window, Point thePt)
OSStatus InvokeWindowPaintUPP(GDHandle device, GrafPtr qdContext, WindowRef window, RgnHandle inClientPaintRgn, RgnHandle outSystemPaintRgn, void *refCon, WindowPaintUPP userUPP)
OSStatus GetWindowProxyIcon(WindowRef window, IconRef *outIcon)
void ClipAbove(WindowRef window)
OSStatus GetIndexedWindow(WindowGroupRef inGroup, UInt32 inIndex, WindowGroupContentOptions inOptions, WindowRef *outWindow)
Boolean ResizeWindow(WindowRef window, Point startPoint, const Rect *sizeConstraints, Rect *newContentRect)
void DrawNew(WindowRef window, Boolean update)
OSStatus HideSheetWindow(WindowRef inSheet)
OSStatus CreateNewWindow(WindowClass windowClass, WindowAttributes attributes, const Rect *contentBounds, WindowRef *outWindow)
void CalcVis(WindowRef window)
@ kWindowLatentVisibleFloater
Definition: MacWindows.h:4638
@ kWindowLatentVisibleCollapsedOwner
Definition: MacWindows.h:4658
@ kWindowLatentVisibleCollapsedGroup
Definition: MacWindows.h:4664
@ kWindowLatentVisibleFullScreen
Definition: MacWindows.h:4648
@ kWindowLatentVisibleSuspend
Definition: MacWindows.h:4643
@ kWindowLatentVisibleAppHidden
Definition: MacWindows.h:4653
OSStatus BeginWindowProxyDrag(WindowRef window, DragReference *outNewDrag, RgnHandle outDragOutlineRgn)
WindowRef NewCWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short procID, WindowRef behind, Boolean goAwayFlag, long refCon)
void SetWindowDataHandle(WindowRef window, Handle data)
Definition: MacWindows.h:5708
WindowRef FrontNonFloatingWindow(void)
OSStatus WindowPathSelect(WindowRef window, MenuRef menu, SInt32 *outMenuResult)
OSStatus SetWindowGroupLevel(WindowGroupRef inGroup, SInt32 inLevel)
OSStatus SendWindowGroupBehind(WindowGroupRef inGroup, WindowGroupRef behindGroup)
OSStatus TrackWindowProxyDrag(WindowRef window, Point startPt)
void DisposeWindow(WindowRef window)
OSStatus CreateWindowGroup(WindowGroupAttributes inAttributes, WindowGroupRef *outGroup)
OSStatus GetWindowPropertySize(WindowRef window, PropertyCreator creator, PropertyTag tag, UInt32 *size)
OSStatus DisableScreenUpdates(void)
Boolean IsWindowPathSelectClick(WindowRef window, const EventRecord *event)
long draggrayrgn(RgnHandle theRgn, Point *startPt, const Rect *boundsRect, const Rect *slopRect, short axis, DragGrayRgnUPP actionProc)
Boolean IsWindowUpdatePending(WindowRef window)
@ kWindowPlainDialogProc
Definition: MacWindows.h:379
Boolean IsValidWindowPtr(WindowRef possibleWindow)
long InvokeWindowDefUPP(short varCode, WindowRef window, short message, long param, WindowDefUPP userUPP)
OSStatus InvalWindowRect(WindowRef window, const Rect *bounds)
UInt32 WindowActivationScope
Definition: MacWindows.h:1857
@ kWindowSimpleProc
Definition: MacWindows.h:439
@ kWindowSimpleFrameProc
Definition: MacWindows.h:444
OSStatus GetSheetWindowParent(WindowRef inSheet, WindowRef *outParentWindow)
OSStatus CollapseWindow(WindowRef window, Boolean collapse)
OSStatus RemoveWindowProperty(WindowRef window, PropertyCreator propertyCreator, PropertyTag propertyTag)
void InvalRgn(RgnHandle badRgn)
OSStatus GetWindowContentPattern(WindowRef window, PixPatHandle outPixPat)
OSStatus GetWindowContentColor(WindowRef window, RGBColor *color)
void SetPortWindowPort(WindowRef window)
long DragTheRgn(RgnHandle theRgn, Point startPt, const Rect *limitRect, const Rect *slopRect, short axis, DragGrayRgnUPP actionProc)
OSStatus FindWindowOfClass(const Point *where, WindowClass inWindowClass, WindowRef *outWindow, WindowPartCode *outWindowPart)
UInt32 WindowGroupContentOptions
Definition: MacWindows.h:1917
OSStatus ActivateWindow(WindowRef inWindow, Boolean inActivate)
WindowRef FrontWindow(void)
Return a pointer to the frontmost window.
void InvokeDeskHookUPP(Boolean mouseClick, EventRecord *theEvent, DeskHookUPP userUPP)
OSStatus SetWindowGroup(WindowRef inWindow, WindowGroupRef inNewGroup)
OSStatus ValidWindowRect(WindowRef window, const Rect *bounds)
OSStatus GetWindowFeatures(WindowRef window, UInt32 *outFeatures)
OSStatus SetWindowIdealUserState(WindowRef window, const Rect *userState)
OSStatus ChangeWindowPropertyAttributes(WindowRef window, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear)
OSStatus SetWindowProxyIcon(WindowRef window, IconRef icon)
Menu Manager Interfaces.
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Quickdraw Offscreen GWorld Interfaces.
Interface to Quickdraw Graphics.
Boolean EmptyRgn(RgnHandle rgn)
Determine if a Region is empty.
void MacSetPort(GrafPtr port)
void MacCopyRgn(RgnHandle srcRgn, RgnHandle dstRgn)
TQAMethodSelector
Definition: RAVE.h:1009
typedef CALLBACK_API_REGISTER68K(void, SIInterruptProcPtr,(SPBPtr inParamPtr, Ptr dataBuffer, short peakAmplitude, long sampleSize))
TextEncoding-related types and constants, and prototypes for related functions.
typedef REGISTER_UPP_TYPE(HighHookProcPtr) HighHookUPP
Definition: Aliases.h:87
Definition: MacWindows.h:809
long awFlags
Definition: MacWindows.h:815
CTabHandle awReserved
Definition: MacWindows.h:816
WindowRef awOwner
Definition: MacWindows.h:811
long awRefCon
Definition: MacWindows.h:817
CTabHandle awCTable
Definition: MacWindows.h:812
Handle reserved
Definition: MacWindows.h:814
Definition: MacWindows.h:843
UInt32 windowDefinitionVersion
Definition: MacWindows.h:854
Rect windowContentRect
Definition: MacWindows.h:846
WindowPositionMethod windowPositionMethod
Definition: MacWindows.h:851
WindowAttributes windowAttributes
Definition: MacWindows.h:866
Rect windowZoomRect
Definition: MacWindows.h:847
UInt32 windowStateFlags
Definition: MacWindows.h:849
Boolean windowHasCloseBox
Definition: MacWindows.h:860
UInt32 windowRefCon
Definition: MacWindows.h:848
Definition: Quickdraw.h:2261
Definition: MacWindows.h:781
PicHandle windowPic
Definition: MacWindows.h:798
CWindowPeek nextWindow
Definition: MacWindows.h:797
StringHandle titleHandle
Definition: MacWindows.h:794
long refCon
Definition: MacWindows.h:799
RgnHandle updateRgn
Definition: MacWindows.h:791
Handle windowDefProc
Definition: MacWindows.h:792
RgnHandle strucRgn
Definition: MacWindows.h:789
Boolean visible
Definition: MacWindows.h:785
Boolean goAwayFlag
Definition: MacWindows.h:787
Handle controlList
Definition: MacWindows.h:796
short windowKind
Definition: MacWindows.h:783
Boolean hilited
Definition: MacWindows.h:786
short titleWidth
Definition: MacWindows.h:795
RgnHandle contRgn
Definition: MacWindows.h:790
Handle dataHandle
Definition: MacWindows.h:793
Boolean spareFlag
Definition: MacWindows.h:788
Definition: Quickdraw.h:1960
Definition: Quickdraw.h:1968
Definition: Events.h:224
Definition: Quickdraw.h:2178
Definition: MacWindows.h:562
Definition: MacWindows.h:516
Definition: Quickdraw.h:1648
Definition: Quickdraw.h:306
Definition: MacWindows.h:546
SInt16 fullTitleWidth
Definition: MacWindows.h:548
SInt16 titleTextWidth
Definition: MacWindows.h:549
Definition: Menus.h:753
Definition: Quickdraw.h:326
Definition: Quickdraw.h:2091
Definition: MacTypes.h:520
Definition: PPCToolbox.h:168
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527
Definition: MacWindows.h:533
RgnHandle outlineRgn
Definition: MacWindows.h:539
RgnHandle imageRgn
Definition: MacWindows.h:536
Definition: MacWindows.h:889
Rect stdState
Definition: MacWindows.h:891
Definition: MacWindows.h:740
short ctSize
Definition: MacWindows.h:743
ColorSpec ctTable[5]
Definition: MacWindows.h:744
short wCReserved
Definition: MacWindows.h:742
Definition: MacWindows.h:1178
Definition: MacWindows.h:754
short windowKind
Definition: MacWindows.h:756
StringHandle titleHandle
Definition: MacWindows.h:767
long refCon
Definition: MacWindows.h:772
Boolean hilited
Definition: MacWindows.h:759
Handle windowDefProc
Definition: MacWindows.h:765
PicHandle windowPic
Definition: MacWindows.h:771
Boolean spareFlag
Definition: MacWindows.h:761
short titleWidth
Definition: MacWindows.h:768
Handle controlList
Definition: MacWindows.h:769
RgnHandle contRgn
Definition: MacWindows.h:763
RgnHandle updateRgn
Definition: MacWindows.h:764
Handle dataHandle
Definition: MacWindows.h:766
Boolean visible
Definition: MacWindows.h:758
RgnHandle strucRgn
Definition: MacWindows.h:762
WindowPeek nextWindow
Definition: MacWindows.h:770
Boolean goAwayFlag
Definition: MacWindows.h:760