/****************************************************************************************/
/*                                                                                      */
/*              load_win.h                                                              */
/*                                                                                      */
/****************************************************************************************/


// Modification History
//
//$LB (16/12/2003) : add _SETwindowTransparency and _SIMULATEwindowTransparency


#ifndef _LOAD_WIN_H_
#define _LOAD_WIN_H_


#include "objects/win.h"
#include "objects/bitmap.h"


/************************************************************************************/ 
/*                                                                                  */ 
/*      Package sur les fonctions de fenetres                                       */ 
/*                                                                                  */ 
/************************************************************************************/ 
//$BLG - v4.6a7: Modif - _TOPMOSTwindow
//#define WINPKGSIZE          49
//$BLG - v5.21: Modif - _CLICKwindow, _UNCLICKwindow, _DBLCLICKwindow, _MOUSEMOVEwindow,
//											_KEYDOWNwindow, _KEYUPwindow
//#define WINPKGSIZE          50
#define WINPKGSIZE          58
char *winpkgname [WINPKGSIZE] = {
    "_CRwindow" ,"_DSwindow" , "_SHOWwindow" , "_MVwindow" ,
    "_TXTout" ,"_SETwindowName" , "_SIZEwindow" , "_GETwindowSizePosition" ,
    "_CBwinPaint" , "_CBwinMove" , "_CBcursorMove" , "_GETwindowExSizePosition" ,
    "_CBwinSize" , "_CBwinClick" , "_CBwinUnclick" , "_CBwinKeydown" ,
    "_CBwinKeyup" , "_CBwinDestroy" ,"_CBwinClose" , "_SETfocus"  , "_PAINTwindow" ,
    "_PAINTcircle" , "_PAINTline" , "_PAINTrectangle" , "_GETscreenSize" , "_GETdesktopSize",
    "_CBwinFocus" , "_CBwinKillFocus" , "_POSITIONwindow" , "_GETwindowPositionSize" ,
    "_GETwindowExPositionSize" , "_CBwinDClick" , "_CBwinDropFile", "_TOPwindow" ,
    //$BLG: v4.6a7 - Add
    "_TOPMOSTwindow",
    //$BLG - v5.21: Add
    "_CLICKwindow", "_UNCLICKwindow", "_DBLCLICKwindow", "_MOUSEMOVEwindow",
    "_KEYDOWNwindow", "_KEYUPwindow",
    
    "_POSITIONwindowEx" , "_SIZEwindowEx" , "_SETwindowMinSize" , "_SETwindowMaxSize" ,   
    "_ENwindow" , "_CLRwindow" , "_GETsysColor" , "_CRscrollWindow",
	"_SETwindowStyle","_FULLSCREENwindow","_DESKTOPwindow","_CBwinWheel",
	"_CBwinSuspend","_CBwinResume",
	//$LB (16/12/2003)
	"_SETwindowTransparency",
	//$LB (16/12/2003)
	"_SIMULATEwindowTransparency",
  //$BB
  "_SETwindowIcon"
} ;


char * winpkgtype [WINPKGSIZE] = {
"fun [ Chn ObjWin I I I I I S ] ObjWin" ,               /* _create_window               */ 
"fun [ ObjWin ] I",                                     /* _destroy_obj_win             */ 
"fun [ ObjWin I ] ObjWin",                              /* _show_window                 */ 
"fun [ ObjWin I I ] ObjWin",                            /* _move_window                 */ 
"fun [ ObjWin ObjFont I I I I S] ObjWin" ,              /* _text_out                    */     
"fun [ObjWin S] ObjWin" ,                               /* _set_window_name             */ 
"fun [ObjWin I I I I] ObjWin" ,                         /* _resize_window               */ 
"fun [ObjWin] [ I I I I ]" ,                            /* _get_size_position_window    */ 
"fun [ObjWin fun [ ObjWin u0 ] u1 u0] ObjWin" ,         /* _reflex_win_paint            */    
"fun [ObjWin fun [ ObjWin u0 I I] u1 u0] ObjWin" ,      /* _reflex_win_move             */ 
"fun [ObjWin fun [ ObjWin u0 I I I ] u1 u0] ObjWin" ,   /* _reflex_cursor_move          */ 
"fun [ObjWin] [ I I I I ]" ,                            /* _get_size_position_window_ex */ 
"fun [ObjWin fun [ ObjWin u0 I I] u1 u0] ObjWin" ,      /* _reflex_win_size             */ 
"fun [ObjWin fun [ ObjWin u0 I I I] u1 u0] ObjWin" ,    /* _reflex_win_click            */ 
"fun [ObjWin fun [ ObjWin u0 I I I] u1 u0] ObjWin" ,    /* _reflex_win_unclik           */ 
"fun [ObjWin fun [ ObjWin u0 I I] u1 u0] ObjWin" ,      /* _reflex_win_keydown          */ 
"fun [ObjWin fun [ ObjWin u0 I] u1 u0] ObjWin" ,        /* _reflex_win_keyup            */ 
"fun [ObjWin fun [ ObjWin u0] u1 u0] ObjWin" ,          /* _reflex_win_destroy          */ 
"fun [ObjWin fun [ ObjWin u0] u1 u0] ObjWin" ,          /* _reflex_win_close          */ 
"fun [ObjWin] ObjWin" ,                                 /* _set_focus                   */ 
"fun [ObjWin] ObjWin" ,                                 /* _paint_obj_win               */ 
"fun [ ObjWin I I I I I I I I] ObjWin" ,                /* _draw_circle                 */ 
"fun [ ObjWin I I I I I I I ] ObjWin" ,                 /* _draw_line                   */ 
"fun [ ObjWin I I I I I I I I I] ObjWin",               /* _draw_rectangle              */ 
"fun [ ] [I I ] " ,                                     /* _get_screen_size             */ 
"fun [ ] [I I ] " ,                                     /* _get_desktop_size            */ 
"fun [ ObjWin fun [ ObjWin u0 ] u1 u0] ObjWin",         /* _reflex_win_focus            */ 
"fun [ ObjWin fun [ ObjWin u0 ] u1 u0] ObjWin",         /* _reflex_win_killfocus        */ 
"fun [ ObjWin I I I I ] ObjWin" ,                       /* _set_position_size_window    */ 
"fun [ ObjWin ] [ I I I I ]",                           /* _get_position_size_window    */ 
"fun [ ObjWin ] [ I I I I ]",                           /* _get_position_size_window_ex */ 
"fun [ObjWin fun [ObjWin u0 I I I] u1 u0] ObjWin",      /* _reflex_window_double_click  */ 
"fun [ObjWin fun [ObjWin u0 I I [P r1]]u1 u0] ObjWin",  /* _reflex_window_drop_file     */ 
"fun [ObjWin] ObjWin",                                  /* _top_window                  */ 
//$BLG: v4.6a7 - Add
"fun [ObjWin I I] ObjWin",															/* _TOPMOSTwindow               */
//$BLG - v5.21: Add
"fun [ObjWin ObjWin I I I] ObjWin",											/* _CLICKwindow									*/
"fun [ObjWin ObjWin I I I] ObjWin",											/* _UNCLICKwindow								*/
"fun [ObjWin ObjWin I I I] ObjWin",											/* _DBLCLICKwindow							*/
"fun [ObjWin ObjWin I I I] ObjWin",											/* _MOUSEMOVEwindow							*/
"fun [ObjWin ObjWin I I] ObjWin",												/* _KEYDOWNwindow								*/
"fun [ObjWin ObjWin I] ObjWin",													/* _KEYUPwindow									*/

"fun [ObjWin I I I I] ObjWin",                          /* _position_window_ex          */ 
"fun [ObjWin I I I I] ObjWin",                          /* _size_window_ex              */ 
"fun [ObjWin I I] ObjWin",                              /* _set_window_min_size         */ 
"fun [ObjWin I I] ObjWin",                              /* _set_window_max_size         */ 
"fun [ObjWin I] ObjWin",                                /* _enable_window               */ 
"fun [ObjWin] ObjWin" ,                                 /* _clear_window                */ 
"fun [I] I",                                            /* _get_sys_color               */ 
"fun [Chn ObjWin I I I I I I I S] [ObjWin ObjWin]",      /* _create_scroll_window        */ 
"fun [ObjWin I] ObjWin",									/* _set_window_style		*/
"fun [ObjWin I I] I",
"fun [ObjWin] I",
"fun [ObjWin fun [ObjWin u0 I I I I] u1 u0] ObjWin",    /* _reflex_window_wheel  */ 
"fun [ObjWin fun [ObjWin u0] u1 u0] ObjWin",    /* _reflex_window_suspend  */ 
"fun [ObjWin fun [ObjWin u0] u1 u0] ObjWin",    /* _reflex_window_restore  */ 
//$LB (16/12/2003)
"fun [ObjWin I I I] ObjWin",                      /* _SETwindowTransparency */
//$LB (16/12/2003)
"fun [ObjWin I] ObjWin",                           /* _SIMULATEwindowTransparency */
"fun [ObjWin P] ObjWin"                           /* _SETwindowIcon */
};


#define NARG_CREATE_WINDOW              8
#define NARG_DESTROY_OBJ_WIN            1
#define NARG_MOVE_WINDOW                3
#define NARG_SHOW_WINDOW                2
#define NARG_TEXT_OUT                   7
#define NARG_RESIZE_WINDOW              5
#define NARG_GET_SIZE_POSITION_WINDOW   1
#define NARG_REFLEX_WIN_PAINT           3
#define NARG_REFLEX_WIN_MOVE            3
#define NARG_REFLEX_CURSOR_MOVE         3
#define NARG_REFLEX_WIN_SIZE            3
#define NARG_REFLEX_WIN_CLICK           3
#define NARG_REFLEX_WIN_UNCLICK         3
#define NARG_REFLEX_WIN_KEYDOWN         3
#define NARG_REFLEX_WIN_KEYUP           3
#define NARG_SET_WINDOW_NAME            2
#define NARG_HIDE_WINDOW                1
#define NARG_UNHIDE_WINDOW              1
#define NARG_REFLEX_WIN_DESTROY         3
#define NARG_REFLEX_WIN_CLOSE           3
#define NARG_SET_FOCUS                  1
#define NARG_PAINT_OBJ_WIN              1
#define NARG_PAINT_CIRCLE               9
#define NARG_PAINT_LINE                 8
#define NARG_PAINT_RECTANGLE            10
#define NARG_GET_SCREEN_SIZE            0
#define NARG_GET_DESKTOP_SIZE           0
#define NARG_REFLEX_WIN_FOCUS           3
#define NARG_REFLEX_WIN_KILLFOCUS       3
#define NARG_REFLEX_WIN_DCLICK          3
#define NARG_REFLEX_WIN_DROPFILE        3
#define NARG_TOP_WINDOW                 1
//$BLG: v4.6a7 - Add
#define NARG_TOPMOST_WINDOW							3
//$BLG - v5.21: Add
#define NARG_CLICK_WINDOW								5
#define NARG_UNCLICK_WINDOW							5
#define NARG_DBLCLICK_WINDOW						5
#define NARG_MOUSEMOVE_WINDOW						5
#define NARG_KEYDOWN_WINDOW							4
#define NARG_KEYUP_WINDOW								3

#define NARG_POSITION_EX_WIN            5
#define NARG_SET_WINDOW_MIN_SIZE        3
#define NARG_SET_WINDOW_MAX_SIZE        3
#define NARG_ENABLE_WINDOW              2
#define NARG_CLEAR_WINDOW               1
#define NARG_GET_BKCOLOR                1
#define NARG_CREATE_SCROLL_WINDOW       10
#define NARG_SET_WINDOW_STYLE			2
#define NARG_FULLSCREEN_WINDOW			3
#define NARG_DESKTOP_WINDOW				1
#define NARG_REFLEX_WIN_WHEEL           3
//$LB (16/12/2003)
#define NARG_WIN_TRANSP                 4
//$LB (16/12/2003)
#define NARG_WIN_SIMULATE               2
//$BB
#define NARG_WIN_SETICON                2


int winpkgarg [WINPKGSIZE] = {
    NARG_CREATE_WINDOW , NARG_DESTROY_OBJ_WIN , NARG_SHOW_WINDOW , NARG_MOVE_WINDOW ,
    NARG_TEXT_OUT , NARG_SET_WINDOW_NAME , NARG_RESIZE_WINDOW , NARG_GET_SIZE_POSITION_WINDOW ,
    NARG_REFLEX_WIN_PAINT , NARG_REFLEX_WIN_MOVE , NARG_REFLEX_CURSOR_MOVE , NARG_GET_SIZE_POSITION_WINDOW ,
    NARG_REFLEX_WIN_SIZE , NARG_REFLEX_WIN_CLICK , NARG_REFLEX_WIN_UNCLICK , NARG_REFLEX_WIN_KEYDOWN , 
    NARG_REFLEX_WIN_KEYUP , NARG_REFLEX_WIN_DESTROY , NARG_REFLEX_WIN_CLOSE , NARG_SET_FOCUS , NARG_PAINT_OBJ_WIN ,
    NARG_PAINT_CIRCLE , NARG_PAINT_LINE , NARG_PAINT_RECTANGLE , NARG_GET_SCREEN_SIZE , NARG_GET_DESKTOP_SIZE,
    NARG_REFLEX_WIN_FOCUS , NARG_REFLEX_WIN_KILLFOCUS , NARG_RESIZE_WINDOW , NARG_GET_SIZE_POSITION_WINDOW ,
    NARG_GET_SIZE_POSITION_WINDOW , NARG_REFLEX_WIN_DCLICK , NARG_REFLEX_WIN_DROPFILE , NARG_TOP_WINDOW,
    //$BLG: v4.6a7 - Add
    NARG_TOPMOST_WINDOW,
    //$BLG - v5.21: Add
    NARG_CLICK_WINDOW, NARG_UNCLICK_WINDOW, NARG_DBLCLICK_WINDOW, NARG_MOUSEMOVE_WINDOW,
    NARG_KEYDOWN_WINDOW, NARG_KEYUP_WINDOW,
    
    NARG_POSITION_EX_WIN , NARG_POSITION_EX_WIN , NARG_SET_WINDOW_MIN_SIZE , NARG_SET_WINDOW_MAX_SIZE ,
    NARG_ENABLE_WINDOW , NARG_CLEAR_WINDOW , NARG_GET_BKCOLOR , NARG_CREATE_SCROLL_WINDOW ,
		NARG_SET_WINDOW_STYLE, NARG_FULLSCREEN_WINDOW,NARG_DESKTOP_WINDOW,NARG_REFLEX_WIN_WHEEL,
		3,3,
		//$LB (16/12/2003)
		NARG_WIN_TRANSP,
		//$LB (16/12/2003)
		NARG_WIN_SIMULATE,
    //$BB
    NARG_WIN_SETICON
};

int (*winpkgfun[WINPKGSIZE])(mmachine m) = {
        GRCreateWindow , GRDestroyObjWin , GRShowWindow , GRMoveWindow ,
        GRTextOut , GRSetWindowName , GRResizeWindow , GRGetClientRect ,
        GRReflexWinPaint , GRReflexWinMove , GRReflexCursorMove , GRGetSizePositionWindow ,
        GRReflexWinSize , GRReflexWinClick , GRReflexWinUnclick , GRReflexWinKeyDown ,
        GRReflexWinKeyUp , GRReflexWinDestroy , GRReflexWinClose , GRSetFocus , GRPaintObjWin ,
        GRDrawCircle , GRDrawLine , GRDrawRectangle , GRGetScreenSize , GRGetDesktopSize,
        GRReflexWinFocus , GRReflexWinKillFocus , GRReposWindow , GRGetClientRect2 ,
        GRGetPositionSizeWindow , GRReflexWinDClick ,GRReflexWinDropFile ,GRTopWindow ,
        //$BLG: v4.6a7 - Add
        GRTopMostWindow,
        //$BLG - v5.21: Add
        GRClickWindow, GRUnClickWindow, GRDblClickWindow, GRMouseMoveWindow,
        GRKeyDownWindow, GRKeyUpWindow,
        
        GRPositionEx, GRSizeEx , GRSetWindowMinSize , GRSetWindowMaxSize ,
        GREnableWindow , GRClearWindow , GRGetSysColor , GRCreateScrollWindow ,
				GRSetWindowStyle, GRFullScreenWindow, GRDesktopWindow,GRReflexWinWheel,
				GRReflexWinSuspend,GRReflexWinResume,
				//$LB (16/12/2003)
				_SETwindowTransparency,
				//$LB (16/12/2003)
				_SIMULATEwindowTransparency,
        //$BB
        GRSetWindowIcon
};


#endif
