소스 검색

+ added qd, the "QuickDraw globals"

olle 21 년 전
부모
커밋
ef5ff3185b
2개의 변경된 파일57개의 추가작업 그리고 2개의 파일을 삭제
  1. 45 0
      rtl/macos/macostp.inc
  2. 12 2
      rtl/macos/system.pp

+ 45 - 0
rtl/macos/macostp.inc

@@ -806,6 +806,51 @@ external 'InterfaceLib';
 PROCEDURE UpperString(VAR theString: Str255; diacSensitive: BOOLEAN);
 external 'InterfaceLib';
 
+{************** from Quickdraw ***************}
+
+TYPE
+	Bits16								= ARRAY [0..15] OF INTEGER;
+
+	PatternPtr = ^Pattern;
+	Pattern = RECORD
+		pat:					PACKED ARRAY [0..7] OF UInt8;
+	END;
+
+	PatPtr								= ^Pattern;
+	BitMapPtr = ^BitMap;
+	BitMap = RECORD
+		baseAddr:				pointer;
+		rowBytes:				INTEGER;
+		bounds:					Rect;
+	END;
+	BitMapHandle = ^BitMapPtr;
+
+	CursorPtr = ^Cursor;
+	Cursor = RECORD
+		data:					Bits16;
+		mask:					Bits16;
+		hotSpot:				Point;
+	END;
+	CursPtr = ^Cursor;
+
+  GrafPtr = pointer; //TODO Should actually point to a GrafPort.
+
+	QDGlobalsPtr = ^QDGlobals;
+	QDGlobals = RECORD
+		privates:				PACKED ARRAY [0..75] OF CHAR;
+		randSeed:				LONGINT;								{  in Carbon use GetQDGlobalsRandomSeed }
+		screenBits:				BitMap;									{  in Carbon use GetQDGlobalsScreenBits }
+		arrow:					Cursor;									{  in Carbon use GetQDGlobalsArrow }
+		dkGray:					Pattern;								{  in Carbon use GetQDGlobalsDarkGray }
+		ltGray:					Pattern;								{  in Carbon use GetQDGlobalsLightGray }
+		gray:					Pattern;								{  in Carbon use GetQDGlobalsGray }
+		black:					Pattern;								{  in Carbon use GetQDGlobalsBlack }
+		white:					Pattern;								{  in Carbon use GetQDGlobalsWhite }
+		thePort:				GrafPtr;								{  in Carbon use GetQDGlobalsThePort }
+	END;
+
+	QDGlobalsHdl						= ^QDGlobalsPtr;
+
 {************** from others ***************}
 
 procedure ExitToShell;

+ 12 - 2
rtl/macos/system.pp

@@ -1,7 +1,7 @@
 {
     $Id$
     This file is part of the Free Pascal run time library.
-    Copyright (c) 2002-2003 by Olle Raab
+    Copyright (c) 2002-2004 by Olle Raab
 
     FreePascal system unit for MacOS.
 
@@ -184,6 +184,13 @@ as an include file and not a unit.}
 
 {$I macostp.inc}
 
+{If the Apples Universal Interfaces are used, the qd variable is required
+to be allocated somewhere, so we do it here for the convenience to the user.}
+
+var
+  qd: QDGlobals; cvar;
+
+
 {$ifdef MACOS_USE_STDCLIB}
 
 {************** API to StdCLib in MacOS ***************}
@@ -1271,7 +1278,10 @@ end.
 
 {
   $Log$
-  Revision 1.17  2004-06-21 19:23:34  olle
+  Revision 1.18  2004-07-14 23:34:07  olle
+    + added qd, the "QuickDraw globals"
+
+  Revision 1.17  2004/06/21 19:23:34  olle
     + Variables describing misc OS features added
     + Detection of GUI app
     * Working directory for APPTYPE TOOL correct now