#include <stdio.h>
#include <stdlib.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

extern int	commandDialogID ;
extern int	commandReturnExecDButtonID ;
extern int	commandExecFunc() ;
extern int	commandfileDButtonID ;
extern int	commandFileDialogFunc() ;
extern int	commandExecDButtonID ;
extern int	commandFileNameTextID ;
extern int	commandQuitIconID ;
extern int	commandQuitFunc() ;
extern int	commandMessageID[2] ;

#define ALIGN	4
#define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)

/*	MMI_init 用データ	*/

/*	ヘッダ	*/

MMIINIT	initDataCMNDGUI = { "MmiInit",   8, 0 } ;

/* commandDialogID */

static MMIPACKET d001 = {	&commandDialogID,
							NULL,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d001d = {	MS_BTLEFTL40 | MS_EVMOSONL40,
							  99, 217, 542, 285, 8, 6, 8,
							MS_PANELL40 | MS_BFRAMEL40 | MS_FRAMEL40,
							NULL,   0,   0
						} ;

/* commandReturnExecDButtonID */

static MMIPACKET d002 = {	&commandReturnExecDButtonID,
							&commandDialogID,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d002d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 477, 268, 482, 273, 5, 6,15,
							MS_NONEL40,
							commandExecFunc,
							0x8012
						} ;

/* commandfileDButtonID */

static MMIPACKET d003 = {	&commandfileDButtonID,
							&commandDialogID,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d003d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 400, 261, 463, 280,13, 6,15,
							MS_PANELL40 | MS_FRAMEL40,
							commandFileDialogFunc,
							0x8001
						} ;

/* commandExecDButtonID */

static MMIPACKET d004 = {	&commandExecDButtonID,
							&commandDialogID,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d004d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 469, 261, 532, 280, 5, 6,15,
							MS_PANELL40 | MS_FRAMEL40,
							commandExecFunc,
							0x8012
						} ;

/* commandFileNameTextID */

static MMIPACKET d005 = {	&commandFileNameTextID,
							&commandDialogID,
							&MJ_TEXTL40,
							OFFSET(TEXTL40),
							MS_NONE
						} ;
static TEXTL40	d005d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_HORIL40,
							 104, 243, 537, 258, 8, 7,15,
							MS_DFRAMEL40 | MS_FRAMEL40,
							0,
							   0,   0,   0,   0,
							   0,   0,   0,   0,   0,
							     127,   0,   0,
							   0,   0,   0,   0,
							   0,
							   0,   0,   0,   0,
							   1,  12,  12,   0,   0,
							   0,   0,   0,   0,   0,   0,   0,
							   0,   0,   0,   0,
							  24
						} ;

/* commandQuitIconID */

static MMIPACKET d006 = {	&commandQuitIconID,
							&commandDialogID,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d006d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 104, 222, 122, 240, 2, 6, 8,
							MS_PANELL40 | MS_FRAMEL40,
							commandQuitFunc,
							0x8011, 285
						} ;

/* commandMessageID[0] */

static MMIPACKET d007 = {	&commandMessageID[0],
							&commandDialogID,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d007d = 	{	MS_DSPONLYL40,
							 408, 265, 455, 276, 8,15, 8,
							MS_NONEL40,
							"ファイル",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* commandMessageID[1] */

static MMIPACKET d008 = {	&commandMessageID[1],
							&commandDialogID,
							&MJ_MSGL40,
							0,
							MS_NONE
						} ;
static MSGL40	d008d = 	{	MS_DSPONLYL40,
							 483, 265, 518, 276, 8,15, 8,
							MS_NONEL40,
							"実　行",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

