Back to index

im-sdk  12.3.91
IIIMP_hotkey_profile.hh
Go to the documentation of this file.
00001 #ifndef IIIMP_HOTKEY_PROFILE_HH_
00002 #define IIIMP_HOTKEY_PROFILE_HH_
00003 #include "IMBasicObject.hh"
00004 #include "IIIMPTrans.hh"
00005 #include "SunIM.h"
00006 #include "IMHotkey.hh"
00007 #include "IMHotkeyPrimitive.hh"
00008 
00009 class IIIMP_hotkey_profile
00010 {
00011   IMHotkeyProfileList profile_list ;
00012 
00013   IIIMP_card16 default_hotkey_profile_id;
00014   IIIMP_card16 default_hotkey_trigger_notify_id;
00015   IIIMP_card16 default_hotkey_lang_switch_id;
00016   IIIMP_card16 default_hotkey_cycle_lang_switch_id;
00017   IIIMP_card16 default_hotkey_reverse_cycle_lang_switch_id;
00018   IIIMP_card16 default_hotkey_super_help_id;
00019 
00020   typedef map<size_t, IMHotkeyProfileStruct *> HotkeyProfileMap;
00021   HotkeyProfileMap hotkey_profile_map;
00022 
00023   void merge_default_hotkeys(IMHotkeyList &phklist);
00024   public:
00025     IIIMP_hotkey_profile();
00026     ~IIIMP_hotkey_profile();
00027 
00028     const IMHotkeyProfileList *get_profile_list() const 
00029     { return &profile_list; }
00030 
00031     const int get_default_hotkey_profile_id() const
00032     { return default_hotkey_profile_id; }
00033 
00034     const int get_default_hotkey_trigger_notify_id() const
00035     { return default_hotkey_trigger_notify_id; }
00036 
00037     const int get_default_hotkey_lang_switch_id() const
00038     { return default_hotkey_lang_switch_id; }
00039 
00040     const int get_default_hotkey_cycle_lang_switch_id() const
00041     { return default_hotkey_cycle_lang_switch_id; }
00042 
00043     const int get_default_hotkey_reverse_cycle_lang_switch_id() const
00044     { return default_hotkey_reverse_cycle_lang_switch_id; }
00045 
00046     const int get_default_hotkey_super_help_id() const
00047     { return default_hotkey_super_help_id; }
00048 
00049     const int get_unique_profile_id(int le_profile_id, IMLEName *lename);
00050     bool init_hotkey_profile_list(IMHotkeyProfileStruct *hkps, int count);
00051 
00052     bool add_super_hotkey_profiles(
00053        const u16string &curr_input_lang,
00054        const IMHotkeyStruct *hotkeys,
00055        int n_hotkeys
00056     );
00057 
00058     IMHotkeyStruct *get_super_hotkeys(const IMKeySpecList &triggerkeys,
00059                                   const char          *language,
00060                                   int                 *count_hotkeys);
00061 
00062     int register_hotkeys(void* registerer_id, IMHotkeyList *hklist); 
00063     // for someone to store
00064     // the hotkeys 
00065     // returns profile_id
00066 
00067     const IMKeySpecList *retrieve_trigger_keys(int profile_id);
00068 
00069     HOTKEY_LIST* retrive_hotkeys(IIIMP_data_s *pdata_s, int count, int *profile_id); 
00070     // convert list to 
00071     // array and register
00072     // the hotkeys with 
00073     // client
00074     int get_num_profiles() const { return profile_list.size(); }
00075 
00076     void* get_registerer_id_by_profile_id(int profile_id);
00077     void* get_profile_id_by_registerer_id(void* registerer_id);
00078     
00079 };
00080 
00081 #endif /* not IIIMP_HOTKEY_PROFILE_HH_ */
00082 
00083 /* Local Variables: */
00084 /* c-file-style: "iiim-project" */
00085 /* End: */