#if defined _skb_included
  #endinput
#endif
#define _skb_included

enum
{
	SKB_BUSY = 0,
	SKB_OK = 1,
	SKB_CANCEL = -1,
	SKB_ERROR = -2,
};

enum
{
	SKB_MODE_NOCHANGE = 0,
	SKB_MODE_HIRAGANA,
	SKB_MODE_KATAKANA,
	SKB_MODE_ALPHABET,
	SKB_MODE_QWERTY,
	SKB_MODE_NUMBER,
	SKB_MODE_CHARLIST,
};

enum
{
	SKB_INPPUT_MODE_NOCHANGE = 0,

	SKB_INPPUT_MODE_FEPOFF,

	SKB_INPPUT_MODE_HIRAGANA,
	SKB_INPPUT_MODE_KATAKANA,
	SKB_INPPUT_MODE_KATAKANA_HALF,
	SKB_INPPUT_MODE_ALPHABET,
	SKB_INPPUT_MODE_ALPHABET_HALF,

	SKB_INPPUT_MODE_HIRAGANA_L,
	SKB_INPPUT_MODE_KATAKANA_L,
	SKB_INPPUT_MODE_KATAKANA_HALF_L,
	SKB_INPPUT_MODE_ALPHABET_L,
	SKB_INPPUT_MODE_ALPHABET_HALF_L,
};

enum
{
	SKB_LIMIT_BYTE = 0,
	SKB_LIMIT_CHAR,
};

enum
{
	SKB_OPTION_NONE = 0,
	SKB_OPTION_LOCK_SKB  = 1<<0,
	SKB_OPTION_LOCK_FEP  = 1<<1,
	SKB_OPTION_SHOW_SKB  = 1<<2,
    SKB_OPTION_KANALOCK  = 1<<3,
    SKB_OPTION_KANALOCK_FIX = 1<<4,
};

native skbStart( obj: _edit_, skbmode=SKB_MODE_NOCHANGE,
							  inputmode=SKB_INPPUT_MODE_NOCHANGE,
							  option=SKB_OPTION_NONE,
							  limit_type=SKB_LIMIT_BYTE, limit=256,
							  const ucs4char_list[]="", bool: accept=false );
native skbSync();
native skbGetString( _str_[], bufsize = sizeof _str_ );
native skbGetRect( &_x_, &_y_, &_w_, &_h_ );

stock skbWait()
{
	new	ret;

	for(;;){
		ret = skbSync();
		if( ret != SKB_BUSY ) return ret;		// 処理完了、または、エラー
		sleep;
	}

	return 0;
}

