home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WINPUTCX.HPP < prev    next >
C/C++ Source or Header  |  1996-11-08  |  4KB  |  117 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1996, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. /*************************************************************************
  12.  *
  13.  * WInputContext -- IME Input context
  14.  *
  15.  *************************************************************************/
  16.  
  17. #ifndef _WINPUTCX_HPP_INCLUDED
  18. #define _WINPUTCX_HPP_INCLUDED
  19.  
  20. #ifndef _WNO_PRAGMA_PUSH
  21. #pragma pack(push,8);
  22. #pragma enum int;
  23. #endif
  24.  
  25.  
  26. #include "wdef.hpp"
  27.  
  28. #ifndef _WOBJECT_HPP_INCLUDED
  29. #  include "wobject.hpp"
  30. #endif
  31.  
  32. #define WIME_MODE_FULLSHAPE     0x0008 // IME_CMODE_FULLSHAPE
  33. #define WIME_MODE_NATIVE        0x0001 // IME_CMODE_NATIVE
  34. #define WIME_MODE_KATAKANA      0x0002 // IME_CMODE_KATAKANA
  35. #define WIME_MODE_ALPHANUMERIC  0x0000 // IME_CMODE_ALPHANUMERIC
  36. #define WIME_NO_CONVERSION      0x0100 // IME_CMODE_NOCONVERSION
  37. #define WIME_MODE_ROMAN         0x0010 // IME_CMODE_ROMAN
  38. #define WIME_MODE_SOFTKBD       0x0080 // IME_CMODE_SOFTKBD
  39. #define WIME_MODE_CHARCODE      0x0020 // IME_CMODE_CHARCHODE
  40. #define WIME_MODE_HANJA         0x0040 // IME_CMODE_HANJACONVERT
  41. #define WIME_MODE_EUDC          0x0200 // IME_CMODE_EUDC
  42. #define WIME_MODE_SYMBOL        0x0400 // IME_CMODE_SYMBOL
  43.  
  44. // non-roman defines
  45. #define WIME_DB_HIRAGANA (WIME_MODE_FULLSHAPE | WIME_MODE_NATIVE)
  46. #define WIME_DB_KATAKANA (WIME_MODE_FULLSHAPE | WIME_MODE_NATIVE | WIME_MODE_KATAKANA)
  47. #define WIME_DB_ALPHANUM (WIME_MODE_FULLSHAPE)
  48. #define WIME_SB_KATAKANA (WIME_MODE_KATAKANA | WIME_MODE_NATIVE)
  49.  
  50. // The names are:
  51. //      No Conversion
  52. //      Double Byte Hiragana
  53. //      Double Byte Katakana
  54. //      Single Byte Katakana
  55. //      Double Byte Alphanumeric
  56. //      Single Byte Alphanumeric
  57.  
  58. #define WIME_NONE              (WIME_MODE_NOCONVERSION)
  59. // roman defines
  60. #define WIME_DB_HIRAGANA_ROMAN (WIME_MODE_FULLSHAPE | WIME_MODE_NATIVE | WIME_MODE_ROMAN)
  61. #define WIME_DB_KATAKANA_ROMAN (WIME_MODE_KATAKANA | WIME_MODE_FULLSHAPE | WIME_MODE_NATIVE | WIME_MODE_ROMAN)
  62. #define WIME_SB_KATAKANA_ROMAN (WIME_MODE_KATAKANA | WIME_MODE_NATIVE | WIME_MODE_ROMAN)
  63. #define WIME_DB_ALPHANUM_ROMAN (WIME_MODE_FULLSHAPE | WIME_MODE_ROMAN)
  64.  
  65. #define WIME_SB_ALPHANUM       (WIME_MODE_ALPHANUMERIC)
  66.  
  67. class WCMCLASS WInputContext : public WObject {
  68.     WDefineSubclass( WInputContext, WObject );
  69.  
  70.     public:
  71.  
  72.         /**************************************************************
  73.          * Constructors and destructors
  74.          **************************************************************/
  75.     
  76.         WInputContext();
  77.         WInputContext( const WInputContext &ctx );
  78.         ~WInputContext();
  79.  
  80.         WInputContext & operator=( const WInputContext &ctx );
  81.  
  82.         /**************************************************************
  83.          * Methods
  84.          **************************************************************/
  85.  
  86.          WBool Create();
  87.  
  88.         /**************************************************************
  89.          * Properties
  90.          **************************************************************/
  91.  
  92.         // InputMode
  93.         //
  94.         //      The input mode for this input context.
  95.  
  96.         WDWord GetInputMode() const;
  97.         WBool      SetInputMode( WDWord mode );
  98.  
  99.         WInputContextHandle     GetHandle() const;
  100.  
  101.         /**************************************************************
  102.          * Data members
  103.          **************************************************************/
  104.  
  105.     private:
  106.         WInputContextHandle     _inputContext;
  107.  
  108. };
  109.  
  110.  
  111. #ifndef _WNO_PRAGMA_PUSH
  112. #pragma enum pop;
  113. #pragma pack(pop);
  114. #endif
  115.  
  116. #endif // _WINPUTCX_HPP_INCLUDED
  117.