home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
bbs
/
gnu
/
ixemul-39.47-env-bin.lha
/
include
/
libraries
/
reqtools.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-25
|
20KB
|
634 lines
#ifndef LIBRARIES_REQTOOLS_H
#define LIBRARIES_REQTOOLS_H
/*
** $Filename: libraries/reqtools.h $
** $Release: 2.1 $
** $Revision: 38.10 $
**
** reqtools.library definitions
**
** (C) Copyright 1991-1993 Nico François
** All Rights Reserved
*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif /* EXEC_TYPES_H */
#ifndef EXEC_LISTS_H
#include <exec/lists.h>
#endif /* EXEC_LISTS_H */
#ifndef EXEC_LIBRARIES_H
#include <exec/libraries.h>
#endif /* EXEC_LIBRARIES_H */
#ifndef EXEC_SEMAPHORES_H
#include <exec/semaphores.h>
#endif /* EXEC_SEMAPHORES_H */
#ifndef LIBRARIES_DOS_H
#include <libraries/dos.h>
#endif /* LIBRARIES_DOS_H */
#ifndef LIBRARIES_DOSEXTENS_H
#include <libraries/dosextens.h>
#endif /* LIBRARIES_DOSEXTENS_H */
#ifndef LIBRARIES_DISKFONT_H
#include <libraries/diskfont.h>
#endif /* LIBRARIES_DISKFONT_H */
#ifndef GRAPHICS_TEXT_H
#include <graphics/text.h>
#endif /* GRAPHICS_TEXT_H */
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif /* UTILITY_TAGITEM_H */
#define REQTOOLSNAME "reqtools.library"
#define REQTOOLSVERSION 38L
/***********************
* *
* Preferences *
* *
***********************/
#define RTPREF_FILEREQ 0L
#define RTPREF_FONTREQ 1L
#define RTPREF_PALETTEREQ 2L
#define RTPREF_SCREENMODEREQ 3L
#define RTPREF_VOLUMEREQ 4L
#define RTPREF_OTHERREQ 5L
#define RTPREF_NR_OF_REQ 6L
struct ReqDefaults {
ULONG Size;
ULONG ReqPos;
UWORD LeftOffset;
UWORD TopOffset;
UWORD MinEntries;
UWORD MaxEntries;
};
struct ReqToolsPrefs {
/* Size of preferences (_without_ this field and the semaphore) */
ULONG PrefsSize;
struct SignalSemaphore PrefsSemaphore;
/* Start of real preferences */
ULONG Flags;
struct ReqDefaults ReqDefaults[RTPREF_NR_OF_REQ];
};
#define RTPREFS_SIZE \
(sizeof (struct ReqToolsPrefs) - sizeof (struct SignalSemaphore) - 4)
/* Flags */
#define RTPRB_DIRSFIRST 0L
#define RTPRF_DIRSFIRST (1L<<RTPRB_DIRSFIRST)
#define RTPRB_DIRSMIXED 1L
#define RTPRF_DIRSMIXED (1L<<RTPRB_DIRSMIXED)
#define RTPRB_IMMSORT 2L
#define RTPRF_IMMSORT (1L<<RTPRB_IMMSORT)
#define RTPRB_NOSCRTOFRONT 3L
#define RTPRF_NOSCRTOFRONT (1L<<RTPRB_NOSCRTOFRONT)
/***********************
* *
* Library Base *
* *
***********************/
struct ReqToolsBase {
struct Library LibNode;
UBYTE RTFlags;
UBYTE pad[3];
BPTR SegList;
/* PUBLIC FIELDS */
/* NOTE: Some versions of the Manx C compiler contain a bug so it gets
confused by the library bases below. Add the rt_ prefix to the
library names to fix the problem (e.g. rt_IntuitionBase). */
/* The following library bases may be read and used by your program */
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct DosLibrary *DOSBase;
/* Next two library bases are only (and always) valid on Kickstart 2.0!
(1.3 version of reqtools also initializes these when run on 2.0) */
struct Library *GadToolsBase;
struct Library *UtilityBase;
/* PRIVATE FIELDS, THESE WILL CHANGE FROM RELEASE TO RELEASE! */
/* The RealOpenCnt is for the buffered AvailFonts feature. Since
Kickstart 3.0 offers low memory handlers a release of ReqTools for 3.0
will not use this field and start using the normal OpenCnt again. */
UWORD RealOpenCnt;
UWORD AvailFontsLock;
struct AvailFontsHeader *AvailFontsHeader;
ULONG FontsAssignType;
BPTR FontsAssignLock;
struct AssignList *FontsAssignList;
struct ReqToolsPrefs ReqToolsPrefs;
UWORD prefspad;
};
/* types of requesters, for rtAllocRequestA() */
#define RT_FILEREQ 0L
#define RT_REQINFO 1L
#define RT_FONTREQ 2L
/* (V38) */
#define RT_SCREENMODEREQ 3L
/***********************
* *
* File requester *
* *
***********************/
/* structure _MUST_ be allocated with rtAllocRequest() */
struct rtFileRequester {
ULONG ReqPos;
UWORD LeftOffset;
UWORD TopOffset;
ULONG Flags;
/* OBSOLETE IN V38! DON'T USE! */ struct Hook *Hook;
/* */
char *Dir; /* READ ONLY! Change with rtChangeReqAttrA()! */
char *MatchPat; /* READ ONLY! Change with rtChangeReqAttrA()! */
/* */
struct TextFont *DefaultFont;
ULONG WaitPointer;
/* (V38) */
ULONG LockWindow;
ULONG ShareIDCMP;
struct Hook *IntuiMsgFunc;
UWORD reserved1;
UWORD reserved2;
UWORD reserved3;
UWORD ReqHeight; /* READ ONLY! Use RTFI_Height tag! */
/* Private data follows! HANDS OFF :-) */
};
/* returned by rtFileRequestA() if multiselect is enabled,
free list with rtFreeFileList() */
struct rtFileList {
struct rtFileList *Next;
ULONG StrLen; /* -1 for directories */
char *Name;
};
/* structure passed to RTFI_FilterFunc callback hook by
volume requester (see RTFI_VolumeRequest tag) */
struct rtVolumeEntry {
ULONG Type; /* DLT_DEVICE or DLT_DIRECTORY */
char *Name;
};
/***********************
* *
* Font requester *
* *
***********************/
/* structure _MUST_ be allocated with rtAllocRequest() */
struct rtFontRequester {
ULONG ReqPos;
UWORD LeftOffset;
UWORD TopOffset;
ULONG Flags;
/* OBSOLETE IN V38! DON'T USE! */ struct Hook *Hook;
/* */
struct TextAttr Attr; /* READ ONLY! */
/* */
struct TextFont *DefaultFont;
ULONG WaitPointer;
/* (V38) */
ULONG LockWindow;
ULONG ShareIDCMP;
struct Hook *IntuiMsgFunc;
UWORD reserved1;
UWORD reserved2;
UWORD reserved3;
UWORD ReqHeight; /* READ ONLY! Use RTFO_Height tag! */
/* Private data follows! HANDS OFF :-) */
};
/*************************
* *
* ScreenMode requester *
* *
*************************/
/* structure _MUST_ be allocated with rtAllocRequest() */
struct rtScreenModeRequester {
ULONG ReqPos;
UWORD LeftOffset;
UWORD TopOffset;
ULONG Flags;
ULONG private1;
/* */
ULONG DisplayID; /* READ ONLY! */
UWORD DisplayWidth; /* READ ONLY! */
UWORD DisplayHeight; /* READ ONLY! */
/* */
struct TextFont *DefaultFont;
ULONG WaitPointer;
ULONG LockWindow;
ULONG ShareIDCMP;
struct Hook *IntuiMsgFunc;
UWORD reserved1;
UWORD reserved2;
UWORD reserved3;
UWORD ReqHeight; /* READ ONLY! Use RTSC_Height tag! */
/* */
UWORD DisplayDepth; /* READ ONLY! */
UWORD OverscanType; /* READ ONLY! */
ULONG AutoScroll; /* READ ONLY! */
/* Private data follows! HANDS OFF :-) */
};
/***********************
* *
* Requester Info *
* *
***********************/
/* for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
_MUST_ be allocated with rtAllocRequest() */
struct rtReqInfo {
ULONG ReqPos;
UWORD LeftOffset;
UWORD TopOffset;
ULONG Width; /* not for rtEZRequestA() */
char *ReqTitle; /* currently only for rtEZRequestA() */
ULONG Flags;
struct TextFont *DefaultFont; /* currently only for rtPaletteRequestA() */
ULONG WaitPointer;
/* (V38) */
ULONG LockWindow;
ULONG ShareIDCMP;
struct Hook *IntuiMsgFunc;
/* structure may be extended in future */
};
/***********************
* *
* Handler Info *
* *
***********************/
/* for rtReqHandlerA(), will be allocated for you when you use
the RT_ReqHandler tag, never try to allocate this yourself! */
struct rtHandlerInfo {
ULONG private1;
ULONG WaitMask;
ULONG DoNotWait;
/* Private data follows, HANDS OFF :-) */
};
/* possible return codes from rtReqHandlerA() */
#define CALL_HANDLER (ULONG)0x80000000
/*************************************
* *
* TAGS *
* *
*************************************/
#define RT_TagBase TAG_USER
/*** tags understood by most requester functions ***
*/
/* optional pointer to window */
#define RT_Window (RT_TagBase+1)
/* idcmp