WinDom: globals.h File Reference

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

# globals.h File Reference

`#include <stdarg.h>`
`#include <stddef.h>`
`#include <assert.h>`
`#include "wportab.h"`
`#include "options.h"`
`#include <osbind.h>`
`#include <mintbind.h>`
`#include <fcntl.h>`
`#include "toserror.h"`
`#include <compiler.h>`
`#include "../include/windom/list.h"`
`#include "../include/mt_wndm.h"`
`#include "../include/windom/udlib.h"`

Go to the source code of this file.

## Data Structures
struct | ev_msg
struct | FRAME
struct | FRAMEINFO
struct | _config
| configuration of windom applications More...
struct | _bind
struct | W_PARM
struct | SMENU
struct | ty_obspec_dup
struct | USER_DRAW
struct | __windowlist
struct | ulib_obj_struct
struct | udef_lib_struct
struct | APPprivate_struct
struct | RSXHDR
struct | NRSHDR
struct | UBLK
struct | _rsc
struct | slider
struct | _thumb
struct | WIND_HANDLERS
struct | fontid
struct | bubble
## Defines
#define | APPRSVD struct APPprivate_struct
#define | SCREENMGR 1
#define | CONF(ap) (&ap->priv->config)
#define | HI16(a) ((INT16)((long)(a) >> 16) & 0xFFFFL )
#define | LO16(a) ((INT16)(long)(a) & 0xFFFFL )
#define | SYSMENU(app) (app->aes4 & AES4_MENUBAR) && (CONF(app)->flag & FLG_MNSYSTEM)
#define | ROOTS 0
#define | OUTLINED_WIDTH 3
#define | GETFINFO(app, win) ((FRAMEINFO*)mt_DataSearch( app, win, WD_WFRI))
#define | EVM_DISABLE 0x2
#define | EVM_IN_USE 0x4
#define | EVM_DELETED 0x8
#define | FCENTER 6
#define | SYSFONT 0
#define | USERDRAW 0xFF
#define | XCICON 0x0D
#define | XSMENU 0x01
#define | _FSM 0x5F46534DUL
## Typedefs
typedef ev_msg | EV_MSG
typedef _config | CONFIG
| configuration of windom applications
typedef _bind | BIND
typedef __windowlist | WINDOWLIST
typedef ulib_obj_struct | UDLIB_OBJ
typedef udef_lib_struct | UDLIB_LIB
typedef APPprivate_struct | APPprivate
typedef _rsc | RSC
typedef slider | SLIDER
typedef _thumb | THUMB
## Functions
int | mt_slid_newpos (APPvar *app, void *_slid)
void __CDECL | frm_drw (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage redraw event on form
void __CDECL | frm_mvd (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage window-moved event on form
void __CDECL | frm_tpd (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage window-topped event on form
void __CDECL | frm_fld (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage window-fulled event on form
void __CDECL | frm_click (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage mouse click event on form
void __CDECL | frm_keyhd (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage keyboard event on form
void __CDECL | frm_dstry (WINDOW *win, short buff[8], APPvar *app)
| standard callback function to manage destroy event on form
void * | __malloc_obspec (APPvar *app, OBJECT *p_ob, long size)
void | __free_obspec (APPvar *app, OBJECT *p_ob)
void | __freeall_obspec (APPvar *app)
int | scrap_txt_write (APPvar *app, char *str)
char * | scrap_txt_read (APPvar *app)
int __CDECL | wind_aes_get_root_handle (APPvar *app, WINDOW *win)
int __CDECL | wind_aes_get (APPvar *app, WINDOW *win, int mode, GRECT *clip, INT16 *x, INT16 *y, INT16 *w, INT16 *h)
| Get window attributes.
int __CDECL | wind_aes_set (APPvar *app, WINDOW *win, int mode, int x, int y, int w, int h)
| set/change window attributes.
int __CDECL | wind_aes_calc (APPvar *app, WINDOW *wind, int type, int x, int y, int w, int h, INT16 *xout, INT16 *yout, INT16 *wout, INT16 *hout)
int __CDECL | wind_aes_remove (APPvar *app, WINDOW *win)
OBJECT * | get_frame_slider (APPvar *app)
void | set_gadget_pos (APPvar *app, WINDOW *frame, GRECT *r1, int mode)
void | __frame_set_widget (APPvar *app, int parm1)
int | remove_frame_from_list (APPvar *app, WINDOW *win, WINDOW *child)
int | mt_ObjcAttach (APPvar *app, int mode, WINDOW *win, int __index, int type,...)
| Attach a variable or a callback function at an object.
void | mt_RsrcUserFree (APPvar *, OBJECT *)
int | is_modal (APPvar *app)
int | obj_fd_flag (OBJECT *, int, int)
int | obj_fd_xtype (OBJECT *dial, int racine, int flag)
int | obj_nb (OBJECT *)
int | obj_root (OBJECT *tree, int idx)
void | mt_DataClear (APPvar *app, WINDOW *win)
| Remove all the window data list items.
void | mt_DataTrace (APPvar *app, WINDOW *win)
void | mt_AddWindow (APPvar *app, WINDOW *win)
void | mt_RemoveWindow (APPvar *app, WINDOW *win)
void | add_slash (char *path)
void | init_scroll_menu (APPvar *app)
void | exit_scroll_menu (APPvar *app)
WORD __CDECL | draw_submenu (PARMBLK *pblk)
void | GemCode2Ascii (int key, int kstate, char *txt)
int | mt_GetIndexMenu (APPvar *app, OBJECT *menu, int title)
void | mt_menu_bind (APPvar *app, WINDOW *win, int item, int title)
int | get_next_obj (OBJECT *tree, int __index)
void | objc_extended (APPvar *app, int mode, OBJECT *tree)
void | objc_extfree (APPvar *app, OBJECT *tree)
int | objc_wform_edit (APPvar *app, WINDOW *win, W_FORM *wform, OBJECT *tree, int obj, int val, INT16 *idx, int kind)
int | mt_vFormAlert (APPvar *app, int but, char fmt[], va_list list)
int | mt_vConfInquire (APPvar *app, char *keyword, char *fmt, va_list args)
int | mt_vConfWrite (APPvar *app, char *name, char *fmt, va_list args)
void __CDECL | std_apterm (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage application-terminated event
void __CDECL | std_cls (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-closed event
void __CDECL | std_tpd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-topped event
void __CDECL | std_mvd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-moved event
void __CDECL | std_szd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-sized event
void __CDECL | std_fld (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-fulled event
void __CDECL | std_icn (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-iconify event
void __CDECL | std_unicn (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-uniconify event
void __CDECL | std_allicn (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-alliconify event
void __CDECL | std_arw (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-arrowed event
void __CDECL | std_sldxy (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage "move-work" actions
void __CDECL | std_dnlnd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window down-up event
void __CDECL | std_uplnd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window line-up event
void __CDECL | std_lflnd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window line-left event
void __CDECL | std_rtlnd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window line-right event
void __CDECL | std_dnpgd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window page-down event
void __CDECL | std_uppgd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window page-up event
void __CDECL | std_rtpgd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window page-right event
void __CDECL | std_lfpgd (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window page-left event
void __CDECL | std_vsld (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window vertical-slider event
void __CDECL | std_hsld (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window horizontal-slider event
void __CDECL | std_dstry (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-destroyed event
void __CDECL | std_btm (WINDOW *, short buff[8], APPvar *app)
| standard callback function to manage window-bottomed event
void __CDECL | std_comp_reflow (COMPONENT *c, long buff[8], APPvar *app)
| standard callback function to manage CM_REFLOW event
void __CDECL | std_fntchg (WINDOW *win, short buff[8], APPvar *app)
void | move_screen (APPvar *app, int vhandle, GRECT *screen, int dx, int dy)
void | move_work_rect (APPvar *app, WINDOW *win, GRECT *rect, int dx, int dy)
void | move_work (APPvar *app, WINDOW *win, int dx, int dy)
void __CDECL | std_mwk (APPvar *app, WINDOW *win)
int | menu_exec_cmd (APPvar *app, WINDOW *win)
void | menu_draw_grect (APPvar *app, WINDOW *win, OBJECT *menu, GRECT *work, GRECT *clip)
void | wind_menu_draw (APPvar *app, WINDOW *win, GRECT *clip)
int | wind_menu_set (APPvar *app, WINDOW *win, int mode, void *v1, func_evnt handler)
| Set the WINDOW menu appropriately.
int | frm_menu (APPvar *app, WINDOW *win)
int | frm_keybd_ev (APPvar *app, OBJECT *tree)
int | is_menu (APPvar *app, WINDOW *win)
int | ob_istype (APPvar *app, OBJECT *tree, int ob, int type)
int | frm_buttn_ev (APPvar *app, WINDOW *win, int mode)
void | _do_update (APPvar *app, WINDOW *win, short buff[8])
void | list_ev_msg (APPvar *app, WINDOW *win, char *str)
void | get_appname (APPvar *app, char *name)
int | vq_mint (void)
| return the version of MiNT
int | vq_magx (void)
| test if MagiC is present and returns the version number
int | vq_extfs (char *)
| test of long filename
WINDOW * | wlst_get_bottom (APPvar *app)
WINDOW * | wlst_get_next (APPvar *app, WINDOW *win)
WINDOW * | wlst_get_top (APPvar *app)
void | wlst_remove (APPvar *app, WINDOW *win)
void | wlst_add_bottom (APPvar *app, WINDOW *win)
void | wlst_add_top (APPvar *app, WINDOW *win)
void | wlst_recompute_wglb (APPvar *app)
int | load_fontid (APPvar *app)
void | close_fontid (APPvar *app)
void | mt_snd_mu_button (APPvar *app, int mbut, int nbclick)
long | __cookieptr (void)
int | frm_menu_beta (APPvar *app, WINDOW *win)
int | udlib_reinit (APPvar *app)
int | udlib_exit (APPvar *app)
| free all userdef libraries
int | udlib_garbage (APPvar *app)
| free unused userdef libraries
int | udlib_extended (APPvar *app, OBJECT *tree, int ob, int mode)
int | udlib_unextended (APPvar *app, OBJECT *tree, int ob, OBJECT *cpy)
int | udlib_extfree (APPvar *app, OBJECT *tree, int ob)
int | udlib_add_obj (UDLIB_LIB *udlib, OBJECT *tree, int ob, int ob_type)
int | udlib_rm_obj (UDLIB_LIB *udlib, OBJECT *tree, int ob)
int | udlib_string (APPvar *app, OBJECT *tree, int ob, char *put, char **retval)
int | udlib_char (APPvar *app, OBJECT *tree, int ob, int put, int *retval)
int | udlib_edit (APPvar *app, OBJECT *tree, int ob, int val, short *idx, int kind, int nclip, GRECT *gclip)
int | udlib_get_edpos (APPvar *app, OBJECT *tree, long object, long x, long y)
int | udlib_get_type (APPvar *app, OBJECT *tree, int object)
UDLIB_OBJ * | udlib_objfind (UDLIB_LIB *udlib, OBJECT *tree, int ob)
int | udlib_ConfSetLib (APPvar *app, const char *libname)
int | udlib_ConfAddLib (APPvar *app, const char *libname, short head)
char * | udlib_ConfGetFirstLib (APPvar *app)
char * | udlib_ConfGetNextLib (char *prev)
short __CDECL | cdecl_draw_cicon (long vdih, OBJECT *tree, long ob, long ob_state, long ob_x, long ob_y)
COMPONENT * | comp_reflow (COMPONENT *c, APPvar *app)
void | comp_dfs (COMPONENT *p, long *buff, APPvar *app)
| COMPONENT handlers.
COMPONENT * | win_comp_get (APPvar *app, WINDOW *win)
void | win_comp_attach (APPvar *app, WINDOW *win, COMPONENT *c)
COMPONENT * | win_comp_getfocus (APPvar *app, WINDOW *win)
void | win_comp_setfocus (APPvar *app, WINDOW *win, COMPONENT *f)
int | comp_slider_set (APPvar *app, WINDOW *win, COMPONENT *wgtc, int mode, int par1, int par2, int par3, int par4)
COMPONENT * | comp_objc_create (APPvar *app, OBJECT *o, short type, long size, short flex)
COMPONENT * | comp_wind_create (APPvar *app, WINDOW *w, short type, long size, short flex)
int | comp_widget_set (APPvar *app, WINDOW *win, COMPONENT *wgtc, int mode, int par1, int par2, int par3, int par4)
COMPONENT * | comp_widget_create (APPvar *app, WINDOW *win, int size, int flex)
COMPONENT * | comp_slider_create (APPvar *app, int mode, int width, int sz, int flex)
void | comp_slider_link (APPvar *app, COMPONENT *c, COMPONENT *s, int mode)
| Link the slider and the controlled component.
COMPONENT * | comp_split_create (APPvar *app, int mode, int sz)
void | mt_CompDataClear (APPvar *app, COMPONENT *c)
| Remove all the component data list items.
void | mt_CompDataTrace (APPvar *app, COMPONENT *c)
APPvar * | __mt_ApplInit (short *global)
int | __mt_ApplExit (APPvar *app)

## Define Documentation

#define _FSM 0x5F46534DUL

#define APPRSVD struct APPprivate_struct

#define CONF | ( | ap |  | ) | (&ap->priv->config)

#define EVM_DELETED 0x8

#define EVM_DISABLE 0x2

#define EVM_IN_USE 0x4

#define FCENTER 6

#define GETFINFO | ( | app,
|  | win |  | ) | ((FRAMEINFO*)mt_DataSearch( app, win, WD_WFRI))

#define HI16 | ( | a |  | ) | ((INT16)((long)(a) >> 16) & 0xFFFFL )

#define LO16 | ( | a |  | ) | ((INT16)(long)(a) & 0xFFFFL )

#define OUTLINED_WIDTH 3

#define ROOTS 0

#define SCREENMGR 1

#define SYSFONT 0

#define SYSMENU | ( | app |  | ) | (app->aes4 & AES4_MENUBAR) && (CONF(app)->flag & FLG_MNSYSTEM)

#define USERDRAW 0xFF

#define XCICON 0x0D

#define XSMENU 0x01

## Typedef Documentation

typedef struct APPprivate_struct APPprivate

typedef struct _bind BIND

typedef struct _config CONFIG

| configuration of windom applications This structure is private (not accessible for programmer of application). If you want to change a config data, you should use mt_ApplSet() or ask the user to modify its windom configuration file.

typedef struct ev_msg EV_MSG

typedef struct _rsc RSC

typedef struct slider SLIDER

typedef struct _thumb THUMB

typedef struct udef_lib_struct UDLIB_LIB

typedef struct ulib_obj_struct UDLIB_OBJ

typedef struct __windowlist WINDOWLIST

## Function Documentation

long __cookieptr | ( | void |  | ) |

void __frame_set_widget | ( | APPvar * | app,
|  | int | parm1
| ) |

void __free_obspec | ( | APPvar * | app,
|  | OBJECT * | p_ob
| ) |

void __freeall_obspec | ( | APPvar * | app | ) |

void* __malloc_obspec | ( | APPvar * | app,
|  | OBJECT * | p_ob,
|  | long | size
| ) |

int __mt_ApplExit | ( | APPvar * | app | ) |

APPvar* __mt_ApplInit | ( | short * | global | ) |

void _do_update | ( | APPvar * | app,
|  | WINDOW * | win,
|  | short | buff[8]
| ) |

void add_slash | ( | char * | path | ) |

short __CDECL cdecl_draw_cicon | ( | long | vdih,
|  | OBJECT * | tree,
|  | long | ob,
|  | long | ob_state,
|  | long | ob_x,
|  | long | ob_y
| ) |

void close_fontid | ( | APPvar * | app | ) |

void comp_dfs | ( | COMPONENT * | p,
|  | long * | buff,
|  | APPvar * | app
| ) |

| COMPONENT handlers.

COMPONENT* comp_objc_create | ( | APPvar * | app,
|  | OBJECT * | o,
|  | short | type,
|  | long | size,
|  | short | flex
| ) |

COMPONENT* comp_reflow | ( | COMPONENT * | c,
|  | APPvar * | app
| ) |

COMPONENT* comp_slider_create | ( | APPvar * | app,
|  | int | mode,
|  | int | width,
|  | int | sz,
|  | int | flex
| ) |

void comp_slider_link | ( | APPvar * | app,
|  | COMPONENT * | c,
|  | COMPONENT * | s,
|  | int | mode
| ) |

  | Link the slider and the controlled component. Parameters:
  | app |
  | c | the component to control (slider messages to be sent to)
  | s | slider component
  | mode | `CS_VSLIDE` or `CS_HSLIDE` according to which direction the slider `s` is to be used in by `c`.

int comp_slider_set | ( | APPvar * | app,
|  | WINDOW * | win,
|  | COMPONENT * | wgtc,
|  | int | mode,
|  | int | par1,
|  | int | par2,
|  | int | par3,
|  | int | par4
| ) |

COMPONENT* comp_split_create | ( | APPvar * | app,
|  | int | mode,
|  | int | sz
| ) |

COMPONENT* comp_widget_create | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | size,
|  | int | flex
| ) |

int comp_widget_set | ( | APPvar * | app,
|  | WINDOW * | win,
|  | COMPONENT * | wgtc,
|  | int | mode,
|  | int | par1,
|  | int | par2,
|  | int | par3,
|  | int | par4
| ) |

COMPONENT* comp_wind_create | ( | APPvar * | app,
|  | WINDOW * | w,
|  | short | type,
|  | long | size,
|  | short | flex
| ) |

WORD __CDECL draw_submenu | ( | PARMBLK * | pblk | ) |

void exit_scroll_menu | ( | APPvar * | app | ) |

int frm_buttn_ev | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | mode
| ) |

int frm_keybd_ev | ( | APPvar * | app,
|  | OBJECT * | tree
| ) |

int frm_menu | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

int frm_menu_beta | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

void GemCode2Ascii | ( | int | key,
|  | int | kstate,
|  | char * | txt
| ) |

void get_appname | ( | APPvar * | app,
|  | char * | name
| ) |

OBJECT* get_frame_slider | ( | APPvar * | app | ) |

int get_next_obj | ( | OBJECT * | tree,
|  | int | __index
| ) |

void init_scroll_menu | ( | APPvar * | app | ) |

int is_menu | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

int is_modal | ( | APPvar * | app | ) |

void list_ev_msg | ( | APPvar * | app,
|  | WINDOW * | win,
|  | char * | str
| ) |

int load_fontid | ( | APPvar * | app | ) |

void menu_draw_grect | ( | APPvar * | app,
|  | WINDOW * | win,
|  | OBJECT * | menu,
|  | GRECT * | work,
|  | GRECT * | clip
| ) |

int menu_exec_cmd | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

void move_screen | ( | APPvar * | app,
|  | int | vhandle,
|  | GRECT * | screen,
|  | int | dx,
|  | int | dy
| ) |

void move_work | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | dx,
|  | int | dy
| ) |

void move_work_rect | ( | APPvar * | app,
|  | WINDOW * | win,
|  | GRECT * | rect,
|  | int | dx,
|  | int | dy
| ) |

void mt_AddWindow | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

void mt_CompDataClear | ( | APPvar * | app,
|  | COMPONENT * | c
| ) |

  | Remove all the component data list items. Parameters:
  | app | application descriptor,
  | c | component descriptor.
See also: mt_DataDelete().

void mt_CompDataTrace | ( | APPvar * | app,
|  | COMPONENT * | c
| ) |

void mt_DataClear | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

  | Remove all the window data list items. Parameters:
  | app | application descriptor,
  | win | window descriptor or NULL for application data list.
Used by destroy callback function to release memory. See also: mt_DataDelete().

void mt_DataTrace | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

int mt_GetIndexMenu | ( | APPvar * | app,
|  | OBJECT * | menu,
|  | int | title
| ) |

void mt_menu_bind | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | item,
|  | int | title
| ) |

int mt_ObjcAttach | ( | APPvar * | app,
|  | int | mode,
|  | WINDOW * | win,
|  | int | ob,
|  | int | type,
|  |  | ...
| ) |

  | Attach a variable or a callback function at an object. Parameters:
  | app | application descriptor,
  | mode | destination type OC_FORM if the object is in a window formular, OC_TOOLBAR object is in a toolbar, OC_MENU object is in a window menu,
  | win | targeted window or NULL,
  | ob | object index to attach,
  | type | type of binding BIND_VAR attach a variable, BIND_BIT attach a specific bit of a variable, BIND_FUNC attach a function,
  | ... | variable argument list depending on value of type parameter. With BIND_VAR and BIND_BIT, argument is a pointer to the (integer) variable to bind. BIND_BIT requires a second parameter which is the bit to bind. BIND_VAR requires a second parameter which is the value of the variable when the object is selected. With BIND_FUNC, argument is a pointer to the function and a second optional argument is a pointer to a user data which will given to the function (see examples).
Returns: 0 or a negative code error. mt_ObjcAttach() attaches a function or a variable at an object from a window formular, a toolbar or a menu. The rules are differents if you use a formular and a toolbar or a menu. With formulars or toolbars, only EXIT or TOUCHEXIT objects can be attached at a callback function. When the user selects these objects, the callback function is invoked. Only SELECTABLE objects can be binded to a variable When the user selects these objects, the variable is set to its "value_when_selected" value. Only SELECTABLE objects can be binded to a bitset. When the user selects these objects, the bit of the variable is set. If such object is unselected, then the bit is cleared. Please note that all these rules also appli for RADIO button (the variable is no more filled with the index of the selected object). With menu, an item of the menu can be attached at a function or at a bitset. When an item is linked to a bitset, it is checked or unchecked when the user selects it. The variable linked is filled with 1 or 0 (or a specific bit with the BIND_BIT mode) when the item is checked or unchecked. Notice desktop menu is addressed if win parameter is set to NULL. Callback function prototype A function linked with to an object in a formular or a toolbar has the following interface:
      void __CDECL func ( APPvar *ap, WINDOW *win, int ob, int mode, void *data);
where win is the host window, ob is the index of the attached object and mode can be OC_FORM, OC_TOOLBAR or OC_MENU. If an user data pointer is specified with ObjcAttach(), this pointer can be read as a fourth parameter of the binded function (data in our example). A function linked to a menu object has an additionnal parameter - title - which indicated the menu title index selected. This parameter is required by mt_MenuTNormal():
      void __CDECL func ( APPvar *ap, WINDOW *win, int ob, int mode, int title, void *data);
  The fifth parameter data is an optional user pointer data specified by mt_ObjcAttach(). It's highly recommended to use specialized ObjcAttachXxx() functions instead of this general function. They are: mt_ObjcAttachVar() similar to mt_ObjcAttach(...,BIND_VAR,...) mt_ObjcAttachBit() similar to mt_ObjcAttac(...,BIND_BIT,...) mt_ObjcAttachFormFunc() similar to mt_ObjcAttach(OC_FORM,...,BIND_FUNC,...) mt_ObjcAttachTBFunc() similar to mt_ObjcAttach(OC_TOOLBAR,...,BIND_FUNC,...) mt_ObjcAttachMenuFunc() similar to mt_ObjcAttach(OC_MENU,...,BIND_FUNC,...) Examples
      static int radio = 1;
      #define OPTION1 0x1 // bit 0
      #define OPTION2 0x2 // bit 1
      #define OPTION3 0x4     // bit 2
      static int options = 0;

      {
       // Before : create the form with FormCreate()
       // Then attach the objects

       // 3 radio buttons in a formular
       // the variable "radio" will contain either 1, 2 or 3
       // depending on the selected radio button
        ObjcAttachVar( OC_FORM, win, RAD1, &radio, 1);
        ObjcAttachVar( OC_FORM, win, RAD2, &radio, 2);
        ObjcAttachVar( OC_FORM, win, RAD3, &radio, 3);

        // some checkboxes ...
        ObjcAttachBit( OC_FORM, win, BUT1, &options, OPTION1);
        ObjcAttachBit( OC_FORM, win, BUT2, &options, OPTION2);
        ObjcAttachBit( OC_FORM, win, BUT3, &options, OPTION3);

        // An example of function linked to an object
        // see after for the definition of the function
        ObjcAttachFormFunc( win, OK, ButOk, "a dummy data");
      }

      // Function linked to OK object
      void ButOk( WINDOW *win, int ob, int mode, char *mydata) {
        // Unselect the object ...
        ObjcChange( mode, win, ob, NORMAL, 0);
        puts( mydata); // Should print 'a dummy data' ...
        // ... and destroy the window
        ApplWrite( app.id, WM_DESTROY, win->handle);
      }

void mt_RemoveWindow | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

void mt_RsrcUserFree | ( | APPvar * | ,
|  | OBJECT * |
| ) |

int mt_slid_newpos | ( | APPvar * | app,
|  | void * | _slid
| ) |

void mt_snd_mu_button | ( | APPvar * | app,
|  | int | mbut,
|  | int | nbclick
| ) |

int mt_vConfInquire | ( | APPvar * | app,
|  | char * | keyword,
|  | char * | fmt,
|  | va_list | args
| ) |

int mt_vConfWrite | ( | APPvar * | app,
|  | char * | name,
|  | char * | fmt,
|  | va_list | args
| ) |

int mt_vFormAlert | ( | APPvar * | app,
|  | int | but,
|  | char | fmt[],
|  | va_list | list
| ) |

int ob_istype | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob,
|  | int | type
| ) |

int obj_fd_flag | ( | OBJECT * | ,
|  | int | ,
|  | int |
| ) |

int obj_fd_xtype | ( | OBJECT * | dial,
|  | int | racine,
|  | int | flag
| ) |

int obj_nb | ( | OBJECT * |  | ) |

int obj_root | ( | OBJECT * | tree,
|  | int | idx
| ) |

void objc_extended | ( | APPvar * | app,
|  | int | mode,
|  | OBJECT * | tree
| ) |

void objc_extfree | ( | APPvar * | app,
|  | OBJECT * | tree
| ) |

int objc_wform_edit | ( | APPvar * | app,
|  | WINDOW * | win,
|  | W_FORM * | wform,
|  | OBJECT * | tree,
|  | int | obj,
|  | int | val,
|  | INT16 * | idx,
|  | int | kind
| ) |

int remove_frame_from_list | ( | APPvar * | app,
|  | WINDOW * | win,
|  | WINDOW * | child
| ) |

char* scrap_txt_read | ( | APPvar * | app | ) |

int scrap_txt_write | ( | APPvar * | app,
|  | char * | str
| ) |

void set_gadget_pos | ( | APPvar * | app,
|  | WINDOW * | frame,
|  | GRECT * | r1,
|  | int | mode
| ) |

void __CDECL std_fntchg | ( | WINDOW * | win,
|  | short | buff[8],
|  | APPvar * | app
| ) |

void __CDECL std_mwk | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

int udlib_add_obj | ( | UDLIB_LIB * | udlib,
|  | OBJECT * | tree,
|  | int | ob,
|  | int | ob_type
| ) |

int udlib_char | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob,
|  | int | put,
|  | int * | retval
| ) |

int udlib_ConfAddLib | ( | APPvar * | app,
|  | const char * | libname,
|  | short | head
| ) |

char* udlib_ConfGetFirstLib | ( | APPvar * | app | ) |

char* udlib_ConfGetNextLib | ( | char * | prev | ) |

int udlib_ConfSetLib | ( | APPvar * | app,
|  | const char * | libname
| ) |

int udlib_edit | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob,
|  | int | val,
|  | short * | idx,
|  | int | kind,
|  | int | nclip,
|  | GRECT * | gclip
| ) |

int udlib_exit | ( | APPvar * | app | ) |

  | free all userdef libraries Parameters:
  | app |
Returns: 0. This function will free all UDLIB_OBJ objects still allocated (properly, thru udlib_extfree()). Then the garbage is called to free all the userdef libraries (because they are now all unused).

int udlib_extended | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob,
|  | int | mode
| ) |

int udlib_extfree | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob
| ) |

int udlib_garbage | ( | APPvar * | app | ) |

  | free unused userdef libraries Parameters:
  | app |
Returns: the number of libraries free-ed.

int udlib_get_edpos | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | long | object,
|  | long | x,
|  | long | y
| ) |

int udlib_get_type | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | object
| ) |

UDLIB_OBJ* udlib_objfind | ( | UDLIB_LIB * | udlib,
|  | OBJECT * | tree,
|  | int | ob
| ) |

int udlib_reinit | ( | APPvar * | app | ) |

int udlib_rm_obj | ( | UDLIB_LIB * | udlib,
|  | OBJECT * | tree,
|  | int | ob
| ) |

int udlib_string | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob,
|  | char * | put,
|  | char ** | retval
| ) |

int udlib_unextended | ( | APPvar * | app,
|  | OBJECT * | tree,
|  | int | ob,
|  | OBJECT * | cpy
| ) |

int vq_extfs | ( | char * | path | ) |

  | test of long filename Parameters:
  | path | complet path of a file or folder
Returns: 1 if the file system supports long file name, 0 else. vq_extfs() tests if the file system supports long file name. MiNT and MagiC are concerned.

int vq_magx | ( | void |  | ) |

| test if MagiC is present and returns the version number Returns: the MagiC version number (from MagiC 3) or 0 if MagiC is not present.

int vq_mint | ( | void |  | ) |

| return the version of MiNT Returns: the version of MiNT or 0 if MiNT is not detected

void win_comp_attach | ( | APPvar * | app,
|  | WINDOW * | win,
|  | COMPONENT * | c
| ) |

COMPONENT* win_comp_get | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

COMPONENT* win_comp_getfocus | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

void win_comp_setfocus | ( | APPvar * | app,
|  | WINDOW * | win,
|  | COMPONENT * | f
| ) |

int __CDECL wind_aes_calc | ( | APPvar * | app,
|  | WINDOW * | wind,
|  | int | type,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | INT16 * | xout,
|  | INT16 * | yout,
|  | INT16 * | wout,
|  | INT16 * | hout
| ) |

int __CDECL wind_aes_get | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | mode,
|  | GRECT * | clip,
|  | INT16 * | x,
|  | INT16 * | y,
|  | INT16 * | w,
|  | INT16 * | h
| ) |

  | Get window attributes. Parameters:
  | app | application descriptor,
  | win | target window
  | mode | attribute to read,
  | clip | rectagle to optimize the result,
  | x,y,w,h | meanning depend on value of mode.
Returns: 0 or a negative code error. This an internal WinDom function not to be used by applications. They should use mt_WindGet(). See also: mt_WindGet(), mt_WindSet()

int __CDECL wind_aes_get_root_handle | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

int __CDECL wind_aes_remove | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

int __CDECL wind_aes_set | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | mode,
|  | int | par1,
|  | int | par2,
|  | int | par3,
|  | int | par4
| ) |

  | set/change window attributes. Parameters:
  | app | application descriptor,
  | win | window descriptor (or NULL in some case),
  | mode | attribute to change,
  | par1 |
  | par2 |
  | par3 |
  | par4 | meanning of these 4 parameters depend on mode value as explained elswhere.
Returns: O or a negative error code. This is WinDom internal function not to be used by applications. They should use mt_WindSet() instead. See also: mt_WindSet(), t_WindGet().

void wind_menu_draw | ( | APPvar * | app,
|  | WINDOW * | win,
|  | GRECT * | clip
| ) |

int wind_menu_set | ( | APPvar * | app,
|  | WINDOW * | win,
|  | int | mode,
|  | void * | v1,
|  | func_evnt | handler
| ) |

  | Set the WINDOW menu appropriately. Parameters:
  | app | application descriptor,
  | win | window descriptor
  | mode | WindSet() mode,
  | v1 | pointer to a data (parameters p1 and p2 of WindSet()),
  | handler | pointer to a callback function (parameters p3 and p4 of WindSet())
Returns: 0 on success otherwise negative error code FIXME: MOVE to other file? perhaps comp_menu.c is the right place later on?

void wlst_add_bottom | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

void wlst_add_top | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

WINDOW* wlst_get_bottom | ( | APPvar * | app | ) |

WINDOW* wlst_get_next | ( | APPvar * | app,
|  | WINDOW * | win
| ) |

WINDOW* wlst_get_top | ( | APPvar * | app | ) |

void wlst_recompute_wglb | ( | APPvar * | app | ) |

void wlst_remove | ( | APPvar * | app,
|  | WINDOW * | win
| ) |