¼Ò½º ´Ù¿î·Îµå "mdictest.zip" (GNU) /* 1. ¿µÇÑ»çÀü ³»ºÎÀÇ Àǹ̺¸±â¸¦ ÀÌ¿ëÇÏ·Á¸é »ùÇà ¼Ò½º Áß ShowMeaning() ¸¦ ÀÌ¿ëÇÏ½Ã¸é µË´Ï´Ù. 2. ¹ßÀ½±âÈ£³ª ±âŸ ³»¿ëµéÀ» ÇÁ·Î±×·¥³»¿¡¼ »ç¿ëÇϽ÷Á¸é GNU ·Î Build µÈ EDictLib_stub.o ¸¦ »ç¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù. */ #include "EDictLib_stub.h" #define EKDICT50_NAME "NAED" #define DICV_APPP_ID "EKDA" #define REQ_WORD_MEAN 5252 #define REQ_DRAW_PRON 5253 typedef struct tagProWord { unsigned char *pro; // ´Ü¾îÀÇ ¹ßÀ½±âÈ£ int x; // x ÁÂÇ¥ int y; // y ÁÂÇ¥ int width; } PROWORD, *PPROWORD; /* »çÀüµ¥ÀÌŸ°¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö È®ÀÎ */ STATUS SeekDict( void ) { int version; char app50[5] = EKDICT50_NAME; if( FindLibrary( *((P_U32)app50), (P_U32)&version, (P_U32)gEDLibFuncVec) == CVOS_OK ) { InitDictionary(); return CVOS_OK; } return CVOS_ERROR; } /* »çÀü¿¡¼ ´Ü¾î °Ë»ö - »ç¿ëÀü SeekDict È£Ãâ */ STATUS SeekWord( char *word, char *pron, char *expl, char impo ) { int rtn; char* pDataBuf = NULL; rtn = Search( (const char*)word, &pDataBuf ); if( rtn <= 0 ) return DICT_WORD_NOT_FOUND; SeperateString( pDataBuf, word, &impo, pron, expl ); Lfree( pDataBuf ); return CVOS_OK; } /* ¹ßÀ½±âÈ£¸¦ ȸéÁÂÇ¥ x,y ¿¡ ±×·ÁÁØ´Ù. */ STATUS DrawPron( char *pron, int x, int y, int width ) { PROWORD ProWord; memset( &ProWord, 0, sizeof( PROWORD ) ); ProWord.pro = pron; ProWord.x = x; ProWord.y = y; ProWord.width = width; return RequestToApplication( *((P_U32)DICV_APPP_ID), REQ_DRAW_PRON, (P_U32)((P_U8)(&ProWord))); } /* ´Ü¾îÀÇ Àǹ̸¦ º¸¿©ÁØ´Ù. */ STATUS ShowMeaning( char *word ) { return RequestToApplication( *((P_U32)DICV_APPP_ID), REQ_WORD_MEAN, (P_U32)((P_U8)(word))); } |