2
0

prefs.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. {
  2. This file is part of the Free Pascal run time library.
  3. A file in Amiga system run time library.
  4. Copyright (c) 1998-2002 by Nils Sjoholm
  5. member of the Amiga RTL development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {
  13. History:
  14. Update for AmigaOS 3.9.
  15. Added some const and a few records.
  16. Added reaction and workbench.
  17. 31 Jan 2003.
  18. Changed integer > smallint.
  19. 09 Feb 2003.
  20. [email protected] Nils Sjoholm
  21. }
  22. unit prefs;
  23. INTERFACE
  24. uses exec, iffparse, graphics, timer, intuition;
  25. { Asl }
  26. const
  27. ID_ASL = $41534C20;
  28. { These members correspond directly to the associated
  29. members of the 'AslSemaphore' data structure defined
  30. in the <libraries/asl.h> header file by the same names.
  31. }
  32. type
  33. PAslPrefs = ^tAslPrefs;
  34. tAslPrefs = record
  35. ap_Reserved : array[0..3] of LONG;
  36. ap_SortBy : UBYTE;
  37. ap_SortDrawers : UBYTE;
  38. ap_SortOrder : UBYTE;
  39. ap_SizePosition : UBYTE;
  40. ap_RelativeLeft : WORD;
  41. ap_RelativeTop : WORD;
  42. ap_RelativeWidth : UBYTE;
  43. ap_RelativeHeight : UBYTE;
  44. end;
  45. { Font }
  46. {***************************************************************************}
  47. const
  48. ID_FONT = 1179602516;
  49. FONTNAMESIZE = 128;
  50. type
  51. pFontPrefs = ^tFontPrefs;
  52. tFontPrefs = record
  53. fp_Reserved : Array[0..2] of Longint;
  54. fp_Reserved2 : WORD;
  55. fp_Type : WORD;
  56. fp_FrontPen,
  57. fp_BackPen,
  58. fp_DrawMode : Byte;
  59. fp_TextAttr : tTextAttr;
  60. fp_Name : Array[0..FONTNAMESIZE-1] of Char;
  61. end;
  62. const
  63. { constants for FontPrefs.fp_Type }
  64. FP_WBFONT = 0;
  65. FP_SYSFONT = 1;
  66. FP_SCREENFONT = 2;
  67. {***************************************************************************}
  68. { IControl }
  69. {***************************************************************************}
  70. const
  71. ID_ICTL = 1229149260;
  72. Type
  73. pIControlPrefs = ^tIControlPrefs;
  74. tIControlPrefs = record
  75. ic_Reserved : Array[0..3] Of Longint; { System reserved }
  76. ic_TimeOut : WORD; { Verify timeout }
  77. ic_MetaDrag : smallint; { Meta drag mouse event }
  78. ic_Flags : ULONG; { IControl flags (see below) }
  79. ic_WBtoFront, { CKey: WB to front }
  80. ic_FrontToBack, { CKey: front screen to back }
  81. ic_ReqTrue, { CKey: Requester TRUE }
  82. ic_ReqFalse : Byte; { CKey: Requester FALSE }
  83. end;
  84. const
  85. { flags for IControlPrefs.ic_Flags }
  86. ICB_COERCE_COLORS = 0;
  87. ICB_COERCE_LACE = 1;
  88. ICB_STRGAD_FILTER = 2;
  89. ICB_MENUSNAP = 3;
  90. ICB_MODEPROMOTE = 4;
  91. ICB_SQUARE_RATIO = 5;
  92. ICF_COERCE_COLORS = 1;
  93. ICF_COERCE_LACE = 2;
  94. ICF_STRGAD_FILTER = 4;
  95. ICF_MENUSNAP = 8;
  96. ICF_MODEPROMOTE = 16;
  97. ICF_SQUARE_RATIO = (1 shl 5);
  98. {***************************************************************************}
  99. { File format for input preferences }
  100. const
  101. ID_INPT = 1229869140;
  102. Type
  103. pInputPrefs = ^tInputPrefs;
  104. tInputPrefs = record
  105. ip_Keymap : Array[0..15] of Char;
  106. ip_PointerTicks : WORD;
  107. ip_DoubleClick,
  108. ip_KeyRptDelay,
  109. ip_KeyRptSpeed : tTimeVal;
  110. ip_MouseAccel : smallint;
  111. end;
  112. { File format for locale preferences }
  113. const
  114. ID_LCLE = 1279478853;
  115. ID_CTRY = 1129599577;
  116. Type
  117. pCountryPrefs = ^tCountryPrefs;
  118. tCountryPrefs = record
  119. cp_Reserved : Array[0..3] of ULONG;
  120. cp_CountryCode : ULONG;
  121. cp_TelephoneCode: ULONG;
  122. cp_MeasuringSystem : Byte;
  123. cp_DateTimeFormat : Array[0..79] of Char;
  124. cp_DateFormat : Array[0..39] of Char;
  125. cp_TimeFormat : Array[0..39] of Char;
  126. cp_ShortDateTimeFormat : Array[0..79] of Char;
  127. cp_ShortDateFormat : Array[0..39] of Char;
  128. cp_ShortTimeFormat : Array[0..39] of Char;
  129. { for numeric values }
  130. cp_DecimalPoint,
  131. cp_GroupSeparator,
  132. cp_FracGroupSeparator : Array[0..9] of Char;
  133. cp_Grouping,
  134. cp_FracGrouping : Array[0..9] of Byte;
  135. { for monetary values }
  136. cp_MonDecimalPoint,
  137. cp_MonGroupSeparator,
  138. cp_MonFracGroupSeparator : Array[0..9] of Char;
  139. cp_MonGrouping,
  140. cp_MonFracGrouping : Array[0..9] of Byte;
  141. cp_MonFracDigits,
  142. cp_MonIntFracDigits : Byte;
  143. { for currency symbols }
  144. cp_MonCS,
  145. cp_MonSmallCS,
  146. cp_MonIntCS : Array[0..9] of Char;
  147. { for positive monetary values }
  148. cp_MonPositiveSign : Array[0..9] of Char;
  149. cp_MonPositiveSpaceSep,
  150. cp_MonPositiveSignPos,
  151. cp_MonPositiveCSPos : Byte;
  152. { for negative monetary values }
  153. cp_MonNegativeSign : Array[0..9] of Char;
  154. cp_MonNegativeSpaceSep,
  155. cp_MonNegativeSignPos,
  156. cp_MonNegativeCSPos : Byte;
  157. cp_CalendarType : Byte;
  158. end;
  159. pLocalePrefs = ^tLocalePrefs;
  160. tLocalePrefs = record
  161. lp_Reserved : Array[0..3] of ULONG;
  162. lp_CountryName : Array[0..31] of Char;
  163. lp_PreferredLanguages : Array[0..9] of Array[0..29] of Char;
  164. lp_GMTOffset : Longint;
  165. lp_Flags : ULONG;
  166. lp_CountryData : tCountryPrefs;
  167. end;
  168. { File format for overscan preferences }
  169. const
  170. ID_OSCN = 1330856782;
  171. OSCAN_MAGIC = $FEDCBA89;
  172. Type
  173. pOverscanPrefs = ^tOverscanPrefs;
  174. tOverscanPrefs = record
  175. os_Reserved,
  176. os_Magic : ULONG;
  177. os_HStart,
  178. os_HStop,
  179. os_VStart,
  180. os_VStop : WORD;
  181. os_DisplayID : ULONG;
  182. os_ViewPos,
  183. os_Text : tPoint;
  184. os_Standard : tRectangle;
  185. end;
  186. { os_HStart, os_HStop, os_VStart, os_VStop can only be looked at if
  187. * os_Magic equals OSCAN_MAGIC. If os_Magic is set to any other value,
  188. * these four fields are undefined
  189. }
  190. {***************************************************************************}
  191. { File format for palette preferences }
  192. const
  193. ID_PALT = 1346456660;
  194. Type
  195. pPalettePrefs = ^tPalettePrefs;
  196. tPalettePrefs = record
  197. pap_Reserved : Array[0..3] of Longint; { System reserved }
  198. pap_4ColorPens : Array[1..32] of WORD;
  199. pap_8ColorPens : Array[1..32] of WORD;
  200. pap_Colors : Array[1..32] of tColorSpec; { Used as full 16-bit RGB values }
  201. end;
  202. {***************************************************************************}
  203. { File format for pointer preferences }
  204. const
  205. ID_PNTR = 1347310674;
  206. Type
  207. pPointerPrefs = ^tPointerPrefs;
  208. tPointerPrefs = record
  209. pp_Reserved : Array[0..3] of ULONG;
  210. pp_Which, { 0=NORMAL, 1=BUSY }
  211. pp_Size, { see <intuition/pointerclass.h> }
  212. pp_Width, { Width in pixels }
  213. pp_Height, { Height in pixels }
  214. pp_Depth, { Depth }
  215. pp_YSize, { YSize }
  216. pp_X, pp_Y : WORD; { Hotspot }
  217. { Color Table: numEntries = (1 << pp_Depth) - 1 }
  218. { Data follows }
  219. end;
  220. {***************************************************************************}
  221. Const
  222. { constants for PointerPrefs.pp_Which }
  223. WBP_NORMAL = 0;
  224. WBP_BUSY = 1;
  225. {***************************************************************************}
  226. Type
  227. pRGBTable = ^tRGBTable;
  228. tRGBTable = record
  229. t_Red,
  230. t_Green,
  231. t_Blue : Byte;
  232. end;
  233. {***************************************************************************}
  234. { File format for preferences header }
  235. const
  236. ID_PREF = 1347568966;
  237. ID_PRHD = 1347569732;
  238. Type
  239. pPrefHeader = ^tPrefHeader;
  240. tPrefHeader = record
  241. ph_Version, { version of following data }
  242. ph_Type : Byte; { type of following data }
  243. ph_Flags : ULONG; { always set to 0 for now }
  244. end;
  245. { File format for graphics printer preferences }
  246. const
  247. ID_PGFX = 1346848344;
  248. Type
  249. pPrinterGfxPrefs = ^tPrinterGfxPrefs;
  250. tPrinterGfxPrefs = record
  251. pg_Reserved : Array[0..3] of Longint;
  252. pg_Aspect,
  253. pg_Shade,
  254. pg_Image : Word;
  255. pg_Threshold : smallint;
  256. pg_ColorCorrect,
  257. pg_Dimensions,
  258. pg_Dithering : Byte;
  259. pg_GraphicFlags : WORD;
  260. pg_PrintDensity : Byte; { Print density 1 - 7 }
  261. pg_PrintMaxWidth,
  262. pg_PrintMaxHeight : WORD;
  263. pg_PrintXOffset,
  264. pg_PrintYOffset : Byte;
  265. end;
  266. const
  267. { constants for PrinterGfxPrefs.pg_Aspect }
  268. PA_HORIZONTAL = 0;
  269. PA_VERTICAL = 1;
  270. { constants for PrinterGfxPrefs.pg_Shade }
  271. PS_BW = 0;
  272. PS_GREYSCALE = 1;
  273. PS_COLOR = 2;
  274. PS_GREY_SCALE2 = 3;
  275. { constants for PrinterGfxPrefs.pg_Image }
  276. PI_POSITIVE = 0;
  277. PI_NEGATIVE = 1;
  278. { flags for PrinterGfxPrefs.pg_ColorCorrect }
  279. PCCB_RED = 1; { color correct red shades }
  280. PCCB_GREEN = 2; { color correct green shades }
  281. PCCB_BLUE = 3; { color correct blue shades }
  282. PCCF_RED = 1;
  283. PCCF_GREEN = 2;
  284. PCCF_BLUE = 4;
  285. { constants for PrinterGfxPrefs.pg_Dimensions }
  286. PD_IGNORE = 0; { ignore max width/height settings }
  287. PD_BOUNDED = 1; { use max w/h as boundaries }
  288. PD_ABSOLUTE = 2; { use max w/h as absolutes }
  289. PD_PIXEL = 3; { use max w/h as prt pixels }
  290. PD_MULTIPLY = 4; { use max w/h as multipliers }
  291. { constants for PrinterGfxPrefs.pg_Dithering }
  292. PD_ORDERED = 0; { ordered dithering }
  293. PD_HALFTONE = 1; { halftone dithering }
  294. PD_FLOYD = 2; { Floyd-Steinberg dithering }
  295. { flags for PrinterGfxPrefs.pg_GraphicsFlags }
  296. PGFB_CENTER_IMAGE = 0; { center image on paper }
  297. PGFB_INTEGER_SCALING = 1; { force integer scaling }
  298. PGFB_ANTI_ALIAS = 2; { anti-alias image }
  299. PGFF_CENTER_IMAGE = 1;
  300. PGFF_INTEGER_SCALING = 2;
  301. PGFF_ANTI_ALIAS = 4;
  302. { File format for PostScript printer preferences }
  303. const
  304. ID_PSPD = 1347637316;
  305. Type
  306. pPrinterPSPrefs = ^tPrinterPSPrefs;
  307. tPrinterPSPrefs = record
  308. ps_Reserved : Array[0..3] of Longint; { System reserved }
  309. { Global printing attributes }
  310. ps_DriverMode,
  311. ps_PaperFormat : Byte;
  312. ps_Reserved1 : Array[0..1] of Byte;
  313. ps_Copies,
  314. ps_PaperWidth,
  315. ps_PaperHeight,
  316. ps_HorizontalDPI,
  317. ps_VerticalDPI : Longint;
  318. { Text Options }
  319. ps_Font,
  320. ps_Pitch,
  321. ps_Orientation,
  322. ps_Tab : Byte;
  323. ps_Reserved2 : Array[0..7] of Byte;
  324. { Text Dimensions }
  325. ps_LeftMargin,
  326. ps_RightMargin,
  327. ps_TopMargin,
  328. ps_BottomMargin,
  329. ps_FontPointSize,
  330. ps_Leading : Longint;
  331. ps_Reserved3 : Array[0..7] of Byte;
  332. { Graphics Options }
  333. ps_LeftEdge,
  334. ps_TopEdge,
  335. ps_Width,
  336. ps_Height : Longint;
  337. ps_Image,
  338. ps_Shading,
  339. ps_Dithering : Byte;
  340. ps_Reserved4 : Array[0..8] of Byte;
  341. { Graphics Scaling }
  342. ps_Aspect,
  343. ps_ScalingType,
  344. ps_Reserved5,
  345. ps_Centering : Byte;
  346. ps_Reserved6 : Array[0..7] of byte;
  347. end;
  348. const
  349. { All measurements are in Millipoints which is 1/1000 of a point, or
  350. * in other words 1/72000 of an inch
  351. }
  352. { constants for PrinterPSPrefs.ps_DriverMode }
  353. DM_POSTSCRIPT = 0;
  354. DM_PASSTHROUGH = 1;
  355. { constants for PrinterPSPrefs.ps_PaperFormat }
  356. PF_USLETTER = 0;
  357. PF_USLEGAL = 1;
  358. PF_A4 = 2;
  359. PF_CUSTOM = 3;
  360. { constants for PrinterPSPrefs.ps_Font }
  361. FONT_COURIER = 0;
  362. FONT_TIMES = 1;
  363. FONT_HELVETICA = 2;
  364. FONT_HELV_NARROW = 3;
  365. FONT_AVANTGARDE = 4;
  366. FONT_BOOKMAN = 5;
  367. FONT_NEWCENT = 6;
  368. FONT_PALATINO = 7;
  369. FONT_ZAPFCHANCERY = 8;
  370. { constants for PrinterPSPrefs.ps_Pitch }
  371. PITCH_NORMAL = 0;
  372. PITCH_COMPRESSED = 1;
  373. PITCH_EXPANDED = 2;
  374. { constants for PrinterPSPrefs.ps_Orientation }
  375. ORIENT_PORTRAIT = 0;
  376. ORIENT_LANDSCAPE = 1;
  377. { constants for PrinterPSPrefs.ps_Tab }
  378. TAB_4 = 0;
  379. TAB_8 = 1;
  380. TAB_QUART = 2;
  381. TAB_HALF = 3;
  382. TAB_INCH = 4;
  383. { constants for PrinterPSPrefs.ps_Image }
  384. IM_POSITIVE = 0;
  385. IM_NEGATIVE = 1;
  386. { constants for PrinterPSPrefs.ps_Shading }
  387. SHAD_BW = 0;
  388. SHAD_GREYSCALE = 1;
  389. SHAD_COLOR = 2;
  390. { constants for PrinterPSPrefs.ps_Dithering }
  391. DITH_DEFAULT = 0;
  392. DITH_DOTTY = 1;
  393. DITH_VERT = 2;
  394. DITH_HORIZ = 3;
  395. DITH_DIAG = 4;
  396. { constants for PrinterPSPrefs.ps_Aspect }
  397. ASP_HORIZ = 0;
  398. ASP_VERT = 1;
  399. { constants for PrinterPSPrefs.ps_ScalingType }
  400. ST_ASPECT_ASIS = 0;
  401. ST_ASPECT_WIDE = 1;
  402. ST_ASPECT_TALL = 2;
  403. ST_ASPECT_BOTH = 3;
  404. ST_FITS_WIDE = 4;
  405. ST_FITS_TALL = 5;
  406. ST_FITS_BOTH = 6;
  407. { constants for PrinterPSPrefs.ps_Centering }
  408. CENT_NONE = 0;
  409. CENT_HORIZ = 1;
  410. CENT_VERT = 2;
  411. CENT_BOTH = 3;
  412. { File format for text printer preferences }
  413. const
  414. ID_PTXT = 1347704916;
  415. ID_PUNT = 1347767892;
  416. ID_PDEV = $50444556;
  417. DRIVERNAMESIZE = 30; { Filename size }
  418. DEVICENAMESIZE = 32; { .device name size }
  419. UNITNAMESIZE = 32;
  420. Type
  421. pPrinterTxtPrefs = ^tPrinterTxtPrefs;
  422. tPrinterTxtPrefs = record
  423. pt_Reserved : Array[0..3] of Longint; { System reserved }
  424. pt_Driver : Array[0..DRIVERNAMESIZE-1] of Char; { printer driver filename }
  425. pt_Port : Byte; { printer port connection }
  426. pt_PaperType,
  427. pt_PaperSize,
  428. pt_PaperLength, { Paper length in # of lines }
  429. pt_Pitch,
  430. pt_Spacing,
  431. pt_LeftMargin, { Left margin }
  432. pt_RightMargin, { Right margin }
  433. pt_Quality : WORD;
  434. end;
  435. const
  436. { constants for PrinterTxtPrefs.pt_Port }
  437. PP_PARALLEL = 0;
  438. PP_SERIAL = 1;
  439. { constants for PrinterTxtPrefs.pt_PaperType }
  440. PT_FANFOLD = 0;
  441. PT_SINGLE = 1;
  442. { constants for PrinterTxtPrefs.pt_PaperSize }
  443. PS_US_LETTER = 0 ;
  444. PS_US_LEGAL = 1 ;
  445. PS_N_TRACTOR = 2 ;
  446. PS_W_TRACTOR = 3 ;
  447. PS_CUSTOM = 4 ;
  448. PS_EURO_A0 = 5 ; { European size A0: 841 x 1189 }
  449. PS_EURO_A1 = 6 ; { European size A1: 594 x 841 }
  450. PS_EURO_A2 = 7 ; { European size A2: 420 x 594 }
  451. PS_EURO_A3 = 8 ; { European size A3: 297 x 420 }
  452. PS_EURO_A4 = 9 ; { European size A4: 210 x 297 }
  453. PS_EURO_A5 = 10; { European size A5: 148 x 210 }
  454. PS_EURO_A6 = 11; { European size A6: 105 x 148 }
  455. PS_EURO_A7 = 12; { European size A7: 74 x 105 }
  456. PS_EURO_A8 = 13; { European size A8: 52 x 74 }
  457. { constants for PrinterTxtPrefs.pt_PrintPitch }
  458. PP_PICA = 0;
  459. PP_ELITE = 1;
  460. PP_FINE = 2;
  461. { constants for PrinterTxtPrefs.pt_PrintSpacing }
  462. PS_SIX_LPI = 0;
  463. PS_EIGHT_LPI = 1;
  464. { constants for PrinterTxtPrefs.pt_PrintQuality }
  465. PQ_DRAFT = 0;
  466. PQ_LETTER = 1;
  467. { PrinterUnitPrefs is used from printer.device to open
  468. the connection device
  469. }
  470. Type
  471. pPrinterUnitPrefs = ^tPrinterUnitPrefs;
  472. tPrinterUnitPrefs = record
  473. pu_Reserved : Array[0..3] of Longint; { System reserved }
  474. pu_UnitNum : Longint; { Unit number for OpenDevice() }
  475. pu_OpenDeviceFlags : ULONG; { Flags for OpenDevice() }
  476. pu_DeviceName : Array[0..DEVICENAMESIZE-1] of Char; { Name for OpenDevice() }
  477. end;
  478. { PrinterDeviceUnitPrefs is used as descriptor for printer device
  479. units.
  480. }
  481. PPrinterDeviceUnitPrefs = ^tPrinterDeviceUnitPrefs;
  482. tPrinterDeviceUnitPrefs = record
  483. pd_Reserved : array[0..3] of LONG; { System reserved }
  484. pd_UnitNum : LONG; { Unit number for OpenDevice() }
  485. pd_UnitName : array[0..(UNITNAMESIZE)-1] of UBYTE; { Symbolic name of the unit }
  486. end;
  487. { Reaction }
  488. const
  489. ID_RACT = $52414354;
  490. type
  491. PReactionPrefs = ^tReactionPrefs;
  492. tReactionPrefs = record
  493. rp_BevelType : UWORD;
  494. rp_GlyphType : UWORD;
  495. rp_LayoutSpacing : UWORD;
  496. rp_3DProp : BOOL;
  497. rp_LabelPen : UWORD;
  498. rp_LabelPlace : UWORD;
  499. rp_3DLabel : BOOL;
  500. rp_SimpleRefresh : BOOL;
  501. rp_3DLook : BOOL;
  502. rp_FallbackAttr : tTextAttr;
  503. rp_LabelAttr : tTextAttr;
  504. rp_FallbackName : array[0..(FONTNAMESIZE)-1] of UBYTE;
  505. rp_LabelName : array[0..(FONTNAMESIZE)-1] of UBYTE;
  506. rp_Pattern : array[0..255] of UBYTE;
  507. end;
  508. { File format for screen mode preferences }
  509. const
  510. ID_SCRM = 1396920909;
  511. Type
  512. pScreenModePrefs = ^tScreenModePrefs;
  513. tScreenModePrefs = record
  514. smp_Reserved : Array[0..3] of ULONG;
  515. smp_DisplayID : ULONG;
  516. smp_Width,
  517. smp_Height,
  518. smp_Depth,
  519. smp_Control : Word;
  520. end;
  521. const
  522. { flags for ScreenModePrefs.smp_Control }
  523. SMB_AUTOSCROLL = 1;
  524. SMF_AUTOSCROLL = 1;
  525. { File format for serial preferences }
  526. const
  527. ID_SERL = 1397051980;
  528. Type
  529. pSerialPrefs = ^tSerialPrefs;
  530. tSerialPrefs = record
  531. sp_Reserved : Array[0..2] of Longint; { System reserved }
  532. sp_Unit0Map, { What unit 0 really refers to }
  533. sp_BaudRate, { Baud rate }
  534. sp_InputBuffer, { Input buffer: 0 - 65536 }
  535. sp_OutputBuffer : ULONG; { Future: Output: 0 - 65536 }
  536. sp_InputHandshake, { Input handshaking }
  537. sp_OutputHandshake, { Future: Output handshaking }
  538. sp_Parity, { Parity }
  539. sp_BitsPerChar, { I/O bits per character }
  540. sp_StopBits : Byte; { Stop bits }
  541. end;
  542. const
  543. { constants for SerialPrefs.sp_Parity }
  544. PARITY_NONE = 0;
  545. PARITY_EVEN = 1;
  546. PARITY_ODD = 2;
  547. PARITY_MARK = 3; { Future enhancement }
  548. PARITY_SPACE = 4; { Future enhancement }
  549. { constants for SerialPrefs.sp_Input/OutputHandshaking }
  550. HSHAKE_XON = 0;
  551. HSHAKE_RTS = 1;
  552. HSHAKE_NONE = 2;
  553. { File format for sound preferences }
  554. const
  555. ID_SOND = 1397706308;
  556. Type
  557. pSoundPrefs = ^tSoundPrefs;
  558. tSoundPrefs = record
  559. sop_Reserved : Array[0..3] of Longint; { System reserved }
  560. sop_DisplayQueue, { Flash the display? }
  561. sop_AudioQueue : Boolean; { Make some sound? }
  562. sop_AudioType, { Type of sound, see below }
  563. sop_AudioVolume, { Volume of sound, 0..64 }
  564. sop_AudioPeriod, { Period of sound, 127..2500 }
  565. sop_AudioDuration : WORD; { Length of simple beep }
  566. sop_AudioFileName : Array[0..255] of Char; { Filename of 8SVX file }
  567. end;
  568. const
  569. { constants for SoundPrefs.sop_AudioType }
  570. SPTYPE_BEEP = 0; { simple beep sound }
  571. SPTYPE_SAMPLE = 1; { sampled sound }
  572. { File format for wbpattern preferences }
  573. const
  574. ID_PTRN = 1347703374;
  575. Type
  576. pWBPatternPrefs = ^tWBPatternPrefs;
  577. tWBPatternPrefs = record
  578. wbp_Reserved : Array[0..3] of ULONG;
  579. wbp_Which, { Which pattern is it }
  580. wbp_Flags : WORD;
  581. wbp_Revision, { Must be set to zero }
  582. wbp_Depth : Byte; { Depth of pattern }
  583. wbp_DataLength : WORD; { Length of following data }
  584. end;
  585. const
  586. { constants for WBPatternPrefs.wbp_Which }
  587. WBP_ROOT = 0;
  588. WBP_DRAWER = 1;
  589. WBP_SCREEN = 2;
  590. { wbp_Flags values }
  591. WBPF_PATTERN = $0001;
  592. { Data contains a pattern }
  593. WBPF_NOREMAP = $0010;
  594. { Don't remap the pattern }
  595. { PDTA_DitherQuality: see pictureclass.h }
  596. WBPF_DITHER_MASK = $0300;
  597. { DitherQuality: Default }
  598. WBPF_DITHER_DEF = $0000;
  599. { DitherQuality: 0 }
  600. WBPF_DITHER_BAD = $0100;
  601. { DitherQuality: 2 }
  602. WBPF_DITHER_GOOD = $0200;
  603. { DitherQuality: 4 }
  604. WBPF_DITHER_BEST = $0300;
  605. { OBP_Precision: see pictureclass.h }
  606. WBPF_PRECISION_MASK = $0C00;
  607. WBPF_PRECISION_DEF = $0000;
  608. WBPF_PRECISION_ICON = $0400;
  609. WBPF_PRECISION_IMAGE = $0800;
  610. WBPF_PRECISION_EXACT = $0C00;
  611. WBPF_PLACEMENT_MASK = $3000;
  612. WBPF_PLACEMENT_TILE = $0000;
  613. WBPF_PLACEMENT_CENTER = $1000;
  614. WBPF_PLACEMENT_SCALE = $2000;
  615. WBPF_PLACEMENT_SCALEGOOD = $3000;
  616. {***************************************************************************}
  617. MAXDEPTH = 3; { Max depth supported (8 colors) }
  618. DEFPATDEPTH = 2; { Depth of default patterns }
  619. { Pattern width & height: }
  620. PAT_WIDTH = 16;
  621. PAT_HEIGHT = 16;
  622. { Workbench }
  623. ID_WBNC = $57424E43;
  624. type
  625. PWorkbenchPrefs = ^tWorkbenchPrefs;
  626. tWorkbenchPrefs = record
  627. { settings from workbench.library }
  628. wbp_DefaultStackSize : ULONG;
  629. wbp_TypeRestartTime : ULONG;
  630. { settings from icon.library }
  631. wbp_IconPrecision : ULONG;
  632. wbp_EmbossRect : tRectangle;
  633. wbp_Borderless : BOOL;
  634. wbp_MaxNameLength : LONG;
  635. wbp_NewIconsSupport : BOOL;
  636. wbp_ColorIconSupport : BOOL;
  637. { new for V45 }
  638. wbp_ImageMemType : ULONG;
  639. wbp_LockPens : BOOL;
  640. wbp_NoTitleBar : BOOL;
  641. wbp_NoGauge : BOOL;
  642. end;
  643. PWorkbenchHiddenDevicePrefs = ^tWorkbenchHiddenDevicePrefs;
  644. tWorkbenchHiddenDevicePrefs = record
  645. whdp_Name : array[0..0] of UBYTE; { C String including NULL char }
  646. end;
  647. const
  648. ID_WBHD = $57424844;
  649. IMPLEMENTATION
  650. END.