#include <stdio.h>
#include <stdlib.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

extern int	tremoDialogId ;
extern int	tremoOkBtnId ;
extern int	tremoOkchk() ;
extern int	tremoPlayBtnId ;
extern int	tremoPlay() ;
extern int	tremoUndoBtnId ;
extern int	tremoUndo() ;
extern int	tremoFixBtnId ;
extern int	tremoFix() ;
extern int	tremoCanBtnId ;
extern int	tremoCanchk() ;
extern int	tremoMesId[23] ;
extern int	tremoSubDialogId ;
extern int	tremoMainMixVolumeId ;
extern int	tremoMainMixSet() ;
extern int	tremoMainMixNumId ;
extern int	tremoTremoMixVolumeId ;
extern int	tremoTremoMixSet() ;
extern int	tremoTremoMixNumId ;
extern int	tremoSpeedNumId ;
extern int	tremoSpeedSet() ;
extern int	tremoSpeedVolumeId ;
extern int	tremoBtnId[3] ;
extern int	tremoModeSet() ;
extern int	tremoInfBtnId ;
extern int	tremoInf() ;

#define ALIGN	4
#define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)

/*	MMI_init 用データ	*/

/*	ヘッダ	*/

MMIINIT	initDataIWVTRE = { "MmiInit",  40, 0 } ;

/* tremoDialogId */

static MMIPACKET d001 = {	&tremoDialogId,
							NULL,
							&MJ_ALERTL40,
							OFFSET(ALERTL40),
							MS_NONE
						} ;
static ALERTL40	d001d = {	MS_BTLEFTL40 | MS_EVMOVEL40 | MS_EVMOSONL40 | MS_EVKEYONL40,
							  90, 102, 550, 394, 8, 4, 8,
							MS_PANELL40 | MS_UFRAMEL40 | MS_FRAMEL40,
							NULL,   0,   0,
							   0,   0,   0,   0
						} ;

/* tremoOkBtnId */

static MMIPACKET d002 = {	&tremoOkBtnId,
							&tremoDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d002d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							  96, 353, 157, 376,12, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							tremoOkchk,
							0x0000
						} ;

/* tremoPlayBtnId */

static MMIPACKET d003 = {	&tremoPlayBtnId,
							&tremoDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d003d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 166, 353, 227, 376, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							tremoPlay,
							0x0000
						} ;

/* tremoUndoBtnId */

static MMIPACKET d004 = {	&tremoUndoBtnId,
							&tremoDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d004d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 236, 353, 297, 376, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							tremoUndo,
							0x0000
						} ;

/* tremoFixBtnId */

static MMIPACKET d005 = {	&tremoFixBtnId,
							&tremoDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d005d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 306, 353, 367, 376, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							tremoFix,
							0x0000
						} ;

/* tremoCanBtnId */

static MMIPACKET d006 = {	&tremoCanBtnId,
							&tremoDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d006d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 483, 353, 544, 376,10, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							tremoCanchk,
							0x0000
						} ;

/* tremoMesId[0] */

static MMIPACKET d007 = {	&tremoMesId[0],
							&tremoDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d007d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 105, 356, 148, 373, 8,15, 8,
							MS_NONEL40,
							"実  行",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[1] */

static MMIPACKET d008 = {	&tremoMesId[1],
							&tremoDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d008d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 174, 356, 220, 373, 8,15, 8,
							MS_NONEL40,
							"再  生",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[2] */

static MMIPACKET d009 = {	&tremoMesId[2],
							&tremoDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d009d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 242, 356, 293, 373, 8,15, 8,
							MS_NONEL40,
							"アンドゥ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[3] */

static MMIPACKET d010 = {	&tremoMesId[3],
							&tremoDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d010d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 311, 356, 362, 373, 8,15, 8,
							MS_NONEL40,
							"定  着",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[4] */

static MMIPACKET d011 = {	&tremoMesId[4],
							&tremoDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d011d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 491, 356, 537, 373, 8,15, 8,
							MS_NONEL40,
							"取  消",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[5] */

static MMIPACKET d012 = {	&tremoMesId[5],
							&tremoDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d012d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 122, 109, 179, 127, 8,15, 8,
							MS_NONEL40,
							"トレモロ",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* tremoSubDialogId */

static MMIPACKET d013 = {	&tremoSubDialogId,
							&tremoDialogId,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d013d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							  96, 134, 544, 336, 8, 4, 8,
							MS_DFRAMEL40 | MS_FRAMEL40,
							NULL,   0,   0
						} ;

/* tremoMainMixVolumeId */

static MMIPACKET d014 = {	&tremoMainMixVolumeId,
							&tremoSubDialogId,
							&MJ_SCRLL40,
							OFFSET(SCRLL40),
							MS_NONE
						} ;
static SCRLL40	d014d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
							 305, 174, 464, 189, 8, 4, 7,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							tremoMainMixSet,
							  20,   0, 100,   8,   8,
							 265, 266
						} ;

/* tremoMainMixNumId */

static MMIPACKET d015 = {	&tremoMainMixNumId,
							&tremoSubDialogId,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d015d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 471, 170, 526, 193, 8, 4, 8,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							tremoMainMixSet,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							  20,   0, 100,   1,   0,
							 263, 264
						} ;

/* tremoTremoMixVolumeId */

static MMIPACKET d016 = {	&tremoTremoMixVolumeId,
							&tremoSubDialogId,
							&MJ_SCRLL40,
							OFFSET(SCRLL40),
							MS_NONE
						} ;
static SCRLL40	d016d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
							 305, 209, 464, 224, 8, 4, 7,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							tremoTremoMixSet,
							 100,   0, 100,   8,   8,
							 265, 266
						} ;

/* tremoTremoMixNumId */

static MMIPACKET d017 = {	&tremoTremoMixNumId,
							&tremoSubDialogId,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d017d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 471, 205, 526, 228, 8, 4, 8,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							tremoTremoMixSet,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							 100,   0, 100,   1,   0,
							 263, 264
						} ;

/* tremoSpeedNumId */

static MMIPACKET d018 = {	&tremoSpeedNumId,
							&tremoSubDialogId,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d018d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 471, 293, 526, 316, 8, 4, 8,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							tremoSpeedSet,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							 150,   0, 500,   1,   1,
							 263, 264
						} ;

/* tremoMesId[6] */

static MMIPACKET d019 = {	&tremoMesId[6],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d019d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 326, 149, 443, 166, 0,15, 8,
							MS_NONEL40,
							"ミキシングレート",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* tremoMesId[7] */

static MMIPACKET d020 = {	&tremoMesId[7],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d020d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 240, 175, 300, 190, 0,15, 8,
							MS_NONEL40,
							"オリジナル",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[8] */

static MMIPACKET d021 = {	&tremoMesId[8],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d021d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 237, 208, 299, 225, 0,15, 8,
							MS_NONEL40,
							"トレモロ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[9] */

static MMIPACKET d022 = {	&tremoMesId[9],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d022d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 242, 247, 379, 263, 0,15, 8,
							MS_NONEL40,
							"トレモロ周波数（Hz）",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* tremoSpeedVolumeId */

static MMIPACKET d023 = {	&tremoSpeedVolumeId,
							&tremoSubDialogId,
							&MJ_SCRLL40,
							OFFSET(SCRLL40),
							MS_NONE
						} ;
static SCRLL40	d023d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
							 117, 297, 464, 312, 8, 4, 7,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							tremoSpeedSet,
							  75,   0, 250,   1,   8,
							 265, 266
						} ;

/* tremoMesId[10] */

static MMIPACKET d024 = {	&tremoMesId[10],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d024d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 139, 281, 361, 298, 0,15, 8,
							MS_NONEL40,
							"|    |    |    |    |    |    |    |",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[11] */

static MMIPACKET d025 = {	&tremoMesId[11],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d025d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 229, 281, 451, 298, 0,15, 8,
							MS_NONEL40,
							"|    |    |    |    |    |    |    |",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[12] */

static MMIPACKET d026 = {	&tremoMesId[12],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d026d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 128, 267, 158, 282, 0,15, 8,
							MS_NONEL40,
							"0",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[13] */

static MMIPACKET d027 = {	&tremoMesId[13],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d027d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 186, 267, 216, 282, 0,15, 8,
							MS_NONEL40,
							"10",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[14] */

static MMIPACKET d028 = {	&tremoMesId[14],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d028d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 247, 267, 277, 282, 0,15, 8,
							MS_NONEL40,
							"20",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[15] */

static MMIPACKET d029 = {	&tremoMesId[15],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d029d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 307, 267, 337, 282, 0,15, 8,
							MS_NONEL40,
							"30",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[16] */

static MMIPACKET d030 = {	&tremoMesId[16],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d030d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 367, 267, 397, 282, 0,15, 8,
							MS_NONEL40,
							"40",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[17] */

static MMIPACKET d031 = {	&tremoMesId[17],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d031d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 427, 267, 457, 282, 0,15, 8,
							MS_NONEL40,
							"50",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoBtnId[0] */

static MMIPACKET d032 = {	&tremoBtnId[0],
							&tremoSubDialogId,
							&MJ_TICONL40,
							OFFSET(TICONL40),
							MS_NONE
						} ;
static TICONL40	d032d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
							 129, 174, 224, 190, 8, 4, 8,
							MS_NONEL40,
							tremoModeSet,
							0x0000, 259, 260
						} ;

/* tremoBtnId[1] */

static MMIPACKET d033 = {	&tremoBtnId[1],
							&tremoSubDialogId,
							&MJ_TICONL40,
							OFFSET(TICONL40),
							MS_NONE
						} ;
static TICONL40	d033d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
							 129, 192, 224, 208, 8, 4, 8,
							MS_NONEL40,
							tremoModeSet,
							0x0000, 259, 260
						} ;

/* tremoBtnId[2] */

static MMIPACKET d034 = {	&tremoBtnId[2],
							&tremoSubDialogId,
							&MJ_TICONL40,
							OFFSET(TICONL40),
							MS_NONE
						} ;
static TICONL40	d034d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
							 129, 210, 224, 226, 8, 4, 8,
							MS_NONEL40,
							tremoModeSet,
							0x0000, 259, 260
						} ;

/* tremoMesId[19] */

static MMIPACKET d035 = {	&tremoMesId[19],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d035d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 112, 149, 229, 166, 0,15, 8,
							MS_NONEL40,
							"実行チャンネル選択",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* tremoMesId[20] */

static MMIPACKET d036 = {	&tremoMesId[20],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d036d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 152, 175, 212, 190, 0,15, 8,
							MS_NONEL40,
							"左右",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[21] */

static MMIPACKET d037 = {	&tremoMesId[21],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d037d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 152, 193, 212, 208, 0,15, 8,
							MS_NONEL40,
							"左",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoMesId[22] */

static MMIPACKET d038 = {	&tremoMesId[22],
							&tremoSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d038d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 152, 211, 212, 226, 0,15, 8,
							MS_NONEL40,
							"右",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* tremoInfBtnId */

static MMIPACKET d039 = {	&tremoInfBtnId,
							&tremoDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d039d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 376, 353, 437, 376, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							tremoInf,
							0x0000
						} ;

/* tremoMesId[18] */

static MMIPACKET d040 = {	&tremoMesId[18],
							&tremoDialogId,
							&MJ_MSGL40,
							0,
							MS_NONE
						} ;
static MSGL40	d040d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 381, 356, 432, 373, 8,15, 8,
							MS_NONEL40,
							"情  報",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

