1 IFND LIBRARIES_REQTOOLS_I
2 LIBRARIES_REQTOOLS_I SET 1
4 ** $Filename: libraries/reqtools.i $
8 ** reqtools.library definitions
10 ** (C) Copyright 1991-1994 Nico François
11 ** All Rights Reserved
15 include "exec/lists.i"
19 include "exec/libraries.i"
22 IFND EXEC_SEMAPHORES_I
23 include "exec/semaphores.i"
27 include "libraries/dos.i"
30 IFND LIBRARIES_DOSEXTENS_I
31 include "libraries/dosextens.i"
35 include "graphics/text.i"
38 IFND UTILITY_TAGITEM_I
39 include "utility/tagitem.i"
43 dc.b "reqtools.library",0
46 REQTOOLSVERSION equ 38
48 ************************
52 ************************
56 RTPREF_PALETTEREQ equ 2
57 RTPREF_SCREENMODEREQ equ 3
58 RTPREF_VOLUMEREQ equ 4
60 RTPREF_NR_OF_REQ equ 6
62 STRUCTURE ReqDefaults,0
69 LABEL ReqDefaults_SIZE
71 STRUCTURE ReqToolsPrefs,0
72 * Size of preferences (_without_ this field and the semaphore)
74 STRUCT rtpr_PrefsSemaphore,SS_SIZE
75 * Start of real preferences
77 STRUCT rtpr_ReqDefaults,RTPREF_NR_OF_REQ*ReqDefaults_SIZE
78 LABEL ReqToolsPrefs_SIZE
80 RTPREFS_SIZE equ (ReqToolsPrefs_SIZE-SS_SIZE-4)
84 BITDEF RTPR,DIRSFIRST,0
85 BITDEF RTPR,DIRSMIXED,1
87 BITDEF RTPR,NOSCRTOFRONT,3
90 ************************
94 ************************
96 STRUCTURE ReqToolsBase,LIB_SIZE
103 * The following library bases may be read and used by your program
104 APTR rt_IntuitionBase
107 * Next two library bases are only (and always) valid on Kickstart 2.0!
108 * (1.3 version of reqtools also initializes these when run on 2.0)
112 * PRIVATE FIELDS, THESE WILL CHANGE FROM RELEASE TO RELEASE!
114 * The RealOpenCnt is for the buffered AvailFonts feature. Since
115 * Kickstart 3.0 offers low memory handlers a release of ReqTools for
116 * 3.0 will not use this field and start using the normal OpenCnt again.
118 UWORD rt_AvailFontsLock
119 APTR rt_AvailFontsHeader
120 ULONG rt_FontsAssignType
121 BPTR rt_FontsAssignLock
122 APTR rt_FontsAssignList
123 STRUCT rt_ReqToolsPrefs,ReqToolsPrefs_SIZE
125 LABEL ReqToolsBase_SIZE
127 * types of requesters, for rtAllocRequestA()
132 RT_SCREENMODEREQ equ 3
134 ************************
138 ************************
140 * structure _MUST_ be allocated with rtAllocRequest()
142 STRUCTURE rtFileRequester,0
144 UWORD rtfi_LeftOffset
148 APTR rtfi_Dir * READ ONLY! Change with rtChangeReqAttrA()!
149 APTR rtfi_MatchPat * READ ONLY! Change with rtChangeReqAttrA()!
150 APTR rtfi_DefaultFont
151 ULONG rtfi_WaitPointer
153 ULONG rtfi_LockWindow
154 ULONG rtfi_ShareIDCMP
155 APTR rtfi_IntuiMsgFunc
159 UWORD rtfi_ReqHeight * READ ONLY! Use RTFI_Height tag!
160 * Lots of private data follows! HANDS OFF :-)
162 * returned by rtFileRequestA() if multiselect is enabled,
163 * free list with rtFreeFileList()
165 STRUCTURE rtFileList,0
169 LABEL rtFileList_SIZE
171 * structure passed to RTFI_FilterFunc callback hook by
172 * volume requester (see RTFI_VolumeRequest tag)
174 STRUCTURE rtVolumeEntry,0
175 ULONG rtve_Type * DLT_DEVICE or DLT_DIRECTORY
177 LABEL rtVolumeEntry_SIZE
179 ************************
183 ************************
185 * structure _MUST_ be allocated with rtAllocRequest()
187 STRUCTURE rtFontRequester,0
189 UWORD rtfo_LeftOffset
193 STRUCT rtfo_Attr,ta_SIZEOF * READ ONLY!
194 APTR rtfo_DefaultFont
195 ULONG rtfo_WaitPointer
197 ULONG rtfo_LockWindow
198 ULONG rtfo_ShareIDCMP
199 APTR rtfo_IntuiMsgFunc
203 UWORD rtfo_ReqHeight * READ ONLY! Use RTFO_Height tag!
204 * Lots of private data follows! HANDS OFF :-)
206 **************************
208 * ScreenMode requester *
210 **************************
212 * structure _MUST_ be allocated with rtAllocRequest()
214 STRUCTURE rtScreenModeRequester,0
216 UWORD rtsc_LeftOffset
221 ULONG rtsc_DisplayID * READ ONLY!
222 UWORD rtsc_DisplayWidth * READ ONLY!
223 UWORD rtsc_DisplayHeight * READ ONLY!
225 APTR rtsc_DefaultFont
226 ULONG rtsc_WaitPointer
227 ULONG rtsc_LockWindow
228 ULONG rtsc_ShareIDCMP
229 APTR rtsc_IntuiMsgFunc
233 UWORD rtsc_ReqHeight * READ ONLY! Use RTSC_Height tag!
235 UWORD rtsc_DisplayDepth * READ ONLY!
236 UWORD rtsc_OverscanType * READ ONLY!
237 ULONG rtsc_AutoScroll * READ ONLY!
238 * Lots of private data follows! HANDS OFF :-)
240 ************************
244 ************************
246 * for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
247 * _MUST_ be allocated with rtAllocRequest()
249 STRUCTURE rtReqInfo,0
251 UWORD rtri_LeftOffset
253 ULONG rtri_Width * not for rtEZRequestA()
254 APTR rtri_ReqTitle * currently only for rtEZRequestA()
256 APTR rtri_DefaultFont * currently only for rtPaletteRequestA()
257 ULONG rtri_WaitPointer
259 ULONG rtri_LockWindow
260 ULONG rtri_ShareIDCMP
261 ULONG rtri_IntuiMsgFunc
262 * structure may be extended in future
264 ************************
268 ************************
270 * for rtReqHandlerA(), will be allocated for you when you use
271 * the RT_ReqHandler tag, never try to allocate this yourself!
273 STRUCTURE rtHandlerInfo,4 * first longword is private!
276 * Private data follows, HANDS OFF :-)
278 * possible return codes from rtReqHandlerA()
280 CALL_HANDLER equ $80000000
283 **************************************
287 **************************************
289 RT_TagBase equ TAG_USER
291 *** tags understood by most requester functions ***
293 * optional pointer to window
294 RT_Window equ (RT_TagBase+1)
295 * idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED)
296 RT_IDCMPFlags equ (RT_TagBase+2)
297 * position of requester window (see below) - default REQPOS_POINTER
298 RT_ReqPos equ (RT_TagBase+3)
299 * leftedge offset of requester relative to position specified by RT_ReqPos
300 RT_LeftOffset equ (RT_TagBase+4)
301 * topedge offset of requester relative to position specified by RT_ReqPos
302 RT_TopOffset equ (RT_TagBase+5)
303 * name of public screen to put requester on (use on Kickstart 2.0 only!)
304 RT_PubScrName equ (RT_TagBase+6)
305 * address of screen to put requester on
306 RT_Screen equ (RT_TagBase+7)
307 * additional signal mask to wait on
308 RT_ReqHandler equ (RT_TagBase+8)
309 * font to use when screen font is rejected, _MUST_ be fixed-width font!
310 * (struct TextFont *, not struct TextAttr *!)
311 * - default GfxBase->DefaultFont
312 RT_DefaultFont equ (RT_TagBase+9)
313 * boolean to set the standard wait pointer in window - default FALSE
314 RT_WaitPointer equ (RT_TagBase+10)
315 * (V38) char preceding keyboard shortcut characters (will be underlined)
316 RT_Underscore equ (RT_TagBase+11)
317 * (V38) share IDCMP port with window - default FALSE
318 RT_ShareIDCMP equ (RT_TagBase+12)
319 * (V38) lock window and set standard wait pointer - default FALSE
320 RT_LockWindow equ (RT_TagBase+13)
321 * (V38) boolean to make requester's screen pop to front - default TRUE
322 RT_ScreenToFront equ (RT_TagBase+14)
323 * (V38) Requester should use this font - default: screen font
324 RT_TextAttr equ (RT_TagBase+15)
325 * (V38) call this hook for every IDCMP message not for requester
326 RT_IntuiMsgFunc equ (RT_TagBase+16)
327 * (V38) Locale ReqTools should use for text
328 RT_Locale equ (RT_TagBase+17)
330 *** tags specific to rtEZRequestA ***
332 * title of requester window - english default "Request" or "Information"
333 RTEZ_ReqTitle equ (RT_TagBase+20)
334 * (RT_TagBase+21) reserved
335 * various flags (see below)
336 RTEZ_Flags equ (RT_TagBase+22)
337 * default response (activated by pressing RETURN) - default TRUE
338 RTEZ_DefaultResponse equ (RT_TagBase+23)
340 *** tags specific to rtGetLongA ***
342 * minimum allowed value - default MININT
343 RTGL_Min equ (RT_TagBase+30)
344 * maximum allowed value - default MAXINT
345 RTGL_Max equ (RT_TagBase+31)
346 * suggested width of requester window (in pixels)
347 RTGL_Width equ (RT_TagBase+32)
348 * boolean to show the default value - default TRUE
349 RTGL_ShowDefault equ (RT_TagBase+33)
350 * (V38) string with possible responses - english default " _Ok |_Cancel"
351 RTGL_GadFmt equ (RT_TagBase+34)
352 * (V38) optional arguments for RTGL_GadFmt
353 RTGL_GadFmtArgs equ (RT_TagBase+35)
354 * (V38) invisible typing - default FALSE
355 RTGL_Invisible equ (RT_TagBase+36)
356 * (V38) window backfill - default TRUE
357 RTGL_BackFill equ (RT_TagBase+37)
358 * (V38) optional text above gadget
359 RTGL_TextFmt equ (RT_TagBase+38)
360 * (V38) optional arguments for RTGS_TextFmt
361 RTGL_TextFmtArgs equ (RT_TagBase+39)
362 * (V38) Center text - default FALSE
363 RTGL_CenterText equ (RT_TagBase+100)
364 * (V38) various flags (see below)
365 RTGL_Flags equ RTEZ_Flags
367 *** tags specific to rtGetStringA ***
369 * suggested width of requester window (in pixels)
370 RTGS_Width equ RTGL_Width
371 * allow empty string to be accepted - default FALSE
372 RTGS_AllowEmpty equ (RT_TagBase+80)
373 * (V38) string with possible responses - english default " _Ok |_Cancel"
374 RTGS_GadFmt equ RTGL_GadFmt
375 * (V38) optional arguments for RTGS_GadFmt
376 RTGS_GadFmtArgs equ RTGL_GadFmtArgs
377 * (V38) invisible typing - default FALSE
378 RTGS_Invisible equ RTGL_Invisible
379 * (V38) window backfill - default TRUE
380 RTGS_BackFill equ RTGL_BackFill
381 * (V38) optional text above gadget
382 RTGS_TextFmt equ RTGL_TextFmt
383 * (V38) optional arguments for RTGS_TextFmt
384 RTGS_TextFmtArgs equ RTGL_TextFmtArgs
385 * (V38) Center text - default FALSE
386 RTGS_CenterText equ RTGL_CenterText
387 * (V38) various flags (see below)
388 RTGS_Flags equ RTEZ_Flags
390 *** tags specific to rtFileRequestA ***
392 * various flags (see below)
393 RTFI_Flags equ (RT_TagBase+40)
394 * suggested height of file requester
395 RTFI_Height equ (RT_TagBase+41)
396 * replacement text for 'Ok' gadget (max 6 chars)
397 RTFI_OkText equ (RT_TagBase+42)
398 * (V38) bring up volume requester, tag data holds flags (see below)
399 RTFI_VolumeRequest equ (RT_TagBase+43)
400 * (V38) call this hook for every file in the directory
401 RTFI_FilterFunc equ (RT_TagBase+44)
402 * (V38) allow empty file to be accepted - default FALSE
403 RTFI_AllowEmpty equ (RT_TagBase+45)
405 *** tags specific to rtFontRequestA ***
407 * various flags (see below)
408 RTFO_Flags equ RTFI_Flags
409 * suggested height of font requester
410 RTFO_Height equ RTFI_Height
411 * replacement text for 'Ok' gadget (max 6 chars)
412 RTFO_OkText equ RTFI_OkText
413 * suggested height of font sample display - default 24
414 RTFO_SampleHeight equ (RT_TagBase+60)
415 * minimum height of font displayed
416 RTFO_MinHeight equ (RT_TagBase+61)
417 * maximum height of font displayed
418 RTFO_MaxHeight equ (RT_TagBase+62)
419 * [(RT_TagBase+63) to (RT_TagBase+66) used below]
420 * (V38) call this hook for every font
421 RTFO_FilterFunc equ RTFI_FilterFunc
423 *** (V38) tags for rtScreenModeRequestA ***
424 * various flags (see below)
425 RTSC_Flags equ RTFI_Flags
426 * suggested height of screenmode requester
427 RTSC_Height equ RTFI_Height
428 * replacement text for 'Ok' gadget (max 6 chars)
429 RTSC_OkText equ RTFI_OkText
430 * property flags (see also RTSC_PropertyMask)
431 RTSC_PropertyFlags equ (RT_TagBase+90)
432 * property mask - default all bits in RTSC_PropertyFlags considered
433 RTSC_PropertyMask equ (RT_TagBase+91)
434 * minimum display width allowed
435 RTSC_MinWidth equ (RT_TagBase+92)
436 * maximum display width allowed
437 RTSC_MaxWidth equ (RT_TagBase+93)
438 * minimum display height allowed
439 RTSC_MinHeight equ (RT_TagBase+94)
440 * maximum display height allowed
441 RTSC_MaxHeight equ (RT_TagBase+95)
442 * minimum display depth allowed
443 RTSC_MinDepth equ (RT_TagBase+96)
444 * maximum display depth allowed
445 RTSC_MaxDepth equ (RT_TagBase+97)
446 * call this hook for every display mode id
447 RTSC_FilterFunc equ RTFI_FilterFunc
449 *** tags for rtChangeReqAttrA ***
451 * file requester - set directory
452 RTFI_Dir equ (RT_TagBase+50)
453 * file requester - set wildcard pattern
454 RTFI_MatchPat equ (RT_TagBase+51)
455 * file requester - add a file or directory to the buffer
456 RTFI_AddEntry equ (RT_TagBase+52)
457 * file requester - remove a file or directory from the buffer
458 RTFI_RemoveEntry equ (RT_TagBase+53)
459 * font requester - set font name of selected font
460 RTFO_FontName equ (RT_TagBase+63)
461 * font requester - set font size
462 RTFO_FontHeight equ (RT_TagBase+64)
463 * font requester - set font style
464 RTFO_FontStyle equ (RT_TagBase+65)
465 * font requester - set font flags
466 RTFO_FontFlags equ (RT_TagBase+66)
467 * (V38) screenmode requester - get display attributes from screen
468 RTSC_ModeFromScreen equ (RT_TagBase+80)
469 * (V38) screenmode requester - set display mode id (32-bit extended)
470 RTSC_DisplayID equ (RT_TagBase+81)
471 * (V38) screenmode requester - set display width
472 RTSC_DisplayWidth equ (RT_TagBase+82)
473 * (V38) screenmode requester - set display height
474 RTSC_DisplayHeight equ (RT_TagBase+83)
475 * (V38) screenmode requester - set display depth
476 RTSC_DisplayDepth equ (RT_TagBase+84)
477 * (V38) screenmode requester - set overscan type, 0 for regular size
478 RTSC_OverscanType equ (RT_TagBase+85)
479 * (V38) screenmode requester - set autoscroll
480 RTSC_AutoScroll equ (RT_TagBase+86)
482 *** tags for rtPaletteRequestA ***
484 * initially selected color - default 1
485 RTPA_Color equ (RT_TagBase+70)
487 *** tags for rtReqHandlerA ***
489 * end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
490 * in case of rtEZRequest to the return value
491 RTRH_EndRequest equ (RT_TagBase+60)
493 *** tags for rtAllocRequestA ***
494 * no tags defined yet
501 REQPOS_CENTERWIN equ 1
502 REQPOS_CENTERSCR equ 2
503 REQPOS_TOPLEFTWIN equ 3
504 REQPOS_TOPLEFTSCR equ 4
512 ****************************************
513 * flags for RTFI_Flags and RTFO_Flags *
514 * or filereq->Flags and fontreq->Flags *
515 ****************************************
516 BITDEF FREQ,NOBUFFER,2
518 ******************************************
519 * flags for RTFI_Flags or filereq->Flags *
520 ******************************************
521 BITDEF FREQ,MULTISELECT,0
523 BITDEF FREQ,NOFILES,3
525 BITDEF FREQ,SELECTDIRS,12
527 ******************************************
528 * flags for RTFO_Flags or fontreq->Flags *
529 ******************************************
530 BITDEF FREQ,FIXEDWIDTH,5
531 BITDEF FREQ,COLORFONTS,6
532 BITDEF FREQ,CHANGEPALETTE,7
533 BITDEF FREQ,LEAVEPALETTE,8
537 ******************************************************
538 * (V38) flags for RTSC_Flags or screenmodereq->Flags *
539 ******************************************************
540 BITDEF SCREQ,SIZEGADS,13
541 BITDEF SCREQ,DEPTHGAD,14
542 BITDEF SCREQ,NONSTDMODES,15
543 BITDEF SCREQ,GUIMODES,16
544 BITDEF SCREQ,AUTOSCROLLGAD,18
545 BITDEF SCREQ,OVERSCANGAD,19
547 ******************************************
548 * flags for RTEZ_Flags or reqinfo->Flags *
549 ******************************************
550 BITDEF EZREQ,NORETURNKEY,0
551 BITDEF EZREQ,LAMIGAQUAL,1
552 BITDEF EZREQ,CENTERTEXT,2
554 ************************************************
555 * (V38) flags for RTGL_Flags or reqinfo->Flags *
556 ************************************************
557 BITDEF GLREQ,CENTERTEXT,EZREQB_CENTERTEXT
558 BITDEF GLREQ,HIGHLIGHTTEXT,3
560 ************************************************
561 * (V38) flags for RTGS_Flags or reqinfo->Flags *
562 ************************************************
563 BITDEF GSREQ,CENTERTEXT,EZREQB_CENTERTEXT
564 BITDEF GSREQ,HIGHLIGHTTEXT,GLREQB_HIGHLIGHTTEXT
566 ******************************************
567 * (V38) flags for RTFI_VolumeRequest tag *
568 ******************************************
569 BITDEF VREQ,NOASSIGNS,0
570 BITDEF VREQ,NODISKS,1
571 BITDEF VREQ,ALLDISKS,2
574 * Following things are obsolete in ReqTools V38.
575 * DON'T USE THESE IN NEW CODE!
577 IFND NO_REQTOOLS_OBSOLETE
578 rtfi_Hook equ rtfi_private1
579 rtfo_Hook equ rtfo_private1
580 REQHOOK_WILDFILE equ 0
581 REQHOOK_WILDFONT equ 1
582 BITDEF FREQ,DOWILDFUNC,11
585 ENDC ; LIBRARIES_REQTOOLS_I