/* * $Id: mt_gemx.h,v 1.17 2005/02/21 16:53:58 ggs Exp $ * * gemx.h - main header file for new gem-lib extensions * * This lib contains all GEM extensions of MagiC and NVDI/FSM/Speedo * */ #ifndef _MT_GEMLIB_X_H_ #define _MT_GEMLIB_X_H_ #ifndef _MT_GEMLIB_H_ #include #endif __BEGIN_DECLS /******************************************************************************* * The AES extentsions of MagiC */ /** TODO */ typedef struct { short mwhich; /**< Type of events */ short mx; /**< X-coordinate of the mouse cursor */ short my; /**< Y-coordinate of the mouse cursor */ short mbutton; /**< Pressed mouse button */ short kstate; /**< Status of the 'special' keys (kbshift) */ short key; /**< Scancode of the pressed key */ short mclicks; /**< Number of mouse clicks */ short reserved[9];/**< Reserved */ short msg[16]; /**< Message-buffer */ } EVNT; /** @addtogroup a_evnt * @{ */ void mt_EVNT_multi( short evtypes, short nclicks, short bmask, short bstate, const MOBLK *m1, const MOBLK *m2, unsigned long ms, EVNT *event, short *global_aes ); /**@}*/ /* * Extensions to the form library (MagiC only) */ /** @addtogroup a_form * @{ */ /** TODO */ typedef struct { char scancode; /**< TODO */ char nclicks; /**< TODO */ short objnr; /**< TODO */ } SCANX; /** TODO */ typedef struct { SCANX *unsh; /**< Tabellen fr UnShift-Kombinationen */ SCANX *shift; /**< Tabellen fr Shift-Kombinationen */ SCANX *ctrl; /**< Tabellen fr Control-Kombinationen */ SCANX *alt; /**< Tabellen fr Alternate-Kombinationen */ void *resvd; /**< reserviert */ } XDO_INF; /** parameters for the init callback function (7th parameter of mt_xfrm_popup() ) */ struct POPUP_INIT_args { OBJECT *tree; /**< TODO */ short scrollpos; /**< TODO */ short nlines; /**< TODO */ void *param; /**< TODO */ }; short mt_form_popup (OBJECT *tree, short x, short y, short * global); short mt_form_wbutton (OBJECT *fo_btree, short fo_bobject, short fo_bclicks, short *fo_bnxtobj, short whandle, short * global); short mt_form_wkeybd (OBJECT *fo_ktree, short fo_kobject, short fo_kobnext, short fo_kchar, short *fo_knxtobject, short *fo_knxtchar, short whandle, short * global); short mt_form_xdial (short fo_diflag, short fo_dilittlx, short fo_dilittly, short fo_dilittlw, short fo_dilittlh, short fo_dibigx, short fo_dibigy, short fo_dibigw, short fo_dibigh, void **flydial, short * global); short mt_form_xdial_grect (short fo_diflag, const GRECT *fo_dilittl, const GRECT *fo_dibig, void **flydial, short * global); short mt_form_xdo (OBJECT *tree, short startob, short *lastcrsr, XDO_INF *tabs, void *flydial, short * global); short mt_form_xerr (long errcode, char *errfile, short * global); short mt_xfrm_popup (OBJECT *tree, short x, short y, short firstscrlob, short lastscrlob, short nlines, void __CDECL (*init)(struct POPUP_INIT_args), void *param, short *lastscrlpos, short * global); /**@}*/ /* * Extensions to the object library (MagiC only) */ /** @addtogroup a_objc * @{ */ void mt_objc_wchange (OBJECT *tree, short obj, short new_state, GRECT *clip, short whandle, short * global); void mt_objc_wdraw (OBJECT *tree, short start, short depth, GRECT *clip, short whandle, short * global); short mt_objc_wedit (OBJECT *tree, short obj, short key, short *idx, short kind, short whandle, short * global); short mt_objc_xedit (OBJECT *tree, short obj, short key, short *xpos, short subfn, GRECT *r, short * global); /**@}*/ /* * fnts_* font selection (MagiC/WDIALOG only) */ /** @addtogroup x_fnts * @{ */ /** opaque structure (internal management structure) */ typedef void *FNT_DIALOG; /** parameters for UTXT_FN callback functions */ struct UTXT_FN_args { short x; /**< TODO */ short y; /**< TODO */ short *clip_rect; /**< TODO */ long id; /**< TODO */ long pt; /**< TODO */ long ratio; /**< TODO */ char *string; /**< TODO */ }; /** TODO */ typedef void __CDECL (*UTXT_FN)(struct UTXT_FN_args); /** TODO */ typedef struct _fnts_item FNTS_ITEM; /** FNTS_ITEM data structure */ struct _fnts_item { FNTS_ITEM *next; /**< Pointer to the next font or 0L (end of the list) */ UTXT_FN display; /**< Pointer to the display function for the user fonts */ long id; /**< Font ID, >= 65536 for user fonts */ short index; /**< Must be 0, as not a VDI font */ char mono; /**< Flag for mono-spaced font */ char outline; /**< Flag for vector font */ short npts; /**< Number of predefined point sizes */ char *full_name; /**< Pointer to the complete name */ char *family_name; /**< Pointer to the family name */ char *style_name; /**< Pointer to the style name */ char *pts; /**< Pointer to field with point sizes */ long reserved[4]; /**< Reserved, must be 0 */ }; /* Definition of in mt_fnts_create() */ #define FNTS_BTMP 1 /**< Display bitmap fonts */ #define FNTS_OUTL 2 /**< Display vector fonts */ #define FNTS_MONO 4 /**< Display mono-spaced fonts */ #define FNTS_PROP 8 /**< Display proportional fonts */ /* Definition of in mt_fnts_create() */ #define FNTS_3D 1 /**< Display selector in 3D-look */ /* Definition of in mt_fnts_open() */ #define FNTS_SNAME 0x01 /**< Select checkbox for names */ #define FNTS_SSTYLE 0x02 /**< Select checkbox for style */ #define FNTS_SSIZE 0x04 /**< Select checkbox for height */ #define FNTS_SRATIO 0x08 /**< Select checkbox for width/height ratio */ #define FNTS_CHNAME 0x0100 /**< Display checkbox for names */ #define FNTS_CHSTYLE 0x0200 /**< Display checkbox for style */ #define FNTS_CHSIZE 0x0400 /**< Display checkbox for height */ #define FNTS_CHRATIO 0x0800 /**< Display checkbox for width/height ratio */ #define FNTS_RATIO 0x1000 /**< Width/height ratio adjustable */ #define FNTS_BSET 0x2000 /**< Button "Set" selectable */ #define FNTS_BMARK 0x4000 /**< Button "Mark" selectable */ /* Definition of