2
This file is part of the Free Pascal run time library.
4
A file in Amiga system run time library.
5
Copyright (c) 1998-2002 by Nils Sjoholm
6
member of the Amiga RTL development team.
8
See the file COPYING.FPC, included in this distribution,
9
for details about the copyright.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
**********************************************************************}
19
Update for AmigaOS 3.9.
20
Added some const and a few records.
21
Added reaction and workbench.
24
Changed integer > smallint.
27
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
35
uses exec, iffparse, graphics, timer, intuition;
43
{ These members correspond directly to the associated
44
members of the 'AslSemaphore' data structure defined
45
in the <libraries/asl.h> header file by the same names.
49
PAslPrefs = ^tAslPrefs;
51
ap_Reserved : array[0..3] of LONG;
53
ap_SortDrawers : UBYTE;
55
ap_SizePosition : UBYTE;
56
ap_RelativeLeft : WORD;
57
ap_RelativeTop : WORD;
58
ap_RelativeWidth : UBYTE;
59
ap_RelativeHeight : UBYTE;
64
{***************************************************************************}
73
pFontPrefs = ^tFontPrefs;
75
fp_Reserved : Array[0..2] of Longint;
81
fp_TextAttr : tTextAttr;
82
fp_Name : Array[0..FONTNAMESIZE-1] of Char;
86
{ constants for FontPrefs.fp_Type }
92
{***************************************************************************}
95
{***************************************************************************}
101
pIControlPrefs = ^tIControlPrefs;
102
tIControlPrefs = record
103
ic_Reserved : Array[0..3] Of Longint; { System reserved }
104
ic_TimeOut : WORD; { Verify timeout }
105
ic_MetaDrag : smallint; { Meta drag mouse event }
106
ic_Flags : ULONG; { IControl flags (see below) }
107
ic_WBtoFront, { CKey: WB to front }
108
ic_FrontToBack, { CKey: front screen to back }
109
ic_ReqTrue, { CKey: Requester TRUE }
110
ic_ReqFalse : Byte; { CKey: Requester FALSE }
114
{ flags for IControlPrefs.ic_Flags }
115
ICB_COERCE_COLORS = 0;
117
ICB_STRGAD_FILTER = 2;
120
ICB_SQUARE_RATIO = 5;
122
ICF_COERCE_COLORS = 1;
124
ICF_STRGAD_FILTER = 4;
126
ICF_MODEPROMOTE = 16;
127
ICF_SQUARE_RATIO = (1 shl 5);
129
{***************************************************************************}
131
{ File format for input preferences }
135
ID_INPT = 1229869140;
138
pInputPrefs = ^tInputPrefs;
140
ip_Keymap : Array[0..15] of Char;
141
ip_PointerTicks : WORD;
144
ip_KeyRptSpeed : tTimeVal;
145
ip_MouseAccel : smallint;
148
{ File format for locale preferences }
151
ID_LCLE = 1279478853;
152
ID_CTRY = 1129599577;
156
pCountryPrefs = ^tCountryPrefs;
157
tCountryPrefs = record
158
cp_Reserved : Array[0..3] of ULONG;
159
cp_CountryCode : ULONG;
160
cp_TelephoneCode: ULONG;
161
cp_MeasuringSystem : Byte;
163
cp_DateTimeFormat : Array[0..79] of Char;
164
cp_DateFormat : Array[0..39] of Char;
165
cp_TimeFormat : Array[0..39] of Char;
167
cp_ShortDateTimeFormat : Array[0..79] of Char;
168
cp_ShortDateFormat : Array[0..39] of Char;
169
cp_ShortTimeFormat : Array[0..39] of Char;
171
{ for numeric values }
174
cp_FracGroupSeparator : Array[0..9] of Char;
176
cp_FracGrouping : Array[0..9] of Byte;
178
{ for monetary values }
180
cp_MonGroupSeparator,
181
cp_MonFracGroupSeparator : Array[0..9] of Char;
183
cp_MonFracGrouping : Array[0..9] of Byte;
185
cp_MonIntFracDigits : Byte;
187
{ for currency symbols }
190
cp_MonIntCS : Array[0..9] of Char;
192
{ for positive monetary values }
193
cp_MonPositiveSign : Array[0..9] of Char;
194
cp_MonPositiveSpaceSep,
195
cp_MonPositiveSignPos,
196
cp_MonPositiveCSPos : Byte;
198
{ for negative monetary values }
199
cp_MonNegativeSign : Array[0..9] of Char;
200
cp_MonNegativeSpaceSep,
201
cp_MonNegativeSignPos,
202
cp_MonNegativeCSPos : Byte;
204
cp_CalendarType : Byte;
207
pLocalePrefs = ^tLocalePrefs;
208
tLocalePrefs = record
209
lp_Reserved : Array[0..3] of ULONG;
210
lp_CountryName : Array[0..31] of Char;
211
lp_PreferredLanguages : Array[0..9] of Array[0..29] of Char;
212
lp_GMTOffset : Longint;
214
lp_CountryData : tCountryPrefs;
217
{ File format for overscan preferences }
220
ID_OSCN = 1330856782;
221
OSCAN_MAGIC = $FEDCBA89;
225
pOverscanPrefs = ^tOverscanPrefs;
226
tOverscanPrefs = record
233
os_DisplayID : ULONG;
236
os_Standard : tRectangle;
239
{ os_HStart, os_HStop, os_VStart, os_VStop can only be looked at if
240
* os_Magic equals OSCAN_MAGIC. If os_Magic is set to any other value,
241
* these four fields are undefined
245
{***************************************************************************}
247
{ File format for palette preferences }
251
ID_PALT = 1346456660;
254
pPalettePrefs = ^tPalettePrefs;
255
tPalettePrefs = record
256
pap_Reserved : Array[0..3] of Longint; { System reserved }
257
pap_4ColorPens : Array[1..32] of WORD;
258
pap_8ColorPens : Array[1..32] of WORD;
259
pap_Colors : Array[1..32] of tColorSpec; { Used as full 16-bit RGB values }
263
{***************************************************************************}
266
{ File format for pointer preferences }
269
ID_PNTR = 1347310674;
273
pPointerPrefs = ^tPointerPrefs;
274
tPointerPrefs = record
275
pp_Reserved : Array[0..3] of ULONG;
276
pp_Which, { 0=NORMAL, 1=BUSY }
277
pp_Size, { see <intuition/pointerclass.h> }
278
pp_Width, { Width in pixels }
279
pp_Height, { Height in pixels }
282
pp_X, pp_Y : WORD; { Hotspot }
284
{ Color Table: numEntries = (1 << pp_Depth) - 1 }
289
{***************************************************************************}
292
{ constants for PointerPrefs.pp_Which }
296
{***************************************************************************}
299
pRGBTable = ^tRGBTable;
306
{***************************************************************************}
308
{ File format for preferences header }
311
ID_PREF = 1347568966;
312
ID_PRHD = 1347569732;
315
pPrefHeader = ^tPrefHeader;
317
ph_Version, { version of following data }
318
ph_Type : Byte; { type of following data }
319
ph_Flags : ULONG; { always set to 0 for now }
322
{ File format for graphics printer preferences }
325
ID_PGFX = 1346848344;
328
pPrinterGfxPrefs = ^tPrinterGfxPrefs;
329
tPrinterGfxPrefs = record
330
pg_Reserved : Array[0..3] of Longint;
334
pg_Threshold : smallint;
338
pg_GraphicFlags : WORD;
339
pg_PrintDensity : Byte; { Print density 1 - 7 }
341
pg_PrintMaxHeight : WORD;
343
pg_PrintYOffset : Byte;
347
{ constants for PrinterGfxPrefs.pg_Aspect }
351
{ constants for PrinterGfxPrefs.pg_Shade }
357
{ constants for PrinterGfxPrefs.pg_Image }
361
{ flags for PrinterGfxPrefs.pg_ColorCorrect }
362
PCCB_RED = 1; { color correct red shades }
363
PCCB_GREEN = 2; { color correct green shades }
364
PCCB_BLUE = 3; { color correct blue shades }
370
{ constants for PrinterGfxPrefs.pg_Dimensions }
371
PD_IGNORE = 0; { ignore max width/height settings }
372
PD_BOUNDED = 1; { use max w/h as boundaries }
373
PD_ABSOLUTE = 2; { use max w/h as absolutes }
374
PD_PIXEL = 3; { use max w/h as prt pixels }
375
PD_MULTIPLY = 4; { use max w/h as multipliers }
377
{ constants for PrinterGfxPrefs.pg_Dithering }
378
PD_ORDERED = 0; { ordered dithering }
379
PD_HALFTONE = 1; { halftone dithering }
380
PD_FLOYD = 2; { Floyd-Steinberg dithering }
382
{ flags for PrinterGfxPrefs.pg_GraphicsFlags }
383
PGFB_CENTER_IMAGE = 0; { center image on paper }
384
PGFB_INTEGER_SCALING = 1; { force integer scaling }
385
PGFB_ANTI_ALIAS = 2; { anti-alias image }
387
PGFF_CENTER_IMAGE = 1;
388
PGFF_INTEGER_SCALING = 2;
392
{ File format for PostScript printer preferences }
395
ID_PSPD = 1347637316;
398
pPrinterPSPrefs = ^tPrinterPSPrefs;
399
tPrinterPSPrefs = record
400
ps_Reserved : Array[0..3] of Longint; { System reserved }
402
{ Global printing attributes }
404
ps_PaperFormat : Byte;
405
ps_Reserved1 : Array[0..1] of Byte;
410
ps_VerticalDPI : Longint;
417
ps_Reserved2 : Array[0..7] of Byte;
425
ps_Leading : Longint;
426
ps_Reserved3 : Array[0..7] of Byte;
436
ps_Reserved4 : Array[0..8] of Byte;
443
ps_Reserved6 : Array[0..7] of byte;
447
{ All measurements are in Millipoints which is 1/1000 of a point, or
448
* in other words 1/72000 of an inch
451
{ constants for PrinterPSPrefs.ps_DriverMode }
455
{ constants for PrinterPSPrefs.ps_PaperFormat }
461
{ constants for PrinterPSPrefs.ps_Font }
465
FONT_HELV_NARROW = 3;
470
FONT_ZAPFCHANCERY = 8;
472
{ constants for PrinterPSPrefs.ps_Pitch }
474
PITCH_COMPRESSED = 1;
477
{ constants for PrinterPSPrefs.ps_Orientation }
479
ORIENT_LANDSCAPE = 1;
481
{ constants for PrinterPSPrefs.ps_Tab }
488
{ constants for PrinterPSPrefs.ps_Image }
492
{ constants for PrinterPSPrefs.ps_Shading }
497
{ constants for PrinterPSPrefs.ps_Dithering }
504
{ constants for PrinterPSPrefs.ps_Aspect }
508
{ constants for PrinterPSPrefs.ps_ScalingType }
517
{ constants for PrinterPSPrefs.ps_Centering }
524
{ File format for text printer preferences }
527
ID_PTXT = 1347704916;
528
ID_PUNT = 1347767892;
531
DRIVERNAMESIZE = 30; { Filename size }
532
DEVICENAMESIZE = 32; { .device name size }
536
pPrinterTxtPrefs = ^tPrinterTxtPrefs;
537
tPrinterTxtPrefs = record
538
pt_Reserved : Array[0..3] of Longint; { System reserved }
539
pt_Driver : Array[0..DRIVERNAMESIZE-1] of Char; { printer driver filename }
540
pt_Port : Byte; { printer port connection }
544
pt_PaperLength, { Paper length in # of lines }
548
pt_LeftMargin, { Left margin }
549
pt_RightMargin, { Right margin }
554
{ constants for PrinterTxtPrefs.pt_Port }
558
{ constants for PrinterTxtPrefs.pt_PaperType }
562
{ constants for PrinterTxtPrefs.pt_PaperSize }
568
PS_EURO_A0 = 5 ; { European size A0: 841 x 1189 }
569
PS_EURO_A1 = 6 ; { European size A1: 594 x 841 }
570
PS_EURO_A2 = 7 ; { European size A2: 420 x 594 }
571
PS_EURO_A3 = 8 ; { European size A3: 297 x 420 }
572
PS_EURO_A4 = 9 ; { European size A4: 210 x 297 }
573
PS_EURO_A5 = 10; { European size A5: 148 x 210 }
574
PS_EURO_A6 = 11; { European size A6: 105 x 148 }
575
PS_EURO_A7 = 12; { European size A7: 74 x 105 }
576
PS_EURO_A8 = 13; { European size A8: 52 x 74 }
578
{ constants for PrinterTxtPrefs.pt_PrintPitch }
583
{ constants for PrinterTxtPrefs.pt_PrintSpacing }
587
{ constants for PrinterTxtPrefs.pt_PrintQuality }
592
{ PrinterUnitPrefs is used from printer.device to open
593
the connection device
597
pPrinterUnitPrefs = ^tPrinterUnitPrefs;
598
tPrinterUnitPrefs = record
599
pu_Reserved : Array[0..3] of Longint; { System reserved }
600
pu_UnitNum : Longint; { Unit number for OpenDevice() }
601
pu_OpenDeviceFlags : ULONG; { Flags for OpenDevice() }
602
pu_DeviceName : Array[0..DEVICENAMESIZE-1] of Char; { Name for OpenDevice() }
606
{ PrinterDeviceUnitPrefs is used as descriptor for printer device
609
PPrinterDeviceUnitPrefs = ^tPrinterDeviceUnitPrefs;
610
tPrinterDeviceUnitPrefs = record
611
pd_Reserved : array[0..3] of LONG; { System reserved }
612
pd_UnitNum : LONG; { Unit number for OpenDevice() }
613
pd_UnitName : array[0..(UNITNAMESIZE)-1] of UBYTE; { Symbolic name of the unit }
623
PReactionPrefs = ^tReactionPrefs;
624
tReactionPrefs = record
625
rp_BevelType : UWORD;
626
rp_GlyphType : UWORD;
627
rp_LayoutSpacing : UWORD;
630
rp_LabelPlace : UWORD;
632
rp_SimpleRefresh : BOOL;
634
rp_FallbackAttr : tTextAttr;
635
rp_LabelAttr : tTextAttr;
636
rp_FallbackName : array[0..(FONTNAMESIZE)-1] of UBYTE;
637
rp_LabelName : array[0..(FONTNAMESIZE)-1] of UBYTE;
638
rp_Pattern : array[0..255] of UBYTE;
642
{ File format for screen mode preferences }
645
ID_SCRM = 1396920909;
649
pScreenModePrefs = ^tScreenModePrefs;
650
tScreenModePrefs = record
651
smp_Reserved : Array[0..3] of ULONG;
652
smp_DisplayID : ULONG;
660
{ flags for ScreenModePrefs.smp_Control }
665
{ File format for serial preferences }
668
ID_SERL = 1397051980;
672
pSerialPrefs = ^tSerialPrefs;
673
tSerialPrefs = record
674
sp_Reserved : Array[0..2] of Longint; { System reserved }
675
sp_Unit0Map, { What unit 0 really refers to }
676
sp_BaudRate, { Baud rate }
678
sp_InputBuffer, { Input buffer: 0 - 65536 }
679
sp_OutputBuffer : ULONG; { Future: Output: 0 - 65536 }
681
sp_InputHandshake, { Input handshaking }
682
sp_OutputHandshake, { Future: Output handshaking }
684
sp_Parity, { Parity }
685
sp_BitsPerChar, { I/O bits per character }
686
sp_StopBits : Byte; { Stop bits }
690
{ constants for SerialPrefs.sp_Parity }
694
PARITY_MARK = 3; { Future enhancement }
695
PARITY_SPACE = 4; { Future enhancement }
697
{ constants for SerialPrefs.sp_Input/OutputHandshaking }
702
{ File format for sound preferences }
705
ID_SOND = 1397706308;
708
pSoundPrefs = ^tSoundPrefs;
710
sop_Reserved : Array[0..3] of Longint; { System reserved }
711
sop_DisplayQueue, { Flash the display? }
712
sop_AudioQueue : Boolean; { Make some sound? }
713
sop_AudioType, { Type of sound, see below }
714
sop_AudioVolume, { Volume of sound, 0..64 }
715
sop_AudioPeriod, { Period of sound, 127..2500 }
716
sop_AudioDuration : WORD; { Length of simple beep }
717
sop_AudioFileName : Array[0..255] of Char; { Filename of 8SVX file }
721
{ constants for SoundPrefs.sop_AudioType }
722
SPTYPE_BEEP = 0; { simple beep sound }
723
SPTYPE_SAMPLE = 1; { sampled sound }
725
{ File format for wbpattern preferences }
728
ID_PTRN = 1347703374;
731
pWBPatternPrefs = ^tWBPatternPrefs;
732
tWBPatternPrefs = record
733
wbp_Reserved : Array[0..3] of ULONG;
734
wbp_Which, { Which pattern is it }
736
wbp_Revision, { Must be set to zero }
737
wbp_Depth : Byte; { Depth of pattern }
738
wbp_DataLength : WORD; { Length of following data }
742
{ constants for WBPatternPrefs.wbp_Which }
748
WBPF_PATTERN = $0001;
749
{ Data contains a pattern }
751
WBPF_NOREMAP = $0010;
752
{ Don't remap the pattern }
753
{ PDTA_DitherQuality: see pictureclass.h }
754
WBPF_DITHER_MASK = $0300;
755
{ DitherQuality: Default }
756
WBPF_DITHER_DEF = $0000;
758
WBPF_DITHER_BAD = $0100;
760
WBPF_DITHER_GOOD = $0200;
762
WBPF_DITHER_BEST = $0300;
763
{ OBP_Precision: see pictureclass.h }
764
WBPF_PRECISION_MASK = $0C00;
765
WBPF_PRECISION_DEF = $0000;
766
WBPF_PRECISION_ICON = $0400;
767
WBPF_PRECISION_IMAGE = $0800;
768
WBPF_PRECISION_EXACT = $0C00;
769
WBPF_PLACEMENT_MASK = $3000;
770
WBPF_PLACEMENT_TILE = $0000;
771
WBPF_PLACEMENT_CENTER = $1000;
772
WBPF_PLACEMENT_SCALE = $2000;
773
WBPF_PLACEMENT_SCALEGOOD = $3000;
775
{***************************************************************************}
777
MAXDEPTH = 3; { Max depth supported (8 colors) }
778
DEFPATDEPTH = 2; { Depth of default patterns }
780
{ Pattern width & height: }
789
PWorkbenchPrefs = ^tWorkbenchPrefs;
790
tWorkbenchPrefs = record
791
{ settings from workbench.library }
792
wbp_DefaultStackSize : ULONG;
793
wbp_TypeRestartTime : ULONG;
794
{ settings from icon.library }
795
wbp_IconPrecision : ULONG;
796
wbp_EmbossRect : tRectangle;
797
wbp_Borderless : BOOL;
798
wbp_MaxNameLength : LONG;
799
wbp_NewIconsSupport : BOOL;
800
wbp_ColorIconSupport : BOOL;
802
wbp_ImageMemType : ULONG;
804
wbp_NoTitleBar : BOOL;
808
PWorkbenchHiddenDevicePrefs = ^tWorkbenchHiddenDevicePrefs;
809
tWorkbenchHiddenDevicePrefs = record
810
whdp_Name : array[0..0] of UBYTE; { C String including NULL char }
822
Revision 1.4 2003/02/10 17:59:46 nils
823
* fixes for delphi mode
825
Revision 1.3 2003/02/07 20:45:08 nils
826
* update for amigaos 3.9
828
Revision 1.2 2002/11/19 18:48:39 nils