#include <stdio.h>
#include <stdlib.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

extern int	Window_Base ;
extern int	MJ_BASEOBJ ;
extern int	Func_Window() ;
extern int	Message_ToY ;
extern int	DButton_Exec ;
extern int	Func_Exec() ;
extern int	Message_Exec ;
extern int	DButton_Cancel ;
extern int	Func_Cancel() ;
extern int	Message_Cancel ;
extern int	Dialog_SelBack ;
extern int	Dialog_Par ;
extern int	Message_Par100 ;
extern int	NumBox_Par ;
extern int	Message_OutFileTitle ;
extern int	Message_ModeTitle ;
extern int	Message_Retry ;
extern int	NumBox_ErrStop ;
extern int	Func_NumBox() ;
extern int	NumBox_Retry ;
extern int	Message_ErrStop ;
extern int	Icon_SKB ;
extern int	Func_SoftKey() ;
extern int	Dialog_SelDevice ;
extern int	Icon_SelR ;
extern int	Func_DevSelect() ;
extern int	Icon_SelL ;
extern int	Icon_SelDevice ;
extern int	Icon_SelDevice_No ;
extern int	Dialog_MesBack[2] ;
extern int	Message_NowExec ;
extern int	TIcon_Mode ;
extern int	Func_Mode() ;
extern int	Message_Mode ;
extern int	Icon_OUTFile ;
extern int	Func_OUTFileSEL() ;
extern int	Text_OUTFile ;
extern int	Func_OUTFileIN() ;
extern int	Button_About ;
extern int	Func_About() ;

#define ALIGN	4
#define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)

/*	MMI_init 用データ	*/

/*	ヘッダ	*/

MMIINIT	initDataWINDOW = { "MmiInit",  30, 0 } ;

/* Window_Base */

static MMIPACKET d001 = {	&Window_Base,
							&MJ_BASEOBJ,
							&MJ_WINDOWL40,
							OFFSET(WINDOWL40),
							MS_NONE
						} ;
static WINDOWL40	d001d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_TITLEL40 | MS_CLOSEL40,
							   0,   0, 307, 146, 8,15, 9,
							MS_SRECTL40 | MS_FRAMEL40,
							NULL,   0,   0,
							   1,  17,   0,   0,
							 128,  96, 640, 480,
							Func_Window,
							"FD/CD 表面検査",
						} ;

/* Message_ToY */

static MMIPACKET d002 = {	&Message_ToY,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d002d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 278,   1, 297,  15, 8,15, 8,
							MS_NONEL40,
							"ToY",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* DButton_Exec */

static MMIPACKET d003 = {	&DButton_Exec,
							&Window_Base,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d003d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 165, 115, 220, 134, 8,15, 8,
							MS_ROUNDL40 | MS_FRAMEL40 | MS_DEFAULTL40,
							Func_Exec,
							0x8012
						} ;

/* Message_Exec */

static MMIPACKET d004 = {	&Message_Exec,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d004d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 165, 115, 220, 134, 8,15, 8,
							MS_NONEL40,
							"実行",
							   1,  12,  12,
							MS_NONEL40,
							   8,   0
						} ;

/* DButton_Cancel */

static MMIPACKET d005 = {	&DButton_Cancel,
							&Window_Base,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d005d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 237, 115, 292, 134, 8,15, 8,
							MS_ROUNDL40 | MS_FRAMEL40,
							Func_Cancel,
							0x8011
						} ;

/* Message_Cancel */

static MMIPACKET d006 = {	&Message_Cancel,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d006d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 237, 115, 292, 134, 8,15, 8,
							MS_NONEL40,
							"取消",
							   1,  12,  12,
							MS_NONEL40,
							   8,   0
						} ;

/* Dialog_SelBack */

static MMIPACKET d007 = {	&Dialog_SelBack,
							&Window_Base,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d007d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40 | MS_DSPONLYL40,
							   1,  17, 122, 143, 8, 9, 8,
							MS_NONEL40,
							NULL,   0,   0
						} ;

/* Dialog_Par */

static MMIPACKET d008 = {	&Dialog_Par,
							&Dialog_SelBack,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d008d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40 | MS_DSPONLYL40,
							  29,  87,  94, 106, 8,15, 8,
							MS_FRAMEL40,
							NULL,   0,   0
						} ;

/* Message_Par100 */

static MMIPACKET d009 = {	&Message_Par100,
							&Dialog_Par,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d009d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							  59,  89,  93, 104, 8,15, 8,
							MS_NONEL40,
							NULL,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* NumBox_Par */

static MMIPACKET d010 = {	&NumBox_Par,
							&Dialog_Par,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d010d = 	{	MS_EVMOSONL40 | MS_EVKEYONL40 | MS_FIXEDL40,
							  31,  89,  58, 104, 8,15, 8,
							MS_NONEL40,
							0,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							   0,   0, 100,   1,   0,
							  -1,  -1
						} ;

/* Message_OutFileTitle */

static MMIPACKET d011 = {	&Message_OutFileTitle,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d011d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 132,  28, 167,  47, 8,15, 8,
							MS_NONEL40,
							"出力先",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message_ModeTitle */

static MMIPACKET d012 = {	&Message_ModeTitle,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d012d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 132,  56, 167,  75, 8,15, 8,
							MS_NONEL40,
							"モード",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message_Retry */

static MMIPACKET d013 = {	&Message_Retry,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d013d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 132,  84, 167, 103, 8,15, 8,
							MS_NONEL40,
							"ﾘﾄﾗｲ数",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* NumBox_ErrStop */

static MMIPACKET d014 = {	&NumBox_ErrStop,
							&Window_Base,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d014d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 260,  84, 291, 103, 8,15, 8,
							MS_FRAMEL40,
							Func_NumBox,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							   8,   0,  64,   1,   0,
							 281, 282
						} ;

/* NumBox_Retry */

static MMIPACKET d015 = {	&NumBox_Retry,
							&Window_Base,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d015d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 172,  84, 203, 103, 8,15, 8,
							MS_FRAMEL40,
							Func_NumBox,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							   3,   0,  16,   1,   0,
							 281, 282
						} ;

/* Message_ErrStop */

static MMIPACKET d016 = {	&Message_ErrStop,
							&Window_Base,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d016d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 212,  84, 255, 103, 8,15, 8,
							MS_NONEL40,
							"ｴﾗｰ停止",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Icon_SKB */

static MMIPACKET d017 = {	&Icon_SKB,
							&Window_Base,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d017d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 276,  28, 295,  47, 8,15, 8,
							MS_FRAMEL40,
							Func_SoftKey,
							0x800b, 292
						} ;

/* Dialog_SelDevice */

static MMIPACKET d018 = {	&Dialog_SelDevice,
							&Window_Base,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d018d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							   9,  27, 114,  74, 8, 9, 8,
							MS_NONEL40,
							NULL,   0,   0
						} ;

/* Icon_SelR */

static MMIPACKET d019 = {	&Icon_SelR,
							&Dialog_SelDevice,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d019d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							  97,  27, 114,  74, 8,15, 8,
							MS_FRAMEL40,
							Func_DevSelect,
							0x800a, 270
						} ;

/* Icon_SelL */

static MMIPACKET d020 = {	&Icon_SelL,
							&Dialog_SelDevice,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d020d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							   9,  27,  26,  74, 8,15, 8,
							MS_FRAMEL40,
							Func_DevSelect,
							0x8009, 269
						} ;

/* Icon_SelDevice */

static MMIPACKET d021 = {	&Icon_SelDevice,
							&Dialog_SelDevice,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d021d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40 | MS_DSPONLYL40,
							  29,  27,  94,  74, 8,15, 8,
							MS_FRAMEL40,
							0,
							0x0000, 198
						} ;

/* Icon_SelDevice_No */

static MMIPACKET d022 = {	&Icon_SelDevice_No,
							&Dialog_SelDevice,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d022d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40 | MS_DSPONLYL40,
							  33,  31,  48,  46, 8,15, 8,
							MS_NONEL40,
							0,
							0x0000, 300
						} ;

/* Dialog_MesBack[0] */

static MMIPACKET d023 = {	&Dialog_MesBack[0],
							&Window_Base,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d023d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40 | MS_DSPONLYL40,
							  10, 111, 109, 130, 8, 9, 8,
							MS_NONEL40,
							NULL,   0,   0
						} ;

/* Message_NowExec */

static MMIPACKET d024 = {	&Message_NowExec,
							&Dialog_MesBack[0],
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d024d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							  13, 111, 110, 130, 8,15, 8,
							MS_NONEL40,
							NULL,
							   1,  12,  12,
							MS_OUTLINEL40,
							   2,   0
						} ;

/* Dialog_MesBack[1] */

static MMIPACKET d025 = {	&Dialog_MesBack[1],
							&Window_Base,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d025d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							 172,  56, 271,  75, 8,15, 8,
							MS_NONEL40,
							NULL,   0,   0
						} ;

/* TIcon_Mode */

static MMIPACKET d026 = {	&TIcon_Mode,
							&Dialog_MesBack[1],
							&MJ_TICONL40,
							OFFSET(TICONL40),
							MS_NONE
						} ;
static TICONL40	d026d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
							 172,  56, 271,  75, 8,15, 8,
							MS_FRAMEL40,
							Func_Mode,
							0x0000, 270, 270
						} ;

/* Message_Mode */

static MMIPACKET d027 = {	&Message_Mode,
							&Dialog_MesBack[1],
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d027d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 192,  56, 271,  75, 8,15, 8,
							MS_NONEL40,
							NULL,
							   1,  12,  12,
							MS_NONEL40,
							   8,   0
						} ;

/* Icon_OUTFile */

static MMIPACKET d028 = {	&Icon_OUTFile,
							&Window_Base,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d028d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 172,  28, 191,  47, 8,15, 8,
							MS_FRAMEL40,
							Func_OUTFileSEL,
							0x800b, 293
						} ;

/* Text_OUTFile */

static MMIPACKET d029 = {	&Text_OUTFile,
							&Window_Base,
							&MJ_TEXTL40,
							OFFSET(TEXTL40),
							MS_NONE
						} ;
static TEXTL40	d029d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_HORIL40,
							 191,  28, 271,  47, 8,15, 8,
							MS_FRAMEL40,
							Func_OUTFileIN,
							   0,   0,   0,   0,
							   0,   0,   0,   0,   0,
							     256,   0,   0,
							   0,   0,   0,   0,
							   0,
							   0,   0,   0,   0,
							   1,  12,  12,   0,   0,
							   2,   0,   0,   0,   0,   0,   0,
							   0,   0,   0,   0,
							   0
						} ;

/* Button_About */

static MMIPACKET d030 = {	&Button_About,
							&Window_Base,
							&MJ_BUTTONL40,
							0,
							MS_NONE
						} ;
static BUTTONL40	d030d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 276,   2, 297,  14, 0, 0, 0,
							MS_NONEL40,
							Func_About,
							0x0000
						} ;

