Home AESAES AES function listAES function list XCONTROLXCONTROL

8.27 AES structures


8.27.1 AESPB

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;

8.27.2 ANI_MOUSE

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

8.27.3 APPFLAGS

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

8.27.4 APFLG

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

8.27.5 APPLRECORD

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):
Left button: 0x0001
Right button: 0x0002

(low-WORD) Number of clicks.
2   Mouse event X-coordinate (high-WORD), Y-coordinate (low-WORD) of hotspot
3   Keyboard event
Bits 24-31 Scancode
Bits 16-23 ASCII code
Low-Word State of 'special' keys (0 = not depressed, 1 = depressed):
Right [Shift]: 0x0001
Left [Shift]: 0x0002
[Control]: 0x0004
[Alternate]: 0x0008

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

8.27.6 The bit-block structure

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

8.27.7 CICON

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

8.27.8 CICONBLK

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

8.27.9 CLRCAT

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

8.27.10 DIALOG

typedef void *DIALOG;

8.27.11 DITHER_MODE

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

8.27.12 DRV_ENTRY

typedef struct _drv_entry
{
   struct _drv_entry *next; /* Pointer to successor  */
} DRV_ENTRY;

8.27.13 DRV_INFO

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

8.27.14 EVNT

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

8.27.15 FNTS_ITEM

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

8.27.16 FNT_DIALOG

typedef void *FNT_DIALOG;

8.27.17 G_VECTORS

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:

See the files VECTEST.C and VECTESTS.S for an example.

See also: Cookie, Gnva

8.27.18 HNDL_OBJ

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
>=0: Object number
<0: Function number:
 -1 = HNDL_INIT    // Initialize dialog
 -2 = HNDL_MESG    //
 -3 = HNDL_CLSD    // Dialog window was closed
 -5 = HNDL_OPEN    // Conclude dialog initialisation
 -6 = HNDL_EDIT    // Check character for an edit field
 -7 = HNDL_EDDN    // Character was set in edit field
 -8 = HNDL_EDCH    // Edit field was changed
 -9 = HNDL_MOVE    // Dialog was moved
-10 = HNDL_TOPW    // Dialog window was topped
-11 = HNDL_UNTP    // Dialog window is not active

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

8.27.18.1 Example for HNDL_OBJ

/* 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 */
}

8.27.18.2 HNDL_INIT

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

8.27.18.3 HNDL_MESG

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

8.27.18.4 HNDL_OPEN

data is the variable passed by wdlg_open.

The variable code is passed in clicks.

See also: HNDL_OBJ   wdlg_create

8.27.18.5 HNDL_CLSD

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

8.27.18.6 HNDL_MOVE

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

8.27.18.7 HNDL_TOPW

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

8.27.18.8 HNDL_UNTP

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

8.27.18.9 HNDL_EDIT

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

8.27.18.10 HNDL_EDDN

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

8.27.18.11 HNDL_EDCH

data points to a WORD with the object number of the new editable field.

See also: HNDL_OBJ   wdlg_create

8.27.19 ICONBLK

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:

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.

See also: CICONBLK   OBJECT

8.27.20 KEYCODE

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

8.27.21 LBOX_ITEM

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

8.27.22 LIST_BOX

typedef void *LIST_BOX;

8.27.23 MEDIA_SIZE

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

8.27.24 MEDIA_TYPE

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

8.27.25 MENU

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

8.27.26 MFORM

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

8.27.27 MN_SET

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

8.27.28 OBJECT

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

8.27.29 OB_PREFER

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

8.27.30 PARMBLK

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:

See also: About the AES   GEM   USERBLK

8.27.31 PDLG_HNDL

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

8.27.32 PDLG_INIT

typedef int32_t (cdecl *PDLG_INIT) (struct _prn_settings *settings,
                                 struct _pdlg_sub *sub );

See also: Print dialogs   pdlg_add_sub_dialogs   PDLG_SUB

8.27.33 PDLG_RESET

typedef int32_t (cdecl *PDLG_RESET) ( struct _prn_settings *settings,
                                   struct _pdlg_sub *sub );

See also: Print dialogs   pdlg_add_sub_dialogs   PDLG_SUB

8.27.34 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

8.27.35 POPINFO

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.

See also: MagiC   G_POPUP

8.27.36 PRN_DIALOG

typedef void *PRN_DIALOG;

8.27.37 PRN_ENTRY

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

8.27.38 PRN_MODE

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

8.27.39 PRN_SETTINGS

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

8.27.40 PRN_SWITCH

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

8.27.41 PRN_TRAY

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

8.27.42 RSHDR

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

8.27.43 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;

See also: rsrc_load   RSHDR

8.27.44 SCANX

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

8.27.45 SETTINGS

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

8.27.46 SET_ITEM

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

8.27.47 SHELTAIL

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

8.27.48 SHELW

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;

8.27.49 SLCT_ITEM

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

8.27.50 SWINFO

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

8.27.51 TEDINFO

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:

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

8.27.52 USERBLK

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.

8.27.53 UTXT_FN

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

8.27.54 WIND_TREE

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
Bit 0: Auto resize (X_WTFL_RESIZE=1)
Bit 1: Process clicks (X_WTFL_CLICKS=2)
Bit 2: Resize sliders, info (X_WTFL_SLIDERS=4)

See also: x_wind_tree

8.27.55 WINFRAME_HANDLER

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

8.27.56 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

8.27.57 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

8.27.58 XAESMSG

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:

See also: About the AES   appl_write   GEM

8.27.59 XDO_INF

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

8.27.60 XFONTINFO

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

8.27.61 XFSL_FILTER

typedef int16_t (cdecl XFSL_FILTER) (int8_t *path, int8_t *name,
      XATTR *xa);

See also: fslx_do   fslx_open

8.27.62 XSHW_COMMAND

typedef struct
{
   int8_t  *command;
   int32_t limit;
   int32_t nice;
   int8_t  *defdir;
   int8_t  *env;
} XSHW_COMMAND;

See also: shel_write

8.27.63 XTED

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

8.27.64 X_BUF_V2

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


Home AESAES AES function listAES function list XCONTROLXCONTROL