////////////////////////////////////////////////////////////////////////////
// TaEditJPEXT.h グローバル関数の宣言
//
////////////////////////////////////////////////////////////////////////////

#if !defined( TAEDITJPEXT_H_INCLUDED_ )
#define TAEDITJPEXT_H_INCLUDED_

#include <Xm/XmAll.h>
#include <string>
#include "TaEdit_std.h"
#include "ErrorBool.h"

// フォントに関する関数
XFontSet JPEXT_CreateFontSet( Display *pDisplay, const char *pFontName );
short JPEXT_GetFontWidth( XFontSet fs, int flg );
short JPEXT_GetMaxWidth( XFontSet fs );
short JPEXT_GetMinWidth( XFontSet fs );
short JPEXT_GetFont_ascent( XFontSet fs );
short JPEXT_GetFont_descent( XFontSet fs );
short JPEXT_GetFontHeight( XFontSet fs );

// マルチバイトとワイドバイトの変換
bool JPEXT_WCStoMBS( const wchar_t *pWCS, std::string *pMBS );
bool JPEXT_MBStoWCS( const char *pMBS, std::wstring *pWCS );
bool JPEXT_ChangeEncode( const char *pSrc, std::string *pDst, const char *pSrcEncode, const char *pDestEncode );
bool JPEXT_WCStoSpecifiedEncodeMBS( const wchar_t *pWCS, std::string *pMBS, const char *pDestEncode );
bool JPEXT_SpecifiedEncodeMBStoWCS( const char *pMBS, std::wstring *pWCS, const char *pSrcEncode );

// クリップボードへの入出力
CErrorBool JPEXT_SetClipboardData( Widget w, const std::wstring &rStr );
CErrorBool JPEXT_GetClipboardData( Widget w, std::wstring *pStr );

// パス名の操作
std::string JPEXT_ResolvPath( const std::string &rPath );

#endif // TAEDITJPEXT_H_INCLUDED_

