/*************************************************************************
*	"tools.c"  : 各種ツール
*************************************************************************/

/*************************************************************************
*	サイドワークメニューの起動
*-------------------------------------------------------------------------
*	アイテム登録可能
*	パラメータ:なし
*************************************************************************/

int		CCI_sidework()
{
	AplSideWorkMenu();
	return (NORMAL);
}

/*************************************************************************
*	ヘルプ，説明表示用
*-------------------------------------------------------------------------
*	アイテム登録可能（パラメータ必須）
*	パラメータ:	<説明ファイル名>
*************************************************************************/

int		CCI_textViewer( int argc, char **argv)
{
	if ( argc > 1 )
	{	AplHelpDlg( argv[1], "TEXT" );
	}
	return (NORMAL);
}

/*************************************************************************
*	子ペイント(16)の起動
*-------------------------------------------------------------------------
*	アイテム登録可能（パラメータ必須）
*************************************************************************/

int		CCI_callGX16(int argc, char **argv)
{
	int		att;
	short	fr[4], trm[2];

	fr[0] = 0x10;
	fr[1] = 0x20;
	fr[2] = 0xFF;
	fr[3] = 0x7F;
	trm[0] = fr[0];
	trm[1] = fr[1];
	if ( AplDta_setGX16para( "", fr, trm, NULL ) != 0 )
		return (ERR);

	att = APLPCL_SAVE_SCREEN   
	    | APLPCL_RESET_CRTC   
	    | APLPCL_SET_MRESO    
	    | APLPCL_CLEAR_SCREEN 
	    | APLPCL_DTALIB_IGNORE;
	AplPclExec( "gx16.exp", att );

	return (0);
}


/*************************************************************************
*	システムソフトウェアのCD辞書検索プログラムを呼び出す
*************************************************************************/

int		CCI_cddic()
{
	int		att;

	att = APLPCL_SAVE_SCREEN  
	    | APLPCL_RESET_CRTC   
	    | APLPCL_SET_MRESO    
	    | APLPCL_CLEAR_SCREEN 
	    | APLPCL_DTALIB_IGNORE
	    | APLPCL_CHDIR        ;
	AplPclExec( "cddic.exp", att );

	return (0);
}
