globals.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/globals_8h-source.html,v $
00020  * Module : definition of internal structures
00021  *
00022  * CVS info:
00023  *   $Author: bercegeay $
00024  *   $Date: 2006/06/22 11:58:27 $
00025  *   $Revision: 1.5 $
00026  */
00027 
00028 
00029 #ifndef __WINDOM_GLOBAL__
00030 #define __WINDOM_GLOBAL__
00031 
00032 #include <stdarg.h>
00033 #include <stddef.h>
00034 #include <assert.h>
00035 
00036 #include "wportab.h"
00037 #include "options.h"
00038 
00039 /* TOS library */
00040 
00041 /* Pure C has non-standard libraries */
00042 #ifdef __PUREC__
00043 # include <tos.h>
00044 #else
00045 # ifdef __SOZOBONX__
00046 #  include <atari.h>  /* for DTA definition */
00047 # endif
00048 # include <osbind.h>
00049 # include <mintbind.h>
00050 # include <fcntl.h>
00051 #endif
00052 
00053 /* error codes unified for all libc */
00054 #include "toserror.h"
00055 
00056 #define APPRSVD struct APPprivate_struct
00057 
00058 /* AES / VDI library */
00059 
00060 #ifndef __COMPILER_H__
00061 #include <compiler.h>
00062 #endif
00063 
00064 #ifdef __PUREC__
00065 # include "..\include\windom\list.h"
00066 # include "..\include\mt_wndm.h"
00067 # include "..\include\windom\udlib.h"
00068 #else
00069 # undef NIL
00070 # include "../include/windom/list.h"
00071 # include "../include/mt_wndm.h"
00072 # include "../include/windom/udlib.h"
00073 #endif
00074 
00075 
00076 /* some private constantes and structures */
00077 
00078 /* Magic */
00079 #define SCREENMGR       1
00080 
00081 #define CONF(ap) (&ap->priv->config)
00082 #define HI16(a) ((INT16)((long)(a) >> 16) & 0xFFFFL )
00083 #define LO16(a) ((INT16)(long)(a) & 0xFFFFL )
00084 /*#define DEBUG()   {int printf( const char *, ...); printf( "%s:%d\n", __FILE__, __LINE__);}*/
00085 
00086 /* return a true value if the AES can manage menubar within window and if we want the
00087  * AES to handle window-embeded menubar 
00088  */
00089 #define SYSMENU(app) (app->aes4 & AES4_MENUBAR) && (CONF(app)->flag & FLG_MNSYSTEM)
00090 
00091 /* defs for form/toolbar */
00092 #define ROOTS           0
00093 #define OUTLINED_WIDTH  3
00094 
00095 typedef struct ev_msg {
00096         LINKABLE lnk;
00097 
00098         short msg;
00099         func_evntdata proc;
00100         int flags;
00101         void *data;
00102     } EV_MSG;
00103 
00104 
00105 /* Frame structres */
00106 
00107 typedef struct {
00108         struct _window *list, *front,  *widget;
00109         int border;
00110         int color;
00111         int flags;
00112         int line, col;
00113     } FRAME;
00114 
00115 typedef struct {
00116         int line, col;
00117         int x,y,w,h;
00118         int flags;
00119         int vsldpos,vsldsize;
00120         int hsldpos,hsldsize;
00121     } FRAMEINFO;
00122 
00123 #define GETFINFO(app,win)   ((FRAMEINFO*)mt_DataSearch( app, win, WD_WFRI))
00124 
00125 /* Evnt Mesag Flags */
00126 #define EVM_DISABLE     0x2
00127 #define EVM_IN_USE      0x4
00128 #define EVM_DELETED     0x8
00129 
00130 /* ApplGet/Set values */
00131 /* nota: similar to WFORM in windom.h */
00132 #define FCENTER     6
00133 
00134 #define SYSFONT     0
00135 
00136 /* extended ob_type for G_USERDEF objects; internal to windom */
00137 #define USERDRAW    0xFF    /* reserved for userdef object created by WinDom */
00138 #define XCICON      0x0D    /* userdefined color icon */
00139 #define XSMENU      0x01    /* see menu.c (internal) */
00140 
00141 /* maybe GEMlib is the right place for this ? */
00142 #define _FSM 0x5F46534DUL
00143 
00144 /* copy GRECT to/from msg[4..7] */
00145 static inline void grect2msg( const GRECT *grect, short buff[8]) {
00146     *(GRECT*)&buff[4] = *grect;
00147 }
00148 
00149 static inline void msg2grect( const short buff[8], GRECT *grect) {
00150     *grect = *(const GRECT*)&buff[4];
00151 }
00152 
00160 typedef struct _config {
00207         unsigned short flag;
00216         short   wicon;
00225         short   hicon;
00236         short   bgcolor;
00248         short   bgpatt;
00260         short   bgstyle;
00276         short   key_color;
00292         ATTRIB  string;
00308         ATTRIB  button;
00323         ATTRIB  exit;
00339         ATTRIB  title;
00354         ATTRIB  xedit_text;
00369         ATTRIB  xedit_label;
00381         short   xedit_curs_color;
00396         ATTRIB  xlongedit;
00404         short   xlgedt_smlfnt;
00419         ATTRIB  xtedinfo;
00427         short   xtdinf_smlfnt;
00444         short   actmono;
00454         short   actcol;
00465         short   menu_effect;
00476         ATTRIB  bubble;
00497         short   popcolor;
00509         short   popborder;
00521         short   popfcolor;
00537         short   poppatt;
00550         short   popwind;        /* -1 (defaut), 0 (blocking) ou 1 (preemptive) */
00583         short   wcenter;        /* CENTER, MOUSE, UP_RIGHT, UP_LEFT, DN_RIGHT, DU_LEFT */
00591         short   weffect;        /* -1 (defaut), 0 (off), 1 (on) */
00599         short   mwidget;        /* GEM window attribute for modal formulars */
00607         short   fwidsize;       /* Frame widgets size */
00618         char    *udlib_filenames;
00619 } CONFIG;
00620 
00621 typedef struct _bind {
00622         short type;  
00624         union {
00626             struct {
00627                 int *var;  
00628                 int value; 
00629             } var;
00631             struct {
00632                 int *var;  
00633                 unsigned short bit; 
00634             } bit;
00636             struct {
00637                 union {
00638                     func_bind     form;  
00639                     func_bind     tb;    
00640                     func_bindmenu menu;  
00641                 } f; 
00642                 void *data;  
00643             } func;
00644         } desc;
00645     } BIND;
00646 
00647 /*
00648  *  Stucture pointed by ub_parm
00649  *  for userdef objects
00650  */
00651 
00652 typedef struct {
00653         long  wp_spec;
00654         int   wp_type;
00655         APPvar *wp_app;
00656     } W_PARM;
00657 
00658 /*
00659  *  hierachical menus
00660  */
00661 
00662 typedef struct {
00663         char *string;
00664         OBJECT *mn_tree;
00665         int mn_menu, mn_item, mn_scroll;
00666         APPvar *app;
00667     } SMENU;
00668 
00669 
00670 /*
00671  * APPprivate
00672  */
00673 
00674 #include "fsel.h" /* SLCT_STR */
00675 
00676 struct ty_obspec_dup {
00677     OBJECT * p_ob;    /* pointer to the duplicated object */
00678     void   * p_mem;   /* address of the allocated memory for this duplicated object */
00679     struct ty_obspec_dup * next;
00680 }; 
00681 
00682 /* user_draw special type */
00683 typedef struct {
00684         WINDOW *win;
00685         func_userdraw draw;
00686         void *data;
00687         APPvar *app;
00688     } USER_DRAW;
00689 
00690 /* list of windows */
00691 typedef struct __windowlist{
00692     WINDOW *win;
00693     struct __windowlist *next;
00694 } WINDOWLIST;
00695 
00696 
00697 typedef struct ulib_obj_struct {
00698     LINKABLE lnk;
00699     OBJECT *tree;
00700     short ob;
00701     short ob_type;
00702 } UDLIB_OBJ;
00703 
00704 typedef struct udef_lib_struct {
00705     LINKABLE lnk;
00706     APPENV *env;
00707     enum { udlib_internal, udlib_ldg } type;
00708     enum { udlib_simple, udlib_freedom} mode;
00709     char filename[256];
00710     void *udlib_descriptor;
00711     long   __CDECL (* libinit)      ( APPENV *);
00712     void   __CDECL (* udconfig)     ( UDLIB_CONFIG *, APPENV *);
00713     void   __CDECL (* libexit)      ( APPENV *);
00714     long   __CDECL (* objc_extended)( OBJECT *, long , long , APPENV *);
00715     void   __CDECL (* objc_extfree) ( OBJECT *, long , APPENV *);
00716     char * __CDECL (* objc_string)  ( OBJECT *, long , char *, APPENV *);
00717     long   __CDECL (* objc_char)    ( OBJECT *, long , long , APPENV *);
00718     long   __CDECL (* objc_edit)    ( OBJECT *, long , long , short* , long , long , GRECT *, APPENV *);
00719     long   __CDECL (* objc_edpos)   ( OBJECT *, long , long , long , APPENV *);
00720     long   __CDECL (* objc_unextnd) ( OBJECT *, long , APPENV *);
00721     LIST ob_list;
00722 } UDLIB_LIB;
00723 
00724 typedef struct APPprivate_struct {
00725     
00726     /* previously in APPvar */
00727  
00728     /* cicon.c */
00729     short    xpixelbytes;
00730     short    xscrn_planes;
00731     
00732     /* conf_getline.c */
00733     size_t pos ;
00734     
00735     /* debug_windom.c */
00736     char debug[255];
00737     int first;
00738 
00739     /* font_sel.c */
00740     int init_fontsel;
00741     
00742     /* fsel.c */
00743     SLCT_STR *slct ;
00744     long     *fsel ;
00745 
00746     /* galloc.c */
00747     int type_mxalloc;
00748     
00749     /* global.c */
00750     CONFIG config;
00751     int    _res;     /* screen resolution: 0=low; 1=high */ 
00752     WINDOWLIST *__windowlist; /* list of windows, from bottom window to top window */
00753 
00754     WINDOW  *desk;             /* The desktop/application data/binding holding WINDOW instance */
00755 
00756     WORD __iconlist[ MAX_ICON];/* position des icones
00757                                  * 0 position libre
00758                                  */
00759     int __bubble_quit;
00760     int _menu_disabled;   /* used by MenuEnable and MenuDisable */
00761     struct bubble *bubble_index;
00762     char __confpath [FILE_SIZE]; /* WinConf */
00763     struct fontid *listfontid; /* Emulation of Gdos fonts */
00764     int maxfontid;             /* Emulation of Gdos fonts */
00765     char *__confapp_buffer;    /* Configuration of the application */
00766     int __confapp_line_top;    /* Configuration of the application */
00767     int __confapp_line_pos;    /* Configuration of the application */
00768     char *__confdef_buffer;    /* Default configuration */
00769     int __confdef_line_top;    /* Default configuration */
00770     int __confdef_line_pos;    /* Default configuration */
00771     size_t __confgetline_pos;  /* current position used by mt_ConfGetLine() */
00772     char *__av_name;           /* name of the client (our application) */
00773     char __av_server[9];       /* name of the AV server */
00774     INT16 __av_status[3];      /* action provided by the AV server */
00775     
00776     /* mouse_work.c: */
00777     int mouse;
00778 
00779     /* obspec_mem.c */
00780     struct ty_obspec_dup * __list_obspec_dup;
00781 
00782     /* shel_write.c */
00783     char file[FILE_SIZE];
00784 
00785     /* xrsrc.c: */
00786     int xrsrc_init;
00787 
00788     /* RESOURCE forms: */
00789     /* sliders.rsh, frame_init.c */
00790     OBJECT * frame_slider;
00791     /* mnscroll.rsh, mnscroll.c */
00792     OBJECT * mnscroll;
00793     
00794     /* userdefs... */
00795     
00796     LIST udef_lib;
00797     short udlib_vdih; 
00798     int udlib_garbage; 
00803     } APPprivate;
00804     
00805 /*******************************************************************************
00806     RSC header and support struct
00807 *******************************************************************************/
00808 
00809 typedef struct {        /* fichier ressource tendu */
00810   UWORD rsh_vrsn;           /* should be 3                                                           */
00811   UWORD rsh_extvrsn;        /* not used, initialised to 'IN' for Interface */
00812   ULONG rsh_object;
00813   ULONG rsh_tedinfo;
00814   ULONG rsh_iconblk;        /* list of ICONBLKS                             */
00815   ULONG rsh_bitblk;
00816   ULONG rsh_frstr;
00817   ULONG rsh_string;
00818   ULONG rsh_imdata;         /* image data                                       */
00819   ULONG rsh_frimg;
00820   ULONG rsh_trindex;
00821   ULONG rsh_nobs;           /* counts of various structs                    */
00822   ULONG rsh_ntree;
00823   ULONG rsh_nted;
00824   ULONG rsh_nib;
00825   ULONG rsh_nbb;
00826   ULONG rsh_nstring;
00827   ULONG rsh_nimages;
00828   ULONG rsh_rssize;         /* total bytes in resource   */
00829 } RSXHDR;
00830 
00831 typedef struct {
00832     unsigned long   rlen;
00833     unsigned long   cicon_offset;
00834 } NRSHDR;
00835 
00836 #define NRSC_CIBK           0x0004
00837 #define NRSC_LONG           0x0003
00838 
00839 typedef struct {
00840     int         type;
00841     USERBLK     blk;
00842     long        spec;
00843     unsigned    user1;
00844     unsigned    user2;
00845     unsigned    user3;
00846     unsigned    user4;
00847     long        userl;
00848 }   UBLK;
00849 
00850 #include "cicon.h" /* XRSRCFIX */
00851 
00852 typedef struct _rsc {
00853     rscHDR  head;           /*  RSC Header          */
00854     long    adr;            /*  Adr of memory bloc  */
00855     long    len;            /*  Len of memory bloc  */
00856     UBLK    *ublk;          /*  userdef array       */
00857     CICON   *cicon;         /*  color icon array    */
00858     XRSRCFIX fix;           /*  icone couleurs      */
00859 } RSC;
00860 
00861 typedef
00862 struct slider {
00863     short min, max;
00864     short sinc, linc;
00865     int ori;        /* HORI,VERT*/
00866     int upd;        /* */
00867     short value;    /* current value */
00868     func_doslid doslid;
00869     void *data;     /* user data for user function */
00870     int mode;
00871     WINDOW *win;
00872     int up, dn, sld, bsld;
00873 } SLIDER;
00874 
00875 /* for sliders: this adapt the position of the slider box
00876  * to the parent object, so that the slider look pretty
00877  * (NdT: je ne suis pas sur d'avoir tres bien compris)
00878  */
00879 #define SLID_OFFSET 0
00880 
00881 int mt_slid_newpos( APPvar *app, void *_slid);
00882 
00883 typedef struct _thumb {
00884     /* links between buttons and thumb */
00885     int *idxthb;
00886     int *idxbut;
00887     /* number of thumbs */
00888     int nbbut;
00889     /* active thumb (index of idxthb and idxbut) */
00890     int selbut;
00891 } THUMB;
00892 
00895 void __CDECL frm_drw  ( WINDOW *win, short buff[8], APPvar *app);
00896 void __CDECL frm_mvd  ( WINDOW *win, short buff[8], APPvar *app);
00897 void __CDECL frm_tpd  ( WINDOW *win, short buff[8], APPvar *app);
00898 void __CDECL frm_fld  ( WINDOW *win, short buff[8], APPvar *app);
00899 void __CDECL frm_click( WINDOW *win, short buff[8], APPvar *app);
00900 void __CDECL frm_keyhd( WINDOW *win, short buff[8], APPvar *app);
00901 void __CDECL frm_dstry( WINDOW *win, short buff[8], APPvar *app);
00904 void * __malloc_obspec(APPvar *app, OBJECT * p_ob, long size);
00905 void   __free_obspec( APPvar *app, OBJECT * p_ob);
00906 void   __freeall_obspec( APPvar *app);
00907 
00908 int   scrap_txt_write( APPvar *app, char *str);
00909 char *scrap_txt_read ( APPvar *app);
00910 
00911 /* Standard AES WINDOW handlers (that uses mostly gemlib mt_wind_* functions) */
00912 int __CDECL wind_aes_get_root_handle( APPvar *app, WINDOW *win);
00913 int __CDECL wind_aes_get( APPvar *app, WINDOW *win, int mode, GRECT *clip, INT16 *x, INT16 *y, INT16 *w, INT16 *h );
00914 int __CDECL wind_aes_set( APPvar *app, WINDOW *win, int mode, int x, int y, int w, int h );
00915 int __CDECL wind_aes_calc( APPvar *app, WINDOW *wind, int type, int x, int y, int w, int h,
00916                     INT16 *xout, INT16 *yout, INT16 *wout, INT16 *hout);
00917 int __CDECL wind_aes_remove( APPvar *app, WINDOW *win);
00918 
00919 /* for custom WindGet/Set/Calc behaviour structure */
00920 typedef struct {
00921     int __CDECL (*get_root_handle)(  APPvar *app, WINDOW *win);
00922 
00923     int __CDECL (*get)(  APPvar *app, WINDOW *win, int mode, GRECT *clip, INT16 *x, INT16 *y, INT16* w, INT16 *h );
00924     int __CDECL (*set)(  APPvar *app, WINDOW *win, int mode, int par1, int par2, int par3, int par4);
00925     int __CDECL (*calc)( APPvar *app, WINDOW *win, int type, int x, int y, int w, int h,
00926                 INT16 *xout, INT16 *yout, INT16 *wout, INT16 *hout);
00927     int __CDECL (*remove)( APPvar *app, WINDOW *win );
00928 } WIND_HANDLERS;
00929 
00930 
00931 extern OBJECT * get_frame_slider ( APPvar *app);
00932 extern void set_gadget_pos( APPvar *app, WINDOW *frame, GRECT *r1, int mode);
00933 extern void __frame_set_widget( APPvar *app, int parm1);
00934 extern int remove_frame_from_list( APPvar *app, WINDOW *win, WINDOW *child);
00935 #define PROPOR( mode, wmax, w)  ((mode)?((int)((long)wmax * (long)(w) / 100L)):(w))
00936 #define NO_BACKGROUND   0x0002  /* interne */
00937 
00938 extern int  mt_ObjcAttach( APPvar *app, int mode, WINDOW *win, int __index, int type, ...);
00939 extern void mt_RsrcUserFree( APPvar*, OBJECT *);
00940 extern int  is_modal    ( APPvar *app);
00941 extern int  obj_fd_flag ( OBJECT *, int, int);
00942 extern int  obj_fd_xtype( OBJECT *dial, int racine, int flag);
00943 extern int  obj_nb      ( OBJECT *);
00944 extern int  obj_root    ( OBJECT *tree, int idx);
00945 extern void mt_DataClear    ( APPvar *app, WINDOW *win);
00946 extern void mt_DataTrace    ( APPvar *app, WINDOW *win);
00947 extern void mt_AddWindow    ( APPvar *app, WINDOW *win);
00948 extern void mt_RemoveWindow ( APPvar *app, WINDOW *win);
00949 extern void add_slash   ( char *path);
00950 extern void init_scroll_menu( APPvar *app);
00951 extern void exit_scroll_menu( APPvar *app);
00952 extern WORD __CDECL draw_submenu( PARMBLK *pblk);
00953 extern void GemCode2Ascii( int key, int kstate, char *txt);
00954 extern int mt_GetIndexMenu( APPvar *app, OBJECT *menu, int title);
00955 
00956 extern void mt_menu_bind    ( APPvar *app, WINDOW *win, int item, int title);
00957 
00958 int  get_next_obj       ( OBJECT *tree, int __index);
00959 void objc_extended      ( APPvar *app, int mode, OBJECT *tree);
00960 void objc_extfree       ( APPvar *app, OBJECT *tree);
00961 
00962 int objc_wform_edit( APPvar *app, WINDOW *win, W_FORM *wform, OBJECT *tree, int obj, int val, INT16 *idx, int kind);
00963 
00964 int mt_vFormAlert( APPvar *app, int but, char fmt[], va_list list);
00965 int mt_vConfInquire( APPvar *app, char *keyword, char *fmt, va_list args);
00966 int mt_vConfWrite( APPvar *app, char *name, char *fmt, va_list args);
00967 
00968 
00969 /* standard callback functions
00970  */
00973 void __CDECL std_apterm ( WINDOW *, short buff[8], APPvar *app);
00974 void __CDECL std_cls    ( WINDOW *, short buff[8], APPvar *app);
00975 void __CDECL std_tpd    ( WINDOW *, short buff[8], APPvar *app);
00976 void __CDECL std_mvd    ( WINDOW *, short buff[8], APPvar *app);
00977 void __CDECL std_szd    ( WINDOW *, short buff[8], APPvar *app);
00978 void __CDECL std_fld    ( WINDOW *, short buff[8], APPvar *app);
00979 void __CDECL std_icn    ( WINDOW *, short buff[8], APPvar *app);
00980 void __CDECL std_unicn  ( WINDOW *, short buff[8], APPvar *app);
00981 void __CDECL std_allicn ( WINDOW *, short buff[8], APPvar *app);
00982 void __CDECL std_arw    ( WINDOW *, short buff[8], APPvar *app);
00983 void __CDECL std_sldxy  ( WINDOW *, short buff[8], APPvar *app);
00984 void __CDECL std_dnlnd  ( WINDOW *, short buff[8], APPvar *app);
00985 void __CDECL std_uplnd  ( WINDOW *, short buff[8], APPvar *app);
00986 void __CDECL std_lflnd  ( WINDOW *, short buff[8], APPvar *app);
00987 void __CDECL std_rtlnd  ( WINDOW *, short buff[8], APPvar *app);
00988 void __CDECL std_dnpgd  ( WINDOW *, short buff[8], APPvar *app);
00989 void __CDECL std_uppgd  ( WINDOW *, short buff[8], APPvar *app);
00990 void __CDECL std_rtpgd  ( WINDOW *, short buff[8], APPvar *app);
00991 void __CDECL std_lfpgd  ( WINDOW *, short buff[8], APPvar *app);
00992 void __CDECL std_vsld   ( WINDOW *, short buff[8], APPvar *app);
00993 void __CDECL std_hsld   ( WINDOW *, short buff[8], APPvar *app);
00994 void __CDECL std_dstry  ( WINDOW *, short buff[8], APPvar *app);
00995 void __CDECL std_btm    ( WINDOW *, short buff[8], APPvar *app);
00996 
00997 void __CDECL std_comp_reflow  ( COMPONENT *c, long buff[8], APPvar *app );
00999 void __CDECL std_fntchg ( WINDOW *win, short buff[8], APPvar *app);
01000 
01001 void move_screen   ( APPvar *app, int vhandle, GRECT *screen, int dx, int dy);
01002 void move_work_rect( APPvar *app, WINDOW *win, GRECT *rect, int dx, int dy);
01003 void move_work     ( APPvar *app, WINDOW *win, int dx, int dy);
01004 
01005 void __CDECL std_mwk    ( APPvar *app, WINDOW *win);
01006  
01007 
01008 
01009 int  menu_exec_cmd( APPvar *app, WINDOW *win);
01010 void menu_draw_grect( APPvar *app, WINDOW *win, OBJECT *menu, GRECT *work, GRECT *clip);
01011 void wind_menu_draw( APPvar *app, WINDOW *win, GRECT *clip);
01012 int  wind_menu_set( APPvar *app, WINDOW *win, int mode, void *v1, func_evnt handler);
01013 int  frm_menu     ( APPvar *app, WINDOW *win);
01014 int  frm_keybd_ev ( APPvar *app, OBJECT *tree);
01015 int  is_menu      ( APPvar *app, WINDOW *win);
01016 int ob_istype     ( APPvar *app, OBJECT *tree, int ob, int type);
01017 
01018 /* Directive for experimentation on size of executable */
01019 int  frm_buttn_ev ( APPvar *app, WINDOW *win, int mode);
01020 void _do_update   ( APPvar *app, WINDOW *win, short buff[8]);
01021 
01022 void list_ev_msg  ( APPvar * app, WINDOW *win, char *str);
01023 
01024 void get_appname  ( APPvar *app, char *name);
01025 
01026 int     vq_mint     ( void);
01027 int     vq_magx     ( void);
01028 int     vq_extfs    ( char *);
01029 
01030 /* __windowlist management */
01031 extern WINDOW *wlst_get_bottom      ( APPvar *app);
01032 extern WINDOW *wlst_get_next        ( APPvar *app, WINDOW *win);
01033 extern WINDOW *wlst_get_top         ( APPvar *app);
01034 extern void    wlst_remove          ( APPvar *app, WINDOW *win);
01035 extern void    wlst_add_bottom      ( APPvar *app, WINDOW *win);
01036 extern void    wlst_add_top         ( APPvar *app, WINDOW *win);
01037 extern void    wlst_recompute_wglb  ( APPvar *app);
01038 
01039 
01040 /*  Emulation of Gdos fonts */
01041 struct fontid {
01042     char name[44];
01043     int  id;
01044     int flags;      /* monospaced, vectoriel, etc ... */
01045 };
01046 extern int load_fontid( APPvar *app);
01047 extern void close_fontid( APPvar *app);
01048 
01049 /* bubble GEM */
01050 struct bubble {
01051     OBJECT *tree;
01052     int index;
01053     char *help;
01054     struct bubble *next;
01055 };
01056 extern void mt_snd_mu_button( APPvar *app, int mbut, int nbclick);
01057 
01058 extern long __cookieptr(void);
01059 
01060 #ifdef BETAMENU
01061 extern int frm_menu_beta( APPvar *app, WINDOW *win);
01062 #endif
01063 
01064 #ifdef WINDOMDEBUG
01065     #define LOGFILE "C:\\gemsys\\log\\windom.log"
01066 #endif
01067 
01068 /* userdef library */
01069 int udlib_reinit ( APPvar *app);
01070 int udlib_exit ( APPvar *app);
01071 int udlib_garbage ( APPvar *app);
01072 int udlib_extended( APPvar *app, OBJECT *tree, int ob, int mode);
01073 int udlib_unextended( APPvar *app, OBJECT *tree, int ob, OBJECT *cpy);
01074 int udlib_extfree ( APPvar *app, OBJECT *tree, int ob);
01075 int udlib_add_obj( UDLIB_LIB *udlib, OBJECT *tree, int ob, int ob_type) ;
01076 int udlib_rm_obj ( UDLIB_LIB *udlib, OBJECT *tree, int ob) ;
01077 int udlib_string( APPvar *app, OBJECT *tree, int ob, char *put, char **retval);
01078 int udlib_char( APPvar *app, OBJECT *tree, int ob, int put, int *retval);
01079 int udlib_edit( APPvar *app, OBJECT *tree, int ob, int val, short *idx, int kind, int nclip, GRECT *gclip);
01080 int udlib_get_edpos( APPvar *app, OBJECT *tree, long object, long x, long y);
01081 int udlib_get_type( APPvar *app, OBJECT *tree, int object);
01082 UDLIB_OBJ * udlib_objfind( UDLIB_LIB *udlib, OBJECT *tree, int ob);
01083 
01084 int    udlib_ConfSetLib( APPvar *app, const char *libname);
01085 int    udlib_ConfAddLib( APPvar *app, const char *libname, short head);
01086 char * udlib_ConfGetFirstLib( APPvar *app);
01087 char * udlib_ConfGetNextLib( char *prev);
01088 
01089 
01090 short __CDECL cdecl_draw_cicon( long vdih, OBJECT *tree, long ob, long ob_state, long ob_x, long ob_y);
01091 
01092 /* BEGIN: COMPONENT stuff */
01093 
01094 /* Internally used by the COMPONENT resize (status field) handler */
01095 #define CS_FIX_FLEX 0x8000
01096 
01097 /* Slider components linked to a WIDGET WINDOW */
01098 #define CDT_VSLID       0x455e4dUL  /* 'COM' */
01099 #define CDT_HSLID       0x455e4eUL  /* 'COM' */
01100 
01101 /* from src/comp_szd.c */
01102 COMPONENT *comp_reflow( COMPONENT *c, APPvar *app );
01103 
01104 /* from src/comp_create.c */
01105 void comp_dfs( COMPONENT *p, long *buff, APPvar *app );
01106 
01107 COMPONENT *win_comp_get( APPvar *app, WINDOW *win);
01108 void       win_comp_attach( APPvar *app, WINDOW *win, COMPONENT *c);
01109 COMPONENT *win_comp_getfocus( APPvar *app, WINDOW *win );
01110 void       win_comp_setfocus( APPvar *app, WINDOW *win, COMPONENT *f );
01111  
01112 /* from comp_slider.c */
01113 #define CDT_OBJECT 0x004f424aUL  /* '\0OBJ' */
01114 int comp_slider_set(  APPvar *app, WINDOW *win, COMPONENT *wgtc, int mode, int par1, int par2, int par3, int par4);
01115 COMPONENT *comp_objc_create( APPvar *app, OBJECT *o, short type, long size, short flex );
01116 
01117 /* from comp_window.c */
01118 COMPONENT *comp_wind_create( APPvar *app, WINDOW *w, short type, long size, short flex );
01119 
01120 /* from comp_widget.c */
01121 int comp_widget_set(  APPvar *app, WINDOW *win, COMPONENT *wgtc, int mode, int par1, int par2, int par3, int par4);
01122 COMPONENT *comp_widget_create( APPvar *app, WINDOW *win, int size, int flex );
01123 
01124 /* from comp_slider.c */
01125 COMPONENT *comp_slider_create( APPvar *app, int mode, int width, int sz, int flex );
01126 void comp_slider_link( APPvar *app, COMPONENT *c, COMPONENT *s, int mode );
01127 
01128 /* from comp_split.c */
01129 COMPONENT *comp_split_create( APPvar *app, int mode, int sz );
01130 
01131 /* data.c */
01132 extern void mt_CompDataClear( APPvar *app, COMPONENT *c);
01133 extern void mt_CompDataTrace( APPvar *app, COMPONENT *c);
01134 /* END: COMPONENT stuff */
01135 
01136 
01137 extern APPvar * __mt_ApplInit( short *global);
01138 extern int      __mt_ApplExit( APPvar *app);
01139 
01140 #endif /* __WINDOM_GLOBAL__ */

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