#include <stdio.h>
#include <stdlib.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

extern int	DB_base ;
extern int	MJ_BASEOBJ ;
extern int	Dialog ;
extern int	DButton[3] ;
extern int	help() ;
extern int	create() ;
extern int	quit() ;
extern int	NumBox ;
extern int	num_F() ;
extern int	Text ;
extern int	text_F() ;
extern int	Message[6] ;
extern int	Icon_file ;
extern int	file_btn() ;
extern int	Icon_about ;
extern int	about_btn() ;
extern int	Alert ;
extern int	Message_A[2] ;
extern int	DButton_A[2] ;
extern int	yes_btn() ;
extern int	no_btn() ;
extern int	Message_Sub[2] ;
extern int	Icon_A ;

#define ALIGN	4
#define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)

/*	MMI_init 用データ	*/

/*	ヘッダ	*/

MMIINIT	initDataINIT = { "MmiInit",  23, 0 } ;

/* DB_base */

static MMIPACKET d001 = {	&DB_base,
							&MJ_BASEOBJ,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d001d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							   0,   0, 639, 479,15, 8, 2,
							MS_SRECTL40 | MS_FRAMEL40,
							NULL, 807, 205
						} ;

/* Dialog */

static MMIPACKET d002 = {	&Dialog,
							&DB_base,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d002d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_SAVEL40,
							  97, 128, 541, 318, 5, 7, 1,
							MS_PANELL40 | MS_FRAMEL40,
							NULL,   0,   0
						} ;

/* DButton[0] */

static MMIPACKET d003 = {	&DButton[0],
							&Dialog,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d003d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 123, 282, 242, 307,14, 8, 1,
							MS_PANELL40 | MS_FRAMEL40,
							help,
							0x0048
						} ;

/* DButton[1] */

static MMIPACKET d004 = {	&DButton[1],
							&Dialog,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d004d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 270, 282, 389, 307,12, 8, 9,
							MS_PANELL40 | MS_FRAMEL40,
							create,
							0x0052
						} ;

/* DButton[2] */

static MMIPACKET d005 = {	&DButton[2],
							&Dialog,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d005d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 411, 282, 530, 307,10, 8, 1,
							MS_PANELL40 | MS_FRAMEL40,
							quit,
							0x0051
						} ;

/* NumBox */

static MMIPACKET d006 = {	&NumBox,
							&Dialog,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d006d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 438, 208, 533, 240, 1,15, 1,
							MS_PANELL40 | MS_FRAMEL40,
							num_F,
							   2,  16,  16,
							MS_NONEL40,
							   0,   0,
							 200,  20,9999,   1,   0,
							 263, 264
						} ;

/* Text */

static MMIPACKET d007 = {	&Text,
							&Dialog,
							&MJ_TEXTL40,
							OFFSET(TEXTL40),
							MS_NONE
						} ;
static TEXTL40	d007d = 	{	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_HORIL40,
							 157, 249, 530, 266, 1,15, 1,
							MS_FRAMEL40,
							text_F,
							   0,   0,   0,   0,
							   0,   0,   0,   0,   0,
							     140,   0,   0,
							   0,   0,   0,   0,
							   0,
							   0,   0,   0,   0,
							   1,  12,  12,   0,   0,
							   1,   0,   0,   0,   0,   0,   0,
							   0,   0,   0,   0,
							  24
						} ;

/* Message[0] */

static MMIPACKET d008 = {	&Message[0],
							&Dialog,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d008d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 166, 150, 325, 173, 1, 7, 9,
							MS_NONEL40,
							"ソフトウェアライブラリ組み込み画面",
							   2,  16,  16,
							MS_BOLDL40,
							   0,   0
						} ;

/* Message[1] */

static MMIPACKET d009 = {	&Message[1],
							&Dialog,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d009d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 440, 182, 534, 205, 1, 7, 1,
							MS_NONEL40,
							"登録データ最大数",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message[2] */

static MMIPACKET d010 = {	&Message[2],
							&Dialog,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d010d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 159, 230, 311, 247, 1, 7, 1,
							MS_NONEL40,
							"組み込み先のディレクトリ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message[3] */

static MMIPACKET d011 = {	&Message[3],
							&Dialog,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d011d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 152, 283, 213, 306, 1, 7,15,
							MS_NONEL40,
							"ヘ ル プ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message[4] */

static MMIPACKET d012 = {	&Message[4],
							&Dialog,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d012d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 300, 283, 361, 306, 1, 7,15,
							MS_NONEL40,
							"作  成",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message[5] */

static MMIPACKET d013 = {	&Message[5],
							&Dialog,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d013d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 441, 283, 502, 306, 1, 7,15,
							MS_NONEL40,
							"や め る",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Icon_file */

static MMIPACKET d014 = {	&Icon_file,
							&Dialog,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d014d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 108, 232, 150, 271,11, 7, 1,
							MS_PANELL40 | MS_FRAMEL40,
							file_btn,
							0x0000,  65
						} ;

/* Icon_about */

static MMIPACKET d015 = {	&Icon_about,
							&Dialog,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d015d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40,
							 108, 153, 149, 191,11, 7, 1,
							MS_PANELL40 | MS_FRAMEL40,
							about_btn,
							0x0000, 109
						} ;

/* Alert */

static MMIPACKET d016 = {	&Alert,
							NULL,
							&MJ_ALERTL40,
							OFFSET(ALERTL40),
							MS_NONE
						} ;
static ALERTL40	d016d = {	MS_BTLEFTL40 | MS_EVMOVEL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_SAVEL40,
							 117, 273, 561, 411, 1, 7, 1,
							MS_ALERTL40 | MS_UFRAMEL40 | MS_FRAMEL40,
							NULL, 102, 700,
							   0,   0,   0,   0
						} ;

/* Message_A[0] */

static MMIPACKET d017 = {	&Message_A[0],
							&Alert,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d017d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 262, 293, 415, 316, 1, 8, 9,
							MS_NONEL40,
							"どうしますか",
							   2,  16,  16,
							MS_NONEL40,
							   0,   0
						} ;

/* Message_A[1] */

static MMIPACKET d018 = {	&Message_A[1],
							&Alert,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d018d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 260, 325, 419, 348, 1, 8, 9,
							MS_NONEL40,
							"メッセージ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* DButton_A[0] */

static MMIPACKET d019 = {	&DButton_A[0],
							&Alert,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d019d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 279, 372, 398, 397,12, 8, 1,
							MS_PANELL40 | MS_FRAMEL40,
							yes_btn,
							0x0000
						} ;

/* DButton_A[1] */

static MMIPACKET d020 = {	&DButton_A[1],
							&Alert,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d020d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 405, 372, 524, 397,10, 8, 1,
							MS_PANELL40 | MS_FRAMEL40,
							no_btn,
							0x0000
						} ;

/* Message_Sub[0] */

static MMIPACKET d021 = {	&Message_Sub[0],
							&Alert,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d021d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 306, 373, 374, 396, 1, 8,15,
							MS_NONEL40,
							"は い",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Message_Sub[1] */

static MMIPACKET d022 = {	&Message_Sub[1],
							&Alert,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d022d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 430, 373, 498, 396, 1, 8,15,
							MS_NONEL40,
							"取 り 消 す",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* Icon_A */

static MMIPACKET d023 = {	&Icon_A,
							&Alert,
							&MJ_ICONL40,
							OFFSET(ICONL40),
							MS_NONE
						} ;
static ICONL40	d023d = 	{	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_CENTERL40 | MS_DSPONLYL40,
							 130, 283, 161, 314, 4, 7,12,
							MS_NONEL40,
							0,
							0x0000,  75
						} ;

