mt_wndm.h

Go to the documentation of this file.
00001 /*
00002  * WinDom: a high level GEM library
00003  * Copyright (c) 1997-2006 windom authors (see AUTHORS file)
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00018  *
00019  * $Source: /cvsroot/windom/htdocs/doc/html/mt__wndm_8h-source.html,v $
00020  *
00021  * CVS info:
00022  *   $Author: bercegeay $
00023  *   $Date: 2006/06/22 11:58:28 $
00024  *   $Revision: 1.5 $
00025  */
00026 
00027 #ifndef __MT_WINDOM__
00028 #define __MT_WINDOM__
00029 
00030 #define __GEMLIB_OLDNAMES
00031 #include <mt_gem.h>
00032 #include <mt_gemx.h>
00033 
00034 #ifdef __PUREC__
00035 # define __MSHORT__
00036 # include <stddef.h>
00037 #endif
00038 
00039 #ifndef __WINDOM_LIST__
00040 #include <windom/list.h>
00041 #endif
00042 
00043 __BEGIN_DECLS
00044 
00045 /*************************************************************
00046  *  WINDOM DEFINITIONS
00047  *************************************************************/
00048 
00049 /* Macros functions 
00050  *************************/
00054 #define mt_AppAESversion(ap)   ((ap)->aes_global[0]) 
00055 
00056 #define mt_AppAESnumapps(ap)   ((ap)->aes_global[1]) 
00057 
00058 #define mt_AppAESapid(ap)      ((ap)->aes_global[2])  
00059 #define mt_AppId(ap)           ((ap)->aes_global[2])  
00061 #define mt_AppAESappglobal(ap) (*((long *)&((ap)->aes_global[3])))  
00062 
00063 #define mt_AppAESrscfile(ap)   ((OBJECT **)(*((long *)&((ap)->aes_global[5]))))  
00064 
00065 #define mt_AppAESmaxchar(ap)   ((ap)->aes_global[13]) 
00066 
00067 #define mt_AppAESminchar(ap)   ((ap)->aes_global[14]) 
00068 
00069 #ifndef MIN
00070 
00071 #define MAX(a,b) ((a)>(b)?(a):(b))
00072 
00073 #define MIN(a,b) ((a)<(b)?(a):(b))
00074 #endif
00075 
00077 #define UNUSED( a)  ((void )(a))
00078 
00079 #define IS_IN( xp, yp, x, y, w, h) (xp>=x && yp>=y && xp<x+w && yp<y+h)
00080 
00081 #define FORM(app,win)   (((W_FORM*)mt_DataSearch( app, win, WD_WFRM))->root)
00082 
00083 #define TOOL( win) ((win)->tool.root)
00084 
00085 #ifndef ADR   /* Portab can defined this macro */
00086 
00087 # define ADR(c)     (int)((long)(c)>>16), (int)(long)(c)
00088 #endif
00089 
00090 #define SET_BIT(field,bit,val) field = (val)?((field)|(bit)):((field) & ~(bit))
00091 
00093 #ifndef TRUE
00094 # define TRUE 1
00095 # define FALSE 0
00096 #endif
00097 
00098 /* Structures
00099  ************************/
00100  
00101 /* WinDom version */
00102 
00103 #define __WINDOM_MAJOR__     2
00104 #define __WINDOM_MINOR__     0
00105 #define __WINDOM_REVISION__  1
00106 #define __WINDOM_BETATAG__   ""
00107 
00108 struct w_version {
00109     short patchlevel;
00110     short release;
00111     char *date;
00112     char *time;
00113     char *cc_name;
00114     short cc_version;
00115 };
00116 
00117 /* Application related definitions */
00118 
00119 typedef INT16 W_COLOR[3];
00120 
00121 #ifdef __GNUC__
00122 struct _window;
00123 struct _appvar;
00124 #endif
00125 
00126 
00127 /* long GRECT version */
00128 
00129 #ifndef __LGRECT
00130 # define __LGRECT
00131 typedef struct long_graphic_rectangle
00132 {
00133     long g_x;           
00134     long g_y;           
00135     long g_w;           
00136     long g_h;           
00137 } LGRECT;
00138 #endif
00139 
00140 #ifdef __WINDOM__  /* for the non-mt version, the last APPvar parameter doesn't exist */
00141 typedef void __CDECL (* func_evntdata)(struct _window *, short buff[8], void *);
00142 typedef void __CDECL (* func_evnt    )(struct _window *, short buff[8]);
00143 typedef void __CDECL (* func_bind    )(struct _window *, int, int, void *);
00144 typedef void __CDECL (* func_bindmenu)(struct _window *, int, int, void *);
00145 typedef void __CDECL (* func_doslid  )(struct _window *, int, short, void *);
00146 typedef void __CDECL (* func_userdraw)(struct _window *, PARMBLK *, void *);
00147 #else
00148 typedef void __CDECL (* func_evntdata)(struct _window *, short buff[8], void *, struct _appvar *);
00149 typedef void __CDECL (* func_evnt    )(struct _window *, short buff[8], struct _appvar *);
00150 typedef void __CDECL (* func_bind    )(struct _window *, int, int, void *, struct _appvar *);
00158 typedef void __CDECL (* func_bindmenu)(struct _window *win, int item, int title, void *data, struct _appvar *ap);
00159 typedef void __CDECL (* func_doslid  )(struct _window *, int, short, void *, struct _appvar *);
00178 typedef void __CDECL (* func_userdraw)(struct _window *win, PARMBLK *pblk, void *data, struct _appvar *ap);
00179 #endif
00180 
00187 typedef struct {
00188         INT16   handle;     
00189         W_COLOR *palette;   
00190         GRECT   clip;       
00191     } W_GRAFPORT;
00192 
00198 typedef struct {
00199         OBJECT *root; 
00200         OBJECT *real; 
00201         int scroll;   
00202         void *bind;   
00203         void (*hilight)( struct _appvar *app, struct _window *win, int title, int item);
00204 #ifdef BETAMENU
00205         /* Activ menu */
00206         int ac_title, ac_item;
00207 #endif
00208     } W_MENU;
00209 
00215 typedef struct {
00216         OBJECT *root; 
00217         OBJECT *real; 
00218         int  *save;
00219         void *bind;   
00220         int edit, nb_ob;
00221         INT16 cursor;
00222     } W_FORM;
00223 
00228 typedef struct {
00229         char *name;
00230         INT16 x, y, w, h;  /* Original coordinate/size of the uniconified window */
00231     } W_ICON;
00232 
00237 struct _window {
00238   int         handle; 
00239   int         attrib; 
00240   long        status; 
00241   W_GRAFPORT  *graf;   
00242   W_MENU      menu;   
00243   W_FORM      tool;   
00244   W_ICON      icon;   
00245   GRECT       createsize;    
00246   int         __rsvd[11];    
00247   char        *name, *info;  
00248   INT16       w_max, h_max;  
00249   INT16       w_min, h_min;  
00250   long        xpos, ypos;         
00251   long        xpos_max, ypos_max; 
00252   INT16       w_u, h_u; 
00253   struct _window *next; 
00254   int         type;     
00255   LIST        data;     
00256   LIST        binding;  
00257 };
00258 
00263 typedef struct _window WINDOW;
00264 
00269 typedef struct {
00270         WINDOW *first;    
00271         WINDOW *front;    
00273         WINDOW *appfront; 
00275     } WINvar;
00290 typedef struct {
00291   long timer; 
00292   int bclick; 
00293   int bmask;  
00298   int bstate; 
00304   int m1_flag; 
00308   int m1_x, m1_y, m1_w, m1_h; 
00309   int m2_flag; 
00313   int m2_x, m2_y, m2_w, m2_h; 
00314   INT16 mx, my;  
00315   INT16 mbut;    
00316   INT16 mkstate; 
00322   INT16 keybd;    
00326   INT16 nb_click; 
00327 } EVNTvar;
00330 #ifndef APPRSVD
00331 #define APPRSVD void
00332 #endif
00333 
00357 typedef struct _appvar {
00358   /* Public part */  
00359 
00360   short  *aes_global; 
00361   INT16   aeshdl;     
00362   INT16   x,y,w,h;    
00364   short   color;      
00365   short   nplanes;    
00366   OBJECT  *menu;          
00367   INT16   work_in[11];    
00368   INT16   work_out[57];   
00369   long   aes4;       
00371   short   avid;       
00372   short   ntree;      
00373   char    *pipe;      
00383   int     error;      
00385   W_GRAFPORT graf;    
00386   EVNTvar evnt;       
00387   WINvar  wglb;       
00389   APPRSVD *priv;    
00393   short   gdos; 
00394 } APPvar;
00402 typedef struct {
00403   long        nobs;     
00404   long        ntree;    
00405   long        nted;     
00406   long        ncib;     
00407   long        nib;      
00408   long        nbb;      
00409   long        nfstr;    
00410   long        nfimg;    
00411   OBJECT      *object ; 
00412   TEDINFO     *tedinfo; 
00413   ICONBLK     *iconblk; 
00414   BITBLK      *bitblk;  
00415   CICON       *cicon;   
00416   CICONBLK    *ciconblk;
00417   char        **frstr;  
00418   BITBLK      **frimg;  
00419   OBJECT      **trindex;
00420 } rscHDR;
00421 
00422 
00423 /* BubbleGEM */
00424 
00425 typedef struct {
00426     unsigned short delay;       /* time to wait before bubble released */
00427     unsigned short flag ;       /* see constants BGC_ */
00428 } BHLP;
00429 
00430 
00431 /* text attributes used in userdef library */
00432 typedef struct {
00433     short font;
00434     short size;
00435     short color;
00436 } ATTRIB;
00437 
00438 
00439 /* Constants
00440  ***********************/
00441 
00445 #define AES4_BOTTOM         0x000001L
00446 
00447 #define AES4_ICONIFY        0x000002L
00448 
00449 #define AES4_ICONIFYXYWH    0x000004L
00450 
00451 #define AES4_SMALLER        0x000008L
00452 
00453 #define AES4_BOTTOMER       0x000010L
00454 
00455 #define AES4_APPSEARCH      0x000020L
00456 
00457 #define AES4_FSLX           0x000040L
00458 
00459 #define AES4_BEVENT         0x000080L
00460 
00461 #define AES4_UNTOPPED       0x000100L
00462 
00463 #define AES4_TOOLBAR        0x000200L
00464 
00465 #define AES4_APPLCONTROL    0x000400L
00466 
00467 #define AES4_XGMOUSE        0x000800L
00468 
00469 #define AES4_MNSELECTED     0x001000L
00470 
00471 #define AES4_MENUBAR        0x002000L
00472 
00473 #define AES4_FIRSTAREAXYWH  0x004000L
00474 
00475 #define AES4_SETWORKXYWH    0x010000L
00476 
00477 /* Definitions for ApplGet()/ApplSet() 
00478  */
00479 
00480 /* modes */
00481 #define APS_ICONSIZE        0
00482 #define APS_FLAG            1
00483 #define APS_WINBG           2
00484 #define APS_KEYCOLOR        3
00485 #define APS_STRSTYLE        4
00486 #define APS_BUTSTYLE        5
00487 #define APS_EXITSTYLE       6
00488 #define APS_TITLESTYLE      7
00489 #define APS_3DEFFECT        8
00490 #define APS_MENUEFFECT      9
00491 #define APS_BUBBLESTYLE     10
00492 #define APS_POPUPSTYLE      11
00493 #define APS_POPUPWIND       12
00494 #define APS_WINDOWS         13
00495 #define APS_XTEDINFOSTYLE   14
00496 #define APS_XLONGEDITSTYLE  15
00497 #define APS_XEDITTEXTSTYLE  16
00498 #define APS_XEDITLABELSTYLE 17
00499 #define APS_FRAMEWIDGETSIZE 18
00500 
00501 /* values */
00502 #define DEFVAL     -1
00503 #define CENTER      0
00504 #define WMOUSE      1
00505 #define UP_RIGHT    2
00506 #define UP_LEFT     3
00507 #define DN_RIGHT    4
00508 #define DN_LEFT     5
00509 #define WFORM       6
00510 
00511 /* Bitfield for APS_FLAG */
00512 #define FLG_KEYMOUSE  0x0001
00513 #define FLG_BUTMOUSE  0x0002
00514 #define FLG_NOPAL     0x0004
00515 #define FLG_MNSCRL    0x0010
00516 #define FLG_NOKEYMENU 0x0020
00517 #define FLG_NOMGXFSEL 0x0040
00518 #define FLG_MNSYSTEM  0x0080
00519 
00520 /* app.key_color */
00521 #define LTMFLY_COLOR  0x0010
00522 
00523 /* extended ob_type values */
00524 #ifndef __MYDIAL__
00525 #define DIALMOVER  0x11
00526 #define DCRBUTTON  0x12
00527 #define UNDERLINE  0x13
00528 #define TITLEBOX   0x14
00529 #define HELPBUT    0x15
00530 #define CIRCLEBUT  0x16
00531 #define POPUPSTRG  0x17
00532 #define KPOPUPSTRG 0x18
00533 #define SLIDEPART  0x19
00534 #define LONGINPUT  0x1A
00535 #define UNDOBUT    0x1F
00536 #endif
00537 #define XBOXLONGTEXT    0x09    /* BOXTEXT with text on several lines */
00538 #define ONGLET          0x10    /* thumb */
00539 #define MENUTITLE       0x0F    /* menu     */
00540 #define XEDIT           0x0E    /* editable text  */
00541 
00542 /* ObjcEdit(): additional modes */
00543 #define ED_CURS      10     
00544 #define ED_BLC_OFF   11     
00545 #define ED_BLC_START 12
00546 #define ED_BLC_END   13
00547 
00548 /* RsrcXtype() mode */
00549 #define RSRC_XTYPE 0x01   /* extended object type + color icons */
00550 #define RSRC_X3D   0x02   /* standard 3D objects */
00551 #define RSRC_XALL  0xFF   /* all (extended type + 3D objects)  */
00552 
00553 /* WindFind() mode */
00554 #define WDF_NAME  0
00555 #define WDF_INFO  1
00556 #define WDF_ID    2
00557 #define WDF_MENU  3
00558 #define WDF_FORM  4
00559 #define WDF_TOOL  5
00560 #define WDF_DATA  6
00561 
00562 /* Cumulates window widgets */
00563 #define WAT_ALL     0x4FFF  /* All widgets */
00564 #define WAT_NOINFO  0x4FEF  /* All widget execpt the info bar */
00565 #define WAT_FORM    0x400F  /* Formular: name, mover, closer, fuller, smaller */
00566 #define WAT_MFORM   0x400D  /* Modal formular: name, mover, smaller, fuller */
00567 
00568 /*  Windows status */
00572 #define WS_OPEN         0x0001  
00573 
00574 #define WS_ICONIFY      0x0002  
00575 
00576 #define WS_MENU         0x0004  
00577 
00578 #define WS_TOOLBAR      0x0008L  
00579 
00580 #define WS_GROW         0x0010  
00581 
00582 #define WS_UNTOPPABLE   0x0020  
00583 
00584 #define WS_FORM         0x0040  
00585 
00586 #define WS_FORMDUP      0x0080  
00587 
00588 #define WS_MODAL        0x0100  
00589 
00591 #define WS_FRAME_ROOT   0x0200  
00592 
00594 #define WS_FRAME        0x0400  
00595 
00596 #define WS_CUSTOM       0x0400
00597 
00598 #define WS_ALLICNF      0x0800  
00599 
00600 #define WS_FULLSIZE     0x1000  
00601 
00602 #define WS_PEXEC        0x2000  
00603 
00604 #define WS_FOREIGN      0x4000  
00605 
00606 #define WS_WIN_IN_USE   0x00008000  
00607 
00608 #define WS_DESTROYED    0x00010000  
00609 
00611 /*  WindSet() mode */
00612 #define BEVENT_MODAL    0x1000
00613 #define WF_ICONTITLE    1001
00614 #define WF_ICONDRAW     1002
00615 #define WF_HILIGHT      1003
00616 #define WF_VWORK        1004
00617 #define WF_SLIDXYWH     1005
00618 #define WF_WORKCLIPXYWH 1006
00619 #define WF_COMPONENT    1007
00620 #define WF_MENUTNORMAL  1008
00621 
00622 /* FormWindDo() mode */ 
00623 #define FORM_EVNT   0x8000
00624  
00625 /* WindSlider() mode */
00626 #define HSLIDER         0x0001
00627 #define VSLIDER         0x0002
00628 
00629 /* WinDom specific messages */
00630 #define WM_DESTROY      0x4400    /* old value 1000 */
00631 /*#define WM_MNSELECTED   0x4401 (deprecated) */
00632 
00644 #define WM_FORM         0x4402
00645 #define AP_LOADCONF     0x4403
00646 
00657 #define AP_BUTTON       0x4404
00658 
00669 #define AP_KEYBD        0x4405
00670 #define AP_DEBUG        0x4410
00671 #define WM_UPLINE       0x4411
00672 #define WM_DNLINE       0x4412
00673 #define WM_LFLINE       0x4413
00674 #define WM_RTLINE       0x4414
00675 #define WM_UPPAGE       0x4415
00676 #define WM_DNPAGE       0x4416
00677 #define WM_LFPAGE       0x4417
00678 #define WM_RTPAGE       0x4418
00679 #define WM_PREREDRAW    0x4419
00680 #define WM_ICONDRAW     0x441a
00681 #define WM_SLIDEXY  0x441b
00682 /* EV_MSG extensions. These message will never go thru the AES pipe */
00683 #define WM_XTIMER       1
00684 
00695 #define WM_XKEYBD       2
00696 
00707 #define WM_XBUTTON      3
00708 #define WM_XM1          4
00709 #define WM_XM2          5
00710 
00711 /* EvntAdd() mode */
00712 #define EV_BOT  0
00713 #define EV_TOP  1
00714 
00715 /* Reserved data magic number */
00716 #define WD_WFRM 0x5746524DL /* 'WFRM' */
00717 #define WD_WFRA 0x57465241L /* 'WFRA' */
00718 #define WD_WFRI 0x57465249L /* 'WFRI' */
00719 #define WD_WHLR 0x57484c52L /* 'WHLR': wind_get/wind_set/wind_calc handlers */
00720 
00721 
00722 /* MenuPopUp() mode */
00723 #define P_RDRW  0x0100
00724 #define P_WNDW  0x0200
00725 #define P_LIST  0x0400
00726 #define P_CHCK  0x0800
00727 
00728 /* ObjcChange() mode */
00729 #define OC_TOOLBAR  0
00730 #define OC_FORM     1
00731 #define OC_OBJC     2
00732 #define OC_MENU     3
00733 #define OC_MSG      0x1000
00734 
00735 /* ObjcAttach() type */
00736 #define BIND_NONE   0
00737 #define BIND_VAR    1
00738 #define BIND_FUNC   2
00739 #define BIND_BIT    3
00740 
00741 /* SlidCreat() parameters */
00742 #define SLD_HORI 0
00743 #define SLD_VERT 1
00744 #define SLD_DIFF 0
00745 #define SLD_IMME 1
00746 
00747 /* FontSel() flags */
00748 #define VSTHEIGHT   0x01
00749 #define BITMAP      0x02
00750 #define MONOSPACED  0x04
00751 
00752 /* Values for FrameSet()
00753  * @deprecated To be replaced by COMPONENTs */
00754 #define FRAME_BORDER 1
00755 #define FRAME_COLOR  2
00756 #define FRAME_KEYBD  3
00757 #define FRAME_SIZE   4
00758 #define FRAME_FLAGS  5
00759 #define FRAME_NOBG   6
00760 #define FRAME_ACTIV  7
00761 #define FRAME_TOPPED_ACTIV  8
00762 
00763 /* Values for FrameGet()
00764  * @deprecated To be replaced by COMPONENTs */
00765 #define FRAME_CELL   10
00766 
00767 /* Flags for FrameAttach()
00768  * @deprecated To be replaced by COMPONENTs */
00769 #define FRAME_WSCALE    0x0001
00770 #define FRAME_HSCALE    0x0002
00771 #define FRAME_WFIX      0x0004
00772 #define FRAME_HFIX      0x0008
00773 #define FRAME_NOBORDER  0x0010
00774 #define FRAME_SELECT    0x0020
00775 
00776 /* Values for BHLP.flag */
00777 #define BGC_FONTCHANGED     0x01
00778 #define BGC_NOWINSTYLE      0x02
00779 #define BGC_SENDKEY         0x04
00780 #define BGC_DEMONACTIVE     0x08
00781 #define BGC_TOPONLY         0x10
00782 
00783 /* AvStatus() return value */
00784 #define V_SENDKEY       0x0001
00785 #define V_ASKFILEFONT   0x0002
00786 #define V_ASKCONFONT    0x0004  /* OPENCONSOLE */
00787 #define V_ASKOBJECT     0x0008
00788 #define V_OPENWIND      0x0010
00789 #define V_STARTPROG     0x0020
00790 #define V_ACCWINDOPEN   0x0040  /* ACCWINDCLOSED */
00791 #define V_STATUS        0x0080  /* GETSTATUS */
00792 #define V_COPY_DRAGGED  0x0100
00793 #define V_PATH_UPDATE   0x0200  /* AV_PATH_UPDATE, WHAT_IZIT, DRAG_ON_WINDOW */
00794 #define V_EXIT          0x0400
00795 #define V_XWIND         0x0800
00796 #define V_FONTCHANGED   0x1000
00797 #define V_STARTED       0x2000
00798 #define V_QUOTE         0x4000
00799 #define V_FILEINFO      0x8000  /* FILECHANGED */
00800 
00801 /* Valeur du mot 4 de VA_PROTOSTATUS
00802  * ou du mot 1 retourn par av_status()
00803  */ 
00804 
00805 #define V_COPYFILE      0x0001  /* FILECOPIED */
00806 #define V_DELFILE       0x0002  /* FILEDELETED */
00807 #define V_VIEW          0x0004  /* FILEVIEWED */
00808 #define V_SETWINDPOS    0x0008
00809 
00810 /* AvInit() mode */
00811 #define A_SETSTATUS     0x0001
00812 #define A_START         0x0002
00813 #define A_STARTED       0x0004
00814 #define A_FONTCHANGED   0x0008
00815 #define A_QUOTE         0x0010
00816 #define A_PATH_UPDATE   0x0020
00817 
00818 /* vqt_xname() flags */
00819 #define FNT_OUTLINE     0x1 /* 0=bitmap 1=vectorielle */
00820 #define FNT_MONO        0x2 /* 0=non proportionnelle, 1=proportionnelle */
00821 #define FNT_SPEEDO      0x4
00822 #define FNT_TRUETYPE    0x8
00823 #define FNT_TYPE1       0x10
00824 
00825 /* vqt_xfntinfo() flags */
00826 #define XFNT_NAME       0x1
00827 #define XFNT_FAMILLY    0x2
00828 #define XFNT_STYLE      0x4
00829 #define XFNT_FILE       0x8
00830 #define XFNT_NBPTS      0x100
00831 #define XFNT_LISTPTS    0x200
00832 
00833 /* Global variables
00834  ***********************/
00835 
00836 extern struct w_version WinDom;
00837 
00838 
00839 /*********************************************************
00840 
00841   TODO: add an APPvar variable as 1st parameter
00842  
00843 **********************************************************/
00844 
00845 /* Function Prototypes
00846  ***********************/
00847 
00848 /* Application Library */
00851 APPvar* mt_ApplInit    ( void);
00852 int     mt_ApplExit    ( APPvar *app);
00853 int     mt_ApplGet     ( APPvar *app, int mode, short *v1, short *v2, short *v3, short *v4);
00854 int     mt_ApplSet     ( APPvar *app, int mode, short v1, short v2, short v3, short v4);
00855 int     mt_ApplName    ( APPvar *app, char *name, int handle);
00856 int     mt_ApplWrite   ( APPvar *app, int to, int msg, int b3, int b4, int b5, int b6, int b7);
00857 int     mt_ApplControl ( APPvar *app, int ap_cid, int ap_cwhat, void *ap_cout);
00860 /* AV library */
00863 int     mt_AvInit      ( APPvar *app, char *name, int status, long idle);
00864 void    mt_AvExit      ( APPvar *app);
00865 INT16*  mt_AvStatus    ( APPvar *app);
00866 char*   mt_AvServer    ( APPvar *app);
00867 int     mt_AvWaitfor   ( APPvar *app, int, INT16 *, long);
00868 
00869 char*   AvStrfmt (int mode, char *src);
00870 #define mt_AvStrfmt(a,b,c) AvStrfmt(b,c) 
00875 int     get_cookie  (long cookie, long *value);
00876 
00877 /* BubbleGEM library */ 
00880 int     mt_BubbleCall  ( APPvar *app, char *help, int x, int y);
00881 int     mt_BubbleModal ( APPvar *app, char *help, int x, int y);
00882 int     mt_BubbleDo    ( APPvar *app, OBJECT *tree, int __index);
00883 int     mt_BubbleAttach( APPvar *app, OBJECT *tree, int __index, char *help);
00884 void    mt_BubbleFree  ( APPvar *app);
00885 int     mt_BubbleFind  ( APPvar *app, OBJECT *tree, int __index, char **help);
00886 int     mt_BubbleEvnt  ( APPvar *app);
00887 int     mt_BubbleGet   ( APPvar *app);
00890 /* Configuration library */
00893 int     mt_ConfRead    ( APPvar *app);
00894 int     mt_ConfInquire ( APPvar *app, char *keyword, char *fmt, ...);
00895 int     mt_ConfGetLine ( APPvar *app, char *line);
00896 int     mt_ConfWrite   ( APPvar *app, char *keyword, char *fmt, ...);
00897 int     mt_ConfWindom  ( APPvar *app);
00900 /* Data library */
00903 int     mt_DataAttach  ( APPvar *app, WINDOW *win, long magic, void *data);
00904 int     mt_DataDelete  ( APPvar *app, WINDOW *win, long magic);
00905 void*   mt_DataSearch  ( APPvar *app, WINDOW *win, long magic);
00908 /* Event library */
00911 int     mt_EvntWindom    ( APPvar *app, int __evnt);
00912 int     mt_EvntWindomBuff( APPvar *app, int __evnt, short buff[8]);
00913 int     mt_EvntAdd       ( APPvar *app, WINDOW *win, int msg, func_evnt     proc, int mode);
00914 int     mt_EvntAttach    ( APPvar *app, WINDOW *win, int msg, func_evnt     proc);
00915 int     mt_EvntDataAdd   ( APPvar *app, WINDOW *win, int msg, func_evntdata proc, void *data, int mode);
00916 int     mt_EvntDataAttach( APPvar *app, WINDOW *win, int msg, func_evntdata proc, void *data);
00917 int     mt_EvntDelete    ( APPvar *app, WINDOW *win, int msg);
00918 void*   mt_EvntFind      ( APPvar *app, WINDOW *win, int msg);
00919 int     mt_EvntExec      ( APPvar *app, WINDOW *win, short buff[8]);
00920 void    mt_EvntClear     ( APPvar *app, WINDOW *win);
00921 int     mt_EvntRemove    ( APPvar *app, WINDOW *win, int msg, void         *proc);
00922 void    mt_EvntDisable   ( APPvar *app, WINDOW *win, int msg);
00923 void    mt_EvntEnable    ( APPvar *app, WINDOW *win, int msg);
00924 void    mt_EvntRedraw    ( APPvar *app, WINDOW *win);
00925 void    mt_EvntRedrawGrect( APPvar *app, WINDOW *win, GRECT *work);
00928 /* Formular library */
00931 WINDOW* mt_FormWindBegin( APPvar *app, OBJECT *dial, char *nom);
00932 void    mt_FormWindEnd  ( APPvar *app);
00933 int     mt_FormWindDo   ( APPvar *app, int __evnt);
00934 int     mt_FormWindDoBuff( APPvar *app, int __evnt, short buff[8]);
00935 
00936 int     mt_FormAttach  ( APPvar *app, WINDOW *win, OBJECT *tree, func_evnt func);
00937 void    mt_FormResize  ( APPvar *app, WINDOW *win, INT16 *x, INT16 *y, INT16 *w, INT16 *h);
00938 WINDOW* mt_FormCreate  ( APPvar *app, OBJECT *tree, int attrib, func_evnt func, char *name, GRECT *coord, int grow, int dup);
00939 int     mt_FormSave    ( APPvar *app, WINDOW *win, int mode);
00940 int     mt_FormRestore ( APPvar *app, WINDOW *win, int mode);
00941 void    mt_FormBegin   ( APPvar *app, OBJECT *tree, MFDB *bckgrnd);
00942 void    mt_FormEnd     ( APPvar *app, OBJECT *tree, MFDB *bckgrnd);
00946 #define mt_FormDo(a,b,c) mt_form_do(b,c,a->aes_global)
00947 int     mt_FormAlert   ( APPvar *app, int but, char fmt[], ...);
00948 void*   mt_FormThumb   ( APPvar *app, WINDOW *win, int *idxthb, int *idxbut, int nb);
00949 void    mt_FormThbSet  ( APPvar *app, WINDOW *win, int but);
00950 int     mt_FormThbGet  ( APPvar *app, void   *thb, int mode);
00951 
00952 void __CDECL mt_stdFormClose(WINDOW *win, int ind, int mode, void *data, APPvar *app);
00955 /* Mouse library */
00958 void    mt_MouseObjc   ( APPvar *app, OBJECT *tree, int __index);
00959 void    mt_MouseWork   ( APPvar *app);
00960 void    mt_MouseSprite ( APPvar *app, OBJECT *tree, int __index);
00963 /* Frame library */
00966 void    mt_FrameInit   ( APPvar *app);
00967 void    mt_FrameExit   ( APPvar *app);
00968 WINDOW* mt_FrameCreate ( APPvar *app, int attrib);
00969 void    mt_FrameAttach ( APPvar *app, WINDOW *win, WINDOW *src, int line, int col, int w, int h, int mode);
00970 WINDOW* mt_FrameRemove ( APPvar *app, WINDOW *win, WINDOW *child, int line, int col);
00971 void    mt_FrameSet    ( APPvar *app, WINDOW *win, int mode, ...);
00972 void    mt_FrameGet    ( APPvar *app, WINDOW *win, int mode, ...);
00973 WINDOW* mt_FrameFind   ( APPvar *app, WINDOW *win, int x, int y);
00974 WINDOW* mt_FrameSearch ( APPvar *app, WINDOW *win, int line, int col);
00975 int     mt_FrameCalc   ( APPvar *app, WINDOW *win, int mode, INT16 *x, INT16 *y, INT16 *w, INT16 *h);
00978 /* Font  library */
00981 int     mt_FontName2Id   ( APPvar *app, char *name);
00982 int     mt_FontId2Name   ( APPvar *app, int id, char *name);
00983 int     mt_VstLoadFonts  ( APPvar *app, int res);
00984 void    mt_VstUnloadFonts( APPvar *app, int res); 
00985 int     mt_VstFont       ( APPvar *app, int id) ;
00986 int     mt_VqtName       ( APPvar *app, int elem, char *name) ;
00987 int     mt_VqtXname      ( APPvar *app, int id, int __index, char *name, int *fl);
00988 int     vqt_extname      ( int handle, int __index, char *name, int *speedo, INT16 *format, INT16 *flags);
00991 /* Selector library */
00994 int     mt_FselInput   ( APPvar *app, char *path, char *fname, char *ext, char *title, char *lpath, char *lext);
00995 int     mt_FontSel     ( APPvar *app, char *title, char *example, int flags, int *id, int *size, char *name);
00998 /* Menu library */
01001 int     mt_MenuBar     ( APPvar *app, OBJECT *menu, int mode);
01002 int     mt_MenuTnormal ( APPvar *app, WINDOW *win, int title, int mode);
01003 int     mt_MenuIcheck  ( APPvar *app, WINDOW *win, int title, int mode);
01004 int     mt_MenuText    ( APPvar *app, WINDOW *win, int title, char *txt);
01005 int     mt_MenuDisable ( APPvar *app);
01006 int     mt_MenuEnable  ( APPvar *app);
01007 int     mt_MenuPopUp   ( APPvar *app, void *data, int x, int y, int max, int size, int item, int mode);
01008 void    mt_MenuScroll  ( APPvar *app, WINDOW *win, int dir);
01010 /* function under developped. Dont use it */
01011 int     mt_MenuAttach  ( APPvar *app, int flag, OBJECT *tree, short item, MENU *mdata);
01012 
01013 /* Object library */
01016 /* int     mt_ObjcAttach      ( APPvar *app, int mode, WINDOW *win, int __index, int type, ...);*/
01017 int     mt_ObjcChange      ( APPvar *app, int mode, void *data, int __index, int state, int redraw);
01018 int     mt_ObjcChar        ( APPvar *app, OBJECT *tree, int idx, int put);
01019 int     mt_ObjcDrawParent  ( APPvar *app, int mode, void *win, int __index, int parent_depth, int child_depth);
01020 #define mt_ObjcDraw(a,b,c,d,e)  mt_ObjcDrawParent(a,b,c,d,0,e)
01021 int     mt_ObjcIsHidden    ( APPvar *app, int mode, void *win, int __index);
01022 OBJECT* mt_ObjcDup         ( APPvar *app, OBJECT *tree, WINDOW *win);
01023 OBJECT *mt_ObjcNDup        ( APPvar *app, OBJECT *src,  WINDOW *win, int nb);
01024 OBJECT *mt_ObjcNDupAtAddr  ( APPvar *app, OBJECT *src,  WINDOW *win, int nb, OBJECT *dest);
01025 int     mt_ObjcEdit        ( APPvar *app, int mode, WINDOW *win, int obj, int val, INT16 *idx, int kind);
01026 void    mt_ObjcFree        ( APPvar *app, OBJECT *tree);
01027 void    mt_ObjcNFreeAtAddr ( APPvar *app, OBJECT *tree, int nb);
01028 char*   mt_ObjcString      ( APPvar *app, OBJECT *tree, int __index, char *put);
01030 #define mt_ObjcStrCpy(a,tree,index,str)  strcpy(mt_ObjcString(a,tree,index,NULL),str)
01031 void    mt_ObjcStr3d       ( APPvar *app, OBJECT *tree);
01032 int     mt_ObjcWindDraw    ( APPvar *app, WINDOW *win, OBJECT *tree, int __index, int depth, int xclip, int yclip, int wclip, int hclip);
01033 int     mt_ObjcWindDrawParent( APPvar *app, WINDOW *win, OBJECT *tree, int __index, int parent_depth, int child_depth, int xclip, int yclip, int wclip, int hclip);
01034 int     mt_ObjcWindChange  ( APPvar *app, WINDOW *win, OBJECT *tree, int __index, int xclip, int yclip, int wclip, int hclip, int state);
01035 OBJECT *mt_ObjcTree        ( APPvar *app, int mode, WINDOW *win);
01036 
01037 void    ObjcStrFmt         ( char *dest, char *src, int size);
01039 #define mt_ObjcStrFmt(a,b,c,d) ObjcStrFmt(b,c,d)
01040 
01041 
01057 static inline int mt_ObjcAttachVar( APPvar *app, int mode, WINDOW *win, int __index, int *var, int value_when_selected ) {
01058     int mt_ObjcAttach ( APPvar *, int, WINDOW *, int, int, ...);
01059     return mt_ObjcAttach( app, mode, win, __index, BIND_VAR, var, value_when_selected);
01060 }
01061 
01062 static inline int mt_ObjcAttachBit( APPvar *app, int mode, WINDOW *win, int __index, int *var, int bit ) {
01063     int mt_ObjcAttach ( APPvar *, int, WINDOW *, int, int, ...);
01064     return mt_ObjcAttach( app, mode, win, __index, BIND_BIT, var, bit);
01065 }
01066 
01067 static inline int mt_ObjcAttachFormFunc( APPvar *app, WINDOW *win, int __index, func_bind fn, void *data ) {
01068     int mt_ObjcAttach ( APPvar *, int, WINDOW *, int, int, ...);
01069     return mt_ObjcAttach( app, OC_FORM, win, __index, BIND_FUNC, fn, data);
01070 }
01071 
01072 static inline int mt_ObjcAttachTBFunc( APPvar *app, WINDOW *win, int __index, func_bind fn, void *data ) {
01073     int mt_ObjcAttach ( APPvar *, int, WINDOW *, int, int, ...);
01074     return mt_ObjcAttach( app, OC_TOOLBAR, win, __index, BIND_FUNC, fn, data);
01075 }
01076 
01077 static inline int mt_ObjcAttachMenuFunc( APPvar *app, WINDOW *win, int __index, func_bindmenu fn, void *data ) {
01078     int mt_ObjcAttach ( APPvar *, int, WINDOW *, int, int, ...);
01079     return mt_ObjcAttach( app, OC_MENU, win, __index, BIND_FUNC, fn, data);
01080 }
01081 
01084 /* Window library */
01087 WINDOW* mt_WindCreate  ( APPvar *app, int GemAttrib, int x, int y, int w, int h);
01088 int     mt_WindOpen    ( APPvar *app, WINDOW *win, int x, int y, int w, int h);
01089 int     mt_WindClose   ( APPvar *app, WINDOW *win);
01090 int     mt_WindDelete  ( APPvar *app, WINDOW *win);
01091 WINDOW* mt_WindHandle  ( APPvar *app, int handle);
01092 int     mt_WindGet     ( APPvar *app, WINDOW *win, int mode, INT16* par1, INT16* par2, INT16* par3, INT16* par4);
01093 #define mt_WindGetGrect( app, win, mode, grect ) mt_WindGet( app, win, mode, &((grect)->g_x), &((grect)->g_y), &((grect)->g_w), &((grect)->g_h) )
01094 int     mt_WindXGet    ( APPvar *app, WINDOW *win, int mode, GRECT *clip, INT16* par1, INT16* par2, INT16* par3, INT16* par4);
01095 #define mt_WindXGetGrect( app, win, mode, clip, grect ) mt_WindXGet( app, win, mode, clip, &((grect)->g_x), &((grect)->g_y), &((grect)->g_w), &((grect)->g_h) )
01096 void*   mt_WindGetPtr  ( APPvar *app, WINDOW *win, int mode);
01097 int     mt_WindSet     ( APPvar *app, WINDOW *win, int mode, int par1, int par2, int par3, int par4);
01098 #define mt_WindSetGrect( app, win, mode, grect ) mt_WindSet( app, win, mode, (grect)->g_x, (grect)->g_y, (grect)->g_w, (grect)->g_h )
01099 int     mt_WindSetStr  ( APPvar *app, WINDOW *win, int mode, char *str);
01100 int     mt_WindSetPtr  ( APPvar *app, WINDOW *win, int mode, void *par1, void *par2);
01101 int     mt_WindCalc    ( APPvar *app, int type, WINDOW *wind, int xin, int yin, int win, int hin,
01102                          INT16 *xout, INT16 *yout, INT16 *wout, INT16 *hout);
01103 #define mt_WindCalcGrect( app, mode, win, inrect, outrect ) \
01104                           mt_WindCalc( app, mode, win, \
01105                                        (inrect)->g_x, (inrect)->g_y, (inrect)->g_w, (inrect)->g_h, \
01106                                        &(outrect)->g_x, &(outrect)->g_y, &(outrect)->g_w, &(outrect)->g_h )
01107 void    mt_WindSlider  ( APPvar *app, WINDOW *win, int mode);
01108 WINDOW* mt_WindAttach  ( APPvar *app, int handle);
01109 WINDOW* mt_WindFind    ( APPvar *app, int mode, ...);
01110 void    mt_WindTop     ( APPvar *app, WINDOW *win);
01111 void    mt_WindNew     ( APPvar *app);
01112 void    mt_WindClear   ( APPvar *app, WINDOW *win);
01113 
01114 void  __CDECL mt_stdWindClear( WINDOW *win, short buff[8], APPvar *app);
01117 /* Slider library (for window formular) */
01120 void*   mt_SlidCreate  ( APPvar *app, short min, short max, short sinc, short linc, short value, int ori, int upd);
01121 void    mt_SlidDelete  ( APPvar *app, void *slid);
01122 void    mt_SlidAttach  ( APPvar *app, void *slid, int mode, WINDOW *win, int up, int bsld, int sld, int dn);
01123 short   mt_SlidGetValue( APPvar *app, void *slid);
01124 void    mt_SlidSetFunc ( APPvar *app, void *slid, func_doslid func, void *data);
01125 void    mt_SlidSetSize ( APPvar *app, void *slid, int size);
01126 void    mt_SlidSetValue( APPvar *app, void *slid, short value);
01127 void    mt_SlidSetUpdat( APPvar *app, void *slid, int upd);
01130 /* Resource library */
01133 int     mt_RsrcLoad        ( APPvar *app, const char *name);
01134 void    mt_RsrcXtype       ( APPvar *app, int mode, OBJECT **rs_trindex, int num_tree);
01135 void    mt_RsrcFixCicon    ( APPvar *app, OBJECT *object, int num_obs, int num_cib, INT16 palette[][4], void *fix);
01136 void    mt_RsrcFreeCicon   ( APPvar *app, void *fix);
01137 int     mt_RsrcUserDraw    ( APPvar *app, int mode, WINDOW *win, int __index, func_userdraw draw, void *data);
01139 #define mt_RsrcFree(app)    mt_rsrc_free(app->aes_global)
01140 void*   mt_RsrcXload       ( APPvar *app, const char *name);
01141 void    mt_RsrcXfree       ( APPvar *app, void *rsc);
01142 int     mt_RsrcGaddr       ( APPvar *app, void *rsc, int type, int __index, void *addr);
01143 rscHDR* mt_RsrcGhdr        ( APPvar *app, void *rsc);
01146 /* Utility library */
01149 void    mt_give_iconifyxywh
01150                     ( APPvar *app, INT16 *x, INT16 *y, INT16 *w, INT16 *h);
01151 void    mt_snd_rdw  ( APPvar *app, WINDOW *win);
01152 void    mt_snd_arrw ( APPvar *app, WINDOW *win, int msg);
01153 void    mt_snd_msg  ( APPvar *app, WINDOW *win, int msg, int par1, int par2, int par3, int par4);
01154 void    rc_set      ( GRECT *, int, int, int, int);
01155 void    rc_lset     ( LGRECT *, long, long, long, long);
01156 void    w_getpal    ( APPvar *app, WINDOW *win);
01157 void    w_setpal    ( APPvar *app, WINDOW *win);
01158 int     w_get_hndl  ( APPvar *app, WINDOW *win);
01159 void    w_get_bkgr  ( APPvar *app, int of_x, int of_y, int of_w, int of_h, MFDB *img);
01160 void    w_put_bkgr  ( APPvar *app, int of_x, int of_y, int of_w, int of_h, MFDB *img);
01161 int     keybd2ascii ( int keybd, int shift);
01162 char*   conv_path   ( char *);
01163 
01164 int     mt_ShelHelp ( APPvar *app, char *file, char *chapter);
01165 int     mt_ShelWrite   ( APPvar *app, char *prg, char *cmd, void *env, int av, int single);
01166 void    mt_DebugWindom ( APPvar *app, const char *format, ...);
01167 void*   Galloc      ( long size);
01168 void    mt_GrectCenter ( APPvar *app, int w, int h, INT16 *x, INT16 *y );
01169 
01170 void mt_ClipOn  ( APPvar *app, W_GRAFPORT *graf, GRECT *r);
01171 void mt_ClipOff ( APPvar *app, W_GRAFPORT *graf);
01172 
01173 void    rc_lgrect2grect ( GRECT *, const LGRECT *);
01174 void    rc_grect2lgrect ( LGRECT *, const GRECT *);
01175 short   rc_lintersect (const LGRECT * r1, LGRECT * r2);
01176 
01181 /* Component library (FIXME: experimental) */
01185 /*
01186  * Maximal value of a component width of height.
01187  */
01188 #define CPNT_MAXSIZE  (LONG_MAX)
01189 
01193 #define CLT_VERTICAL    0
01194 #define CLT_HORIZONTAL  1
01195 #define CLT_STACK   2
01196 
01200 #define CS_INTERACTIVE      0x0010  
01201 #define CS_HSLIDE       0x0020
01202 #define CS_VSLIDE       0x0040
01203 #define CS_HIDDEN       0x0080
01204 #define CS_CLIP         0x0100
01205 #define CS_PROPORTIONAL     0x0200  
01207 #define CS_RESERVED     0x00010000UL  
01208 #define CS_FOCUSED      0x00020000UL  
01209 #define CS_IN_USE       0x00080000UL  
01210 #define CS_DESTROYED        0x00040000UL  
01215 #define CM_GETFOCUS     0x44c0  
01216 #define CM_LOSEFOCUS        0x44c1  
01217 #define CM_REFLOW       0x44c2  
01218 #define CM_REPOSED      0x44c3  
01224 #define CF_WINDOW      0x44e0   
01225 #define CF_MAXSIZE     0x44e1   
01226 #define CF_HSLIDE      0x44d0   
01227 #define CF_VSLIDE      0x44d1   
01228 #define CF_FOCUS       0x44d2   
01233 #define WD_CCRT 0x43435254L 
01234 #define WD_CCWD 0x43435744L 
01235 #define WD_CWGT 0x43573743L 
01242 typedef struct _component {
01243     LINKABLE    item;               
01245     short       type;               
01246     unsigned long   status;             
01247     short       flex;               
01248     short       size;               
01249     LGRECT      rect;               
01250     W_GRAFPORT  *graf;              
01253     struct {
01254         unsigned long   min_width;  
01255         unsigned long   max_width;  
01256         unsigned long   min_height; 
01257         unsigned long   max_height; 
01258     } bounds;
01259 
01260     struct _component   *parent;    
01261     LIST            *children;      
01262     LIST            binding;        
01263     LIST            data;           
01264 } COMPONENT;
01265 
01266 
01267 #define FOR_EACH_CHILD( i, list )   \
01268     listForEach( COMPONENT *, i, list ) \
01269         if ( !(((COMPONENT*)(i))->status & CS_HIDDEN) )
01270 
01271 
01272 /* WINDOM slider component data interface values */
01273 #define CDT_SLIDER_POS      0x455f4dUL  /* WF_[VH]SLIDE-like data values (from the range 0-1000) */
01274 #define CDT_SLIDER_SIZE     0x455f4eUL  /* WF_[VH]SLSIZE-like data value (from the range 0-1000) */
01275 #define CDT_SLIDER_CONTROL  0x455f4fUL  /* The pointer to a slider controlled component */
01276 
01277 
01278 /* COMPONENT essentials */
01279 COMPONENT *mt_CompCreate( APPvar *app, short type, long size, short flex );
01280 COMPONENT *mt_CompFind( APPvar *app, COMPONENT *p, short mx, short my);
01281 int   mt_CompDelete( APPvar *app, COMPONENT *p );
01282 void  mt_CompAttach( APPvar *app, COMPONENT *p, COMPONENT *c);
01283 
01284 /* COMPONENT data handling functions */
01285 int   mt_CompDataAttach( APPvar *app, COMPONENT *c, long magic, void *data);
01286 int   mt_CompDataDelete( APPvar *app, COMPONENT *c, long magic);
01287 void *mt_CompDataSearch( APPvar *app, COMPONENT *c, long magic);
01288 
01289 #if 0
01290 // FIXME: not used/usefull yet
01291 void    mt_CompGet( APPvar *app, COMPONENT *c, short mode, long *par1, long *par2, long *par3, long *par4 );
01292 #define mt_CompGetLGrect( app, win, mode, grect ) mt_CompGet( app, win, mode, (grect)->g_x, (grect)->g_y, (grect)->g_w, (grect)->g_h )
01293 #endif
01294 
01295 int mt_CompSet( APPvar *app, COMPONENT *c, short type, long par1, long par2, long par3, long par4 );
01296 int mt_CompSetPtr( APPvar *app, COMPONENT *c, short mode, void *par1, void *par2);
01297 int mt_CompGetLGrect( APPvar *app, COMPONENT *c, short type, LGRECT *rect);
01298 void*   mt_CompGetPtr( APPvar *app, COMPONENT *c, short type);
01299 
01300 /* COMPONENT handler functions */
01301 #ifdef __WINDOM__  /* for the non-mt version, the last APPvar parameter doesn't exist */
01302 typedef void __CDECL (* func_comp_evntdata)(COMPONENT *, long buff[8], void *);
01303 typedef void __CDECL (* func_comp_evnt    )(COMPONENT *, long buff[8]);
01304 #else
01305 typedef void __CDECL (* func_comp_evntdata)(COMPONENT *, long buff[8], void *, APPvar *app);
01306 typedef void __CDECL (* func_comp_evnt    )(COMPONENT *, long buff[8], APPvar *app);
01307 #endif
01308 
01309 int   mt_CompEvntAdd( APPvar *app, COMPONENT *p, short msg, func_comp_evnt proc, int mode);
01310 int   mt_CompEvntDataAdd( APPvar *app, COMPONENT *c, short msg, func_comp_evntdata proc, void* data, int mode);
01311 int   mt_CompEvntAttach( APPvar *app, COMPONENT *p, short msg, func_comp_evnt proc);
01312 int   mt_CompEvntDataAttach( APPvar *app, COMPONENT *c, short msg, func_comp_evntdata proc, void* data);
01313 int   mt_CompEvntExec  ( APPvar *app, COMPONENT *p, long buff[8]);
01314 void  mt_CompEvntClear( APPvar *app, COMPONENT *c);
01315 int   mt_CompEvntRemove( APPvar *app, COMPONENT *c, int msg, void *proc);
01316 int   mt_CompEvntDelete( APPvar *app, COMPONENT *c, int msg);
01317 void  mt_CompEvntEnable( APPvar *app, COMPONENT *c, int msg);
01318 void  mt_CompEvntDisable( APPvar *app, COMPONENT *c, int msg);
01319 void  mt_CompEvntRedraw( APPvar *app, COMPONENT *c); /* evnt_redraw.c */
01320 void  mt_CompEvntRedrawLGrect( APPvar *app, COMPONENT *c, LGRECT *rdraw); /* evnt_redraw.c */
01321 
01325 #define WD_CPNT_HSLIDE_INFO  0x43485349L /* 'CHSI' horizontal slider info */
01326 #define WD_CPNT_VSLIDE_INFO  0x43565349L /* 'CVSI' vertical slider info */
01327 
01328 #ifndef VSLIDERINFO
01329 #define VSLIDERINFO(app,c)  ((C_SLIDERINFO*)mt_CompDataSearch( app, c, WD_CPNT_VSLIDE_INFO))
01330 #endif
01331 #ifndef HSLIDERINFO
01332 #define HSLIDERINFO(app,c)  ((C_SLIDERINFO*)mt_CompDataSearch( app, c, WD_CPNT_HSLIDE_INFO))
01333 #endif
01334 
01335 typedef struct _sliderinfo {
01336     long  pos;
01337     long  max;
01338     short unit;
01339 } C_SLIDERINFO;
01340 
01341 /* FIXME: 1. attach the WINDOW slider to a particular COMPONENT */
01342 /* FIXME: 2. attach COMPONENT private slider (rewrite the widget display) */
01343 int   mt_CompSliderAttach(APPvar *app, COMPONENT *p, short type);
01344 
01347 __END_DECLS
01348 
01349 #endif /* __MT_WINDOM__ */

Generated on Thu Jun 22 11:45:27 2006 for WinDom by  doxygen 1.4.6