typedef struct { int16_t *cb_pcontrol; /* Pointer to control array */ int16_t *cb_pglobal; /* Pointer to global array */ int16_t *cb_pintin; /* Pointer to int_in array */ int16_t *cb_pintout; /* Pointer to int_out array */ int16_t *cb_padrin; /* Pointer to adr_in array */ int16_t *cb_padrout; /* Pointer to adr_out array */ } AESPB;
Describes (animated) mouse shape
typedef struct { int16_t frames; /* Number of frames in shape */ int16_t delay; /* 50Hz tics to pause between frames */ MFORM form[32]; /* List of mouse forms */ } ANI_MOUSE;
See also: graf_mouse
Describes application flags
typedef struct { unit8_t name[13]; /* Filename pattern to use these flags */ unit8_t desc[17]; /* User-defined description of flags */ APFLG flags; /* Execution flags */ KEYCODE open_key; /* Open application when this key is pressed */ KEYCODE reserve_key[3]; /* Application uses these keys, so don't let */ /* Geneva process them */ } APPFLAGS;
See also: x_appl_flags APFLG KEYCODE
Application bit flags
typedef union { struct { unsigned multitask :1; /* 1: Multitasking */ unsigned special_types:1; /* 1: Use extended object types */ unsigned round_buttons:1; /* 1: Use rounded EXIT buttons */ unsigned kbd_equivs :1; /* 1: Use auto keyboard equivs */ unsigned undo_equivs :1; /* 1: Undraw when form_do exits */ unsigned off_left :1; /* 1: Allow windows off left edge */ unsigned exit_redraw :1; /* 1: Redraw everything at quit */ unsigned AES40_msgs :1; /* 1: New messages for AES 4.0 OK */ unsigned limit_handles:1; /* 1: Limit window handles to 1-7 */ unsigned limit_memory :1; /* 1: Limit Malloc's */ unsigned keep_deskmenu:1; /* 1: Keep desktop/menu bar */ unsigned clear_memory :1; /* 1: Clear Malloc'd memory */ unsigned maximize_wind:1; /* 1: Omit unnecessary gadgets */ unsigned optim_redraws:1; /* 1: Optimize window redraws (rel 004) */ unsigned unused :2; /* Reserved for future use */ unsigned mem_limit :16; /* Kb to limit memory allocation */ } s; unit32_t l; /* longword to access all bits */ } APFLG;
The multitask and limit_handles flags must not be changed for a process which is already in memory.
optim_redraws is present since release 004.
See also: x_appl_flags APPFLAGS
This structure is defined as follows:
typedef struct { int32_t type; /* Type of event */ int32_t what; /* Exact description of the event */ } APPLRECORD
For the components the following apply:
type Meaning | what | ||||||||||||||
0 Timer event | Number of 20-millisecond ticks | ||||||||||||||
1 Button event | (high-WORD) Status of mouse buttons (0 = not depressed, 1 =
depressed):
(low-WORD) Number of clicks. | ||||||||||||||
2 Mouse event | X-coordinate (high-WORD), Y-coordinate (low-WORD) of hotspot | ||||||||||||||
3 Keyboard event |
|
Note: Under PC-GEM each event occupies only 6 bytes, as the component type of APPLRECORD is defined as a int16_t there.
See also: appl_tplay appl_trecord
A bit-image can always be used wherever a non-selectable icon could be placed; the crucial difference is that no mask exists for a bit-image. This structure is defined as follows:
typedef struct { int16_t *bi_pdata; /* Pointer to the graphics data */ int16_t bi_wb; /* Width of the image in bytes */ int16_t bi_hl; /* Height in lines */ int16_t bi_x; /* X-position, and */ int16_t bi_y; /* Y-position of top left corner */ int16_t bi_color; /* Colour */ } BITBLK;
Note: The width of a bit-image (component bi_wb) must always be divisible by 2.
See also: OBJECT AES object types
This structure is defined as follows:
typedef struct cicon_data { int16_t num_planes; /* Number of planes for the following data */ int16_t *col_data; /* Pointer to colour bitmap in standard form */ int16_t *col_mask; /* Pointer to individual colour plane mask */ int16_t *sel_data; /* Pointer to colour bitmap of selected icon */ int16_t *sel_mask; /* Pointer to individual plane mask of the icon */ struct cicon_data *next_res; /* Pointer to icon of other resolution */ } CICON;
See also: CICONBLK ICONBLK OBJECT
This structure is defined as follows:
typedef struct cicon_blk { ICONBLK monoblk; /* Default: monochrome icons */ CICON *mainlist; /* Colour icons for various resolutions */ } CICONBLK;
See also: OBJECT AES object structure
typedef struct clrcat { int16_t cc_foreground /* Foreground colour */ int16_t cc_background /* Background colour */ int16_t cc_style /* Fill style */ int16_t cc_pattern /* Fill pattern */ } CLRCAT;
The CLRCAT is used internally by ViewMAX/2 and later to store the colour categories.
See also: X_BUF_V2
typedef void *DIALOG;
typedef struct _dither_mode { struct _dither_mode *next; /* Pointer to successor */ int32_t length; /* Structure length */ int32_t format; /* Data format */ int32_t reserved; /* Reserved */ int32_t dither_id; /* Dither ID */ int32_t color_modes; /* Colour depths supported */ int32_t reserved1; /* Reserved */ int32_t reserved2; /* Reserved */ int8_t name[32]; /* Name of the dither process */ } DITHER_MODE;
See also: Print dialogs pdlg_add_printers
typedef struct _drv_entry { struct _drv_entry *next; /* Pointer to successor */ } DRV_ENTRY;
typedef struct { int32_t magic; /* 'pdnf' */ int32_t length; /* Structure length */ int32_t format; /* Data format */ int32_t reserved; /* Reserved */ int16_t driver_id; /* Driver number for the VDI */ int16_t driver_type; /* Driver type */ int32_t reserved1; /* Reserved */ int32_t reserved2; /* Reserved */ int32_t reserved3; /* Reserved */ PRN_ENTRY *printers; /* List of printers belonging to */ /* the driver */ DITHER_MODE *dither_modes; /* List of dither processes */ /* supported by the driver */ int32_t reserved4; /* Reserved */ int32_t reserved5; /* Reserved */ int32_t reserved6; /* Reserved */ int32_t reserved7; /* Reserved */ int32_t reserved8; /* Reserved */ int32_t reserved9; /* Reserved */ int8_t device[128]; /* Printer driver output file */ } DRV_INFO;
See also: Print dialogs pdlg_add_printers
typedef struct { int16_t mwhich; /* Type of events */ int16_t mx; /* X-coordinate of the mouse pointer */ int16_t my; /* Y-coordinate of the mouse pointer */ int16_t mbutton; /* Pressed mouse button */ int16_t kstate; /* Status of 'special' keys (kbshift) */ int16_t key; /* Scancode of pressed key */ int16_t mclicks; /* Number of mouse clicks */ int16_t reserved[9]; /* Reserved */ int16_t msg[16]; /* Message buffer */ } EVNT;
See also: fnts_evnt fslx_evnt wdlg_evnt
typedef struct _fnts_item { /* Pointer to next font, or 0L (end of list) */ struct _fnts_item *next; /* Pointer to display function for user fonts */ UTXT_FN display; /* Font ID, >= 65536 for user fonts */ int32_t id; /* Must be 0, as not a VDI font */ int16_t index; /* Flag for mono-spaced font */ int8_t mono; /* Flag for vector font */ int8_t outline; /* Number of predefined point sizes */ int16_t npts; /* Pointer to the complete name */ int8_t *full_name; /* Pointer to the family name */ int8_t *family_name; /* Pointer to the style name */ int8_t *style_name; /* Pointer to field with point sizes / int8_t *pts; /* Reserved, must be 0 */ int32_t reserved[4]; } FNTS_ITEM;
See also: fnts_add Font selection
typedef void *FNT_DIALOG;
typedef struct G_vectors /* Release 004 */ { int16_t used; int16_t (*keypress)( int32_t *key ); int16_t (*app_switch)( int8_t *process_name, int16_t apid ); int16_t (*gen_event)(void); } G_VECTORS;
used: | A bitmap of which vectors in the rest of the structure are used
by this version of Geneva. Currently this is 7, to indicate that the
first 3 vectors are used.
|
keypress: | This function is called whenever Geneva receives a key from the
keyboard. The A0 register points to a longword containing the keycode
of the key which was pressed:
bits 31-24 23-16 15-8 7-0 shift scan code unused ASCII This is just like the result of Bconin(2) with the result of Kbshift(-1) stored in the high byte. If the keypress function changes this longword to 0L, then the keypress will be ignored. If the longword is changed to some other value, then the new value will be processed. If the keypress function returns a value >= 0, then the application with that ID will receive a X_WM_VECKEY message during its next event loop. |
app_switch: | This function is called whenever the user performs some action
that causes the topmost application to change, like selecting a name
from the Desk menu or topping another application's window.
When called, the A0 register points to a string in appl_find format which is the name of the process that was switched to. The D0 register contains the application ID of the process. Under some circumstances, this function may be called even though the "new" application is already the topmost one. It is also possible for the "apid" in D0 to be -1, if Geneva is in the process of shutting down. If the app_switch function returns a value >= 0, then the application with that ID will receive a X_WM_VECSW message during its next event loop. |
gen_event: | This function is called continually by Geneva. It provides a
way for an application to have Geneva poll a certain condition and
generate an event if something occurs.
This can take the place of using evnt_multi with small timer values in order to poll a condition, and is much more efficient. It can be used in things like a corner clock to see when the time has changed to a new minute. If the gen_event function returns a value >= 0, then the application with that ID will receive a X_WM_VECEVNT message during its next event loop. |
Notes about using vectors:
A vector routine can change registers D0-D2/A0-A1. All others
must be preserved.
No vector routine can call the AES. The keypress and app_switch
vectors must not call GEMDOS functions. All other TOS services can be
used.
If a vector does not wish to generate an event, then it must
return a negative number, like -1.
A vector MUST follow the XBRA protocol. The only exception to
this is Geneva itself, which installs default vectors that do nothing
but return -1.
An application is responsible for removing itself from the
vector chain when it terminates. Failure to do so will most likely
cause a crash in the future. An application should use shel_write mode
9 to tell Geneva that it knows about the AP_TERM message and respond
to that message by removing itself from the list before quitting.
If your vector routine does not wish to generate an event, then
it should pass control through to the previous routine in the XBRA
chain.
If Geneva is running without MiNT, then the vector routines are
always called in supervisor mode. If running with MiNT, then the CPU
is in user mode. When MiNT is in memory protection mode, an
application which uses vectors must at least be in Readable mode, and
should most likely in Global mode.
See the files VECTEST.C and VECTESTS.S for an example.
See also: Cookie, Gnva
typedef int16_t (cdecl *HNDL_OBJ) ( void *dialog, EVNT *events, int16_t obj, int16_t clicks, void *data );
Parameter | Meaning | ||||
dialog | Pointer to a dialog structure. One should not access the structure directly; the wdlg_xx functions should be used! | ||||
events | If obj is an object number (>= 0), then events points to the EVNT structure that was passed by wdlg_evnt; otherwise events is basically 0L and can not be used for addressing | ||||
obj |
Of these function numbers one only has to react to HNDL_CLSD; all other events need only be paid attention to when needed | ||||
clicks | Number of mouse clicks (if obj is an object number). | ||||
data | If the parameter obj is a positive object number, then the variable user_data from the wdlg_create function will be passed here; otherwise the value depends on the corresponding function number |
Note: The function is called when an EXIT or TOUCHEXIT object has been clicked on (in this case obj is a positive object number) or when an event pertinent to the dialog has occurred (in that case obj is negative and contains a corresponding function number (see above)).
The parameters are passed via the stack and the routine may alter registers d0-d2/a0-a2. If the function is called with an unknown function number in obj, or one of the above function numbers is to be ignored, the value 1 must be returned.
See also: Sample implementation wdlg_create
/* The following code is an example for an implementation of the handle_exit function, such as that used as a parameter for wdlg_create, for instance. */ int16_t cdecl handle_exit( void *dialog, EVNT *events, int16_t obj, int16_t clicks, void *data ) { /* * Event or object number? * All events except HNDL_CLSD are ignored in this example */ if( obj < 0 ) { if( obj == HNDL_CLSD ) /* Closer activated? */ return( 0 ); /* Finish */ if( obj == HNDL_EDIT ) { /* In window-dialogs it may be useful to ignore key combinations with [Control] in input fields, so that keyboard shortcuts such as [Ctrl]-[U], [Ctrl]-[W] or [Ctrl]-[Q] for instance may be evaluated in the event loops of a program. In that case a 0 should be returned after HNDL_EDIT so that the key is not evaluated by objc_edit. */ } } else { /* An object has been selected */ switch( obj ) /* Initiate action (if needed) */ { case ... . . . case MY_EXIT_OBJECT: ..... return( 0 ); /* Finish */ } } return( 1 ); /* Continue */ }
data is the variable passed by wdlg_create.
If handle_exit returns 0, wdlg_create does not create a dialog structure (error).
The variable code is passed in clicks.
See also: HNDL_OBJ wdlg_create
data is user_data.
If handle_exit returns 0, the dialog will be closed - wdlg_evnt returns 0.
events points to the EVNT structure passed by wdlg_evnt.
HNDL_MESG is only passed if a message code between 20 and 39 was received that is not processed by other opcodes. Is required for iconification, for instance.
Warning: This opcode is only present from MagiC 4.5 of 18.4.96
See also: HNDL_OBJ wdlg_create
data is the variable passed by wdlg_open.
The variable code is passed in clicks.
See also: HNDL_OBJ wdlg_create
data is user_data.
If handle_exit returns 0, the dialog will be closed - wdlg_evnt returns 0.
events points to the EVNT structure passed by wdlg_evnt.
See also: HNDL_OBJ wdlg_create
data is user_data.
If handle_exit returns 0, the dialog will be closed - wdlg_evnt returns 0.
events points to the EVNT structure passed by wdlg_evnt.
See also: HNDL_OBJ wdlg_create
data is user_data.
If handle_exit returns 0, the dialog will be closed - wdlg_evnt returns 0.
events points to the EVNT structure passed by wdlg_evnt.
See also: HNDL_OBJ wdlg_create
data is user_data.
If handle_exit returns 0, the dialog will be closed - wdlg_evnt returns 0.
events points to the EVNT structure passed by wdlg_evnt.
See also: HNDL_OBJ wdlg_create
data points to a WORD with the key-code.
If handle_exit returns 1, the key press will be evaluated, if the return value is 0 it will be ignored.
events points to the EVNT structure passed by wdlg_evnt.
See also: HNDL_OBJ wdlg_create
data points to a WORD with the key-code.
events points to the EVNT structure passed by wdlg_evnt.
See also: HNDL_OBJ wdlg_create
data points to a WORD with the object number of the new editable field.
See also: HNDL_OBJ wdlg_create
typedef struct { uint16_t *ib_pmask; /* Pointer to the icon mask */ uint16_t *ib_pdata; /* Pointer to the icon image */ int8_t *ib_ptext; /* Pointer to the icon text */ uint16_t ib_char; /* Character that is to appear in the icon, as well as the foreground and background colour of the Icon */ uint16_t ib_xchar; /* X-coordinate of the character */ uint16_t ib_ychar; /* Y-coordinate of the character */ uint16_t ib_xicon; /* X-coordinate of the icon */ uint16_t ib_yicon; /* Y-coordinate of the icon */ uint16_t ib_wicon; /* Width of the icon */ uint16_t ib_hicon; /* Height of the icon */ int16_t ib_xtext; /* X-coordinate of the text */ int16_t ib_ytext; /* Y-coordinate of the text */ uint16_t ib_wtext; /* Width of the text */ uint16_t ib_htext; /* Height of the text */ uint16_t ib_resvd; /* Reserved */ } ICONBLK;
Notes about individual components:
ib_pmask: Pointer to a field of 16-bit values in which
the bit-image of the icon mask is stored. The icon mask determines at
which positions the icon is to be drawn, and which pixels are to
remain transparent. This effect is achieved by first ANDing the icon
background with the bits of the mask and then ORing this with the icon
data.
ib_char:
Bits | Meaning |
15..12 | Foreground colour of the icon |
11..08 | Background colour of the icon |
7.. 0 | Character that is to appear in icon |
ib_resvd: Unused, though it is recorded by most RCS
(Resource Construction Set) programs when
writing to the resource file.
For a colour icon under PC-GEM the following applies: In a colour icon, ib_pdata and ib_pmask point to MFDB objects. Otherwise, they point to the lines of the bitmap.
Keypress description
typedef struct { uint8_t shift; /* bit 0: Right Shift key held */ /* bit 1: Left Shift key held */ /* bit 2: Control key held */ /* bit 3: Alternate key held */ uint8_t scan; /* Scan code or zero */ uint8_t ascii; /* ASCII value or zero */ } KEYCODE;
ascii is compared first with the ASCII value of the key which was pressed. If this fails, the scan code is compared. Currently, the key will match if either bit 0 or bit 1 of "shift" is set, and either [Shift] key is held by the user.
See also: x_appl_flags APPFLAGS x_settings SETTINGS
typedef struct _lbox_item { struct _lbox_item *next; /* Pointer to the next entry in the list */ int16_t selected; /* Specifies whether the object is selected */ int16_t data1; /* Data for the program... */ void *data2; void *data3; } LBOX_ITEM;
However the structure can well look like the following example with appropriate casting during the call:
typedef struct { void *next; int16_t selected; ... From here on to suit the application ... } LB_EXAMPLE;
One only has to ensure that as the first element a pointer to the successor, and as the second element a WORD specifying whether the corresponding entry is selected are present.
See also:
lbox_create lbox_free_list lbox_get_idx lbox_get_item
lbox_get_items
typedef void *LIST_BOX;
Description of a paper format.
typedef struct _media_size { struct _media_size *next; /* Pointer to successor */ int32_t size_id; /* Paper format size ID */ int8_t name[32]; /* Name of the paper format */ } MEDIA_SIZE;
See also: Print dialogs pdlg_add_printers
Description of a paper type/print medium.
typedef struct _media_type { struct _media_type *next; /* Pointer to successor */ int32_t type_id; /* Paper format type ID */ int8_t name[32]; /* Name of the paper format */ } MEDIA_TYPE;
See also: Print dialogs pdlg_add_printers
typedef struct { OBJECT *mn_tree; /* The object tree of the menu */ int16_t mn_menu; /* The parent object of the menu items */ int16_t mn_item; /* The starting menu item */ int16_t mn_scroll; /* The scroll field status of the menu: */ /* 0 - The menu will not scroll */ /* >0 - The menu will scroll (no scrollbar) */ /* -1 - The menu will scroll (with scrollbar) */ /* (AES >= 4.1) */ int16_t mn_keystate; /* The [CTRL], [ALT], [SHIFT] key state at */ /* the time the mouse button was pressed */ } MENU;
See also: About the AES menu_attach menu_popup
The structure MFORM sets the appearance of the mouse pointer, and is defined as follows:
typedef struct mfstr { int16_t mf_xhot; /* X-position hot-spot */ int16_t mf_yhot; /* Y-position hot-spot */ int16_t mf_nplanes; /* Number of planes */ int16_t mf_fg; /* Mask colour */ int16_t mf_bg; /* Pointer colour */ int16_t mf_mask[16]; /* Mask form */ int16_t mf_data[16]; /* Pointer form */ } MFORM;
See also: About the AES graf_mouse
typedef struct { int32_t display; /* Submenu display delay */ int32_t drag; /* Submenu drag delay */ int32_t delay; /* Single-click scroll delay */ int32_t speed; /* Continuous scroll delay */ int16_t height; /* Menu scroll height (in items) */ /* (applied when mn_scroll of MENU is >0) */ } MN_SET;
The delay values are measured in milliseconds.
See also: About the AES menu_settings
typedef struct { int16_t ob_next; /* The next object */ int16_t ob_head; /* First child */ int16_t ob_tail; /* Last child */ uint16_t ob_type; /* Object type */ uint16_t ob_flags; /* Manipulation flags */ uint16_t ob_state; /* Object status */ void *ob_spec; /* More under object type */ int16_t ob_x; /* X-coordinate of the object */ int16_t ob_y; /* Y-coordinate of the object */ int16_t ob_width; /* Width of the object */ int16_t ob_height; /* Height of the object */ } OBJECT;
ob_next: | Number of the following object of the same generation or - if it is the last element of the generation - of the parent object |
ob_head: | Number of the first child of the object, if none -1 |
ob_next: | Number of the last child of the object, if none -1 |
ob_type: | Object type of the AES |
ob_flags: | Object flags of the AES |
ob_state: | AES object stati |
See also: AES object structure
Extended object description
typedef union { struct /* Bitmapped flags */ { unsigned outlined :1; /* Object is OUTLINED */ unsigned shadowed :1; /* Object is SHADOWED */ unsigned draw_3D :1; /* Object is draw in 3D */ unsigned rounded :1; /* Object has round corners */ unsigned atari_3D :1; /* Display the object using Atari */ /* AES 4 style 3D */ unsigned shadow_text:1; /* Draw the text with a shadow */ /* underneath it */ unsigned bold_shadow:1; /* Text is bold (can be combined */ /* with shadow_text) */ unsigned reserved :9; /* Reserved for future use */ unsigned framecol :4; /* Color of frame */ unsigned textcol :4; /* Color of text */ unsigned textmode :1; /* 0: transparent, 1: replace */ unsigned fillpattern:3; /* Fill pattern index */ unsigned interiorcol:4; /* Color of interior */ } s; uint32_t l; /* Longword for accessing all flags */ } OB_PREFER;
atari_3D, shadow_text and bold_shadow present since Release 004.
See also: x_appl_flags APPFLAGS x_settings SETTINGS
typedef struct { OBJECT *pb_tree; /* Pointer to the object tree */ int16_t pb_obj; /* Index of the object */ int16_t pb_prevstate; /* Previous object status */ int16_t pb_currstate; /* New object status */ int16_t pb_x; /* X-position of the object */ int16_t pb_y; /* Y-position of the object */ int16_t pb_w; /* Width of the object */ int16_t pb_h; /* Height of the object */ int16_t pb_xc; /* X-position of the clipping region */ int16_t pb_yc; /* Y-position of the clipping region */ int16_t pb_wc; /* Width of the clipping region */ int16_t pb_hc; /* Height of the clipping region */ int32_t pb_parm; /* Parameter of USERBLK structure */ } PARMBLK;
Note: The object only needs to be redrawn if the old and new states are identical; otherwise an 'update' of the object tree suffices. Furthermore, the following points should be respected:
A private function must return to the AES in data register
d0 which aspects of the object status still have to be updated. With
this it is not absolutely necessary to program out the code for
inverting the object in a private output function. Generally one would
want to process some bits of the object status oneself, and leave
others to the AES.
The function receives the PARMBLK pointer on the stack, and
hence must be declared in Pure-C as 'cdecl'.
A complete redraw of the object is required only if the compo
nents pb_prevstate and pb_currstate are identical;
otherwise only the obects status has changed (for example by being
clicked on).
A private function is executed de facto as a sub-program of the
AES, hence one should take care with regard to stack usage.
Furthermore, one can of course make no further AES calls,
since the AES is not re-entrant. On the other hand, calls
of the VDI input functions are permitted here.
The component pb_parm serves to pass to one's private
function further information (such as a pointer to a string, perhaps).
One should not stray too far from the original appearance of
GEM. Rounded rectangles or italic texts certainly do not match the
normal appearance of a GEM application.
See also: About the AES GEM USERBLK
typedef int32_t (cdecl *PDLG_HNDL)( struct _prn_settings *settings, struct _pdlg_sub *sub, int16_t exit_obj );
See also: Print dialogs pdlg_add_sub_dialogs PDLG_SUB
typedef int32_t (cdecl *PDLG_INIT) (struct _prn_settings *settings, struct _pdlg_sub *sub );
See also: Print dialogs pdlg_add_sub_dialogs PDLG_SUB
typedef int32_t (cdecl *PDLG_RESET) ( struct _prn_settings *settings, struct _pdlg_sub *sub );
See also: Print dialogs pdlg_add_sub_dialogs PDLG_SUB
Sub-dialog for setting device.
typedef struct _pdlg_sub { struct _pdlg_sub *next; /* Pointer to successor in the list */ int32_t length; /* Structure length */ int32_t format; /* Data format */ int32_t reserved; /* Reserved */ void *drivers; /* Only for internal dialogs */ int16_t option_flags; /* Flags */ int16_t sub_id; /* Sub-dialog ID */ DIALOG *dialog; /* Pointer to structure of window dialog, or 0L */ OBJECT *tree; /* Pointer to assembled object tree */ int16_t index_offset; /* Index offset of the sub-dialog */ int16_t reserved1; /* Reserved */ int32_t reserved2; /* Reserved */ int32_t reserved3; /* Reserved */ int32_t reserved4; /* Reserved */ PDLG_INIT init_dlg; /* Initialisation function */ PDLG_HNDL do_dlg; /* Handling function */ PDLG_RESET reset_dlg; /* Reset function */ int32_t reserved5; /* Reserved */ OBJECT *sub_icon; /* Pointer to icon for the list box */ OBJECT *sub_tree; /* Pointer to object tree of sub-dialog */ int32_t reserved6; /* Reserved */ int32_t reserved7; /* Reserved */ int32_t private1; /* Dialog's private information 1 */ int32_t private2; /* Dialog's private information 2 */ int32_t private3; /* Dialog's private information 3 */ int32_t private4; /* Dialog's private information 4 */ } PDLG_SUB;
See also: Print dialogs pdlg_add_sub_dialogs
typedef struct { OBJECT *tree; /* Popup menu */ int16_t obnum; /* Current object of <tree> */ } POPINFO;
Note: The component tree points to an object tree which might serve as input for form_popup, for instance. This means that the box should contain as object 0 a G_BOX or G_IBOX which is covered completely by the other objects. Objects that are not selectable should be assigned a DISABLED state, as in a dropdown menu.
All selectable objects must have the state SELECTABLE. In addition, for using with G_POPUP, all selectable objects must be of the type G_STRING (or G_SHORTCUT) or G_BUTTON, and start with two spaces, the latter due to the tick that is set automatically by form_button or form_do!
It is important that ob_x and ob_y of object 0 of the menu is specified relative to the G_POPUP object, i.e. usually they will both be 0. It is recommended that a shadow or a frame of width -1 is specified.
typedef void *PRN_DIALOG;
typedef struct _prn_entry { /* Pointer to next device description*/ struct _prn_entry *next; /* Structure length */ int32_t length; /* Data format */ int32_t format; /* Reserved */ int32_t reserved; /* Driver ID */ int16_t driver_id; /* Driver type */ int16_t driver_type; /* Printer ID */ int32_t printer_id; /* Printer capabilities */ int32_t printer_capabilities; /* Reserved */ int32_t reserved1; /* Various flags */ int32_t flags; /* Pointer to list of sub-dialogs for this printer */ struct _pdlg_sub *sub_dialogs; /* Initialize sub-dialog at printer change */ PRN_SWITCH setup_panel; /* Close sub-dialog at printer change */ PRN_SWITCH close_panel; /* List of available resolutions */ PRN_MODE *modes; /* List of available paper formats */ MEDIA_SIZE *papers; /* List of feed trays */ PRN_TRAY *input_trays; /* List of output trays */ PRN_TRAY *output_trays; /* Name of the printer */ int8_t name[32]; } PRN_ENTRY;
See also: Print dialogs pdlg_add_printers
Description of a print mode.
typedef struct _prn_mode { struct _prn_mode *next; /* Pointer to the next print mode */ int32_t mode_id; /* Mode ID (index within the file) */ int16_t hdpi; /* Horizontal resolution in dpi */ int16_t vdpi; /* Vertical resolution in dpi */ int32_t mode_capabilities; /* Mode capabilities */ int32_t color_capabilities; /* Colour capabilities */ int32_t dither_flags; /* Flags specifying whether the corresponding colour mode is accessible with or without dithering */ MEDIA_TYPE *paper_types; /* Suitable paper types */ int32_t reserved; /* Reserved */ int8_t name[32]; /* Mode name */ } PRN_MODE;
See also: Print dialogs pdlg_add_printers
typedef struct _prn_settings { int32_t magic; /* 'pset' */ int32_t length; /* (+) Structure length */ int32_t format; /* Structure type */ int32_t reserved; /* Reserved */ int32_t page_flags; /* (+) Flags, inc. even/odd pages: 0x0001 = Only pages with even number 0x0002 = Only pages with odd number*/ int16_t first_page; /* (+) First page to print (min. 1) */ int16_t last_page; /* (+) Last page to print (max. 9999) */ int16_t no_copies; /* (+) Number of copies */ int16_t orientation; /* (+) Page orientation: 0x0000 = Orientation unknown and not adjustable 0x0001 = Output in portrait format 0x0002 = Output in landscape format*/ int32_t scale; /* (+) Scaling: 0x10000L = 100% */ int16_t driver_id; /* (+) VDI device number */ int16_t driver_type; /* Type of the selected driver */ int32_t driver_mode; /* Flags, inc. for background printing */ int32_t reserved1; /* Reserved */ int32_t reserved2; /* Reserved */ int32_t printer_id; /* Printer ID number */ int32_t mode_id; /* Mode ID number */ int16_t mode_hdpi; /* Horizontal resolution in dpi */ int16_t mode_vdpi; /* Vertical resolution in dpi */ int32_t quality_id; /* Printing mode (hardware-dependent quality, e.g. Microweave or Econofast)*/ int32_t color_mode; /* Colour mode */ int32_t plane_flags; /* Flags for colour planes to be output (e.g. cyan only) */ int32_t dither_mode; /* Rasterizing (dithering) process */ int32_t dither_value; /* Parameter for the dithering process */ int32_t size_id; /* Paper format */ int32_t type_id; /* Paper type (normal, glossy) */ int32_t input_id; /* Paper feed tray */ int32_t output_id; /* Paper output tray */ int32_t contrast; /* Contrast: 0x10000L = normal */ int32_t brightness; /* Brightness: 0x1000L = normal */ int32_t reserved3; /* Reserved */ int32_t reserved4; /* Reserved */ int32_t reserved5; /* Reserved */ int32_t reserved6; /* Reserved */ int32_t reserved7; /* Reserved */ int32_t reserved8; /* Reserved */ int8_t device[128]; /* Filename for the printout */ #ifdef __PRINTING__ TPrint mac_settings; /* Setting of the Mac printer driver */ #else struct { uint8_t inside[120]; } mac_settings; #endif } PRN_SETTINGS;
Note: The structure elements marked with (+) can be read out by the application. All other entries should not be accessed. Data such as the printer resolution or number of colours should not be taken from the setting structure, but inquired for from the printer at the start of the printout (it would be possible, for instance, that due to a memory shortage the printer driver is forced to use a lower resolution compared to that entered in PRN_SETTINGS).
See also: Print dialogs pdlg_open
typedef int32_t (cdecl *PRN_SWITCH) ( struct _drv_entr *drivers, struct _prn_settings *settings, struct _prn_entry *old_printer, struct _prn_entry *new_printer );
Note: The component old_printer can also be 0L!
See also: Print dialogs pdlg_add_printers
Description of a feed/output tray.
typedef struct _prn_tray { struct _prn_tray *next; /* Pointer to successor */ int32_t tray_id; /* Number of the feed or output tray */ int8_t name[32]; /* Name of the tray */ } PRN_TRAY;
See also: Print dialogs pdlg_add_printers
typedef struct { uint16_t rsh_vrsn; /* Null */ uint16_t rsh_object; /* Position of the object field */ uint16_t rsh_tedinfo; /* Position of the TEDINFO structs */ uint16_t rsh_iconblk; /* Position of the ICONBLK structs */ uint16_t rsh_bitblk; /* Position of the BITBLK structs */ uint16_t rsh_frstr; /* Position of the free strings */ uint16_t rsh_string; /* Unused */ uint16_t rsh_imdata; /* Position of image data */ uint16_t rsh_frimg; /* Position of the free images */ uint16_t rsh_trindex; /* Position of the object tree table */ uint16_t rsh_nobs; /* Total number of objects */ uint16_t rsh_ntree; /* Total number of trees */ uint16_t rsh_nted; /* Total number of TEDINFO structs */ uint16_t rsh_nib; /* Total number of ICONBLK structs */ uint16_t rsh_nbb; /* Total number of BITBLK structs */ uint16_t rsh_nstring; /* Total number of strings */ uint16_t rsh_nimages; /* Total number of images */ uint16_t rsh_rssize; /* Total bytes in resource */ } RSHDR;
Note: All position specifications are to be understood as relative to the start of the file.
A word about the 'free strings': These include not just the character strings containing the data for alert boxes etc., but also all other strings that a program uses for its work. An example of this would be the filename or a file to be read in, or an entry that is altered with menu_text in a menu.
This header is followed by the actual resource data. One should note here that a resource file can have a total size of 64 kbyte maximum, due to the use of 16-bit values as pointers. Files of this format can be saved by all RCS (Resource Construction Set) programs.
Users of the programs Interface and RSM (Resource Master) can also work with resource files > 64 kbyte. The operating system MagiC as of version 3 also supports resource files larger than 64 kbyte; loading of the resource is performed with rsrc_load as usual, the rest is handled quite transparently by the system.
See also: rsrc_rcfix RSXHDR
typedef struct { uint16_t rsh_vrsn; /* Version number, should be 3 for new format */ uint16_t rsh_extvrsn; /* Not used, */ /* initialized to 'IN' for Interface, */ /* 'RM' for ResourceMaster, */ /* 'OR' for ORCS, */ uint32_t rsh_object; /* Offset to OBJECT structures from file start */ uint32_t rsh_tedinfo; /* Offset to TEDINFO structures */ uint32_t rsh_iconblk; /* Offset to ICONBLK structures */ uint32_t rsh_bitblk; /* Offset to BITBLK structures */ uint32_t rsh_frstr; /* Offset to string pointer table */ uint32_t rsh_string; /* Offset to string data */ uint32_t rsh_imdata; /* Offset to image data */ uint32_t rsh_frimg; /* Offset to image pointer table */ uint32_t rsh_trindex; /* Offset to tree pointer table */ uint32_t rsh_nobs; /* Number of OBJECTs in the file */ uint32_t rsh_ntree; /* Number of object trees in the file */ uint32_t rsh_nted; /* Number of TEDINFOs in the file */ uint32_t rsh_nib; /* Number of ICONBLKs in the file */ uint32_t rsh_nbb; /* Number of BITBLKs in the file */ uint32_t rsh_nstring; /* Number of free strings in the file */ uint32_t rsh_nimages; /* Number of free images in the file */ uint32_t rsh_rssize; /* In the newer format files this value can be used as an offset to the extension array */ } RSXHDR;
typedef struct { int8_t scancode; int8_t nclicks; int16_t objnr; } SCANX;
Note: The structure contains the assignment for the key with the scancode scancode, which when pressed performs an nclicks times mouse click on the object with the index objnr. The end of the table is marked by a scancode of NULL.
See also: About the AES MagiC XDO_INF Scancode table
Describes Geneva's global settings
typedef struct Settings { int16_t version; /* Version SETTINGS is for, in BCD */ int16_t struct_len; /* Total # of bytes in SETTINGS */ int16_t boot_rez; /* ST/TT resolution at startup */ int16_t falcon_rez; /* Falcon video mode at startup */ union /* Preferences */ { struct /* Bitmapped flags */ { unsigned pulldown :1; /* use pulldown menus */ unsigned insert_mode :1; /* insert in dialog edits */ unsigned long_titles :1; /* long underlines X_UNDERLINE */ unsigned alerts_under_mouse:1; /* alerts appear under mouse */ unsigned fsel_1col :1; /* column in Item Selector */ unsigned grow_shrink :1; /* 1: FMD_GROW/SHRINK on */ unsigned tear_aways_topped :1; /* 1: tear aways always usable */ unsigned auto_update_shell :1; /* */ unsigned alert_mode_change :1; /* */ unsigned ignore_video_mode :1; /* */ unsigned no_alt_modal_equiv:1; /* rel 004 */ unsigned no_alt_modeless_eq:1; /* rel 004 */ unsigned preserve_palette :1; /* rel 004 */ unsigned mouse_on_off :1; /* rel 004 */ unsigned top_all_at_once :1; /* rel 005 */ unsigned child_pexec_single:1; /* rel 006 */ } s; uint16_t i; /* Word for accessing all flags */ } flags; /* Preferences */ int16_t gadget_pause; /* # of 50 Hz timer tics to wait */ KEYCODE menu_start; /* Key to start menus */ KEYCODE app_switch; /* Key to toggle between apps */ KEYCODE app_sleep; /* */ KEYCODE ascii_table; /* Key to open ASCII table */ KEYCODE redraw_all; /* Key to redraw whole screen */ KEYCODE wind_keys[13]; /* Keys for window events */ OB_PREFER color_3D[4]; /* Colors for 3D objects */ OB_PREFER color_root[4]; /* Colors for root objects */ OB_PREFER color_exit[4]; /* Colors for EXIT objects */ OB_PREFER color_other[4]; /* Colors for other objects */ int8_t sort_type /* fsel sort type, 0(Name) - 4(None) */ int8_t find_file[26] /* fsel Search string */ int8_t fsel_path[10][35] /* Item Selector paths */ int8_t fsel_ext[10][6]; /* Item Selector extension strings */ KEYCODE cycle_in_app; /* rel 004 */ KEYCODE iconify; /* rel 004 */ KEYCODE alliconify; /* rel 004 */ KEYCODE procman; /* rel 006 */ KEYCODE unused[4]; int8_t graymenu; /* rel 004 */ int8_t reserved; /* rel 004 */ union /* rel 006 */ { struct { unsigned procman_details :1; unsigned reserved :31; } s; unsigned int32_t l; } flags2; } SETTINGS;
The color_xx arrays are indexed depending upon the number of bitplanes in the current resolution: 1-plane=0, 2-planes=1, 4-planes=2, >4-planes=3.
The wind_keys array is indexed using the following constants:
XS_UPPAGE | 0 | Index for up page key |
XS_DNPAGE | 1 | Index for down page key |
XS_UPLINE | 2 | Index for up line key |
XS_DNLINE | 3 | Index for down line key |
XS_LFPAGE | 4 | Index for page left key |
XS_RTPAGE | 5 | Index for page right key |
XS_LFLINE | 6 | Index for line left key |
XS_RTLINE | 7 | Index for line right key |
XS_CLOSE | 8 | Index for close box key |
XS_CYCLE | 9 | Index for cycle window key |
XS_FULL | 10 | Index for full window key |
XS_LFINFO | 11 | Index for info left key |
XS_RTINFO | 12 | Index for info right key |
See also: x_settings KEYCODE OB_PREFER
typedef int16_t (cdecl *SET_ITEM)( LIST_BOX *box, OBJECT *tree, struct _lbox_item *item, int16_t obj_index, void *user_data, GRECT *rect, int16_t first );
Parameter | Meaning |
box | points to the list box structure |
tree | points to the object tree of the dialog |
item | points to the LBOX_ITEM structure of the entry to be set |
obj_index | is the number of the object to be set |
user_data | is the pointer passed by lbox_create |
rect | is the pointer to the GRECT for the object redraw or 0L |
first | contains the number of the first visible item for Slider B |
For a list box that only contains text strings, <set> is typically a function that copies a string pointed to by the LBOX_ITEM structure into the object obj_index.
rect is 0L when a redraw of the dialog box is executed or when lbox_update has been called. rect is not 0L when the user has selected or deselected an object, and points to the GRECT for the redraw.
The return value is the number of the start object for objc_draw/wdlg_redraw.
For entries in the list box that consist of several objects it is sometimes sensible to reduce the redraw rectangle when selecting/ deselecting an object, or to alter the start object, to prevent unnecessary drawing operations and/or unnecessary flicker. In most cases the list box routines call the function objc_draw/wdlg_redraw after <set> to display the altered contents.
first contains the number of the first visible item for Slider B if the list box has two sliders. For a (vertical) list box with text strings and two sliders, when calling lbox_create, for instance, one enters the number of visible characters in visible_b, the total string length in entries_b and the index of the first visible character in first_b. If the text is scrolled horizontally, <set> is called for all visible strings and the affected parts of the screen are redrawn or moved. If the list box has only one slider, first is always 0.
See also: List boxes lbox_create
typedef struct { int16_t dummy; /* A NULL-WORD */ int32_t magic; /* 'SHEL', if it's a shell */ int16_t isfirst; /* First call of the shell */ int32_t lasterr; /* Last error */ int16_t wasgr; /* Program was a graphic-app. */ } SHELTAIL;
Note: This information is conveyed to an alternative desktop by MagiC at program launch (can be obtained by shel_read). If the shell returns a negative error code, then MAGXDESK will be reactivated.
If isfirst is set then the status is to be read from something like DESKTOP.INF, if isfirst is not set then one takes the temporary file or shell-buffer.
lasterr is the return value of the program running previously. If this was a GEM program then the error will already have been displayed in an alert box. It is well known that the LONGword is negative if the error occurred with Pexec itself; a program return value always has the high-WORD 0.
See also: About the AES GEM shel_wdef
typedef struct xshelw { const char *newcmd; /* command line */ int32_t psetlimit; /* value for Psetlmit() */ int32_t prenice; /* value for Prenice() */ const char *defdir; /* default diretory */ char *env; /* environment */ int16_t uid; /* New child's UID */ int16_t gid; /* New child's GID */ } SHELW;
typedef void (cdecl *SLCT_ITEM)( LIST_BOX *box, OBJECT *tree, struct _lbox_item *item, void *user_data, int16_t obj_index, int16_t last_state );
The following apply:
Parameter | Meaning |
box | points to the list box structure |
tree | points to the object tree of the dialog |
item | points to the LBOX_ITEM-structure of the selected entry |
user_data | is the pointer passed by lbox_create |
obj_index | is the number of the selected object. For a double-click the top bit is set, similar to form_do. If it is 0, it signifies that no object is assigned to this entry; it is not visible. Normally this is only the case when one is scrolling and by selecting a new object the (now no longer visible) selection has to be cleared. |
last_state | is the previous status of the object. last_state can also have the same value as item->selected. In that case one can normally quit the function immediately. |
See also: lbox_create
typedef struct { int8_t *string; /* Perhaps 'TOS|KAOS|MAG!X' */ int16_t num; /* Index of current character string */ int16_t maxnum; /* Maximum permitted num */ } SWINFO;
See also: About the AES GEM G_SWBUTTON
The TEDINFO structure is used to describe a text object more exactly, and is defined as follows:
typedef struct { int8_t *te_ptext; /* Pointer to a string */ int8_t *te_ptmplt; /* Pointer to the string template */ int8_t *te_pvalid; /* Pointer to the validation string */ int16_t te_font; /* Font type */ int16_t te_fontid; /* GDOS Font ID */ int16_t te_just; /* Text alignment: 0 = Ranged left 1 = Ranged right 2 = Centred */ int16_t te_color; /* Colour */ int16_t te_fontsize; /* GDOS font size in points */ int16_t te_thickness; /* Border width */ int16_t te_txtlen; /* Maximum length of the text */ int16_t te_tmplen; /* Length of the string template */ } TEDINFO;
The following matters should be noted for this:
te_ptext: If the first character is an 'at' symbol (@),
then all following characters will be taken to be place holders, and
the string initially output will consist of space characters. Hence
the 'at' symbol may never be placed at the start of an editable field!
te_ptmplt: Template. This is used only for G_FTEXT and
G_FBOXTEXT, i.e. G_TEXT and G_BOXTEXT can have a NULL-pointer here.
During output, all '_' characters in the template will be replaced
successively with the characters in te_ptext, i.e. a mixed
character string will be formed. So in general the template will have
as many '_' characters as the length of the buffer for
te_ptext (without the terminating NULLbyte). The template can
also contain other characters, which will be displayed but cannot be
overwritten.
te_pvalid: String that contains for each character in
te_ptext validation characters that provide information about
the type of character permitted at the matching string position. The
following apply:
Character | Meaning |
1 - 9 | Accept any digit from 0 to that number. This is handy for doing
octal ('7') or binary ('1') validation.
(Geneva) |
9 | Only digits 0..9 |
A | Only uppercase (capital) letters A..Z and space |
a | Only upper and lowercase letters and space |
N | Digits 0..9, uppercase letters A..Z, and space |
n | Digits 0..9, upper and lowercase letters, and space |
F | All characters valid for a GEMDOS filename, and '*', '?' and ':'. |
f | All characters valid for a GEMDOS filename, without '*', '?' and ':'. |
h | Hexadecimal character (Geneva) |
H | Hexadecimal character; lowercase a..f keys are converted to keys A..F in uppercase (Geneva) |
P | All characters valid for a GEMDOS pathname plus '\', ':', '?', '*' |
p | Similar to 'P', but without the characters '?' and '*' |
m | All characters that are valid for a long filename; i.e. all characters except control characters (ASCII < 32), and also without ':' and '\'. At present, this code is only supported by MagiC. |
X | All characters |
x | All characters, lowercase letters are converted to uppercase (Geneva) |
te_font:
3 = Standard monospaced system font
5 = Small monospaced system font
For further information, see below.
te_fontid:
For further information, see below.
te_color: For the colour of the bounding rectangle, the
following assignments apply:
Bit | Meaning | ||||||
12..15 | Border colour (0..15) | ||||||
08..11 | Text colour (0..15) | ||||||
7 | Text (0 = transparent, 1 = opaque)) | ||||||
4.. 6 | Intensity
| ||||||
0.. 3 | Inner colour (0..15) |
te_thickness: For the border frame, the following
values are valid:
Value | Meaning |
0 | No border |
1.. 128 | Border lies 1 to 128 pixels within the object |
-1..-127 | Border lies 1 to 127 pixels outside of the object |
Note: The components te_fontid and te_fontsize were previously reserved. As of AES Version 4.1 it is possible to use any GDOS fonts for TEDINFO objects.
For this one should specify with the component te_font the type of the font. The following apply:
te_font | Meaning |
0 | SpeedoGDOS font |
1 | SpeedoGDOS font (monospaced) |
2 | GDOS bitmap font |
3 | Normal system font |
5 | Small system font |
To use values 0 and 1 of te_font, SpeedoGDOS or a substitute (such as NVDI) has to be installed on the system.
For values in the region 0..2 of te_font one can then set with the components te_fontid or te_fontsize the desired font and the desired point size.
The simplest way to check the presence of the new possibilities is to call appl_getinfo (opcode 13).
See also:
About the AES GEM OBJECT XTED Scrollable input fields
typedef struct { int16_t cdecl (*ub_code)(PARMBLK *parmblock); int32_t ub_parm; } USERBLK;
Note: The function ub_code is called for each call of objc_draw and objc_change for the corresponding object. The component ub_parm can be looked on as an optional parameter.
This function is declared as follows:
typedef void (cdecl *UTXT_FN) (int16_t x, int16_t y, int16_t *clip_rect, int32_t id, int32_t pt, int32_t ratio, int8_t *string);
See also: About the AES fnts_add FNTS_ITEM Font selection
typedef struct WindTree { int16_t handle; /* Handle of window being modified */ int16_t count; /* Number of objects in window */ int16_t flag; /* Location to copy to/from */ OBJECT *tree; } WIND_TREE;
Parameter | Meaning | ||||||
flag |
|
See also: x_wind_tree
Passing structure for linking in
typedef struct { int16_t version; /* Version number of structure */ int32_t wsizeof; /* Size of the WINDOW-structure */ int16_t whshade; /* Height of the shaded window */ void (*wbm_create)( WININFO *w ); void (*wbm_skind) ( WININFO *w ); void (*wbm_ssize) ( WININFO *w ); void (*wbm_sslid) ( WININFO *w, int16_t vertical ); void (*wbm_sstr) ( WININFO *w ); void (*wbm_sattr) ( WININFO *w, int16_t chbits ); void (*wbm_calc) ( int16_t kind, int16_t *fg ); int16_t (*wbm_obfind)( WININFO *w, int16_t x, int16_t y ); } WINFRAME_HANDLER;
See also:
sys_set_winframe_manager WININFO WINFRAME_SETTINGS
Passing structure for global window settings
typedef struct { int16_t flags; int16_t h_inw; void *finfo_inw; } WINFRAME_SETTINGS;
Bits of flags:
#define NO_BDROP 1
See also:
sys_set_winframe_manager WINFRAME_HANDLER WININFO
WINDOW-structure for MagiC-kernel
typedef struct { int16_t state; int16_t attr; void *own; /* (APPL *) */ int16_t kind; /* from wind_create() */ char *name; /* Pointer to title line */ char *info; /* Pointer to Info line */ GRECT curr; GRECT prev; GRECT full; GRECT work; GRECT overall; /* Outline */ GRECT unic; GRECT min; /* Minimum size */ int16_t oldheight; /* Old height of shading */ int16_t hslide; /* Horizontal slider position */ int16_t vslide; /* Vertical slider position */ int16_t hslsize; /* Horizontal slider size */ int16_t vslsize; /* Vertical slider size */ void *wg; /* Rectangle list */ void *nextwg; /* Next rectangle of the list */ int16_t whdl; OBJECT tree[N_OBJS]; int16_t is_sizer; int16_t is_info; int16_t is_rgtobjects; int16_t is_botobjects; TEDINFO ted_name; TEDINFO ted_info; } WININFO;
Bits of state:
#define OPENED 1
#define COVERED 2
#define ACTIVE 4
#define LOCKED 8
#define ICONIFIED 32
#define SHADED 64
See also:
sys_set_winframe_manager WINFRAME_HANDLER WINFRAME_SETTINGS
This structure is defined as follows:
typedef struct { int16_t dst_apid; /* ID of target application */ int16_t unique_flg; /* Overwrite messages? */ void *attached_mem; /* Pointer to memory block */ int16_t *msgbuf; /* Message buffer */ } XAESMSG;
Note: The component unique_flg specifies if kindred messages (i.e. those with the same message type msgbuf[0]) are to be overwritten by the new message.
If attached_mem is not NULL, it is used to specify a memory block allocated with Malloc that contains the extended message information. The length of this block is arbitrary and is of no interest to the system - for instance it could be passed as the first LONGword of the block, or in msgbuf [4,5]. The system allocates the memory block to the destination application and passes its address in msgbuf[6,7].
Important: The called application must assume that msgbuf[6,7] are destroyed after a call of appl_write. The system reserves the right to copy the contents of the memory block elsewhere and to release the passed block. The caller may no longer access the block after an appl_write call, and may on no account release it!
If appl_write returns an error code, then the block has not been passed and still belongs to the calling application. An error arises when:
The destination application is invalid (non-existant or frozen)
The message buffer of the destination application is full
The destination application is not a process (e.g. the SCRENMGR
and an attached memory block has been specified
See also: About the AES appl_write GEM
typedef struct { SCANX *unsh; /* Tables for non-[Shift] combinations */ SCANX *shift; /* Tables for [Shift] combinations */ SCANX *ctrl; /* Tables for [Control] combinations */ SCANX *alt; /* Tables for [Alternate] combinations */ void *resvd; /* Reserved */ } XDO_INF;
Note: This structure contains pointers to tables that assign to a scancode an object index of the dialog box. This makes it simple to service dialogs completely via the keyboard. The parameter resvd is reserved for future use, and must always be NULL.
See also:
About the AES form_keybd form_xdo MagiC Scancode table
Describes font being used and window gadget borders
typedef struct { int16_t font_id; /* VDI font ID# */ int16_t point_size; /* Point size of the font */ int16_t gadget_wid; /* Width of border around a char in a window gadget */ int16_t gadget_ht; /* Height of border around a char in a window gadget */ } XFONTINFO;
gadget_wid and gadget_ht are added to the width and height of the characters. These values should always be >= 0.
See also: x_appl_font
typedef int16_t (cdecl XFSL_FILTER) (int8_t *path, int8_t *name, XATTR *xa);
typedef struct { int8_t *command; int32_t limit; int32_t nice; int8_t *defdir; int8_t *env; } XSHW_COMMAND;
See also: shel_write
This structure is required in connection with scroll-capable editable text fields.
typedef struct _xted { int8_t *xte_ptmplt; int8_t *xte_pvalid; int16_t xte_vislen; int16_t xte_scroll; } XTED;
See also: Scrollable input fields TEDINFO
typedef struct x_buf_v2 { int16_t buf_len /* Length of the structure, including this WORD */ /* Future versions of this structure (X_BUF_V3 etc.) */ /* may be bigger */ int16_t arch /* 16 for 16-bit AES, 32 for hypothetical 32-bit AES */ CLRCAT *cc /* Address of an array of 16 CLRCAT structures - */ /* this is so that they can be read by a program; in */ /* ViewMAX, the colours could be set but not reread */ OBJECT *w_active /* Address of an object tree (19 elements) used to */ /* draw window elements; included so a program can */ /* change symbols on window buttons */ int8_t *info /* Address of a 0-terminated ASCII string (at most */ /* 40 characters, no newlines) describing the AES */ int32_t abilities /* A bitmapped field describing what optional */ /* functions this AES provides: */ /* ABLE_GETINFO 1 bit 0 : xapp_getinfo supported */ /* ABLE_PROP 2 bit 1 : prop_get, prop_put and prop_del supported */ /* ABLE_WTREE 4 bit 2 : wind_get and wind_set can change glyphs */ /* ABLE_X3D 8 bit 3 : GEM/5 3D using DRAW3D */ /* ABLE_XSHL 16 bit 4 : xshl_getshell & xshl_putshell */ /* ABLE_PROP2 32 bit 5 : prop_gui_get, prop_gui_set */ /* ABLE_EMSDESK 64 bit 6 : xgrf_dtimage supports EMS */ /* ABLE_XBVSET 128 bit 7 : Supports 32 disc drives */ } X_BUF_V2;
An initialized X_BUF_V2 is one in which all members are 0 except buf_len. This initialized buffer is then passed to appl_init. On return, if arch is 0 then the structure was not filled in by the AES; otherwise it was. The buf_len field may be reduced if the AES was expecting an earlier version of the structure (i.e. X_BUF_V1); this should not be a problem because the structures are forward and backward compatible.
See also: appl_init