This document contains reference information for most of the GEOS system structs. You may look up information in this and other GEOS SDK documentation by consulting the index. If, instead, you wish to browse this reference, you may choose one of the links below; the text of each is the name of the first struct documented on its page of the document.
AccessPointStandardProperty ...
AppLaunchFlags ...
BitmapMode ...
CellFunctionParameterFlags ...
Chars ...
ChunkArrayHeader ...
ClipboardItemHeader ...
Color ...
ColorFlag ...
CompSizeHintArgs ...
CustomDialogBoxFlags ...
DataStoreIndexCallbackParams ...
DateTimeFormat ...
DiskFindResult ...
DosNoDotFileName ...
EndOfSongFlags ...
EvalErrorData ...
FALSE ...
FileAttrs ...
FileDateAndTime ...
FileFromTransferBlockID ...
FontFamily ...
FontID ...
FontMaker ...
GCM_info ...
GCNStandardListType ...
GeodeToken ...
GeoworksMediumID ...
GeoWorksVisContentGCNListType ...
GStringElement ...
GStringErrorType ...
HeapCongestion ...
IMCFeatures ...
InkControlFeatures ...
InstrumentPatch ...
InstrumentTable ...
Language ...
LMemType ...
LocalNumericFormat ...
MediumUnitType ...
MixMode ...
NULL ...
OperatorType ...
ParserFlags ...
ParserTokenData ...
Point ...
ProtocolNumber ...
RangeSortFlags ...
ReleaseNumber ...
ScannerTokenCellData ...
SerialBaud ...
Socket ...
SocketError ...
SocketLoadType ...
SoundPlayFlags ...
SpecWidth ...
SpoolInfoType ...
StandardDialog4ResponseTriggerTable ...
StyleElementFlags ...
SystemDrawMask ...
TextMode ...
TextReferenceType ...
TimerHandle ...
TravelOption ...
UndoActionStruct ...
VChar ...
VisRulerType ...
VMOpenType ...
typedef enum { APSP_NAME = 0x0, APSP_PHONE = 0x2, APSP_USER = 0x4, APSP_SECRET = 0x6, APSP_ADDRESS = 0x8, APSP_MASK = 0xa, APSP_GATEWAY = 0xc, APSP_DNS1 = 0xe, APSP_DNS2 = 0x10, APSP_DATA_BITS = 0x12, APSP_STOP_BITS = 0x14, APSP_PARITY = 0x16, APSP_DUPLEX = 0x18, APSP_MODEM_INIT = 0x1a, APSP_BS = 0x1c, APSP_HOSTNAME = 0x1e, APSP_INTERNET_ACCPNT = 0x20, APSP_PROMPT_SECRET = 0x22, /* This property is an integer */ APSP_AUTOMATIC = 0x4000, APSP_UNDEFINED = 0xffff, /* The following are only available on build 4 or more recent of the Nokia 9000i Communicator. */ APSP_USE_LOGIN_APP = 0x24, APSP_LOGIN_APP_NAME = 0x26, APSP_SCRIPT_NAME = 0x28, APSP_CCARD_NAME = 0x2a, APSP_CCARD_ACCESS = 0x2c, APSP_CCARD_ID = 0x2e, APSP_CCARD_PREFIX = 0x30, APSP_CCARD_SEQUENCE = 0x32, APSP_COMPRESSION = 0x34, } AccessPointStandardProperty;
All of the property data associated with these standard properties are strings, except where noted.
Any
AccessPointStandardProperty
value can be combined (bitwise-OR'd) with APSP_AUTOMATIC to make an alternative form of the name. This library puts no special interpretation on automatic names, but they are intended to represent values which are obtained from automatic configuration and not from the user.
Include: accpnt.goh
typedef enum { APT_INTERNET = 0x1, APT_TERMINAL, APT_TELNET, APT_APP_LOCAL, } AccessPointType; #define APT_ALL (0)
Include: accpnt.goh
typedef WordFlags AddUndoActionFlags; #define AUAF_NOTIFY_BEFORE_FREEING 0x8000 #define AUAF_NOTIFY_IF_FREED_WITHOUT_BEING_PLAYED_BACK 0x4000
typedef struct { UndoActionStruct AUAS_data; optr AUAS_output; AddUndoActionFlags AUAS_flags; } AddUndoActionStruct;
The "undo" structures work together to provide information vital to processes which will be working with undo events.
typedef WordFlags AppAttachFlags; #define AAF_RESTORING_FROM_STATE 0x8000 #define AAF_STATE_FILE_PASSED 0x4000 #define AAF_DATA_FILE_PASSED 0x2000
These flags are passed to the process when the application is launching or being restored from a state file. The flags indicate whether the application is being launched from a state file, has a state file, and/or has a data file.
Note that if AAF_RESTORING_FROM_STATE is set, then AAF_STATE_FILE_PASSED will also be set.
typedef struct { /* AIR_fileName: * Application being launched. Pathname is relative to application * directory (which, of course, may be overriden with a direct path * to the application). */ PathName AIR_fileName;
/* AIR_stateFile: * State filename. File is assumed to be in standard directory for * GEOS state files. If the first byte is "0", then there is no * state file for this application. This structure is copied into the * field as an aid in restarting applications, and if it comes across * one with this byte as 0, it will not restart it. */ FileLongName AIR_stateFile;
/* AIR_diskHandle: * Disk handle for app (passed in) IF 0, use System disk, if -1, use * AIR_diskName. In the field, if this is a placeholder structure, this * word is the handle of the application object we are waiting to detach. */ DiskHandle AIR_diskHandle;
/* AIR_savedDiskData: * Start of data stored by DiskSave when instance is saved to state file. */ byte AIR_savedDiskData[1];
} AppInstanceReference;
typedef struct { /* ALB_appRef: * Instance reference. Contains full pathname to application, as * referenced from app directory, plus the name of a state file. * Is enough info to launch application again, restored. (State file * need not be passed to GeodeLoad) */ AppInstanceReference ALB_appRef;
/* ALB_appMode: * Application attach mode method. Should be one of the following: * MSG_GEN_PROCESS_RESTORE_FROM_STATE: * State file must be passed; no data file should be passed. * MSG_GEN_PROCESS_OPEN_APPLICATION: * State file normally should not be passed, although one could be to * accomplish ui templates. A data file may be passed into the * application as well. * MSG_GEN_PROCESS_OPEN_ENGINE: * State file normally should not be passed. The data file on which the * engine will operate must be passed. If zero, the default data file * should be used (enforced by app, not GenProcessClass).*/ Message ALB_appMode;
/* ALB_launchFlags: * Miscellaneous flags to specify desired application launch type. */ AppLaunchFlags ALB_launchFlags;
/* ALB_diskHandle: * Disk handle for data path. (Set as application's current path in * GenProcess' MSG_META_ATTACH handler.) */ MemHandle ALB_diskHandle;
/* ALB_path: * Data path for application to use as initial path. (Usually this is * a directory of any data file passed.) (Set as application current * path in GenProcess' MSG_META_ATTACH handler.) char ALB_path[PATH_BUFFER_SIZE];
/* ALB_dataFile: * Name of data file passed in to be opened (0 if none). Pathname is * relative to above path. */ char ALB_dataFile[PATH_BUFFER_SIZE];
/* ALB_genParent: * Generic parent for new application (0 to put on default field). (Should * be passed NULL to MSG_GEN_FIELD_LAUNCH_APPLICATION). optr ALB_genParent;
/* ALB_userLoadAckOutput, ALB_userLoadAckMessage: * Together, these form an Action Descriptor which will be activated when * the application has been launched (used in conjunction with * ALF_SEND_LAUNCH_REQUEST_TO_UI_TO_HANDLE). (Set to NULL/0 if you don't * want to send anything). * The acknowledgement will come with three arguments: the GeodeHandle * (non-NULL if successful), a word value which will be zero if there was * an error, and the word value set in ALB_userLoackAckID (below).*/ optr ALB_userLoadAckOutput;
Message ALB_userLoadAckMessage; /* ALB_userLoadAckID: * ID sent out via above action descriptor, if any. */ word ALB_userLoadAckID;
/* ALB_extraData: * Extra data to send to process (possibly a handle to * block containing arguments). */ word ALB_extraData;
} AppLaunchBlock;
This structure is used when an application is first starting up. It is an argument of various messages which will be intercepted by system classes. The first fields (
ALB_appRef
,
ALB_appMode
,
ALB_launchFlags
, and
ALB_uiLevel
) are preserved in the application's state file. The other information must be set correctly on launch.
typedef ByteFlags AppLaunchFlags; #define ALF_SEND_LAUNCH_REQUEST_TO_UI_TO_HANDLE 0x80 #define ALF_OPEN_IN_BACK 0x40
typedef ByteFlags ApplicationStates; #define AS_QUITTING 0x80 #define AS_DETACHING 0x40 #define AS_FOCUSABLE 0x20 #define AS_MODELABLE 0x10 #define AS_NOT_USER_INTERACTABLE 0x08 #define AS_RECEIVED_APP_OBJECT_DETACH 0x04 #define AS_ATTACHED_TO_STATE_FILE 0x02 #define AS_ATTACHING 0x01
typedef enum /* word */ { ACT_OPEN, ACT_CHORD, ACT_PIE } ArcCloseType;
This structure is used when filling arcs.
typedef struct { byte AA_colorFlag; RGBValue AA_color; SysDrawMask AA_mask; ColorMapMode AA_mapMode; } AreaAttr;
typedef struct { EvalStackArgumentType ASE_type; EvalStackArgumentData ASE_data; } ArgumentStackElement;
typedef struct { byte BBF_frac; byte BBF_int; } BBFixed;
This structure represents an 8.8 fixed point number.
typedef struct { word B_width; /* In bitmap pixels */ word B_height; /* In bitmap pixels */ byte B_compact; /* A BMCompact value */ byte B_type; /* A BMFormat | BMType value */ } Bitmap;
This data structure provides some information about a simple graphics bitmap. It normally acts as the header for a set of bitmap data.
The bitmap data itself is organized into scan lines. If the bitmap has a mask (if the BMT_MASK bit is set in the
B_type
field), the first information for the scan line will be its mask information. There will be one bit of mask information for each pixel in the scan line (i.e. a number of bits equal to the bitmap width). The actual bitmap data for the scan line starts at the next byte boundary. For each pixel there will be a number of bits of color data, said number depending on the
BMFormat
value in the
B_type
field. The data for the next scan line will begin at the next byte boundary.
Thus, a 7x7 bitmap depicting an inverse "x" might appear:
(Bitmap) {7, 7, BMC_UNCOMPACTED, BMF_MONO }; (byte)[] {0x82, /* 10000010 */ 0x44, /* 01000100 */ 0x28, /* 00101000 */ 0x10, /* 00010000 */ 0x28, /* 00101000 */ 0x44, /* 01000100 */ 0x82 }; /* 10000010 */
A 3x3 color "-" shape with a a "+" shaped mask might appear:
(Bitmap) { 3, 3, BMC_UNCOMPACTED, (BMF_4BIT | BMT_MASK)}; (byte) [] {/* scan line 1: */ 0x40, /* mask: 010 */ 0, 0 /* data: 000 */ /* scan line 2: */ 0xE0, /* mask: 111 */ 0x43, 0x20, /* data: 432 */ /* scan line 3: */ 0x40, /* mask: 010 */ 0, 0 }; /* data: 000 */
If standard BMC_PACKBITS compression is used, then the mask (if any) and color data for the bitmap is compressed using the Macintosh PackBits standard. Under this system, to uncompress the data for a scan line, follow the loop:
Thus a 16x4 color "=" with a matching mask would appear:
(Bitmap) {15, 3, BMC_PACKBITS, BMF_4BIT | BMT_MASK } ; (byte) [] {/* scan line 1: */ /* mask: 2 repetitions of 0xff */ 0xff, 0xff, /* data: 16 repetitions of 0x14 */ 0xf0, 0x14, /* scan line 2: */ /* mask: 2 repetitions of 0x00 */ /* data: 16 repetitions of 0x00 */ /* total: 18 repetitions of 0x00 */ 0xee, 0x00, /* scan line 3: */ /* mask: 2 repetitions of 0x00 */ /* data: 16 repetitions of 0x00 */ /* total: 18 repetitions of 0x00 */ 0xee, 0x00, /* scan line 4: */
/* mask: 2 repetitions of 0xff */
0xff, 0xff,
/* data: 16 repetitions of 0x14 */
0xf0, 0x14};
See Also: CBitmap
.
typedef WordFlags BitmapMode; #define BM_EDIT_MASK 0x0002 #define BM_CLUSTERED_DITHER 0x0001
VMBlockHandle BlockFromTransferBlockID(id); TransferBlockID id;
This macro extracts the block handle from the given
TransferBlockID
value.
TransferBlockID BlockIDFromFileAndBlock(f, b); VMFileHandle f; VMBlockHandle b;
This macro creates a
TransferBlockID
value from the given file and block handles.
typedef ByteEnum ByteCompact; #define BMC_UNCOMPACTED 0 #define BMC_PACKBITS 1 #define BMC_USER_DEFINED 0x80
This data structure is used to specify what sort of compaction is used to store a graphics bitmap.
typedef ByteEnum BMFormat #define BMF_MONO 0 #define BMF_4BIT 1 #define BMF_8BIT 2 #define BMF_24BIT 3 #define BMF_4CMYK 4
This enumerated type determines a graphics bitmap's depth.
typedef ByteFlags BMType; #define BMT_PALETTE 0x40 #define BMT_HUGE 0x20 #define BMT_MASK 0x10 #define BMT_COMPLEX 0x08 #define BMT_FORMAT 0x07
This structure is used to store various facts about a graphics bitmap.
typedef word Boolean;
Booleans represent true/false values. If the Boolean is false , it will evaluate to zero; otherwise, it will be non-zero.
typedef ByteEnum Button; #define BUTTON_0 0 #define BUTTON_1 1 #define BUTTON_2 2 #define BUTTON_3 3
typedef ByteFlags ButtonInfo; #define BI_PRESS 0x80 #define BI_DOUBLE_PRESS 0x40 #define BI_B3_DOWN 0x20 #define BI_B2_DOWN 0x10 #define BI_B1_DOWN 0x08 #define BI_B0_DOWN 0x04 #define BI_BUTTON 0x03
This structure contains the state of a mouse's buttons.
typedef ByteEnum CallbackType; #define CT_FUNCTION_TO_TOKEN 0 #define CT_NAME_TO_TOKEN 1 #define CT_CHECK_NAME_EXISTS 2 #define CT_CHECK_NAME_SPACE 3 #define CT_EVAL_FUNCTION 4 #define CT_LOCK_NAME 5 #define CT_UNLOCK 6 #define CT_FORMAT_FUNCTION 7 #define CT_FORMAT_NAME 8 #define CT_CREATE_CELL 9 #define CT_EMPTY_CELL 10 #define CT_NAME_TO_CELL 11 #define CT_FUNCTION_TO_CELL 12 #define CT_DEREF_CELL 13 #define CT_SPECIAL_FUNCTION 14
typedef struct { Bitmap CB_simple; word CB_startScan; word CB_numScans; word CB_devInfo; word CB_data; word CB_palette; word CB_xres; word CB_yres; } CBitmap;
The CBitmap structure contains the information for a "complex" bitmap. Use the CBitmap structure to hold bitmaps which need to keep track of resolution information, a palette, or a mask.
typedef ByteFlags CellFunctionParameterFlags; #define CFPF_DIRTY 0x80 /* apps may read or change this. */ #define CFPF_NO_FREE_COUNT 0x07
typedef struct { CellFunctionParameterFlags CFP_flags; VMFileHandle CFP_file; /* File containing cells */ VMBlockHandle CFP_rowBlocks[N_ROW_BLOCKS]; } CellFunctionParameters;
This structure is used to pass specifics about a cell file to the cell library routines. Some of the data in the
CellFunctionParameters
structure is opaque to the application; others may be examined or changed by the application. The
CellFunctionParameters
structure contains the following fields:
CFP_flags
CFPF_dirty
. The cell library routines set this bit whenever they change the
CellFunctionParameters
structure, thus indicating that the structure ought to be resaved. After you save it, you may clear this bit.
CFP_file
CFP_rowBlocks
Include: cell.h
Warnings: The cell library expects the
CellFunctionParameters
structure to remain motionless for the duration of a call.  The difference shows up in debugging. If printing the value of a string as char, then the debugger will output ASCII text. If the string is treated as Chars, then the debugger will print out the constant names.
Include: char.h
typedef struct { word CAH_count; /* # of elements in chunk array */ word CAH_elementSize; /* Size of each element (in bytes) */ word CAH_curOffset; /* For internal use only */ word CAH_offset; /* Offset from start of chunk to first element */ } ChunkArrayHeader;
Every chunk array begins with a
ChunkArrayHeader
. This structure contains information about the chunk array. Applications should never change the contents of the
ChunkArrayHeader
; only the chunk array routines should do this. However, applications can examine the header if they wish.
Contents: There are four word-length fields in the
ChunkArrayHeader
:
_count
_elementSize
CAH_elementSize
will be zero.
_curOffset
ChunkArrayEnum()
for bookkeeping.
_offset
typedef word ChunkHandle;
location of a chunk in an LMem heap, combine the segment address of the heap with the chunk handle. From this location you can read the current offset of the chunk itself.
See Also: optr
,
LMemDeref()
.
typedef ByteFlags ClassFlags; #define CLASSF_HAS_DEFAULT 0x80 #define CLASSF_MASTER_CLASS 0x40 #define CLASSF_VARIANT_CLASS 0x20 #define CLASSF_DISCARD_ON_SAVE 0x10 #define CLASSF_NEVER_SAVED 0x08 #define CLASSF_HAS_RELOC 0x04 #define CLASSF_C_HANDLERS 0x02
This record is stored in the
ClassStruct
structure's
Class_flags
field. These flags are internal and may not be set or retrieved directly. See the entry on
@class
for more information about these flags.
typedef struct _ClassStruct { struct _ClassStruct *Class_superClass; /* superclass pointer */ word Class_masterOffset; /* offset to master offset in chunk */ word Class_methodCount; /* number of methods in this class */ word Class_instanceSize; /* size of entire master group */ word Class_vdRelocTable; /* offset to vardata relocation table */ word Class_relocTable; /* offset to relocation table */ ClassFlags Class_flags; /* a record of ClassFlags */ byte Class_masterMessages; /* internal flags for optimization */ } ClassStruct;
This is the structure that defines a class.  Normally, the constant name will give a hint as to the color's composition. If an application has carried out sophisticated palette operations, however, then C_RED might actually correspond to, say, a shade of green.
Include: color.h
typedef ByteEnum ColorFlag; #define CF_INDEX 0 #define CF_GRAY 1 #define CF_SAME 2 #define CF_RGB 0x80
Several color-related commands accept colors in a variety of formats. The
ColorFlag
enumerated type is used to specify how the color is being described. The
ColorFlag
is normally used as part of a
ColorQuad
. See
ColorQuad
for information about how to interpret color specifications using
ColorFlag
s.
typedef ByteFlags ColorMapMode; #define CMM_ON_BLACK 0x04 /* Set this bit if you're drawing on black */ #define CMM_MAP_TYPE 0x01 /* Either CMT_CLOSEST or CMT_DITHER) */ #define LAST_MAP_MODE (CMM_MAP_TYPE | CMM_ON_BLACK)
This structure defines how the system will try to simulate colors not in the palette. If the map type is CMT_CLOSEST, the closest available color will be used. If the map type is CMT_DITHER, the system will mix together two or more close colors in a dithered pattern. If you will be drawing against a black background, you may wish to set the CMM_ON_BLACK flag.
typedef struct { byte CQ_redOrIndex; ColorFlag CQ_info; byte CQ_green; byte CQ_blue; } ColorQuad;
This structure represents a color. The
CQ_info
field determines how the color is being described.
If the info field is CF_INDEX, then the color is being specified by its index, its place in the window's palette. The index is in the
CQ_redOrIndex
field; the the
CQ_green
and
CQ_blue
fields are meaningless for this specification.
If the info field is CF_RGB, then the color is specified by RGB (red, green, and blue) components.
CQ_redOrIndex
contains the color's red component, a number ranging from 0 to 255. The
CQ_green
and
CQ_blue
fields contain the color's green and blue components, respectively.
If the info field is CF_GRAY, then the color is being expressed as a grey scale. This is basically an optimized way of describing RGB colors where the red, green, and blue components are equal. The
CQ_redOrIndex
field contains the brightess, a number between 0 and 255. The
CQ_green
and
CQ_blue
fields are ignored.
When defining hatch patterns, it is possible have a CF_SAME info field. This means that the hatch lines should use the "same" color when drawing. That is, when hatching text, the text color will be used; when filling an area, the area color will be used. The
CQ_redOrIndex
,
CQ_green
, and
CQ_blue
fields are all ignored.
typedef struct { RGBDelta CT_data[125]; } ColorTransfer;
This structure consists of a 5x5x5 matrix of
RGBDelta
structures. This and be used to specify what sorts of adjustments to make to the color when displaying to a specific device. For instance, some color printers will wipe out certain colors if they try to use the amounts of ink suggested by the raw RGB values. The
ColorTransfer
structure thus serves to hold an array of "fudge factors" to tell the printer to use more or less ink than the raw RGB values would suggest.
typedef union { MonoTransfer CTD_mono; RGBTransfer CTD_rgb; CMYKTransfer CTD_cmyk; } ColorTransferData;
typedef ByteEnum ColorTransferType; #define CTT_MONO 0 #define CTT_RGB 1 #define CTT_CMYK 2
typedef struct { word CP_row; word CP_column; word CP_maxRow; word CP_maxColumn; void * CP_callback; void * CP_cellParams; /* ptr to an instance of SpreadsheetClass */ } CommonParameters;
typedef WordFlags CompChildFlags; #define CCF_MARK_DIRTY 0x8000 #define CCF_REFERENCE 0x7fff #define CCO_FIRST 0x0000 #define CCO_LAST 0x7FFF #define CCF_REFERENCE_OFFSET 0
A record used when adding, moving, or removing children in an object tree. The record has one flag and a value, as follows:
typedef struct { SpecWidth CSHA_width; SpecHeight CSHA_height; sword CSHA_count; } CompSizeHintArgs; typedef WordFlags SpecWidth; #define SW_TYPE 0x8c00 #define SW_DATA 0x03ff typedef WordFlags SpecHeight; #define SH_TYPE 0x8c00 #define SH_DATA 0x03ff typedef ByteEnum SpecSizeType; #define SST_PIXELS 0x0000 #define SST_COUNT 0x0400 #define SST_PCT_OF_FIELD_WIDTH 0x0800 #define SST_PCT_OF_FIELD_HEIGHT 0x0c00 #define SST_AVG_CHAR_WIDTHS 0x1000 #define SST_WIDE_CHAR_WIDTHS 0x1400 #define SST_LINES_OF_TEXT 0x1800 #define PCT_0 0x000 #define PCT_5 0x033 #define PCT_10 0x066 #define PCT_15 0x099 #define PCT_20 0x0cc #define PCT_25 0x100 #define PCT_30 0x133 #define PCT_35 0x166 #define PCT_40 0x199 #define PCT_45 0x1cc #define PCT_50 0x200 #define PCT_55 0x233 #define PCT_60 0x266 #define PCT_65 0x299 #define PCT_70 0x2cc #define PCT_75 0x300 #define PCT_80 0x333 #define PCT_85 0x366 #define PCT_90 0x399 #define PCT_95 0x3cc #define PCT_100 0x3ff
This structure is used to define the sizes of various UI gadgets.
CSHA_width
determines how the gadget's width should be calculated;
CSHA_height
determines how the height should be calculated;
CSHA_count
is the number of children in a particular line of the composite object (if that object is wrapping its children).
This example sets the initial size of the composite (probably a GenPrimary) to be half the screen's height and half the screen's width.
HINT_INITIAL_SIZE = { SST_PCT_OF_FIELD_WIDTH | PCT_50, SST_PCT_OF_FIELD_HEIGHT | PCT_50, 0 };
This example sets the size of the composite to be 100 pixels high and 200 pixels wide.
HINT_FIXED_SIZE = { SST_PIXELS | 200, SST_PIXELS | 100, 0 };
This example sets the composite's minimum size to be 10 average characters wide and 20 percent of the screen height tall.
HINT_MINIMUM_SIZE = { SST_AVG_CHAR_WIDTHS | 10, SST_PCT_OF_FIELD_HEIGHT | PCT_20, 0 };
typedef enum /* word */ { CT_UNITED_STATES=1, CT_CANADA, CT_UNITED_KINGDOM, CT_GERMANY, CT_FRANCE, CT_SPAIN, CT_ITALY, CT_DENMARK, CT_NETHERLANDS, } CountryType;
typedef struct { RangeEnumParams CREP_params; void *CREP_locals; PCB(RANGE_ENUM_CALLBACK_RETURN_TYPE, CREP_callback, (RangeEnumCallbackParams));
} CRangeEnumParams;
The
CREP_callback
routine should be declared _pascal.
typedef ByteFlags CurrencyFormatFlags; #define CFF_LEADING_ZERO 0x20 #define CFF_SPACE_AROUND_SYMBOL 0x10 #define CFF_USE_NEGATIVE_SIGN 0x08 #define CFF_SYMBOL_BEFORE_NUMBER 0x04 #define CFF_NEGATIVE_SIGN_BEFORE_NUMBER 0x02 #define CFF_NEGATIVE_SIGN_BEFORE_SYMBOL 0x01
typedef WordFlags CustomDialogBoxFlags; #define CDBF_SYSTEM_MODAL 0x8000 #define CDBF_DIALOG_TYPE 0x6000 #define CDBF_INTERACTION_TYPE 0x1e00 #define CDBF_DESTRUCTIVE_ACTION 0x0100 #define CDBF_DIALOG_TYPE_OFFSET 13 #define CDBF_INTERACTION_TYPE_OFFSET 9
typedef ByteEnum CustomDialogType; #define CDT_QUESTION 0 #define CDT_WARNING 1 #define CDT_NOTIFICATION 2 #define CDT_ERROR 3
typedef enum { DACRB_NO_REFERENCE_BYTE, DACRB_WITH_REFERENCE_BYTE } DACReferenceByte;
typedef enum { DACSF_8_BIT_PCM, DACSF_2_TO_1_ADPCM, DACSF_3_TO_1_ADPCM, DACSF_4_TO_1_ADPCM } DACSampleFormat;
This structure specifies what sort of sampling should be used when recording or playing a sampled sound.
typedef struct { TCHAR *DSCP_name; DataStoreFlags DSCP_flags; FieldDescriptor *DSCP_keyList; word DSCP_keyCount; optr DSCP_notifObject; DataStoreOpenFlags DSCP_openFlags; } DataStoreCreateParams;
Attributes to specify when creating a new datastore.
typedef enum { DSDE_NO_ERROR, DSDE_INVALID_TOKEN, DSDE_DATASTORE_LOCKED, DSDE_ACCESS_DENIED, DSDE_WRITE_ERROR, DSDE_MEMORY_FULL, DSDE_INVALID_RECORD_ID, DSDE_INVALID_FIELD_ID, DSDE_INVALID_FIELD_NAME, DSDE_INVALID_FIELD_TYPE, DSDE_INVALID_FIELD_CATEGORY, DSDE_INVALID_FIELD_FLAGS, DSDE_RECORD_BUFFER_NOT_EMPTY, DSDE_RECORD_BUFFER_EMPTY, DSDE_INVALID_FIELD_DATA, DSDE_DATASTORE_READ_ONLY, DSDE_INVALID_RECORD_NUMBER, DSDE_INVALID_DATA_SIZE, DSDE_FIELD_DOES_NOT_EXIST, DSDE_RECORD_READ_ONLY, DSDE_RECORD_NOT_FOUND, DSDE_READ_ERROR, DSDE_EXCEEDS_BUFFER_SIZE, DSDE_TOO_MANY_FIELDS, DSDE_RECORD_IN_USE, DSDE_INVALID_BLOCK_HANDLE, DSDE_INVALID_CHUNK_HANDLE, DSDE_RECORD_LOCKED, } DataStoreDataError;
Error values returned by various DataStore routines.
typedef enum { DSE_NO_ERROR, DSE_INVALID_TOKEN, DSE_DATASTORE_LOCKED, DSE_ACCESS_DENIED, DSE_WRITE_ERROR, DSE_MEMORY_FULL, DSE_INVALID_RECORD_ID, DSE_INVALID_NAME, DSE_INVALID_KEY_LIST, DSE_INVALID_FLAGS, DSE_DUPLICATE_FIELD_NAME, /* duplicate field in create params */ DSE_CREATE_ERROR, DSE_OPEN_ERROR, DSE_CLOSE_ERROR, DSE_UPDATE_ERROR, DSE_DATASTORE_EXISTS, DSE_DATASTORE_NOT_FOUND, DSE_DATASTORE_ALREADY_OPEN, DSE_PROTOCOL_ERROR, DSE_CLOSE_WITH_LOCKED_RECORD, DSE_INVALID_DATASTORE_FILE, DSE_PRIVATE_DATASTORE, DSE_BAD_SEARCH_PARAMS, DSE_CANNOT_SET_NEXT_RECORD_ID_SMALLER, DSE_NO_MATCH_FOUND, DSE_NO_MORE_RECORDS, /* last record reached */ } DataStoreError;
Error values returned by various DataStore routines.
typedef struct { FieldID DSICP_indexField; SortOrder DSICP_sortOrder; void *DSICP_cbData; RecordHeader *DSICP_rec1; RecordHeader *DSICP_rec2; } DataStoreIndexCallbackParams;
Set of parameters caller passes to callback in
DataStoreBuildIndex()
.
typedef enum { DSSE_NO_ERROR, DSSE_INVALID_TOKEN, DSSE_DATASTORE_LOCKED, DSSE_ACCESS_DENIED, DSSE_WRITE_ERROR, DSSE_MEMORY_FULL, DSSE_TOO_MANY_FIELDS, DSSE_INVALID_FIELD_ID, DSSE_INVALID_FIELD_NAME, DSSE_INVALID_FIELD_TYPE, DSSE_INVALID_FIELD_CATEGORY, DSSE_INVALID_FIELD_FLAGS, DSSE_RECORD_BUFFER_NOT_EMPTY, DSSE_FIELD_NAME_TOO_LONG, DSSE_FIELD_NAME_EXISTS, DSSE_FIELD_NOT_FOUND, DSSE_TIME_STAMP_CANNOT_BE_ADDED, DSSE_TIME_STAMP_CANNOT_BE_DELETED, DSSE_INVALID_SORT_ORDER, DSSE_NO_RECORDS_IN_DATASTORE, DSSE_PARTIAL_INDEX_RETURNED, DSSE_DELETE_PRIMARY_KEY, DSSE_INDEX_RECORD_NUMBER_LIMIT_EXCEEDED, } DataStoreStructureError;
Error values returned by various DataStore routines.
typedef WordFlags DataStoreFlags; #define DSF_PRIVATE 0x8000 #define DSF_TIMESTAMP 0x4000 #define DSF_BACKUP 0x2000 #define DSF_ARCHIVE 0x1000 #define DSF_NO_PRIMARY_KEY 0x1000
Flags passed when creating a datastore.
typedef struct { TCHAR DSCN_name[FILE_LONGNAME_BUFFER_SIZE]; DataStoreChangeType DSCN_action; RecordID DSCN_record; FieldID DSCN_field; } DataStoreChangeNotification;
Structure sent with MSG_META_NOTIFY_WITH_DATA_BLOCK when the datastore has been modified.
typedef enum { DSCT_RECORD_ADDED, DSCT_RECORD_CHANGED, DSCT_RECORD_DELETED, DSCT_FIELD_ADDED, DSCT_FIELD_RENAMED, DSCT_FIELD_DELETED, DSCT_DATASTORE_CHANGED, DSCT_NAME_CHANGED, DSCT_NEXT_RECORD_ID_CHANGED, } DataStoreChangeType;
Datastore change notifications; see
DataStoreChangeNotification
above.
typedef struct { word DSD_year; byte DSD_month; byte DSD_day; } DataStoreDate;
Structure used to get and set data for date fields in a datastore.
typedef ByteFlags DataStoreOpenFlags; #define DSOF_EXCLUSIVE 0x80
Flag passed when opening a datastore; gives exclusive access to the caller.
typedef WordFlags DataStoreRecordEnumFlags; #define DSREF_BACKWARDS 0x8000 #define DSREF_START_AT_END 0x4000
Flags passed in
DataStoreRecordEnum()
.
typedef struct { byte DST_hour; byte DST_minute; byte DST_second; } DataStoreTime;
Structure used to get and set data for time fields in a datastore.
typedef enum /* word */ { DTF_LONG, /* Thursday, 7th August, 1997 */ DTF_LONG_CONDENSED, /* Thu, 7 Aug, 1997 */ DTF_LONG_NO_WEEKDAY, /* 7th August, 1997 */ DTF_LONG_NO_WEEKDAY_CONDENSED, /* 7 Aug, 1997 */ DTF_SHORT, /* 7.8.97 */ DTF_ZERO_PADDED_SHORT, /* 07.08.97 */ DTF_MD_LONG, /* Thursday, 7th August */ DTF_MD_LONG_NO_WEEKDAY, /* 7th August */ DTF_MD_SHORT, /* 7.8 */ DTF_MY_LONG, /* August 1997 */ DTF_MY_SHORT, /* 8.97 */ DTF_MONTH, /* August */ DTF_WEEKDAY, /* Thursday */ DTF_HMS, /* 02:05:06 */ DTF_HM, /* 02:05 */ DTF_H, /* 02 */ DTF_MS, /* 5:06 */ DTF_HMS_24HOUR, /* 14:05:06 */ DTF_HM_24HOUR, /* 14:05 */ } DateTimeFormat;
typedef enum { DOTW_SUNDAY, DOTW_MONDAY, DOTW_TUESAY, DOTW_WEDNESDAY, DOTW_THURSDAY, DOTW_FRIDAY, DOTW_SATURDAY } DayOfTheWeek;
This enumerated type is used in the
TimerDateAndTime
structure.
typedef word DBGroup;
This is the handle of a DB group. It is the VM handle of a DB group block. DB group handles do not change when a file is copied, or when it is closed and reopened.
typedef dword DBGroupAndItem;
This is a dword which contains the group and item handles of a database item. The high word is the item's Group handle; the low word is the item's Item handle.
Macros are provided to create and parse the
DBGroupAndItem
:
DBCombineGroupAndItem()
DBGroupAndItem
from given group and item handles.DBCombineGroupAndItem(group, item);
DBExtractGroupFromGroupAndItem()
DBGroup
from a given
DBGroupAndItem
.DBExtractGroupFromGroupAndItem(groupAndItem);
DBExtractItemFromGroupAndItem()
DBItem
from a given
DBGroupAndItem
.DBExtractItemFromGroupAndItem(groupAndItem);
Include: geos.h
typedef word DBItem;
This is the handle of a DB item. The
DBItem
and
DBGroup
together uniquely identify a DB item in a specified file.
typedef struct { word paperWidth; word paperHeight; word documentWidth; word documentHeight; } DefaultPrintSizes;
typedef enum /* word */ { DP_NOT_PRESENT=0xffff, DP_CANT_TELL=0, DP_PRESENT=1, DP_INVALID_DEVICE=0xfffe } DevicePresent;
typedef enum /* word */ { ERR_DISKCOPY_INSUFFICIENT_MEM=0xd0, ERR_CANT_COPY_FIXED_DISKS, ERR_CANT_READ_FROM_SOURCE, ERR_CANT_WRITE_TO_DEST, ERR_INCOMPATIBLE_FORMATS, ERR_OPERATION_CANCELLED, ERR_CANT_FORMAT_DEST, } DiskCopyError;
typedef struct { word DIS_blockSize; sdword DIS_freeSpace; sdword DIS_totalSpace; VolumeName DIS_name; } DiskInfoStruct;
typedef ByteEnum DisplayAspectRatio; #define DAR_NORMAL 0 #define DAR_SQUISHED 1 #define DAR_VERY_SQUISHED 2
typedef ByteEnum DisplayClass; #define DC_TEXT 0 #define DC_GRAY_1 1 #define DC_GRAY_2 2 #define DC_GRAY_4 3 #define DC_GRAY_8 4 #define DC_COLOR_2 5 #define DC_COLOR_4 6 #define DC_COLOR_8 7 #define DC_CF_RGB 8
typedef ByteEnum DisplaySize; #define DS_TINY 0 #define DS_STANDARD 1 #define DS_LARGE 2 #define DS_HUGE 3
typedef ByteFlags DisplayType; #define DT_DISP_SIZE 0xc0 #define DT_DISP_ASPECT_RATIO 0x30 #define DT_DISP_CLASS 0x0f
typedef ByteEnum DistanceUnit; #define DU_POINTS 0 #define DU_INCHES 1 #define DU_CENTIMETERS 2 #define DU_MILLIMETERS 3 #define DU_PICAS 4 #define DU_EUR_POINTS 5 #define DU_CICEROS 6 #define DU_POINTS_OR_MILLIMETERS 7 #define DU_INCHES_OR_CENTIMETERS 8 #define LOCAL_DISTANCE_BUFFER_SIZE 32
typedef enum /* word */ { DQS_OK, DQS_CANCEL, DQS_DELAYED, DQS_SAVE_ERROR } DocQuitStatus;
typedef enum /* word */ { CODE_PAGE_US=437, CODE_PAGE_MULTILINGUAL=850, CODE_PAGE_PORTUGUESE=860, CODE_PAGE_CANADIAN_FRENCH=863, CODE_PAGE_NORDIC=865 } DosCodePage;
typedef ByteFlags DosExecFlags; #define DEF_PROMPT 0x80 /* prompt user to return to GEOS */ #define DEF_FORCED_SHUTDOWN 0x40 /* force shutdown; no abort */ #define DEF_INTERACTIVE 0x20 /* program is interactive shell */
Flags used with
DosExec()
.
DosExec()
executes a DOS program based on these flags.
typedef struct { byte DFIS_attributes; dword DFIS_modTimeDate; dword DFIS_fileSize; char DFIS_name[DOS_DOT_FILE_NAME_LENGTH_ZT]; word DFIS_pathInfo; } DosFileInfoStruct;
typedef byte DrawMask[8];
The graphics system uses this structure for defining custom draw masks.
typedef ByteEnum DriveType; #define DRIVE_5_25 0 #define DRIVE_3_5 1 #define DRIVE_FIXED 2 #define DRIVE_RAM 3 #define DRIVE_CD_ROM 4 #define DRIVE_8 5 #define DRIVE_UNKNOWN 0xf } DriveType;
Several routines (in particular,
DriveGetStatus()
) provide information about drives used by the computer running GEOS. These routines return a member of the
DriveTypes
enumerated type. Note that while the type is byte-length, all of the values are guaranteed to fit in four bits; thus, routines like
DriveGetStatus()
can return a
DriveTypes
value in the low four bits and other flags in the high four bits of a single byte.
typedef WordFlags DriverAttrs; #define DA_FILE_SYSTEM 0x8000 #define DA_CHARACTER 0x4000 #define DA_HAS_EXTENDED_INFO 0x2000
This record contains flags that indicate a given driver's attributes. This record is stored in the driver's
DriverInfoStruct
structure.
typedef struct { DriverInfoStruct DEIS_common; /* The base driver info structure */ MemHandle DEIS_resource; /* Handle of driver's DriverExtendedInfo * table. */ } DriverExtendedInfoStruct;
This structure is used by Preferences to locate the names of devices supported by a particular driver.
typedef struct { LMemBlockHeader DEIT_common; word DEIT_numDevices; ChunkHandle DEIT_ChunkHandle; word DEIT_infoTable; } DriverExtendedInfoTable;
typedef struct { void (*DIS_strategy)(); /* Pointer to strategy routine */ DriverAttrs DIS_driverAttributes; /* driver's attribute flags */ DriverType DIS_driverType; /* driver's type */ } DriverInfoStruct;
This structure defines the characteristics of a particular driver. In general, applications will not need to access this structure unless they use a driver directly.
typedef enum { DRIVER_TYPE_VIDEO = 1, /* Video drivers */ DRIVER_TYPE_INPUT, /* Input (keyboard, mouse) drivers */ DRIVER_TYPE_MASS_STORAGE, /* Disk/Drive drivers */ DRIVER_TYPE_STREAM, /* Stream and port drivers */ DRIVER_TYPE_FONT, /* Font drivers */ DRIVER_TYPE_OUTPUT, /* Output (not video and printer) drivers */ DRIVER_TYPE_LOCALIZATION, /* Localization drivers */ DRIVER_TYPE_FILE_SYSTEM, /* File system drivers */ DRIVER_TYPE_PRINTER, /* Printer drivers */ DRIVER_TYPE_SWAP, /* Swap drivers */ DRIVER_TYPE_POWER_MANAGEMENT, /* Power management drivers */ DRIVER_TYPE_TASK_SWITCH, /* Task switch drivers */ DRIVER_TYPE_NETWORK /* Network file system drivers */ } DriverType;
This enumerated type has one value for each type of driver in the system. It is used primarily with
GeodeUseDriver()
and its associated routines. Each driver stores its type in its
DriverInfoStruct
structure.
typedef struct { ChunkArrayHeader EAH_meta; /* chunk array header structure */ word EAH_freePtr; /* First free element */ } ElementArrayHeader;
Every element array must begin with an
ElementArrayHeader
. Since element arrays are special kinds of chunk arrays, the
ElementArrayHeader
must itself begin with a
ChunkArrayHeader
. The structure contains one additional field, EAH
_freePtr
. This is used to keep track of the freed elements in the element array. Applications should not examine or change this field.
typedef ByteFlags EndOfSongFlags; #define EOSF_UNLOCK 0x0080 /* unlock block at EOS ? */ #define EOSF_DESTROY 0x0040 /* destroy block at EOS ? */ #define UNLOCK_ON_EOS EOSF_UNLOCK #define DESTROY_ON_EOS EOSF_DESTROY
These flags determine what should be done with the memory block which stores a song structure after the song is done playing.
typedef struct { char EPR_geodeName[GEODE_NAME_SIZE]; word EPR_entryNumber; } EntryPointRelocation;
typedef ByteEnum EnvelopeOrientation; #define EO_PORTAIT_LEFT 0x00 #define EO_PORTAIT_RIGHT 0x01 #define EO_LANDSCAPE_UP 0x02 #define EO_LANDSCAPE_DOWN 0x03
typedef ByteEnum EnvelopePath; #define EP_LEFT 0x00 #define EP_CENTER 0x01 #define EP_RIGHT 0x02
#define ERROR_UNSUPPORTED_FUNCTION 1 #define ERROR_FILE_NOT_FOUND 2 #define ERROR_PATH_NOT_FOUND 3 #define ERROR_TOO_MANY_OPEN_FILES 4 #define ERROR_ACCESS_DENIED 5 #define ERROR_INSUFFICIENT_MEMORY 8 #define ERROR_INVALID_VOLUME 15 #define ERROR_IS_CURRENT_DIRECTORY 16 #define ERROR_DIFFERENT_DEVICE 17 #define ERROR_NO_MORE_FILES 18 #define ERROR_WRITE_PROTECTED 19 #define ERROR_UNKNOWN_VOLUME 20 #define ERROR_DRIVE_NOT_READY 21 #define ERROR_CRC_ERROR 23 #define ERROR_SEEK_ERROR 25 #define ERROR_UNKNOWN_MEDIA 26 #define ERROR_SECTOR_NOT_FOUND 27 #define ERROR_WRITE_FAULT 29 #define ERROR_READ_FAULT 30 #define ERROR_GENERAL_FAILURE 31 #define ERROR_SHARING_VIOLATION 32 #define ERROR_ALREADY_LOCKED 33 #define ERROR_SHARING_OVERFLOW 36 #define ERROR_SHORT_READ_WRITE 128 #define ERROR_INVALID_LONGNAME 129 #define ERROR_FILE_EXISTS 130 #define ERROR_DOS_EXEC_IN_PROGRESS 131 #define ERROR_FILE_IN_USE 132 #define ERROR_ARGS_TOO_LONG 133 #define ERROR_DISK_UNAVAILABLE 134 #define ERROR_DISK_STALE 135 #define ERROR_FILE_FORMAT_MISMATCH 136 #define ERROR_CANNOT_MAP_NAME 137 #define ERROR_DIRECTORY_NOT_EMPTY 138 #define ERROR_ATTR_NOT_SUPPORTED 139 #define ERROR_ATTR_NOT_FOUND 140 #define ERROR_ATTR_SIZE_MISMATCH 141 #define ERROR_ATTR_CANNOT_BE_SET 142 #define ERROR_CANNOT_MOVE_DIRECTORY 143 #define ERROR_PATH_TOO_LONG 144 #define ERROR_ARGS_INVALID 145 #define ERROR_CANNOT_FIND_COMMAND_INTERPRETER 146 #define ERROR_NO_TASK_DRIVER_LOADED 147
typedef WordFlags ErrorCheckingFlags; #define ECF_REGION 0x8000 #define ECF_HEAP_FREE_BLOCKS 0x4000 #define ECF_LMEM_INTERNAL 0x2000 #define ECF_LMEM_FREE_AREAS 0x1000 #define ECF_LMEM_OBJECT 0x0800 #define ECF_BLOCK_CHECKSUM 0x0400 #define ECF_GRAPHICS 0x0200 #define ECF_SEGMENT 0x0100 #define ECF_NORMAL 0x0080 #define ECF_VMEM 0x0040 #define ECF_APP 0x0020 #define ECF_LMEM_MOVE 0x0010 #define ECF_UNLOCK_MOVE 0x0008 #define ECF_VMEM_DISCARD 0x0004
Error checking flags are used when setting the system's error-checking level with
SysSetECLevel()
. The flags above may be individually set or cleared. It is important to use error checking when debugging; it can help catch obscure bugs that might otherwise go unnoticed until after a product ships.
typedef struct { byte EED_errorCode; /* ParserScannerEvaluatorError */ } EvalErrorData;
typedef ByteFlags EvalFlags; #define EF_MAKE_DEPENDENCIES 0x80 #define EF_ONLY_NAMES 0x40 #define EF_KEEP_LAST_CELL 0x20 #define EF_NO_NAMES 0x10 #define EF_ERROR_PUSHED 0x08 #define EVAL_MAX_NESTED_LEVELS 32
typedef struct { CommonParameters EP_common; EvalFlags EP_flags; word EP_fpStack; word EP_depHandle; word EP_nestedLevel; dword EP_nestedAddresses[EVAL_MAX_NESTED_LEVELS]; } EvalParameters;
typedef struct { CellReference ERD_firstCell; CellReference ERD_lastCell; } EvalRangeData;
typedef union { EvalStringData ESAD_string; EvalRangeData ESAD_range; EvalErrorData ESAD_error; } EvalStackArgumentData;
typedef ByteFlags EvalStackArgumentType; #define ESAT_EMPTY 0x80 #define ESAT_ERROR 0x40 #define ESAT_RANGE 0x20 #define ESAT_STRING 0x10 #define ESAT_NUMBER 0x08 #define ESAT_NUM_TYPE 0x03 #define ESAT_TOP_OF_STACK 0 #define ESAT_NAME (ESAT_RANGE | ESAT_STRING) #define ESAT_FUNCTION (ESAT_NUMBER | ESAT_STRING)
typedef union { EvalOperatorData ESOD_operator; EvalFunctionData ESOD_function; } EvalStackOperatorData;
typedef ByteEnum EvalStackOperatorType; #define ESOT_OPERATOR 0 #define ESOT_FUNCTION 1 #define ESOT_OPEN_PAREN 2 #define ESOT_TOP_OF_STACK 3
typedef ByteFlags ExitFlags; #define EF_PANIC 0x80 #define EF_RUN_DOS 0x40 #define EF_OLD_EXIT 0x20 #define EF_RESET 0x10 #define EF_RESTART 0x08
typedef ByteFlags ExportControlToolboxFeatures; #define EXPORTCTF_DIALOG_BOX 0x01
typedef ByteEnum FieldType #define FC_NONE 0x0 #define FC_NAME 0x1 #define FC_DATE 0x2 #define FC_TELEPHONE 0x3 #define FC_ADDRESS 0x4 #define FC_EMAIL 0x5
When you add a field to a datatstore, you define its
FieldCategory
.
FieldCategory
is the type of information the data represents (not to be confused with
FieldType
; see below).
typedef struct { FieldType FD_type; FieldCategory FD_category; FieldFlags FD_flags; } FieldData;
Structure used to get and set field information (see
FieldDescriptor
below).
typedef struct { FieldData FD_data; TCHAR *FD_name; } FieldDescriptor;
Structure used to get and set field information (see
FieldData
above).
typedef struct { FieldID FH_id; word FH_size; } FieldHeader;
Structure containing metadata about a variable-sized field (such as a string field); field data follows this header.
typedef struct { FieldID FHF_id; } FieldHeaderFixed;
Structure containing metadata about a fixed-sized field; field data follows this header.
typedef ByteEnum FieldType #define DSFT_FLOAT 0x0 #define DSFT_SHORT 0x1 #define DSFT_LONG 0x2 #define DSFT_TIMESTAMP 0x3 #define DSFT_DATE 0x4 #define DSFT_TIME 0x5 #define DSFT_STRING 0x6 #define DSFT_BINARY 0x7 #define DSFT_GRAPHICS 0x8 #define DSFT_INK 0x9
When you add a field to a datatstore, you define its
FieldType
.
FieldType
is the type of data the field contains (not to be confused with
FieldCategory
; see above). Note that fields of type DSFT_FLOAT expect data of type
FloatNum
.
typedef ByteEnum FileAccess #define FA_READ_ONLY 0 #define FA_WRITE_ONLY 1 #define FA_READ_WRITE 2
typedef ByteFlags FileAccessFlags; #define FILE_DENY_RW 0x10 #define FILE_DENY_W 0x20 #define FILE_DENY_R 0x30 #define FILE_DENY_NONE 0x40 #define FILE_ACCESS_R 0x00 #define FILE_ACCESS_W 0x01 #define FILE_ACCESS_RW 0x02 #define FILE_NO_ERRORS 0x80
When you open a file for bytewise access, you must pass a record of
FileAccessFlags
. The
FileAccessFlags
record specifies two things: what kind of access the caller wants, and what type of access is permitted to other geodes. A set of
FileAccessFlags
is thus a bit-wise "or" of two different values. The first specifies what kind of access the calling geode wants and has the following values:
The second part specifies what kind of access other geodes may have. Note that if you try to deny a permission which has already been given to another geode (e.g. you open a file with FILE_DENY_W when another geode has the file open for write-access), the call will fail. It has the following values:
Two flags, one from each of these sets of values, are combined to make up a proper
FileAccessFlags
value. For example, to open the file for read-only access while prohibiting other geodes from writing to the file, you would pass the flags "(FILE_ACCESS_R | FILE_DENY_W)".
typedef ByteFlags FileAttrs; #define FA_ARCHIVE 0x20 #define FA_SUBDIR 0x10 #define FA_VOLUME 0x8 #define FA_SYSTEM 0x4 #define FA_HIDDEN 0x2 #define FA_RDONLY 0x1 #define FILE_ATTR_NORMAL 0 #define FILE_ATTR_READ_ONLY FA_RDONLY #define FILE_ATTR_HIDDEN FA_HIDDEN #define FILE_ATTR_SYSTEM FA_SYSTEM #define FILE_ATTR_VOLUME_LABEL FA_VOLUME
Every DOS or GEOS file has certain attributes. These attributes mark such things as whether the file is read-only. With GEOS files, the attributes can be accessed by using the extended attribute FEA_FILE_ATTR. You can also access any file's standard attributes with the routines
FileGetAttributes()
and
FileSetAttributes()
; these routines work for both GEOS files and plain DOS files.
The
FileAttrs
field contains the following bits:
See Also: FileGetAttributes()
,
FileSetAttributes()
.
Include: file.h
typedef struct { PathName FCND_pathname; DiskHandle FCND_diskHandle; FileChangeType FCND_changeType; } FileChangeNotificationData;
typedef ByteEnum FileChangeType; #define FCT_CREATE 0 #define FCT_DELETE 1 #define FCT_RENAME 2 #define FCT_CONTENTS 3 #define FCT_DISK_FORMAT 4
typedef WordFlags FileCreateFlags; #define FCF_NATIVE 0x8000 #define FCF_MODE 0x0300 /* Filled with FILE_CREATE_* constant */ #define FCF_ACCESS 0x00ff /* Filled with FileAccessFlags */
The lower byte of this field is a
FileAccessFlags
record. This specifies the file's permissions and exclusions. Note that you must request write or read/write permission when you create a file. The upper byte specifies how the file should be created. It contains the following possible values:
FileCreate()
will fail with error condition ERROR_FILE_FORMAT_MISMATCH. Similarly, if the flag isn't set and a non-GEOS file with this name exists,
FileCreate()
will fail and return this error.typedef WordFlags FileDate; #define FD_YEAR 0xfe00 #define FD_MONTH 0x01e0 #define FD_DAY 0x001f #define FD_YEAR_OFFSET 9 #define FD_MONTH_OFFSET 5 #define FD_DAY_OFFSET 0
A file's date stamp is stored in a 16-bit bitfield. This field contains entries for the year, month, and day.
Each field is identified by a mask and an offset. To access a field, simply clear all bits except those in the mask, then shift the bits to the right by the number of the offset. (Macros are provided to do this; they are described below.) FileDate
contains the
following fields, identified by their masks:
FD_YEAR_OFFSET
bits.FD_MONTH_OFFSET
bits.FD_DAY_OFFSET
bits.Include: file.h
See Also: FileTime
typedef DWordFlags FileDateAndTime; #define FDAT_HOUR 0xf8000000 #define FDAT_MINUTE 0x07e00000 #define FDAT_2SECOND 0x001f0000 #define FDAT_YEAR 0x0000fe00 #define FDAT_MONTH 0x000001e0 #define FDAT_DAY 0x0000001f #define FDAT_HOUR_OFFSET 27 #define FDAT_MINUTE_OFFSET 21 #define FDAT_2SECOND_OFFSET 16 #define FDAT_YEAR_OFFSET 9 #define FDAT_MONTH_OFFSET 5 #define FDAT_DAY_OFFSET 0 #define FDAT_BASE_YEAR 1980
Every GEOS file has two date and time stamps. One of them records the time the file was created, and one records the time the file was last modified. These stamps are recorded with the file's extended attributes; they are labeled FEA_CREATION and FEA_MODIFICATION, respectively. Non-GEOS files have a single date/time stamp, which records the time the file was last modified.
The date/time stamps are stored in a 32-bit bitfield. This field contains entries for the year, month, day, hour, minute, and second. Each field is identified by a mask and an offset. To access a field, simply clear all bits except those in the mask, then shift the bits to the right by the number of the offset. (Macros are provided to do this; they are described below.)
FileDateAndTime
contains the following fields, identified by their masks:
Macros are provided to extract values from each of the fields of a
FileDateAndTime
structure. The macros are listed below:
byte FDATExtractYear( /* returns year field, counted from 1980*/ FileDateAndTime fdat); word FDATExtractYearAD( /* returns year field + base year */ FileDateAndTime fdat); byte FDATExtractMonth( /* returns month field (1 = January, etc.) */ FileDateAndTime fdat); byte FDATExtractDay( /* returns day field */ FileDateAndTime fdat); byte FDATExtractHour( /* returns hour field */ FileDateAndTime fdat); byte FDATExtractMinute( /* returns minute field */ FileDateAndTime fdat); byte FDATExtract2Second( /* returns 2Second field */ FileDateAndTime fdat); byte FDATExtractSecond( /* returns number of seconds (2 * 2Second) */ FileDateAndTime fdat);
Include: file.h
typedef ByteEnum FileExclude; #define FE_EXCLUSIVE 1 #define FE_DENY_WRITE 2 #define FE_DENY_READ 3 #define FE_NONE 4
typedef struct { FileExtendedAttribute FEAD_attr; /* Attribute to get or set */ void *FEAD_value; /* Pointer to buffer/new value */ word FEAD_size; /* length of buffer/new value */ chr *FEAD_name; /* If FEAD_attr == FEA_CUSTOM, * this points to null- * terminated ASCII string with * attribute's name; otherwise, * this is ignored. */
} FileExtendedAttrDesc;
The routines to get and set extended attributes can be passed the attribute FEA_MULTIPLE. In this case, they will also be passed the address of an array of
FileExtAttrDesc
structures and the number of elements of the array. They will go through the array and read or write the appropriate information.
FileEnum()
can also be passed arrays of
FileExtAttrDesc
structures. In this case, the number of elements in the array is not passed. Instead, each array ends with a
FileExtAttrDesc
with a FEAD
_attr
field set to FEA_END_OF_LIST.
See Also: FileExtendedAttribute
.
Include: file.h
typedef enum /* word */ { FEA_MODIFICATION, FEA_FILE_ATTR, FEA_SIZE, FEA_FILE_TYPE, FEA_FLAGS, FEA_RELEASE, FEA_PROTOCOL, FEA_TOKEN, FEA_CREATOR, FEA_USER_NOTES, FEA_NOTICE, FEA_CREATION, FEA_PASSWORD, FEA_CUSTOM, FEA_NAME, FEA_GEODE_ATTR, FEA_PATH_INFO, FEA_FILE_ID, FEA_DESKTOP_INFO, FEA_DRIVE_STATUS, FEA_DOS_NAME, FEA_OWNER, FEA_RIGHTS, FEA_MULTIPLE = 0xfffe, FEA_END_OF_LIST = 0xffff, } FileExtendedAttribute;
Every GEOS file has a set of extended attributes. These attributes can be recovered with
FileGetPathExtAttributes()
or
FileGetHandleExtAttributes()
. You can also use
FileEnum()
to search a directory for files with specified extended attributes.
The above extended attributes have been implemented. More may be added with future releases of GEOS. The attributes are discussed at length in the File System chapter.
See Also: FileExtAttrDesc
.
Include: file.h
VMFileHandle FileFromTransferBlockID(id); TransferBlockID id;
This macro extracts the file handle from the given
TransferBlockID
value.
typedef ByteEnum FilePosMode; #define FILE_POS_START 0 #define FILE_POS_RELATIVE 1 #define FILE_POS_END 2
typedef WordFlags FileTime; #define FT_HOUR 0xf800 #define FT_MINUTE 0x07e0 #define FT_2SECOND 0x001f #define FT_HOUR_OFFSET 11 #define FT_MINUTE_OFFSET 5 #define FT_2SECOND_OFFSET 0
A file's time stamp is stored in a 16-bit bitfield. This field contains entries for the hour, minute, and second.
Each field is identified by a mask and an offset. To access a field, simply clear all bits except those in the mask, then shift the bits to the right by the number of the offset.
Include: fontID.h
typedef word FontMaker; #define FM_PRINTER 0xf000 #define FM_MICROLOGIC 0xe000 #define FM_ATECH 0xd000 #define FM_PUBLIC 0xc000 #define FM_AGFA 0x4000 #define FM_BITSTREAM 0x3000 #define FM_ADOBE 0x2000 #define FM_NIMBUSQ 0x1000 #define FM_BITMAP 0x0000
Include: fontID.h
typedef ByteEnum FontWeight; #define FW_ULTRA_LIGHT 0 #define FW_EXTRA_LIGHT 1 #define FW_LIGHT 2 #define FW_BOOK 3 #define FW_NORMAL 4 #define FW_DEMI 5 #define FW_BOLD 6 #define FW_EXTRA_BOLD 7 #define FW_ULTRA_BOLD 8 #define FW_BLACK 9
Include: font.h
typedef ByteEnum FontWidth; #define FWI_NARROW 0 #define FWI_CONDENSED 1 #define FWI_MEDIUM 2 #define FWI_WIDE 3 #define FWI_EXPANDED 4
Include: font.h
typedef ByteEnum FormatError; #define FMT_DONE 0 #define FMT_READY 1 #define FMT_RUNNING 2 #define FMT_DRIVE_NOT_READY 3 #define FMT_ERR_WRITING_BOOT 4 #define FMT_ERR_WRITING_ROOT_DIR 5 #define FMT_ERR_WRITING_FAT 6 #define FMT_ABORTED 7 #define FMT_SET_VOLUME_NAME_ERR 8 #define FMT_CANNOT_FORMAT_FIXED_DISKS_IN_CUR_RELEASE 9 #define FMT_BAD_PARTITION_TABLE 10 #define FMT_ERR_READING_PARTITION_TABLE 11 #define FMT_ERR_NO_PARTITION_FOUND 12 #define FMT_ERR_MULTIPLE_PRIMARY_PARTITIONS 13 #define FMT_ERR_NO_EXTENDED_PARTITION_FOUND 14 #define FMT_ERR_CANNOT_ALLOC_SECTOR_BUFFER 15 #define FMT_ERR_DISK_IS_IN_USE 16 #define FMT_ERR_WRITE_PROTECTED 17 #define FMT_ERR_DRIVE_CANNOT_SUPPORT_GIVEN_FORMAT 18 #define FMT_ERR_INVALID_DRIVE_SPECIFIED 19 #define FMT_ERR_DRIVE_CANNOT_BE_FORMATTED 20 #define FMT_ERR_DISK_UNAVAILABLE 21
ClipboardItemFormatID FormatIDFromManufacturerAndType(man, typ) ManufacturerID man; word typ;
This macro creates a
ClipboardItemFormatID
dword value from the given manufacturer ID and format ID.
typedef enum /* word */ { FUNCTION_ID_ABS, FUNCTION_ID_ACOS, FUNCTION_ID_ACOSH, FUNCTION_ID_AND, FUNCTION_ID_ASIN, FUNCTION_ID_ASINH, FUNCTION_ID_ATAN, FUNCTION_ID_ATAN2, FUNCTION_ID_ATANH, FUNCTION_ID_AVG, FUNCTION_ID_CHAR, FUNCTION_ID_CHOOSE, FUNCTION_ID_CLEAN, FUNCTION_ID_CODE, FUNCTION_ID_COLS, FUNCTION_ID_COS, FUNCTION_ID_COSH, FUNCTION_ID_COUNT, FUNCTION_ID_CTERM, FUNCTION_ID_DATE, FUNCTION_ID_DATEVALUE, FUNCTION_ID_DAY, FUNCTION_ID_DDB, FUNCTION_ID_ERR, FUNCTION_ID_EXACT, FUNCTION_ID_EXP, FUNCTION_ID_FACT, FUNCTION_ID_FALSE, FUNCTION_ID_FIND, FUNCTION_ID_FV, FUNCTION_ID_HLOOKUP, FUNCTION_ID_HOUR, FUNCTION_ID_IF, FUNCTION_ID_INDEX, FUNCTION_ID_INT, FUNCTION_ID_IRR, FUNCTION_ID_ISERR, FUNCTION_ID_ISNUMBER, FUNCTION_ID_ISSTRING, FUNCTION_ID_LEFT, FUNCTION_ID_LENGTH, FUNCTION_ID_LN, FUNCTION_ID_LOG, FUNCTION_ID_LOWER, FUNCTION_ID_MAX, FUNCTION_ID_MID, FUNCTION_ID_MIN, FUNCTION_ID_MINUTE, FUNCTION_ID_MOD, FUNCTION_ID_MONTH, FUNCTION_ID_N, FUNCTION_ID_NA, FUNCTION_ID_NOW, FUNCTION_ID_NPV, FUNCTION_ID_OR, FUNCTION_ID_PI, FUNCTION_ID_PMT, FUNCTION_ID_PRODUCT, FUNCTION_ID_PROPER, FUNCTION_ID_PV, FUNCTION_ID_RANDOM_N, FUNCTION_ID_RANDOM, FUNCTION_ID_RATE, FUNCTION_ID_REPEAT, FUNCTION_ID_REPLACE, FUNCTION_ID_RIGHT, FUNCTION_ID_ROUND, FUNCTION_ID_ROWS, FUNCTION_ID_SECOND, FUNCTION_ID_SIN, FUNCTION_ID_SINH, FUNCTION_ID_SLN, FUNCTION_ID_SQRT, FUNCTION_ID_STD, FUNCTION_ID_STDP, FUNCTION_ID_STRING, FUNCTION_ID_SUM, FUNCTION_ID_SYD, FUNCTION_ID_TAN, FUNCTION_ID_TANH, FUNCTION_ID_TERM, FUNCTION_ID_TIME, FUNCTION_ID_TIMEVALUE, FUNCTION_ID_TODAY, FUNCTION_ID_TRIM, FUNCTION_ID_TRUE, FUNCTION_ID_TRUNC, FUNCTION_ID_UPPER, FUNCTION_ID_VALUE, FUNCTION_ID_VAR, FUNCTION_ID_VARP, FUNCTION_ID_VLOOKUP, FUNCTION_ID_WEEKDAY, FUNCTION_ID_YEAR, FUNCTION_ID_FILENAME, FUNCTION_ID_PAGE, FUNCTION_ID_PAGES, FUNCTION_ID_FIRST_EXTERNAL_FUNCTION=FUNCTION_ID_FIRST_EXTERNAL_FUNCTION_BASE } FunctionID;
typedef enum /* word */ { GCMI_MIN_X, GCMI_MIN_X_ROUNDED, GCMI_MIN_Y, GCMI_MIN_Y_ROUNDED, GCMI_MAX_X, GCMI_MAX_X_ROUNDED, GCMI_MAX_Y, GCMI_MAX_Y_ROUNDED, } GCM_info;
typedef enum { GCNDCNT_CREATED, GCNDCNT_DESTROYED } GCNDriveChangeNotificationType;
typedef enum { GCNEMNT_CREATED, GCNEMNT_DESTROYED } GCNExpressMenuNotificationType;
typedef struct { LMemBlockHeader GCNLBH_lmemHeader; ChunkHandle GCNLBH_listOfLists; } GCNListBlockHeader;
typedef struct { ChunkArrayHeader GCNLH_meta; word GCNLH_statusEvent; MemHandle GCNLH_statusData; word GCNLH_statusCount; /* Start of GCNListOfListElements */ } GCNListHeader;
typedef struct { GCNListType GCNLOLE_ID; ChunkHandle GCNLOLE_list; } GCNListOfListsElement;
typedef struct { ChunkArrayHeader GCNLOL_meta; /* Start of GCNListOfListsElement's */ } GCNListOfListsHeader;
typedef WordFlags GCNListSendFlags; #define GCNLSF_SET_STATUS 0x8000 #define GCNLSF_IGNORE_IF_STATUS_TRANSITIONING 0x4000
typedef enum { GCNSCT_SUSPEND, GCNSCT_SHUTDOWN, GCNSCT_UNSUSPEND } GCNShutdownControlType;
typedef enum { GCNSLT_FILE_SYSTEM, GCNSLT_APPLICATION, GCNSLT_DATE_TIME, GCNSLT_DICTIONARY, GCNSLT_EXPRESS_MENU, GCNSLT_SHUTDOWN_CONTROL } GCNStandardListType;
In Goc, GenAppGCNListTypes values will be maintained other structures by other names. Standard GEOS list types are part of the GeoWorksGenAppGCNListType enumerated type.
typedef enum { GE_NO_EVENT=0, /* dummy event (NOP) */ GE_END_OF_SONG=2, /* marks end of song */ GE_SET_PRIORITY=4, /* changes sound priority */ GE_SET_TEMPO=6, /* changes sound tempo */ GE_SEND_NOTIFICATION=8, /* sends encoded message */ GE_V_SEMAPHORE=10 /* V's a specified semaphore*/ } GeneralEvent;
These represent some of the miscellaneous events which can make up a music buffer.
The
GenClass
defines some values meant to be used in the place of a
TravelOption
enumerated value. See
TravelOption
.
typedef WordFlags GeodeAttrs; #define GA_PROCESS 0x8000 #define GA_LIBRARY 0x4000 #define GA_DRIVER 0x2000 #define GA_KEEP_FILE_OPEN 0x1000 #define GA_SYSTEM 0x0800 #define GA_MULTI_LAUNCHABLE 0x0400 #define GA_APPLICATION 0x0200 #define GA_DRIVER_INITIALIZED 0x0100 #define GA_LIBRARY_INITIALIZED 0x0080 #define GA_GEODE_INITIALIZED 0x0040 #define GA_USES_COPROC 0x0020 #define GA_REQUIRES_COPROC 0x0010 #define GA_HAS_GENERAL_CONSUMER_MODE 0x0008 #define GA_ENTRY_POINTS_IN_C 0x0004
typedef enum { GDDT_FILE_SYSTEM = 0, /* File system driver */ GDDT_KEYBOARD = 2, /* Keyboard driver */ GDDT_MOUSE = 4, /* Mouse driver */ GDDT_VIDEO = 6, /* Video driver */ GDDT_MEMORY_VIDEO = 8, /* Vidmem driver */ GDDT_POWER_MANAGEMENT = 10 /* Power management driver */ GDDT_TASK = 12 /* Task driver */ } GeodeDefaultDriverType;
The default driver type has one value for each default driver type in GEOS. This type is used with
GeodeGetDefaultDriver()
and
GeodeSetDefaultDriver()
.
typedef Handle GeodeHandle;
A standard handle that contains information about a loaded geode. When a geode has been loaded, it is referred to by its handle.
typedef enum { GLE_PROTOCOL_IMPORTER_TOO_RECENT, GLE_PROTOCOL_IMPORTER_TOO_OLD, GLE_FILE_NOT_FOUND, GLE_LIBRARY_NOT_FOUND, GLE_FILE_READ_ERROR, GLE_NOT_GEOS_FILE, GLE_NOT_GEOS_EXECUTABLE_FILE, GLE_ATTRIBUTE_MISMATCH, GLE_MEMORY_ALLOCATION_ERROR, GLE_NOT_MULTI_LAUNCHABLE, GLE_LIBRARY_PROTOCOL_ERROR, GLE_LIBRARY_LOAD_ERROR, GLE_DRIVER_INIT_ERROR, GLE_LIBRARY_INIT_ERROR, GLE_DISK_TOO_FULL, GLE_FIELD_DETACHING, } GeodeLoadError;
These errors may be returned by routines that load geodes, including
UserLoadApplication()
,
GeodeUseLibrary()
,
GeodeUseDriver()
, and
GeodeLoad()
.
typedef struct { TokenChars GT_chars; ManufacturerID GT_manufID; } GeodeToken;
Defines a token identifier. The
GT_chars
field is four characters that identify the token;
GT_manufID
is the identifying number of the manufacturer of the item being referenced.
typedef WordFlags GeosFileHeaderFlags; #define GFHF_TEMPLATE 0x8000 #define GFHF_SHARED_MULTIPLE 0x4000 #define GFHF_SHARED_SINGLE 0x2000
typedef enum /* word */ { GFT_NOT_GEOS_FILE, GFT_EXECUTABLE, GFT_VM, GFT_DATA, GFT_DIRECTORY, GFT_LINK } GeosFileType;
files are divided into several broad categories. You can find out a file's category by getting its FEA_FILE_TYPE extended attribute. This attribute is a member of the
GeosFileType
enumerated type. This type has the following values:
typedef enum /* word */ { GAGCNLT_SELF_LOAD_OPTIONS = 0x6800, GAGCNLT_GEN_CONTROL_NOTIFY_STATUS_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SELECT_STATE_CHANGE, GAGCNLT_EDIT_CONTROL_NOTIFY_UNDO_STATE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_CHAR_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_PARA_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_TYPE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_SELECTION_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_COUNT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_STYLE_TEXT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_STYLE_SHEET_TEXT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_STYLE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FONT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_POINT_SIZE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FONT_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_JUSTIFICATION_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_FG_COLOR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_BG_COLOR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_PARA_COLOR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_BORDER_COLOR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SEARCH_SPELL_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SEARCH_REPLACE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_CHART_TYPE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_CHART_GROUP_FLAGS, GAGCNLT_APP_TARGET_NOTIFY_CHART_AXIS_ATTRIBUTES, GAGCNLT_APP_TARGET_NOTIFY_CHART_MARKER_SHAPE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_CURRENT_TOOL_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_BODY_SELECTION_STATE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_AREA_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_LINE_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_TEXT_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_STYLE_GROBJ_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_STYLE_SHEET_GROBJ_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_BODY_INSTRUCTION_FLAGS_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_GROBJ_GRADIENT_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_RULER_TYPE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_RULER_GRID_CHANGE, GAGCNLT_TEXT_RULER_OBJECTS, GAGCNLT_APP_TARGET_NOTIFY_BITMAP_CURRENT_TOOL_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_BITMAP_CURRENT_FORMAT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FLAT_FILE_FIELD_PROPERTIES_STATUS_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FLAT_FILE_FIELD_LIST_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FLAT_FILE_RCP_STATUS_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FLAT_FILE_FIELD_APPEARANCE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_FLAT_FILE_DUMMY_CHANGE_2, GAGCNLT_APP_TARGET_NOTIFY_FLAT_FILE_DUMMY_CHANGE_3, GAGCNLT_APP_NOTIFY_DOC_SIZE_CHANGE, GAGCNLT_APP_NOTIFY_PAPER_SIZE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_VIEW_STATE_CHANGE, GAGCNLT_CONTROLLED_GEN_VIEW_OBJECTS, GAGCNLT_APP_TARGET_NOTIFY_INK_STATE_CHANGE, GAGCNLT_CONTROLLED_INK_OBJECTS, GAGCNLT_APP_TARGET_NOTIFY_PAGE_STATE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_DOCUMENT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_DISPLAY_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_DISPLAY_LIST_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPLINE_MARKER_SHAPE, GAGCNLT_APP_TARGET_NOTIFY_SPLINE_POINT, GAGCNLT_APP_TARGET_NOTIFY_SPLINE_POLYLINE, GAGCNLT_APP_TARGET_NOTIFY_SPLINE_SMOOTHNESS, GAGCNLT_APP_TARGET_NOTIFY_SPLINE_OPEN_CLOSE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_ACTIVE_CELL_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_EDIT_BAR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_SELECTION_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_WIDTH_HEIGHT_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_DOC_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_ATTR_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_CELL_NOTES_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_SPREADSHEET_DATA_RANGE_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_TEXT_NAME_CHANGE, GAGCNLT_FLOAT_FORMAT_CHANGE, GAGCNLT_DISPLAY_OBJECTS_WITH_RULERS, GAGCNLT_APP_TARGET_NOTIFY_APP_CHANGE, GAGCNLT_APP_TARGET_NOTIFY_LIBRARY_CHANGE, GAGCNLT_WINDOWS, GAGCNLT_STARTUP_LOAD_OPTIONS } GeoWorksGenAppGCNListType;
typedef enum { GMID_INVALID = 0x0, GMID_SERIAL_CABLE, /* unit is SerialPortNum */ GMID_INFRARED, /* unit is SerialPortNum */ GMID_DATA_MODEM, /* unit is SerialPortNum */ GMID_FAX_MODEM, /* unit is SerialPortNum */ GMID_PRINTER, /* unit is printer name in mem block */ GMID_PARALLEL_PORT, /* unit is ParallelPortNum */ GMID_NETWORK, /* unit is NetID */ GMID_LOOPBACK, /* no units */ GMID_SM /* Small Message--no units */ } GeoworksMediumID;
These values, together with MANUFACTURER_ID_GEOWORKS, form
MediumType
values representing certain standard communications media.
 A GString is basically an array of bytes; this macro takes two word-length values and breaks them up into four comma-seperated bytes. Thus, they help to make GString commands with variable number of point data appear readable. For example:
... GSDrawPolyline(3), GOC_POINT(0,6), GOC_POINT(10,6), GOC_POINT(10,1), GSFillPolygon(4,ODD_EVEN), GOC_POINT(5,1), GOC_POINT(9,0), GOC_POINT(9,5), GOC_POINT(5,6),
...
#define GOC_SW(a) GOC_WORD(a) #define GOC_WORD(a) ((a)&0xff),(((a)&0xff00)>>8)
These macros are useful when you're statically defining a byte array which contains word-length values. Each macro breaks up a word-length value into two bytes, seperated by a comma.
typedef WordFlags GSControl; #define GSC_PARTIAL 0x0200 #define GSC_ONE 0x0100 #define GSC_MISC 0x0080 #define GSC_LABEL 0x0040 #define GSC_ESCAPE 0x0020 #define GSC_NEW_PAGE 0x0010 #define GSC_XFORM 0x0008 #define GSC_OUTPUT 0x0004 #define GSC_ATTR 0x0002 #define GSC_PATH 0x0001
typedef ByteEnum GSRetType; #define GSRT_COMPLETE 0 #define GSRT_FORM_FEED 1 #define GSRT_ONE 2 #define GSRT_ESCAPE 3 #define GSRT_OUTPUT 4 #define GSRT_ELEMENT 5 #define GSRT_FAULT 0xff
typedef Handle GStateHandle;
GStates, or graphics states, are used to interpret graphics commands. Any graphics command that draws anything takes a GStateHandle as an argument. Each GState is associated with a window, and the graphics system uses the GState to determine which window the command should affect.
The GState also holds considerable information determining how drawing commands will be carried out. For instance, it holds the line color. To draw a green line, first one routine set's the GState's line color to green. From then on (or until the line color is changed again), all lines drawn using that GState will be green. Thus, all commands that set color, pattern, or other drawing attributes take a GStateHandle argument.
GStateHandles are also used when creating bitmaps and graphics strings. In this case, the associated window is fake; all drawing commands passed a GStateHandle representing a bitmap or graphics string will affect the data structure instead of being drawn to screen.
typedef void GString;
A GString (short for "Graphics Strings") represents a string of graphics commands. Each GString is made up of one or more GString elements, each of which corresponds to some standard graphics command.
GStrings may be created by means of drawing to a GStateHandle returned by
GrCreateState()
, but quite often GStrings are declared explicitly. The GString's data is often set up using macros like
GSDrawLine()
. These macros will output an opcode (of type
GStringElement
) and format their macro arguments into data expected with the opcode.
For instance,
GSDrawLine(72, 144, 216, 288);
...would expand to the data:
(GStringElement) GR_DRAW_LINE
GOC_SW(72), GOC_SW(144), GOC_SW(216), GOC_SW(288);
...where GOC_SW() is a macro that breaks up a word-length value into two bytes. Fundamentally, a GString is just an array of bytes.
Thus, these macros just represent data, though they look like normal kernel graphics commands.
typedef ByteEnum GStringElement; /* The following elements are defined : (Miscellaneous GString opcodes:) GR_END_STRING,
GR_COMMENT, (data: variable (word (length of code), code)) GR_NULL_OP, GR_SET_GSTRING_BOUNDS, (data: 8 bytes (4 swords)) GR_LABEL, (data: 2 bytes (word)) GR_ESCAPE, (data: variable (word (size of code), code)) GR_NEW_PAGE, (Coordinate Transform opcodes:) GR_APPLY_ROTATION, (data: 4 bytes (WWFixed))
GR_APPLY_SCALE, (data: 8 bytes (2 WWFixed)) GR_APPLY_TRANSLATION, (data: 8 bytes (2 WWFixed)) GR_APPLY_TRANSFORM, (data: 26 bytes (4 WWFixed, 2 DWFixed)) GR_APPLY_TRANSLATION_DWORD, (data: 8 bytes (2 sdwords)) GR_SET_TRANSFORM, (data: 26 bytes (4 WWFixed, 2 DWFixed)) GR_SET_NULL_TRANSFORM, GR_SET_DEFAULT_TRANSFORM, GR_INIT_DEFAULT_TRANSFORM, GR_SAVE_TRANSFORM, GR_RESTORE_TRANSFORM, (Output opcodes:) GR_DRAW_LINE, (data: 8 bytes (4 swords)) GR_DRAW_LINE_TO, (data: 4 bytes (2 swords)) GR_DRAW_REL_LINE_TO (data: 8 bytes (2 WWFixed)) GR_DRAW_HLINE, (data: 6 bytes (3 swords)) GR_DRAW_HLINE_TO, (data: 2 bytes (sword)) GR_DRAW_VLINE, (data: 6 bytes (3 swords)) GR_DRAW_VLINE_TO, (data: 2 bytes (sword)) GR_DRAW_POLYLINE, (data: variable (word (# of points), points) GR_DRAW_ARC, (data: 14 bytes (ArcCloseType, 6 swords)) GR_DRAW_ARC_3POINT, (data: 14 bytes (ArcCloseType, 6 swords)) GR_DRAW_ARC_3POINT_TO, (data: 10 bytes (ArcCloseType, 4 swords)) GR_DRAW_REL_ARC_3POINT_TO, (data: 18 bytes (ArcCloseType, 4 WWFixed)) GR_DRAW_RECT, (data: 8 bytes (4 swords)) GR_DRAW_RECT_TO, (data: 4 bytes (2 swords)) GR_DRAW_ROUND_RECT, (data: 10 bytes (word, 4 swords)) GR_DRAW_ROUND_RECT_TO, (data: 6 bytes (word, 2 swords)) GR_DRAW_SPLINE, (data: variable (word (# of points), points)) GR_DRAW_SPLINE_TO, (data: variable (word (# of points), points)) GR_DRAW_CURVE, (data: 16 bytes (8 swords)) GR_DRAW_CURVE_TO, (data: 12 bytes (6 swords)) GR_DRAW_REL_CURVE_TO, (data: 24 bytes (6 WWFixed)) GR_DRAW_ELLIPSE, (data: 8 bytes (4 swords)) GR_DRAW_POLYGON, (data: variable (word (# of points), points)) GR_DRAW_POINT, (data: 4 bytes (2 words)) GR_DRAW_POINT_CP, GR_BRUSH_POLYLINE, (data: variable (word (# of points), 2 bytes, points))
GR_DRAW_CHAR, (data: 5 bytes) (Chars, 2 swords)) GR_DRAW_CHAR_CP, (data: 1 byte) (Chars)) GR_DRAW_TEXT, (data: variable (sword, sword, word (length of string), string (not null terminated)))
GR_DRAW_TEXT_CP, (data: variable (word (length of string), string (not null terminated)))
GR_DRAW_TEXT_PTR, (data: 6 bytes (2 swords, (char *))) GR_DRAW_TEXT_OPTR, (data: 6 bytes (2 swords, optr)) GR_DRAW_PATH, GR_FILL_RECT, (data: 8 bytes (4 swords)) GR_FILL_RECT_TO, (data: 4 bytes (2 swords)) GR_FILL_ROUND_RECT, (data: 10 bytes (4 swords, word)) GR_FILL_ROUND_RECT_TO, (data: 6 bytes (2 swords, word)) GR_FILL_ARC, (data: 14 bytes (ArcCloseType, 6 swords)) GR_FILL_POLYGON, (data: variable (word (# of points), RegionFillRule, points))
GR_FILL_ELLIPSE, (data: 8 bytes (2 swords)) GR_FILL_PATH, (data: 1 byte (RegionFillRule)) GR_FILL_ARC_3POINT, (data: 14 bytes (ArcCloseType, 6 swords)) GR_FILL_ARC_3POINT_TO (data: 10 bytes (ArcCloseType, 4 swords)) GR_FILL_BITMAP, (data: 6 bytes (2 swords, word)) GR_FILL_BITMAP_CP, (data: 2 bytes (word)) GR_FILL_BITMAP_OPTR, GR_DRAW_BITMAP, (data: 6 bytes (2 swords, word)) GR_DRAW_BITMAP_CP, (data: 2 bytes (word)) GR_DRAW_BITMAP_OPTR, (data: 6 bytes (2 swords, optr)) GR_DRAW_BITMAP_PTR, (data: 6 bytes (2 swords, *)) GSE_BITMAP_SLICE, (data: variable) (Drawing Attribute opcodes:) GR_SAVE_STATE, GR_RESTORE_STATE, GR_SET_MIX_MODE, (data: 1 byte (MixMode)) GR_MOVE_TO, (data: 4 bytes (2 swords)) GR_REL_MOVE_TO, (data: 8 bytes (2 WWFixed)) GR_CREATE_PALETTE, GR_DESTROY_PALETTE, GR_SET_PALETTE_ENTRY, (data: 4 bytes (Color, 3 bytes)) GR_SET_PALETTE, (data: variable (word (# of entries), entries (3 bytes each)))
GR_SET_LINE_COLOR, (data: 3 bytes (3 bytes)) GR_SET_LINE_MASK, (data: 1 byte (SysDrawMask)) GR_SET_LINE_COLOR_MAP, (data: 1 byte (ColorMapMode)) GR_SET_LINE_WIDTH, (data: 4 bytes (WWFixed)) GR_SET_LINE_JOIN, (data: 1 byte (LineJoin)) GR_SET_LINE_END, (data: 1 byte (LineEnd)) GR_SET_LINE_ATTR, (data: 9 bytes (CF_RGB, 3 bytes, SysDrawMask, ColorMapMode, LineEnd, LineJoin, LineStyle)
GR_SET_MITER_LIMIT, (data: 4 bytes (WWFixed)) GR_SET_LINE_STYLE, (data: 2 bytes (LineStyle, index)) GR_SET_LINE_COLOR_INDEX, (data: 1 byte (Color)) GR_SET_CUSTOM_LINE_MASK, (data: 8 bytes (8 bytes)) GR_SET_CUSTOM_LINE_STYLE, (data: variable (word (index), word (# of on-off dash pairs),
pairs (each pair is 2 bytes))) GR_SET_AREA_COLOR, (data: 3 bytes (3 bytes) GR_SET_AREA_MASK, (data: 1 byte (SysDrawMask)) GR_SET_AREA_COLOR_MAP, (data: 1 byte (ColorMapMode)) GR_SET_AREA_ATTR, (data: 6 bytes (CF_RGB, 3 bytes, SysDrawMask, ColorMapMode))
GR_SET_AREA_COLOR_INDEX, (data: 1 byte (Color)) GR_SET_CUSTOM_AREA_MASK, (data: 8 bytes (8 bytes)) GR_SET_AREA_PATTERN, (data: 2 bytes (GraphicPattern)) GR_SET_CUSTOM_AREA_PATTERN, (data: variable (GraphicPattern, word (size of data) pattern data))
GR_SET_TEXT_COLOR, (data: 3 bytes (3 bytes)) GR_SET_TEXT_MASK, (data: 1 byte (SysDrawMask)) GR_SET_TEXT_COLOR_MAP, (data: 1 byte (ColorMapMode)) GR_SET_TEXT_STYLE, (data: 2 bytes (2 TextStyles)) GR_SET_TEXT_MODE, (data: 2 bytes (2 TextModes)) GR_SET_TEXT_SPACE_PAD, (data: 3 bytes (WBFixed)) GR_SET_TEXT_ATTR, (data: 20 bytes (CF_RGB, 3 bytes, SysDrawMask, ColorMapMode, 2 TextStyles, 2 TextModes, WBFixed, FontID, word))
GR_SET_FONT, (data: 5 bytes (WBFixed, FontID)) GR_SET_TEXT_COLOR_INDEX, (data: 1 byte (Color)) GR_SET_CUSTOM_TEXT_MASK, (data: 8 bytes () GR_SET_TRACK_KERN, (data: 2 bytes (sword)) GR_SET_FONT_WEIGHT, (data: 2 bytes (FontWeight)) GR_SET_FONT_WIDTH, (data: 2 bytes (FontWidth)) GR_SET_SUPERSCRIPT_ATTR, (data: 2 bytes (position, scale)) GR_SET_SUBSCRIPT_ATTR, (data: 2 bytes (position, scale)) GR_SET_TEXT_PATTERN, (data: 2 bytes (GraphicPattern)) GR_SET_CUSTOM_TEXT_PATTERN, (data: variable (GraphicPattern, word (size of data), pattern data))
(Path opcodes:) GR_BEGIN_PATH, (data: 1 byte (PathCombineParam)) GR_END_PATH, GR_SET_CLIP_RECT, (data: 8 bytes (4 swords)) GR_SET_WIN_CLIP_RECT, (data: 8 bytes (4 swords)) GR_CLOSE_SUB_PATH, GR_SET_CLIP_PATH, (data: 1 byte (flags)) GR_SET_WIN_CLIP_PATH, (data: 1 byte (flags)) GR_SET_STROKE_PATH */
Each Graphics String Element consists of a
GStringElement
value specifying the type of element and the data associated with the element's operation. For instance, GR_DRAW_CHAR operations need six bytes of data: two bytes holding the
Chars
value of the character to draw, and two signed words specifying the drawing coordinates.
A good place to find out about the data associated with a particular
GStringElement
type is the
GS...()
macros defined in
gstring.h
.
typedef ByteEnum GStringType; #define GST_CHUNK 0 #define GST_STREAM 1 #define GST_VMEM 2 #define GST_PTR 3 #define GST_PATH 4
typedef struct { PointWWFixed HL_origin; WWFixed HL_deltaX; WWFixed HL_deltaY; WWFixed HL_angle; ColorQuad HL_color; word HL_numDashes; /* array of HatchDash structures follows here */ } HatchLine;
typedef struct { word HP_numLines; /* array of HatchLine structures follows here */ } HatchPattern;
typedef ByteFlags HeapAllocFlags; #define HAF_ZERO_INIT 0x80 #define HAF_LOCK 0x40 #define HAF_NO_ERR 0x20 #define HAF_UI 0x10 #define HAF_READ_ONLY 0x08 #define HAF_OBJECT_RESOURCE 0x04 #define HAF_CODE 0x02 #define HAF_CONFORMING 0x01 #define HAF_STANDARD (0) #define HAF_STANDARD_NO_ERR (HAF_NO_ERR) #define HAF_STANDARD_LOCK (HAF_LOCK) #define HAF_STANDARD_NO_ERR_LOCK (HAF_NO_ERR | HAF_LOCK)
HeapAllocFlags
indicate how the block should be allocated and initialized. They are not stored and can not be retrieved. Only some of the flags can be passed with
MemReAlloc()
; these are noted below. The following flags are available:
MemReAlloc()
to cause new memory to be zero-initialized.
MemDeref()
. This flag may be passed to
MemReAlloc()
.
MemReAlloc()
.typedef ByteFlags HeapFlags; #define HF_FIXED 0x80 #define HF_SHARABLE 0x40 #define HF_DISCARDABLE 0x20 #define HF_SWAPABLE 0x10 #define HF_LMEM 0x08 #define HF_DISCARDED 0x02 #define HF_SWAPPED 0x01 #define HF_STATIC (HF_DISCARDABLE | HF_SWAPABLE) #define HF_DYNAMIC HF_SWAPABLE
The following flags are available:
LMemInitHeap()
and
VMAllocLMem()
; applications should not need to set this flag.typedef struct { LMemBlockHeader HAD_header; VMBlockHandle HAD_data; ChunkHandle HAD_dir; VMBlockHandle HAD_xdir; VMBlockHandle HAD_self; word HAD_size; } HugeArrayDirectory;
typedef WordFlags IACPConnectFlags; #define IACPCF_OBEY_LAUNCH_MODEL 0x0020 #define IACPCF_CLIENT_OD_SPECIFIED 0x0010 #define IACPCF_FIRST_ONLY 0x0008 #define IACPCF_SERVER_MODE 0x0007
Include: iacp.goh
typedef ByteFlags IACPServerFlags; #define IACPSF_MULTIPLE_INSTANCES 0x80
Include: iacp.goh
IACPServerMode; #define IACPSM_NOT_USER_INTERACTIBLE 0 #define IACPSM_IN_FLUX 1 #define IACPSM_USER_INTERACTIBLE 2
Include: iacp.goh
typedef ByteFlags ImageFlags; #define IF_IGNORE_MASK 0x10 #define IF_BORDER 0x08 #define IF_BITSIZE 0x07 /* Should hold an ImageBitSize */ #define IBS_1 0 #define IBS_2 1 #define IBS_4 2 #define IBS_8 3 #define IBS_16 4
typedef ByteFlags IMCFeatures; #define IMCF_MAP 0x01 #define IMC_DEFAULT_FEATURES IMCF_MAP #define IMC_DEFAULT_TOOLBOX_FEATURES 0 #define IMC_MAP_MONIKER_SIZE 1024
typedef WordFlags ImpexDataClasses; #define IDC_TEXT 0x8000 #define IDC_GRAPHICS 0x4000 #define IDC_SPREADSHEET 0x2000 #define IDC_FONT 0x1000
typedef struct { FileLongName IFSD_selection; PathName IFSD_path; word IFSD_disk; GenFileSelectorEntryFlags IFSD_type; } ImpexFileSelectionData;
typedef struct { LMemBlockHeader IMFIH_base; word IMFIH_fieldChunk; word IMFIH_numFields; } ImpexMapFileInfoHeader;
typedef struct { optr ITP_impexOD; Message ITP_returnMsg; word ITP_dataClass; FileHandle ITP_transferVMFile; VMChain ITP_transferVMChain; dword ITP_internal; } ImpexTranslationParams;
typedef WordFlags ImportControlAttrs; #define ICA_IGNORE_INPUT 0x8000 /* ignore input while import occurs */
typedef ByteFlags ImportControlToolboxFeatures; #define IMPORTCTF_DIALOG_BOX 0x01
typedef struct { word IALMBH_recCount; word IALMBH_array; word IALMBH_indexField; word IALMBH_sortOrder; } IndexArrayBlockHeader;
Format of a block containing a datastore index of
RecordNum
s (low word only); see
DataStoreBuildIndex()
.
typedef ByteEnum InitFileCharConvert; #define IFCC_INTACT 0 /* Leave all characters unchanged. */ #define IFCC_UPCASE 1 /* Make all characters upper case. */ #define IFCC_DOWNCASE 2 /* Make all characters lower case. */
This enumerated type describes how
InitFileRead...()
routines should handle incoming strings.
typedef WordFlags InitFileReadFlags; #define IFRF_CHAR_CONVERT 0xc000 /* 2 bits: InitFileCharConvert type */ #define IFRF_READ_ALL 0x2000 #define IFRF_FIRST_ONLY 0x1000 #define IFRF_SIZE 0x0fff
This record is used with the
InitFileRead...()
routines. The IFRF_CHAR_CONVERT field is used to indicate whether strings being read should be upcased, downcased, or left unaltered--the type is designated by a value of
InitFileCharConvert
. The IFRF_SIZE field is used by routines that take a passed buffer; this field indicates the size of the buffer (the maximum number of bytes that can be returned by the routine).
When setting this record, make sure you shift the IFRF_CHAR_CONVERT value left an offset of IFRF_CHAR_CONVERT_OFFSET.
typedef enum { IBT_NO_BACKGROUND = 0, IBT_NARROW_LINED_PAPER = 2, IBT_MEDIUM_LINED_PAPER = 4, IBT_WIDE_LINED_PAPER = 6, IBT_NARROW_STENO_PAPER = 8, IBT_MEDIUM_STENO_PAPER = 10, IBT_WIDE_STENO_PAPER = 12, IBT_SMALL_GRID = 14, IBT_MEDIUM_GRID = 16, IBT_LARGE_GRID = 18, IBT_SMALL_CROSS_SECTION = 20, IBT_MEDIUM_CROSS_SECTION = 22, IBT_LARGE_CROSS_SECTION = 24, IBT_TO_DO_LIST = 26, IBT_PHONE_MESSAGE = 28, IBT_CUSTOM_BACKGROUND = 30 } InkBackgrountType;
This enumerated type is a set of standard background pictures for use with the Ink Database routines.
typedef ByteFlags InkControlFeatures; #define ICF_PENCIL_TOOL 0x02 #define ICF_ERASER_TOOL 0x01
typedef ByteFlags InkControlToolboxFeatures; #define ICTF_PENCIL_TOOL 0x02 #define ICTF_ERASER_TOOL 0x01
typedef struct { Rectangle IDBF_bounds; /* bounds of data to save or coord at * which to load data */
VMFileHandle IDBF_VMFile; /* VM File to write to/read from */ DBGroupAndItem IDBF_DBGroupAndItem; /* DB item to save to/load from */ word IDBF_DBExtra; /* space to skip at start of block */ } InkDBFrame;
typedef ByteFlags InkFlags; #define IF_HAS_TARGET 0x20 #define IF_DIRTY 0x10 #define IF_ONLY_CHILD_OF_CONTENT 0x08 #define IF_CONTROLLED 0x04 #define IF_INVALIDATE_ERASURES 0x02 #define IF_HAS_UNDO 0x01
typedef enum { IRV_NO_REPLY, /* VisComp objects use VisCallChildUnderPoint to send * MSG_META_QUERY_IF_PRESS_IS_INK to its children, and * VisCallChildUnderPoint returns this value (0) if there was not child * under the point. No object should actually return this value. */
IRV_NO_INK, /* Return this if the object wants to treat incoming event as mouse data. */
IRV_INK_WITH_STANDARD_OVERRIDE, /* Return this if the object normally wants ink (the text object does this), * but the user can force mouse events instead by pressing the pen and * holding for some user-adjustable amount of time. */
IRV_WAIT /* Return this value if the object under the point is run by a different * thread and you want to hold up input (don't do anything with the incoming * MSG_META_START_SELECT) `til obj sends MSG_GEN_APPLICATION_INK_QUERY_REPLY * to the applicaiton object. */
} InkReturnValue;
This enumerated type is used by objects to let the system know whether incoming pointer events should be interpreted as mouse or pen data.
typedef WordFlags InsertChildFlags #define ICF_MARK_DIRTY 0x8000 #define ICF_OPTIONS 0x0003
This record specifies how children are to be added to an object tree.
typedef ByteEnum InsertChildOption #define ICO_FIRST 0 #define ICO_LAST 1 #define ICO_BEFORE_REFERENCE 2 #define ICO_AFTER_REFERENCE 3
This enumerated type determines how a child is added and is used with the
InsertChildFlags
record. It has four enumerations, as shown above.
typedef enum { #define IP_ACOUSTIC_GRAND_PIANO 0 #define IP_BRIGHT_ACOUSTIC_PIANO 1 #define IP_ELECTRIC_GRAND_PIANO 2 #define IP_HONKY_TONK_PIANO 3 #define IP_ELECTRIC_PIANO_1 4 #define IP_ELECTRIC_PIANO_2 5 #define IP_HARPSICORD 6 #define IP_CLAVICORD 7 #define IP_CELESTA 8 #define IP_GLOCKENSPIEL 9 #define IP_MUSIC_BOX 10 #define IP_VIBRAPHONE 11 #define IP_MARIMBA 12 #define IP_XYLOPHONE 13 #define IP_TUBULAR_BELLS 14 #define IP_DULCIMER 15 #define IP_DRAWBAR_ORGAN 16 #define IP_PERCUSSIVE_ORGAN 17 #define IP_ROCK_ORGAN 18 #define IP_CHURCH_ORGAN 19 #define IP_REED_ORGAN 20 #define IP_ACCORDION 21 #define IP_HARMONICA 22 #define IP_TANGO_ACCORDION 23 #define IP_ACOUSTIC_NYLON_GUITAR 24 #define IP_ACOUSTIC_STEEL_GUITAR 25 #define IP_ELECTRIC_JAZZ_GUITAR 26 #define IP_ELECTRIC_CLEAN_GUITAR 27 #define IP_ELECTRIC_MUTED_GUITAR 28 #define IP_OVERDRIVEN_GUITAR 29 #define IP_DISTORTION_GUITAR 30 #define IP_GUITAR_HARMONICS 31 #define IP_ACOUSTIC_BASS 32 #define IP_ELECTRIC_FINGERED_BASS 33 #define IP_ELECTRIC_PICKED_BASS 34 #define IP_FRETLESS_BASS 35 #define IP_SLAP_BASS_1 36 #define IP_SLAP_BASS_2 37 #define IP_SYNTH_BASS_1 38 #define IP_SYNTH_BASS_2 39 #define IP_VIOLIN 40 #define IP_VIOLA 41 #define IP_CELLO 42 #define IP_CONTRABASS 43 #define IP_TREMOLO_STRINGS 44 #define IP_PIZZICATO_STRINGS 45 #define IP_ORCHESTRAL_HARP 46 #define IP_TIMPANI 47 #define IP_STRING_ENSEMBLE_1 48 #define IP_STRING_ENSEMBLE_2 49 #define IP_SYNTH_STRINGS_1 50 #define IP_SYNTH_STRINGS_2 51 #define IP_CHIOR_AAHS 52 #define IP_VOICE_OOHS 53 #define IP_SYNTH_VOICE 54 #define IP_ORCHESTRA_HIT 55 #define IP_TRUMPET 56 #define IP_TROMBONE 57 #define IP_TUBA 58 #define IP_MUTED_TRUMPET 59 #define IP_FRENCH_HORN 60 #define IP_BRASS_SECTION 61 #define IP_SYNTH_BRASS_1 62 #define IP_SYNTH_BRASS_2 63 #define IP_SOPRANO_SAX 64 #define IP_ALTO_SAX 65 #define IP_TENOR_SAX 66 #define IP_BARITONE_SAX 67 #define IP_OBOE 68 #define IP_ENGLISH_HORN 69 #define IP_BASSOON 70 #define IP_CLARINET 71 #define IP_PICCOLO 72 #define IP_FLUTE 73 #define IP_RECORDER 74 #define IP_PAN_FLUTE 75 #define IP_BLOWN_BOTTLE 76 #define IP_SHAKUHACHI 77 #define IP_WHISTLE 78 #define IP_OCARINA 79 #define IP_LEAD_SQUARE 80 #define IP_LEAD_SAWTOOTH 81 #define IP_LEAD_CALLIOPE 82 #define IP_LEAD_CHIFF 83 #define IP_LEAD_CHARANG 84 #define IP_LEAD_VOICE 85 #define IP_LEAD_FIFTHS 86 #define IP_LEAD_BASS_LEAD 87 #define IP_PAD_NEW_AGE 88 #define IP_PAD_WARM 89 #define IP_PAD_POLYSYNTH 90 #define IP_PAD_CHOIR 91 #define IP_PAD_BOWED 92 #define IP_PAD_METALLIC 93 #define IP_PAD_HALO 94 #define IP_PAD_SWEEP 95 #define IP_FX_RAIN 96 #define IP_FX_SOUNDTRACK 97 #define IP_FX_CRYSTAL 98 #define IP_FX_ATMOSPHERE 99 #define IP_FX_BRIGHTNESS 100 #define IP_FX_GOBLINS 101 #define IP_FX_ECHOES 102 #define IP_FX_SCI_FI 103 #define IP_SITAR 104 #define IP_BANJO 105 #define IP_SHAMISEN 106 #define IP_KOTO 107 #define IP_KALIMBA 108 #define IP_BAG_PIPE 109 #define IP_FIDDLE 110 #define IP_SHANAI 111 #define IP_TINKLE_BELL 112 #define IP_AGOGO 113 #define IP_STEEL_DRUMS 114 #define IP_WOODBLOCK 115 #define IP_TAIKO_DRUM 116 #define IP_MELODIC_TOM 117 #define IP_SYNTH_DRUM 118 #define IP_REVERSE_CYMBAL 119 #define IP_GUITAR_FRET_NOISE 120 #define IP_BREATH_NOISE 121 #define IP_SEASHORE 122 #define IP_BIRD_TWEET 123 #define IP_TELEPHONE_RING 124 #define IP_HELICOPTER 125 #define IP_APPLAUSE 126 #define IP_GUNSHOT 127 #define IP_ACOUSTIC_BASS_DRUM 128 #define IP_BASS_DRUM_1 129 #define IP_SIDE_STICK 130 #define IP_ACOUSTIC_SNARE 131 #define IP_HAND_CLAP 132 #define IP_ELECTRIC_SNARE 133 #define IP_LOW_FLOOR_TOM 134 #define IP_CLOSED_HI_HAT 135 #define IP_HIGH_FLOOR_TOM 136 #define IP_PEDAL_HI_HAT 137 #define IP_LOW_TOM 138 #define IP_OPEN_HI_HAT 139 #define IP_LOW_MID_TOM 140 #define IP_HI_MID_TOM 141 #define IP_CRASH_CYMBAL_1 142 #define IP_HIGH_TOM 143 #define IP_RIDE_CYMBAL_1 144 #define IP_CHINESE_CYMBAL 145 #define IP_RIDE_BELL 146 #define IP_TAMBOURINE 147 #define IP_SPLASH_CYMBAL 148 #define IP_COWBELL 149 #define IP_CRASH_CYMBAL_2 150 #define IP_VIBRASLAP 151 #define IP_RIDE_CYMBAL_2 152 #define IP_HI_BONGO 153 #define IP_LOW_BONGO 154 #define IP_MUTE_HI_CONGA 155 #define IP_OPEN_HI_CONGA 156 #define IP_LOW_CONGA 157 #define IP_HI_TIMBALE 158 #define IP_LOW_TIMBALE 159 #define IP_HIGH_AGOGO 160 #define IP_LOW_AGOGO 161 #define IP_CABASA 162 #define IP_MARACAS 163 #define IP_SHORT_WHISTLE 164 #define IP_LONG_WHISTLE 165 #define IP_SHORT_GUIRO 166 #define IP_LONG_GUIRO 167 #define IP_CLAVES 168 #define IP_HI_WOOD_BLOCK 169 #define IP_LOW_WOOD_BLOCK 170 #define IP_MUTE_CUICA 171 #define IP_OPEN_CUICA 172 #define IP_MUTE_TRIANGLE 173 #define IP_OPEN_TRIANGLE 174 } InstrumentPatch;
These are standard simulated instruments.
typedef enum { IT_STANDARD_TABLE=0 /* default table */ } InstrumentTable;
The sound library uses this enumerated type to keep track of which table of simulated musical instruments to use.
typedef struct { char JS_fname[13]; /* std DOS (8.3) spool filename */ char JS_parent[FILE_LONGNAME_LENGTH+1]; /* parent app's name */
char JS_documentName[FILE_LONGNAME_LENGTH+1]; /* document name */
word JS_numPages; /* # pages in document */ SpoolTimeStruct JS_time; /* time spooled */ byte JS_printing; /* TRUE/FALSE if we are printing */ } JobStatus;
typedef ByteEnum Justification; #define J_LEFT 0 #define J_RIGHT 1 #define J_CENTER 2 #define J_FULL 3
typedef ByteFlags KeyboardShortcut; #define KS_PHYSICAL 0x80 /* TRUE: match key, not character */ #define KS_ALT 0x40 /* TRUE: <ALT> must be pressed */ #define KS_CTRL 0x20 /* TRUE: <CTRL> must be pressed */ #define KS_SHIFT 0x10 /* TRUE: <SHIFT> must be pressed */ #define KS_CHAR_SET_PRINTABLE (CS_BSW & 0x0f) #define KS_CHAR_SET_CONTROL (CS_CONTROL & 0x0f)
typedef ByteEnum KeyboardType; #define KT_NOT_EXTD 1 #define KT_EXTD 2 #define KT_BOTH 3
typedef enum /* word */ { KEYMAP_US_EXTD=1, KEYMAP_US, KEYMAP_UK_EXTD, KEYMAP_UK, KEYMAP_GERMANY_EXTD, KEYMAP_GERMANY, KEYMAP_SPAIN_EXTD, KEYMAP_SPAIN, KEYMAP_DENMARK_EXTD, KEYMAP_DENMARK, KEYMAP_BELGIUM_EXTD, KEYMAP_BELGIUM, KEYMAP_CANADA_EXTD, KEYMAP_CANADA, KEYMAP_ITALY_EXTD, KEYMAP_ITALY, KEYMAP_LATIN_AMERICA_EXTD, KEYMAP_LATIN_AMERICA, KEYMAP_NETHERLANDS, KEYMAP_NETHERLANDS_EXTD, KEYMAP_NORWAY_EXTD, KEYMAP_NORWAY, KEYMAP_PORTUGAL_EXTD, KEYMAP_PORTUGAL, KEYMAP_SWEDEN_EXTD, KEYMAP_SWEDEN, KEYMAP_SWISS_FRENCH_EXTD, KEYMAP_SWISS_FRENCH, KEYMAP_SWISS_GERMAN_EXTD, KEYMAP_SWISS_GERMAN, KEYMAP_FRANCE_EXTD, KEYMAP_FRANCE, } KeyMapType;
typedef ByteEnum Language; #define L_DEFAULT 0 #define L_GRAPHIC 0 #define L_ENGLISH 1 #define L_GERMAN 2 #define L_FRENCH 3 #define L_SPANISH 4 #define L_ITALIAN 5 #define L_DANISH 6 #define L_DUTCH 7
typedef struct { PointDWFixed LMD_location; byte LMD_buttonInfo; UIFunctionsActive LMD_uiFunctionsActive; } LargeMouseData;
typedef ByteEnum LayerPriority; #define LAYER_PRIO_MODAL 6 #define LAYER_PRIO_ON_TOP 8 #define LAYER_PRIO_STD 12 #define LAYER_PRIO_ON_BOTTOM 14
typedef enum /* word */ { LCT_ATTACH, /* The library was just loaded. */ LCT_DETACH, /* The library is about to be unloaded. */ LCT_NEW_CLIENT, /* A new client of the library was just loaded. */ LCT_NEW_CLIENT_THREAD, /* A new thread was just created for a * current client of the library. */ LCT_CLIENT_THREAD_EXIT, /* A thread was just exited for a current * client of the library. */ LCT_CLIENT_EXIT, /* Library's client is about to be unloaded. */ } LibraryCallType
This type is used by library entry point routines. Library entry point routines take a value of this enumerated type to determine what, if anything, is to be done.
typedef struct { byte LA_colorFlag; RGBValue LA_color; SysDrawMask LA_mask; ColorMapMode LA_mapMode; LineEnd LA_end; LineJoin LA_join; LineStyle LA_style; WWFixed LA_width; } LineAttr;
typedef ByteEnum LineEnd; #define LE_BUTTCAP 0 #define LE_ROUNDCAP 1 #define LE_SQUARECAP 2 #define LAST_LINE_END_TYPE LE_SQUARECAP
Line ends determine how the graphics system will draw the end of a line segment.
typedef ByteEnum LineJoin; #define LJ_MITERED 0 #define LJ_ROUND 1 #define LJ_BEVELED 2 #define LAST_LINE_JOIN_TYPE LJ_BEVELED
This enumerated type determines how the graphics system will draw corners of rectangles and polylines.
typedef ByteEnum LineStyle; #define LS_SOLID 0 #define LS_DASHED 1 #define LS_DOTTED 2 #define LS_DASHDOT 3 #define LS_DASHDDOT 4 #define LS_CUSTOM 5 #define MAX_DASH_ARRAY_PAIRS 5
The
LineStyle
type describes a line's "dottedness."  You can examine any of the fields by locking the block and casting its address to a
*LMemBlockHeader
. You should not, however, change any of the fields yourself; they are managed by the LMem routines.
Contents: The header has the following fields:
_handle
_offset
_flags
LocalMemoryFlags
currently set for the block. The flags are described in the entry for
LMemInitHeap()
.
_lmemType
LMemType
enumerated type, described in the entry for
LMemInitHeap()
.
_blockSize
_nHandles
_freeList
_totalFree
Warnings: Do not change the settings of the
LMemBlockHeader
. They are automatically maintained by the LMem routines.
Include: lmem.h
See Also: LMemInitHeap()
.
typdef enum { LMEM_TYPE_GENERAL, LMEM_TYPE_WINDOW, LMEM_TYPE_OBJ_BLOCK, LMEM_TYPE_GSTATE, LMEM_TYPE_FONT_BLK, LMEM_TYPE_GSTRING, LMEM_TYPE_DB_ITEMS } LMemType;
LMem heaps are created for many different purposes. Some of these purposes require the heap to have special functionality. For this reason, when you create an LMem heap, you must specify what it will be used for. The following types are available:
Include: lmem.h
typedef WordFlags LocalDistanceFlags; #define LDF_FULL_NAMES 0x8000 #define LDF_PRINT_PLURAL_IF_NEEDED 0x4000
typedef struct { byte currencyFormatFlags; byte currencyDigits; word thousandsSeparator; word decimalSeparator; word listSeparator; } LocalCurrencyFormat;
typedef WordFlags LocalMemoryFlags; #define LMF_HAS_FLAGS 0x8000 #define LMF_IN_RESOURCE 0x4000 #define LMF_DETACHABLE 0x2000 #define LMF_DUPLICATED 0x1000 #define LMF_RELOCATED 0x0800 #define LMF_AUTO_FREE 0x0400 #define LMF_IN_LMEM_ALLOC 0x0200 #define LMF_IS_VM 0x0100 #define LMF_NO_HANDLES 0x0080 #define LMF_NO_ENLARGE 0x0040 #define LMF_RETURN_ERRORS 0x0020 #define LMF_DEATH_COUNT 0x0007 #define STD_LMEM_OBJECT_FLAGS (LMF_HAS_FLAGS | LMF_RELOCATED)
When an LMem heap is allocated, certain flags are passed to indicate properties the heap should have. Some of the flags are passed only for system-created heaps. The flags are stored in a word-length record (
LocalMemoryFlags
); the record also contains flags indicating the current state of the heap. The
LocalMemoryFlags
are listed below:
ObjDuplicateResource()
routine. This flag should not be set by applications.
malloc()
routine; in this case, chunks are not relocated after being created, so chunk handles are not needed. Ordinarily, these blocks are created by the
malloc()
routine, not by applications.
ObjInstantiate()
) are optimized in such a way that they cannot deal with LMem allocation errors.
BlockDeathCommon
before it will free the block. This flag is used by error-checking code in the kernel.Include: lmem.h
typedef struct { byte numberFormatFlags; byte decimalDigits; word thousandsSeparator; word decimalSeparator; word listSeparator; } LocalNumericFormat;
typedef struct { word frontSingle; word endSingle; word frontDouble; word endDouble; } LocalQuotes;
ManufacturerID ManufacturerFromFormatID(type); ClipboardItemFormatID type;
This macro extracts the manufacturer ID from the given clipboard format ID and manufacturer value.
typedef word ManufacturerID #define MANUFACTURER_ID_GEOWORKS 0 #define MANUFACTURER_ID_APP_LOCAL 1 #define MANUFACTURER_ID_DOS_LAUNCHER 5 #define MANUFACTURER_ID_SDK 8 #define MANUFACTURER_ID_GENERIC 10
While geode.h
defines many other ManufacturerID
s for specific developers, the only one of these which is useful to know about when developing for the Nokia 9000i communicator is MANUFACTURER_ID_NOKIA
.
Each company should have its own manufacturer ID which is unique to the company and ensures that its applications' GeodeTokens do not conflict with those of other manufacturers. If you don't have a manufacturer ID but think you should, contact Geoworks Developer Support.
typedef ByteEnum MapColorToMono; #define CMT_CLOSEST 0 #define CMT_DITHER 1
This type determines what the graphics system will do when trying to draw in an unavailable color. It will either draw in the closest color, or else mix two or more close colors to get as close as possible overall.
typedef struct { LMemBlockHeader MLBH_base; word MLBH_numDestFields; word MLBH_chunk1; } MapListBlockHeader;
typedef struct { int leftMargin; int topMargin; int rightMargin; int bottomMargin; } MarginDimensions;
#define MAX_FIELD_NAME_LENGTH 40
Maximum size of a field name in a datastore. See
DataStoreAddField()
.
typedef enum /* byte */ { #define MEDIA_NONEXISTENT 0 #define MEDIA_160K 1 #define MEDIA_180K 2 #define MEDIA_320K 3 #define MEDIA_360K 4 #define MEDIA_720K 5 #define MEDIA_1M2 6 #define MEDIA_1M44 7 #define MEDIA_2M88 8 #define MEDIA_FIXED_DISK 9 #define MEDIA_CUSTOM 10 } MediaType;
The
MediaType
enumerated type indicates how a disk is formatted. A member of this enumerated type is returned by some disk-information routines (e.g.
DriveGetDefaultMedia()
). A
MediaType
value is also passed to
DiskFormat()
, indicating how the disk should be formatted.
typedef struct { MediumType MU_medium; MediumUnitType MU_unitType; word MU_unit; } MediumAndUnit;
This structure represents an instance of some communication medium-generally this corresponds to some hardware port or peripheral device.
Include: medium.h
typedef ByteEnum MediumUnitType; #define MUT_NONE 0x0 #define MUT_INT 0x1 #define MUT_MEM_BLOCK 0x2 #define MUT_ANY 0x3
Include: medium.h
typedef struct { word MET_id; ManufacturerID MET_manuf; } MediumType;
This structure represents a communication medium. Several standard media may be represented with a
MET_manuf
of MANUFACTURER_ID_GEOWORKS and a
GeoworksMediumID
in
MET_id
.
Include: medium.h
typedef enum /* word */ { MESSAGE_NO_ERROR, /* no error was encountered */ MESSAGE_NO_HANDLES /* no handle could be allocated * and MF_CAN_DISCARD_IF_DESPARATE * was passed */
} MessageErrors;
A
MessageError
is returned by the assembly routine
ObjMessage()
in assembly to indicate whether the message was successfully sent. This is not encountered by C applications.
typedef WordFlags MessageFlags; #define MF_CALL 0x8000 /* @call */ #define MF_FORCE_QUEUE 0x4000 #define MF_STACK 0x2000 /* @stack */ #define MF_CHECK_DUPLICATE 0x0800 #define MF_CHECK_LAST_ONLY 0x0400 #define MF_REPLACE 0x0200 #define MF_CUSTOM 0x0100 #define MF_FIXUP_DS 0x0080 #define MF_FIXUP_ES 0x0040 #define MF_DISCARD_IF_NO_MATCH 0x0020 #define MF_MATCH_ALL 0x0010 #define MF_INSERT_AT_FRONT 0x0008 /* puts at front of queue */ #define MF_CAN_DISCARD_IF_DESPERATE 0x0004 #define MF_RECORD 0x0002 /* @record */ #define MF_DISPATCH_DONT_FREE 0x0002
MessageFlags
are specified in the assembly routine
ObjMessage()
. Most of these flags are set properly by Goc and the kernel in C. See the reference entries for the Goc keywords
@call
and
@send
.
typedef void MessageMethod();
Goc uses this type when building up method tables for classes.
typedef union { MinUSMeasure MIT_US; MinMetricMeasure MIT_METRIC; MinPointMeasure MIT_POINT; MinPicaMeasure MIT_PICA; } MinIncrementType;
typedef ByteEnum MinMetricMeasure; #define MMM_MILLIMETER 0 #define MMM_HALF_CENTIMETER 1 #define MMM_CENTIMETER 2
typedef ByteEnum MinPointMeasure; #define MPM_25_POINT 0 #define MPM_50_POINT 1 #define MPM_100_POINT 2
typedef ByteEnum MinUSMeasure; #define MUSM_EIGHTH_INCH 0 #define MUSM_QUARTER_INCH 1 #define MUSM_HALF_INCH 2 #define MUSM_ONE_INCH 3
typedef ByteEnum MixMode; #define MM_CLEAR 0 /* clear destination */ #define MM_COPY 1 /* new drawing is opaque */ #define MM_NOP 2 /* no drawing */ #define MM_AND 3 /* logical AND of new and old colors */ #define MM_INVERT 4 /* inverse of old color */ #define MM_XOR 5 /* XOR of new and old colors */ #define MM_SET 6 /* set destination black */ #define MM_OR 7 /* logical OR of new and old colors */
The
MixMode
determines what the graphics system will do when drawing one thing on top of another.
typedef enum { MRC_NOT_SUPPORTED = 1, MRC_DRIVER_IN_USE, MRC_TIMEOUT, MRC_UNKNOWN_RESPONSE, MRC_OK, RC_ERROR, MRC_BUSY, MRC_NO_DIALTONE, MRC_NO_ANSWER, MRC_NO_CARRIER, MRC_CONNECT, MRC_CONNECT_1200, MRC_CONNECT_2400, MRC_CONNECT_4800, MRC_CONNECT_9600, MRC_BLACKLISTED, MRC_DELAYED, } ModemResultCode;
Error codes returned by modem routines.
typedef WordFlags MouseReturnFlags; #define MRF_PROCESSED 0x8000 #define MRF_REPLAY 0x4000 #define MRF_PREVENT_PASS_THROUGH 0x2000 #define MRF_SET_POINTER_IMAGE 0x1000 #define MRF_CLEAR_POINTER_IMAGE 0x0800
These flags are used in various parts of the system that work with mouse input. Which values are appropriate to pass will vary based on context.
typedef struct { word unused; MouseReturnFlags flags; optr ptrImage; } MouseReturnParams;
This structure is used in certain areas of the system which work with mouse input.
typedef struct{ ElementArrayHeader NAH_meta; word NAH_dataSize; /* Size of data section of * each element */
} NameArrayHeader;
Every name array must begin with a
NameArrayHeader
. Since name arrays are special kinds of element arrays, the
NameArrayHeader
must itself begin with an
ElementArrayHeader
. The structure contains one additional field,
NAH_dataSize
. This field specifies how long the data section of every element is. Applications may examine this field, but they must not change it.
typedef struct { RefElementHeader NAME_meta; byte NAME_data[NAME_ARRAY_MAX_DATA_SIZE]; char NAME_name[NAME_ARRAY_MAX_NAME_SIZE]; } NameArrayMaxElement;
typedef ByteEnum NumberType; #define NT_VALUE 0 #define NT_BOOLEAN 1 #define NT_DATE_TIME 2
typedef ByteFlags ObjChunkFlags; #define OCF_VARDATA_RELOC 0x10 #define OCF_DIRTY 0x08 #define OCF_IGNORE_DIRTY 0x04 #define OCF_IN_RESOURCE 0x02 #define OCF_IS_OBJECT 0x01
This record is stored at the beginning of each chunk and gives specific information about the chunk. The flags are internal.
typedef struct { LMemBlockHeader OLMBH_header; /* standard LMem block header */ word OLMBH_inUseCount; word OLMBH_interactibleCount; optr OLMBH_output; word OLMBH_resourceSize; } ObjLMemBlockHeader;
This is the standard Object Block header that begins every object block; you can set additional header fields with the
@header
Goc keyword. The fields of this structure are
OLMBH_header
LMemBlockHeader
structure type.
OLMBH_inUseCount
OLMBH_interactibleCount
OLMBH_output
TravelOption
TO_OBJ_BLOCK_OUTPUT.
OLMBH_resourceSize
typedef ByteEnum ObjRelocationSource; #define ORS_NULL 0 #define ORS_OWNING_GEODE 1 #define ORS_KERNEL 2 #define ORS_LIBRARY 3 #define ORS_CURRENT_BLOCK 4 #define ORS_VM_HANDLE 5 #define ORS_OWNING_GEODE_ENTRY_POINT 6 #define ORS_NON_STATE_VM 7 #define ORS_UNKNOWN_BLOCK 8 #define ORS_EXTERNAL 9 #define RID_SOURCE_OFFSET 12
typedef ByteEnum ObjRelocationType; #define RELOC_END_OF_LIST 0 #define RELOC_RELOC_HANDLE 1 #define RELOC_RELOC_SEGMENT 2 #define RELOC_RELOC_ENTRY_POINT 3
typedef struct { EvalStackOperatorType OSE_type; EvalStackOperatorType OSE_data; } OperatorStackElement;
typedef ByteEnum OperatorType; #define OP_RANGE_SEPARATOR 0 #define OP_NEGATION 1 #define OP_PERCENT 2 #define OP_EXPONENTIATION 3 #define OP_MULTIPLICATION 4 #define OP_DIVISION 5 #define OP_MODULO 6 #define OP_ADDITION 7 #define OP_SUBTRACTION 8 #define OP_EQUAL 9 #define OP_NOT_EQUAL 10 #define OP_LESS_THAN 11 #define OP_GREATER_THAN 12 #define OP_LESS_THAN_OR_EQUAL 13 #define OP_GREATER_THAN_OR_EQUAL 14 #define OP_STRING_CONCAT 15 #define OP_RANGE_INTERSECTION 16 #define OP_NOT_EQUAL_GRAPHIC 17 #define OP_DIVISION_GRAPHIC 18 #define OP_LESS_THAN_OR_EQUAL_GRAPHIC 19 #define OP_GREATER_THAN_OR_EQUAL_GRAPHIC 20 #define OP_PERCENT_MODULO 21 #define OP_SUBTRACTION_NEGATION 22
typedef ByteEnum PageEndCommand; #define PEC_FORM_FEED 0 #define PEC_NO_FORM_FEED 1
This enumerated type is used to specify whether there should be a form feed at the end of a page. A form feed is almost always desired; however, a program such as a banner-printer might suppress the form feed.
typedef union { PageLayoutPaper PL_paper; PageLayoutEnvelope PL_envelope; PageLayoutLabel PL_label; } PageLayout;
typedef WordFlags PageLayoutEnvelope; #define PLE_PATH 0x0040 #define PLE_ORIENTATION 0x0010 #define PLE_TYPE 0x0004
typedef WordFlags PageLayoutLabel; #define PLL_ROWS 0x7e00 /* labels down */ #define PLL_COLUMNS 0x01f8 /* labels across */ #define PLL_TYPE 0x0004 /* PT_LABEL */
typedef WordFlags PageLayoutPaper; #define PLP_ORIENTATION 0x0008 #define PLP_TYPE 0x0004
typedef struct { word unused; word PS_width; word PS_height; PageLayout PS_layout; } PageSize;
typedef WordFlags PageSizeCtrlAttrs; #define PZCA_ACT_LIKE_GADGET 0x8000 #define PZCA_PAPER_SIZE 0x4000 #define PZCA_INITIALIZE 0x2000
typedef ByteFlags PageSizeControlFeatures; #define PSIZECF_MARGINS 0x04 #define PSIZECF_ALL 0x02 #define PSIZECF_PAGE_TYPE 0x01
typedef struct { dword PSR_width; dword PSR_height; PageLayout PSR_layout; PCMarginParams PSR_margins; } PageSizeReport:
typedef ByteEnum PaperOrientation; #define PO_PORTRAIT 0x00 #define PO_LANDSCAPE 0x01
typedef enum { PARALLEL_LPT1 = 0, PARALLEL_LPT2 = 2, PARALLEL_LPT3 = 4, PARALLEL_LPT4 = 6, } ParallelUnit;
typedef ByteFlags ParserFlags; #define PF_HAS_LOOKAHEAD 0x80 #define PF_CONTAINS_DISPLAY_FUNC 0x40 #define PF_OPERATORS 0x20 #define PF_NUMBERS 0x10 #define PF_CELLS 0x08 #define PF_FUNCTIONS 0x04 #define PF_NAMES 0x02 #define PF_NEW_NAMES 0x01
typedef struct { CommonParameters PP_common; word PP_parserBufferSize; ParserFlags PP_flags; dword PP_textPtr; ScannerToken PP_currentToken; ScannerToken PP_lookAheadToken; byte PP_error; /* ParserScannerEvaluatorError */ word PP_tokenStart; word PP_tokenEnd; } ParserParameters;
typedef ByteEnum ParserScannerEvaluatorError; /* * Scanner errors */ #define PSEE_BAD_NUMBER 0 #define PSEE_BAD_CELL_REFERENCE 1 #define PSEE_NO_CLOSE_QUOTE 2 #define PSEE_COLUMN_TOO_LARGE 3 #define PSEE_ROW_TOO_LARGE 4 #define PSEE_ILLEGAL_TOKEN 5 /* * Parser errors */ #define PSEE_GENERAL 6 #define PSEE_TOO_MANY_TOKENS 7 #define PSEE_EXPECTED_OPEN_PAREN 8 #define PSEE_EXPECTED_CLOSE_PAREN 9 #define PSEE_BAD_EXPRESSION 10 #define PSEE_EXPECTED_END_OF_EXPRESSION 11 #define PSEE_MISSING_CLOSE_PAREN 12 #define PSEE_UNKNOWN_IDENTIFIER 13 #define PSEE_NOT_ENOUGH_NAME_SPACE 14 /* * Serious evaluator errors */ #define PSEE_OUT_OF_STACK_SPACE 15 #define PSEE_NESTING_TOO_DEEP 16 /* * Evaluator errors that are returned as the result of formulas. * These are returned on the argument stack. */ #define PSEE_ROW_OUT_OF_RANGE 17 #define PSEE_COLUMN_OUT_OF_RANGE 18 #define PSEE_FUNCTION_NO_LONGER_EXISTS 19 #define PSEE_BAD_ARG_COUNT 20 #define PSEE_WRONG_TYPE 21 #define PSEE_DIVIDE_BY_ZERO 22 #define PSEE_UNDEFINED_NAME 23 #define PSEE_CIRCULAR_REF 24 #define PSEE_CIRCULAR_DEP 25 #define PSEE_CIRC_NAME_REF 26 #define PSEE_NUMBER_OUT_OF_RANGE 27 #define PSEE_GEN_ERR 28 #define PSEE_NA 29 /* * Dependency errors */ #define PSEE_TOO_MANY_DEPENDENCIES 30 #define PSEE_SSHEET_BASE 0xc0 #define PSEE_FLOAT_BASE 250 #define PSEE_APP_BASE 230 #define PSEE_FLOAT_POS_INFINITY PSEE_FLOAT_BASE #define PSEE_FLOAT_NEG_INFINITY (PSEE_FLOAT_BASE + 1) #define PSEE_FLOAT_GEN_ERR (PSEE_FLOAT_BASE + 2)
typedef union { ParserTokenNumberData PTD_number; ParserTokenStringData PTD_string; ParserTokenNameData PTD_name; ParserTokenCellData PTD_cell; ParserTokenFunctionData PTD_function; ParserTokenOperatorData PTD_operator; } ParserTokenData;
typedef ByteEnum ParserTokenType; #define PARSER_TOKEN_NUMBER 0 #define PARSER_TOKEN_STRING 1 #define PARSER_TOKEN_CELL 2 #define PARSER_TOKEN_END_OF_EXPRESSION 3 #define PARSER_TOKEN_OPEN_PAREN 4 #define PARSER_TOKEN_CLOSE_PAREN 5 #define PARSER_TOKEN_NAME 6 #define PARSER_TOKEN_FUNCTION 7 #define PARSER_TOKEN_CLOSE_FUNCTION 8 #define PARSER_TOKEN_ARG_END 9 #define PARSER_TOKEN_OPERATOR 10
typedef enum /* word */ { PCT_NULL, /* wipe out old path */ PCT_REPLACE, /* replace old path with upcoming path */ PCT_UNION, /* union old path with new */ PCT_INTERSECTION /* intersect old path with new */ } PathCombineType;
typedef ByteEnum PatternType; #define PT_SOLID 0 #define PT_SYSTEM_HATCH 1 #define PT_SYSTEM_BITMAP 2 #define PT_USER_HATCH 3 #define PT_USER_BITMAP 4 #define PT_CUSTOM_HATCH 5 #define PT_CUSTOM_BITMAP 6
typedef struct { dword PCDSP_width; dword PCDSP_height; } PCDocSizeParams;
Use this structure to communicate document sizes to a Print Control.
typedef struct { word PCMP_left; /* left margin */ word PCMP_top; /* top margin */ word PCMP_right; /* right margin */ word PCMP_bottom; /* bottom margin */ } PCMarginParams
This structure holds information about a document's or printer's margins.
typedef ByteEnum PDAType; #define PDAT_PC_EMULATOR 0x0 #define PDAT_N9000 0x1 #define PDAT_N9000i 0x2
These values correspond to the different Nokia 9000 Communicator hardware platforms. They are only available on builds 4 or newer of the device (see Versions for more information).
Include: respondr.goh
See Also:
RespGetPDAHardwareInfo()
typedef struct { sbyte PD_hotX; sbyte PD_hotY; byte PD_mask[CURSOR_IMAGE_SIZE_32]; byte PD_image[CURSOR_IMAGE_SIZE_32]; } PointerDef32; STANDARD_CURSOR_IMAGE_SIZE = 32
This structure defines a mouse pointer.
typedef struct { WWFixed PF_x; WWFixed PF_y; } PointWWFixed;
These structures are used to specify graphics point coordinates. Which point structure to use depends on size of the coordinate space and accuracy required.
typedef WordFlags PrintControlAttrs; #define PCA_MARK_APP_BUSY 0x2000 /* mark busy while printing */ #define PCA_VERIFY_PRINT 0x1000 /* verify before printing */ #define PCA_SHOW_PROGRESS 0x0800 /* show print progress dialog box */ #define PCA_PROGRESS_PERCENT 0x0400 /* show progress by percentage */ #define PCA_PROGRESS_PAGE 0x0200 /* show progress by page */ #define PCA_FORCE_ROTATION 0x0100 /* Force rotation of output */ #define PCA_COPY_CONTROLS 0x0080 /* Copy controls are available */ #define PCA_PAGE_CONTROLS 0x0040 /* Page range controls available */ #define PCA_QUALITY_CONTROLS 0x0020 /* Quality controls available */ #define PCA_USES_DIALOG_BOX 0x0010 /* Dialog box should appear */ #define PCA_GRAPHICS_MODE 0x0008 /* Supports graphics mode output */ #define PCA_TEXT_MODE 0x0004 /* Supports text mode output */ #define PCA_DEFAULT_QUALITY 0x0002 /* default print quality */
typedef ByteFlags PrintControlFeatures; #define PRINTCF_PRINT_TRIGGER 0x02 /* wants a print trigger */ #define PRINTCF_FAX_TRIGGER 0x01 /* wants a fax trigger */
typedef enum { PCS_PRINT_BOX_VISIBLE, PCS_PRINT_BOX_NOT_VISIBLE } PrintControlStatus;
typedef ByteFlags PrintControlToolboxFeatures; #define PRINTCTF_PRINT_TRIGGER 0x02 /* wants a print tool trigger */ #define PRINTCTF_FAX_TRIGGER 0x01 /* wants a fax tool trigger */
typedef enum PrinterDriverType; PDT_PRINTER, PDT_PLOTTER, PDT_FACSIMILE, PDT_CAMERA, PDT_OTHER, } PrinterDriverType;
This enumerated type indeicates the type of printer driver that we are dealing with.
typedef ByteFlags PrinterOutputModes; #define POM_GRAPHICS_LOW 0x10 #define POM_GRAPHICS_MEDIUM 0x08 #define POM_GRAPHICS_HIGH 0x04 #define POM_TEXT_DRAFT 0x02 #define POM_TEXT_NLQ 0x01 #define PRINT_GRAPHICS = (POM_GRAPHICS_LOW | POM_GRAPHICS_MEDIUM | POM_GRAPHICS_HIGH )
#define PRINT_TEXT = (POM_TEXT_DRAFT | POM_TEXT_NLQ)
typedef struct { word PN_major; word PN_minor; } ProtocolNumber;
Defines the protocol level of a file, geode, or document.
PN_major
represents significant compatibility comparisons, and
PN_minor
represents less significant differences. If the major protocol is different between to items, they are incompatible. If the minor protocol is different, they may or may not be incompatible.
typedef struct _QuickSortParameters { word _pascal (*QSP_compareCallback) (void * el1, void * el2,
word valueForCallback)); void _pascal (*QSP_lockCallback) (void *el, word valueForCallback)); void _pascal (*QSP_unlockCallback) (void *el, word valueForCallback)); word QSP_insertLimit; word QSP_medianLimit; /* These are set internally by the quicksort algorithm and should not * be set by the caller: */ word QSP_nLesser; word QSP_nGreater; } QuickSortParameters;
This structure is passed to
ArrayQuickSort
. The fields have the following meanings:
*
QSP
_compareCallback
*
QSP
_lockCallback
ArrayQuickSort
examines or changes any element. It should be declared _pascal. You can pass a null function pointer, indicating that no locking callback routine should be called.
*
QSP
_lockCallback
ArrayQuickSort
examines or changes any element. It should be declared _pascal. You can pass a null function pointer, indicating that no unlocking callback routine should be called.
_insertLimit
_insertLimit
elements in a sublist,
ArrayQuickSort
will use an insertion sort for that sublist, rather than a QuickSort.
_medianLimit
_medianLimit
elements in a sublist, ArrayQuickSort will use the first element as a partition, instead of searching for the median element.typedef ByteFlags RangeEnumFlags; #define REF_ALL_CELLS 0x80 #define REF_NO_LOCK 0x40 #define REF_COLUMN_FLAGS 0x20 #define REP_MATCH_COLUMN_FLAGS 0x10 #define REF_CELL_ALLOCATED 0x08 #define REF_CELL_FREED 0x04 #define REF_OTHER_ALLOC_OR_FREE 0x02 #define REF_COLUMN_FLAGS_MODIFIED 0x01
These flags are used by
RangeEnum()
.
typedef struct { PCB(RANGE_ENUM_CALLBACK_RETURN_TYPE, REP_callback, (RangeEnumCallbackParams));
Rectangle REP_bounds; byte REP_columnFlags; word *REP_columnFlagsArray; CellFunctionParameters *REP_cfp; byte REP_matchFlags; word *REP_locals; } RangeEnumParams;
This structure is used by two routines,
RangeEnum()
and
CellGetExtent()
. When it is used by
RangeEnum()
, the structure specifies all the details about how
RangeEnum()
will function.
CellGetExtent()
is passed a blank
RangeEnumParams
structure; it fills in the
REP_bounds
field.
The callback routine, if any, should be declared _pascal.
Include: cell.h
typedef ByteFlags RangeSortCellExistsFlags; #define RSCEF_SECOND_CELL_EXISTS 0x02 #define RSCEF_FIRST_CELL_EXISTS 0x01
typedef ByteFlags RangeSortFlags; #define RSF_SORT_ROWS 0x80 #define RSF_SORT_ASCENDING 0x40 #define RSF_IGNORE_CASE 0x20
typedef struct { Rectangle RSP_range; Point RSP_active; dword RSP_callback; byte RSP_flags; /* RangeSortFlags */ dword RSP_cfp; word RSP_sourceChunk; word RSP_destChunk; word RSP_base; dword RSP_lockedEntry; byte RSP_cachedFlags; } RangeSortParams;
typedef struct { RecordID RH_id; word RH_size; byte RH_fieldCount; } RecordHeader;
Structure containing metadata about a record; first
FieldHeader
follows.
typedef dword RecordID;
Uniquely identifies a record in a datastore; this value stays constant and does not change when other records are added or deleted.
typedef dword RecordNum;
Specifies relative place in the datastore; this value may change when other records are added or deleted.
typedef struct { sword R_left; sword R_top; sword R_right; sword R_bottom; } Rectangle;
This structure represents a graphics rectangle.
typedef struct { sdword RD_left; sdword RD_top; sdword RD_right; sdword RD_bottom; } RectDWord;
This structure represents a graphics rectangle.
typedef struct { word RR_y1M1; word RR_eo1; /* EOREGREC */ word RR_y2; word RR_x1; word RR_x2; word RR_eo2; /* EOREGREC */ word RR_eo3; /* EOREGREC */ } RectRegion;
typedef word Region; #define EOREGREC 0x8000 #define EOREG_HIGH 0x80
This structure represents a region of a graphics coordinate space.
Regions are described in terms of a rectangular array (thus the similarity to bitmaps). Instead of specifying an on/off value for each pixel, however, regions assume that the region will be fairly undetailed and that the data structure can thus be treated in the manner of a sparse array. Only the cells in which the color value of a row changes are recorded. The tricky part here is keeping in mind that when figuring out whether or not a row is the same as a previous row, the system works its way up from the bottom, so that you should compare each row with the row beneath it to determine whether it needs an entry.
The easiest region to describe is the null region, which is a special case described by a single word with the value EOREGREC (a constant whose name stands for E nd Of REG ion REC ord value). Describing a non-null region requires several numbers.
The first four numbers of the region description give the bounds of the region. Next come one or more series of numbers. Each series describes a row, specifying which pixels of that row are part of the region. The only rows which need to be described are those which are different from the row below. The first number of each row description is the row number, its y coordinate. The last number of each series is a special token, EOREGREC, which lets the kernel know that the next number of the description will be the start of another row. Between the row number and EOREGREC are the column numbers where the pixels toggle on and off. The first number after the row number corresponds to the first column in which the pixel is on; the next number is the first subsequent column in which the pixel is off; and so on.
typedef ByteEnum RegionFillRule; #define ODD_EVEN 0 #define WINDING 1
This enumerated type determines how a path or region should be filled. Winding fill is more versatile, but requires that the path or polygon's edges run in the correct direction.
typedef struct { word RN_major; word RN_minor; word RN_change; word RN_engineering; } ReleaseNumber;
Used to record what version a file, document, or geode is. This represents the release level; the most significant numbers are
RN_major
and
RN_minor
. The other fields are typically used only internally to a manufacturer.
typedef dword RGBColorAsDWord; RGB_RED(val) ( val & 0xff) RGB_GREEN(val) ( (val >> 8) & 0xff ) RGB_BLUE(val) ( (val >> 16) & 0xff ) RGB_INDEX(val) ( (val >> 24) & 0xff )
See the
ColorQuad
data structure to find out the meanings of the fields.
typedef struct { byte RGBT_red[256]; byte RGBT_green[256]; byte RGBT_blue[256]; } RGBTransfer;
typedef struct { word SACA_opaqueSize; /* label byte SACA_opaque; */ /* user-readable form of address follows opaque address--use * SACA_opaqueSize to compute the offset to this data. */ } SACAddress;
The SocketAddressControl uses
SACAddress
structures to provide information about addresses.
Most programs won't need to look at the innards of this structure: they will just pass the opaque address information to
SocketResolve()
to make sure that the address is valid and reduce it to its primitive form.
However, if you need to construct a "raw" address to pass to
SocketResolve()
, you'll need to know the structure of the opaque address information. It's an
ExtendedSACAddress
buffer followed by a null-terminated user-readable connection address string..
The
ExtendedSACAddress
buffer consists of:
LinkType
value (one of LT_ADDR, LT_ID, or LT_DEFAULT), and parameters to identify the link. If the
LinkType
is LT_DEFAULT, then there are no further parameters. If the
LinkType
is LT_ID, then there is a word-length
LinkID
which acts as a permanent identifier for the link. If the
LinkType
is LT_ADDR, the parameter is a string which will be appended to the user-readable connection address string, surrounded by parentheses.Include: sac.goh
typedef struct { DACSampleFormat SMID_format:15; DACReferenceByte SMID_reference:1; } SampleFormat;
typedef struct { word SFD_manufact; word SFD_format; word SFD_rate; word SFD_playFlags; } SampleFormatDescription;
This structure acts as a header for a sampled sound, giving format information needed to properly interpret the sound data.
typedef union { ScannerTokenNumberData STD_number; ScannerTokenStringData STD_string; ScannerTokenCellData STD_cell; ScannerTokenIdentifierData STD_identifier; ScannerTokenOperatorData STD_operator; } ScannerTokenData;
typedef struct { word STSD_start; word STSD_length; } ScannerTokenStringData;
typedef ByteEnum ScannerTokenType; #define SCANNER_TOKEN_NUMBER 0 #define SCANNER_TOKEN_STRING 1 #define SCANNER_TOKEN_CELL 2 #define SCANNER_TOKEN_END_OF_EXPRESSION 3 #define SCANNER_TOKEN_OPEN_PAREN 4 #define SCANNER_TOKEN_CLOSE_PAREN 5 #define SCANNER_TOKEN_IDENTIFIER 6 #define SCANNER_TOKEN_OPERATOR 7 #define SCANNER_TOKEN_LIST_SEPARATOR 8
typedef word ScriptAttrAsWord; /* High byte is a vertical offset, as a fraction of the font size. Low byte is a fractional scale to use.
Thus, setting a subscript attr to 0x8020 would result in subscript characters being printed half a line down and at 1/4 normal size. */
This structure specifies the offset and scale factor with which sub- and superscript characters should draw.
typedef ByteFlags SearchFlags; #define SF_BACKWARDS 0x80 #define SF_START_AT_END 0x40 #define SF_IGNORE_CASE 0x20 #define SF_NO_WILDCARDS 0x10 #define SF_PARTIAL_WORD 0x08
Flags to define search parameters; see
SearchParams
and
DataStoreStringSearch()
.
typedef struct { SearchType SP_searchType; dword SP_maxRecords; FieldID SP_startField; FieldCategory SP_category; TCHAR *SP_searchString; SearchFlags SP_flags; } SearchParams;
Structure for specifying search conditions when calling
DataStoreStringSearch()
.
typedef ByteEnum SearchType; #define ST_ALL 1 /* search all string fields */ #define ST_FIELD 2 /* search by FieldID */ #define ST_CATEGORY 3 /* search by FieldCategory */
Values to specify in search parameters; see
SearchParams
and
DataStoreStringSearch()
.
typedef enum { SE_NO_ERROR, /* No error occurred */ SE_TIMEOUT, /* The semaphore timed out before * it could be grabbed by the thread */
SE_PREVIOUS_OWNER_DIED /* The current holder of the semaphore * exited abnormally */
} SemaphoreError;
Determines the error encountered by semaphore and threadlock routines such as
ThreadPSem()
and
ThreadPTimedSem()
.
typedef enum { SERIAL_BAUD_115200 = 1, SERIAL_BAUD_57600 = 2, SERIAL_BAUD_38400 = 3, SERIAL_BAUD_19200 = 6, SERIAL_BAUD_14400 = 8, SERIAL_BAUD_9600 = 12, SERIAL_BAUD_7200 = 16, SERIAL_BAUD_4800 = 24, SERIAL_BAUD_3600 = 32, SERIAL_BAUD_2400 = 48, SERIAL_BAUD_2000 = 58, SERIAL_BAUD_1800 = 64, SERIAL_BAUD_1200 = 96, SERIAL_BAUD_600 = 192, SERIAL_BAUD_300 = 384 } SerialBaud;
typedef ByteFlags SerialFormat; #define SERIAL_FORMAT_DLAB_OFFSET (7) #define SERIAL_FORMAT_DLAB (0x01 << SERIAL_FORMAT_DLAB_OFFSET) #define SERIAL_FORMAT_BREAK_OFFSET (6) #define SERIAL_FORMAT_BREAK (0x01 << SERIAL_FORMAT_BREAK_OFFSET) #define SERIAL_FORMAT_PARITY_OFFSET (3) #define SERIAL_FORMAT_PARITY (0x07 << SERIAL_FORMAT_PARITY_OFFSET) #define SERIAL_FORMAT_EXTRA_STOP_OFFSET (2) #define SERIAL_FORMAT_EXTRA_STOP (0x01 << \ SERIAL_FORMAT_EXTRA_STOP_OFFSET)
#define SERIAL_FORMAT_LENGTH_OFFSET (0) #define SERIAL_FORMAT_LENGTH (0x03 << SERIAL_FORMAT_LENGTH_OFFSET)
typedef ByteFlags SerialModem; #define SMC_RTS 0x02 /* Request-To-Send (1 asserts it) */ #define SMC_DTR 0x01 /* Data-Terminal Ready (1 asserts it) */ #define SERIAL_MODEM_RTS_OFFSET (1) #define SERIAL_MODEM_DTR_OFFSET (0) #define SERIAL_MODEM_DTR (0x01 << SERIAL_MODEM_DTR_OFFSET)
typedef enum { SERIAL_COM1 = 0, SERIAL_COM2 = 2, SERIAL_COM3 = 4, SERIAL_COM4 = 6, SERIAL_COM5 = 8, SERIAL_COM6 = 10, SERIAL_COM7 = 12, SERIAL_COM8 = 14 } SerialPortNum;
typedef byte SerifFace; #define SF_SLAB 0x00c0 #define SF_MODERN 0x0080 #define SF_TRANS 0x0040 #define SF_OLD 0x0000
typedef ByteFlags ShiftState; #define SS_LALT 0x80 #define SS_RALT 0x40 #define SS_LCTRL 0x20 #define SS_RCTRL 0x10 #define SS_LSHIFT 0x08 #define SS_RSHIFT 0x04 #define SS_FIRE_BUTTON_1 0x02 #define SS_FIRE_BUTTON_2 0x01
Modifiers which will be incorporated into input information. Corresponds to alt keys, control keys, shift keys, or special system modifiers. Note that these bits will only be set if not already accounted for; that is, if you are passed the character "E", the shift modifiers of this structure will not be marked.
typedef word Socket;
A Socket represents one side of a communication managed by the Socket library.
Include: socket.goh
typedef struct { SocketPort SA_port; word SA_domainSize; /* size in bytes of SA_domain buffer */ char *SA_domain; /* null terminated domain name */ word SA_addressSize; /* size in bytes of address data */ } SocketAddress;
Addresses are made up of a port number, a domain, and address data:
SocketPort
structure.
SA_domain
is a pointer to the null-terminated domain name string and
SA_domainSize
is the size of the buffer containing the domain name string.
SocketAddress
structure. This means that you should have allocated memory for SA_domain, and initialized
SA_domain
and
SA_domainSize
.
SA_addressSize
field contains the size of the address data. The buffer containing the address data should fall immediately after the
SocketAddress
structure.
SocketAddress
structure. This means that you should leave room for address data after the structure and initialize the
SA_addressSize
field.Include: socket.goh
typedef WordFlags SocketBindFlags; #define SBF_REUSE_PORT (0x8000)
These flags are used to specify options when binding a socket to a port.
There is only one flag: SBF_REUSE_PORT, requesting that the socket be bound to the port even if another socket is already bound to it. You may not use this flag with datagram sockets.
typedef struct { word SCR_socket; SocketCondition SCR_condition; byte SCR_reserved; } SocketCheckRequest; typedef ByteEnum SocketCondition; #define SC_READ 0x0 /* data arrived */ #define SC_WRITE 0x1 /* data can be written */ #define SC_ACCEPT 0x2 /* connect request arrived */ #define SC_EXCEPTION 0x3 /* an exception occurred */ #define SC_URGENT 0x4 /* urgent data arrived */
A
SocketCheckRequest
is used to query a socket about whether it is ready to carry out some operation. You will need to set two fields:
Include: socket.goh
SocketDeliveryType; #define SDT_DATAGRAM 0x0 /* unreliable packets */ #define SDT_SEQ_PACKET 0x1 /* reliable packets */ #define SDT_STREAM 0x2 /* reliable bytes */
Include: socket.goh
typedef enum { SE_NORMAL = 0x0, /* operation completed successfully */ SE_OUT_OF_MEMORY, /* * the net library was unable to allocate memory * either there is no more system memory available, or a net-library * specific upper bound on memory usage has been exceeded */ SE_PORT_IN_USE, /* * Another socket is already bound to this port, and the * SBF_REUSE_PORT flag was not set. */ SE_PORT_ALREADY_LISTENING, /* Another socket is already listening on this port. */ SE_SOCKET_IN_USE, /* * The socket is already being used in a way inconsistent with the * requested operation */ SE_SOCKET_ALREADY_BOUND, /* The socket is already bound to a port. */ SE_SOCKET_NOT_BOUND, /* The socket must be bound to a port for the requested operation. */ SE_SOCKET_NOT_LISTENING, /* The socket must be listening on a port for the requested operation. */ SE_SOCKET_LISTENING, /* A listening socket cannot be used for outgoing connections */ SE_CONNECTION_REFUSED, /* Nobody is listening on the remote port. */ SE_CONNECTION_FAILED, /* The connection is no longer valid, probably due to a * link failure. */ SE_CONNECTION_CLOSED, /* The connection has been closed from the other end. */ SE_NON_UNIQUE_CONNECTION, /* Another connection with the same endpoint addresses and ports exists. */ SE_TIMED_OUT, /* * The timeout period expired before the operation completed. * In some cases the protocol may enforce a shorter timeout then * the user-specified value, so this is possible even where * SOCKET_NO_TIMEOUT is used. */ SE_CANT_LOAD_DRIVER, /* A driver required to establish the connection could * not be loaded. */ SE_UNKNOWN_DOMAIN, /* The requested domain is not known to the libarary. */ SE_SYSTEM_SHUTDOWN, /* The operation was aborted because GEOS is exiting */ SE_SOCKET_NOT_CONNECTED, /* The operation requires a connected socket */ SE_SOCKET_ALREADY_CLOSED, /* The send side of the socket is already closed */ SE_SOCKET_BUSY, /* Another thread is operating on the socket */ SE_IMPROPER_CONDITION, /* * The requested condition for SocketCheckReady is not valid * for a socket in the current state */ SE_INFO_NOT_AVAILABLE, /* The driver could not provide the requested information */ SE_DOMAIN_REQUIRES_16BIT_PORTS, /* * The requested domain only allows 16 bit port numbers. The * SP_manuf field must be set to MANUFACTURER_ID_SOCKET_16BIT_PORT */ SE_CONNECTION_ERROR, /* * The connection was not made for some reason which does not have * it's own specific SocketError */ SE_MEDIUM_BUSY, /* The medium required for the connection is not available */ SE_DESTINATION_UNREACHABLE, /* The requested destination is not available */ SE_LINK_FAILED, /* * The low level link used for this connection failed or could not be * established */ SE_INTERNAL_ERROR, /* * The socket library received an impossible error code from the driver. * Either the library or the driver has a bug. */ SE_CLOSE_SEND_NOT_SUPPORTED, /* * It is not possible to close only the send side of a socket in this * domain. Use SocketClose instead. */ SE_BIND_CONFLICT, /* * The same port cannot have both domain restricted and * domain unrestricted bindings. */ SE_ALL_PORTS_BUSY, /* * SocketConnect attempted to implicitly bind a socket, * but failed because all port numbers in the range used by * implicit binds were in use */ SE_SOCKET_NOT_INTERRUPTIBLE, /* * An operation which cannot be interrupted is in in progress on the * socket */ SE_INTERRUPT, /* The operation was interrupted with SocketInterrupt */ SE_PORT_NOT_LISTENING, /* No listening socket or LoadOnMsg request exists for this port */ SE_LISTEN_QUEUE_EMPTY, /* No connections are pending for this port */ SE_SOCKET_CLOSED, /* The socket must be open for sending to call either * SocketGetSocketName or SocketGetPeerName */ SE_BUFFER_TOO_SMALL, /* Returned by SocketResolve to mean that buffer for resolved * address is too small */ SE_TEMPORARY_ERROR, /* Returned by SocketResolve to indicate that address resolution * is temporarily unavailable for external reasons( such as * network down or server failure )*/ SE_EXCEPTION, SE_URGENT = SE_EXCEPTION, /* Returned by SocketRecv to indicate that some urgent data * arrived on a reliable socket or an exception was received * for a datagram socket */ SE_NOT_IMPLEMENTED, /* Returned by API functions which are not yet implemented */ SE_CONNECTION_RESET /* The connection was reset by the peer, by the local driver (perhaps * in response to SocketCloseDomainMedium()), or by the Socket library * because the Socket is freed when its owning thread exits. */ } SocketError;
Certain socket routines generate error values or generate thread errors under certain conditions. The error value will consist of a word-length value: a
SocketError
value in the low byte, and perhaps a
SpecSocketDrError
value in the high byte.
typedef enum { SLT_USER_LOAD_APPLICATION = 0x0, SLT_GEODE_LOAD, } SocketLoadType;
The Socket library has the ability to load an application when it senses packet coming in to a port. It uses the
SocketLoadType
to determine how to load the application: via
UserLoadApplication()
or
GeodeLoad()
.
Include: socket.goh
typedef enum { SO_RECV_BUF = 0x0, /* receive buffer size */ SO_SEND_BUF = 0x2, /* send buffer size */ SO_INLINE = 0x4, /* inline urgent data */ SO_NODELAY = 0x6, /* send data immediately */ SO_OWNER = 0x8, /* which app owns socket */ } SocketOption;
Various options which may be changed on a per-Socket basis by means of the
SocketSetIntSocketOption()
routine.
Include: socket.goh
typedef struct { word SP_port; /* 16-bit port number */ ManufacturerID SP_manuf; /* 16-bit manufacturer's ID */ } SocketPort;
Port numbers identify a particular line of communication within a machine. Port numbers may be 32-bit or 16-bit, depending on the domain. They are specified via the
SocketPort
structure, made up of a 16-bit
ManufacturerID
and 16-bit token number. If the domain uses 16-bit socket numbers, then use MANUFACTURER_ID_SOCKET_16BIT_PORT as the
ManufacturerID
. If the domain allows 32-bit socket numbers, then you may use MANUFACTURER_ID_SOCKET_16BIT_PORT or some other
ManufacturerID
.
Include: socket.goh
typedef WordFlags SocketRecvFlags; #define SRF_ADDRESS (0x8000) /* return source address of data */ #define SRF_URGENT (0x4000) /* return urgent data, if any */ #define SRF_PEEK (0x2000) /* leave data in socket */
These flags allow you to set options when receiving data from a socket. SRF_ADDRESS requests the address of the machine sending the data. SRF_URGENT requests that only urgent data be returned, if any. SRF_PEEK asks that the data be left on the socket.
Include: socket.goh
typedef WordFlags SocketSendFlags; #define SSF_ADDRESS (0x8000) /* an address is supplied */ #define SSF_URGENT (0x4000) /* this is urgent data */ #define SSF_OPEN_LINK (0x2000) /* this datagram should open the * link, if it is closed */
Use this structure to specify options when sending data over a socket. You may signal that you are specifying an address and/or that the packet sent should be marked urgent.
Include: socket.goh
typedef WordFlags SoundDriverCapability; #define SDC_NOISE 0x8000 #define SDC_WAVEFORM 0x6000 #define SDC_TIMBRE 0x1800 #define SDC_ENVELOPE 0x0600 typedef WordFlags SoundDriverNoiseCapability; #define SDNC_NO_NOISE 0x0000 #define SDNC_WHITE_NOISE 0x8000 typedef WordFlags SoundDriverWaveFormCapability #define SDWFC_NONE 0x0000 #define SDWFC_SELECT 0x2000 #define SDWFC_GENERATE 0x4000 typedef WordFlags SoundDriverTimbreCapability; #define SDTC_TONE_GENERATOR 0x0000 #define SDTC_ADDITIVE 0x0800 #define SDTC_MODULATOR 0x1000 #define SDTC_SELECTIVE 0x1800 typedef WordFlags SoundDriverEnvelopeCapability; #define SDEC_NONE 0x0000 #define SDEC_ADSR 0x0200 #define SDEC_DSP 0x0400
These fields encode information about what the sound driver is capable of in terms of music synthesis.