XKeymacs for 64bit Windows
Revision | 91ee60b4c9b38e2806ba74b80531e12f3d31103c (tree) |
---|---|
Time | 2011-05-27 08:38:33 |
Author | Kazuhiro Fujieda <fujieda@user...> |
Commiter | Kazuhiro Fujieda |
Make all member functions of CXkeymacsDll static.
Make CMainFrame::m_pPropertiesDlg private.
@@ -43,7 +43,6 @@ END_MESSAGE_MAP() | ||
43 | 43 | |
44 | 44 | CMainFrame::CMainFrame() |
45 | 45 | { |
46 | - m_pXkeymacsDll = new CXkeymacsDll; | |
47 | 46 | m_pPropertiesDlg = new CProperties; |
48 | 47 | m_nResultPropertiesDlg = -1; |
49 | 48 | m_bPropertiesDlgExist = FALSE; |
@@ -87,9 +86,6 @@ CMainFrame::CMainFrame() | ||
87 | 86 | |
88 | 87 | CMainFrame::~CMainFrame() |
89 | 88 | { |
90 | - delete m_pXkeymacsDll; | |
91 | - m_pXkeymacsDll = NULL; | |
92 | - | |
93 | 89 | delete m_pPropertiesDlg; |
94 | 90 | m_pPropertiesDlg = NULL; |
95 | 91 |
@@ -114,7 +110,7 @@ int CMainFrame::OnCreate(const LPCREATESTRUCT lpCreateStruct) | ||
114 | 110 | return -1; |
115 | 111 | } |
116 | 112 | |
117 | - m_pXkeymacsDll->Set106Keyboard(CProfile::Is106Keyboard()); | |
113 | + CXkeymacsDll::Set106Keyboard(CProfile::Is106Keyboard()); | |
118 | 114 | |
119 | 115 | // init notify icon data |
120 | 116 | NOTIFYICONDATA notifyIconData[MAX_ICON_TYPE] = { |
@@ -149,7 +145,7 @@ int CMainFrame::OnCreate(const LPCREATESTRUCT lpCreateStruct) | ||
149 | 145 | sizeof(notifyIconData[ALT_ICON].szTip)); |
150 | 146 | |
151 | 147 | // set notify icon data |
152 | - m_pXkeymacsDll->SetNotifyIconData(MAIN_ICON, notifyIconData[MAIN_ICON], | |
148 | + CXkeymacsDll::SetNotifyIconData(MAIN_ICON, notifyIconData[MAIN_ICON], | |
153 | 149 | (HICON)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, 16, 16, LR_SHARED), |
154 | 150 | (HICON)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_MAIN_DISABLE_TMP), IMAGE_ICON, 16, 16, LR_SHARED), |
155 | 151 | (HICON)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_MAIN_DISABLE_WOCQ), IMAGE_ICON, 16, 16, LR_SHARED), // disable without C-q |
@@ -157,45 +153,45 @@ int CMainFrame::OnCreate(const LPCREATESTRUCT lpCreateStruct) | ||
157 | 153 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_MAIN)), 1)); |
158 | 154 | |
159 | 155 | // set notify ^X icon data |
160 | - m_pXkeymacsDll->SetNotifyIconData(CX_ICON, notifyIconData[CX_ICON], AfxGetApp()->LoadIcon(IDI_CX_ON), | |
156 | + CXkeymacsDll::SetNotifyIconData(CX_ICON, notifyIconData[CX_ICON], AfxGetApp()->LoadIcon(IDI_CX_ON), | |
161 | 157 | AfxGetApp()->LoadIcon(IDI_CX_OFF), |
162 | 158 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_CX)), 0)); |
163 | 159 | |
164 | 160 | // set notify M-x icon data |
165 | - m_pXkeymacsDll->SetNotifyIconData(MX_ICON, notifyIconData[MX_ICON], AfxGetApp()->LoadIcon(IDI_MX_ON), | |
161 | + CXkeymacsDll::SetNotifyIconData(MX_ICON, notifyIconData[MX_ICON], AfxGetApp()->LoadIcon(IDI_MX_ON), | |
166 | 162 | AfxGetApp()->LoadIcon(IDI_MX_OFF), |
167 | 163 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_MX)), 0)); |
168 | 164 | |
169 | 165 | // set notify Meta icon data |
170 | - m_pXkeymacsDll->SetNotifyIconData(META_ICON, notifyIconData[META_ICON], AfxGetApp()->LoadIcon(IDI_META_ON), | |
166 | + CXkeymacsDll::SetNotifyIconData(META_ICON, notifyIconData[META_ICON], AfxGetApp()->LoadIcon(IDI_META_ON), | |
171 | 167 | AfxGetApp()->LoadIcon(IDI_META_OFF), |
172 | 168 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_META)), 0)); |
173 | 169 | |
174 | 170 | // set notify Shift icon data |
175 | - m_pXkeymacsDll->SetNotifyIconData(SHIFT_ICON, notifyIconData[SHIFT_ICON], AfxGetApp()->LoadIcon(IDI_SHIFT_ON), | |
171 | + CXkeymacsDll::SetNotifyIconData(SHIFT_ICON, notifyIconData[SHIFT_ICON], AfxGetApp()->LoadIcon(IDI_SHIFT_ON), | |
176 | 172 | AfxGetApp()->LoadIcon(IDI_SHIFT_OFF), |
177 | 173 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_SHIFT)), 0)); |
178 | 174 | |
179 | 175 | // set notify Ctrl icon data |
180 | - m_pXkeymacsDll->SetNotifyIconData(CTRL_ICON, notifyIconData[CTRL_ICON], AfxGetApp()->LoadIcon(IDI_CTRL_ON), | |
176 | + CXkeymacsDll::SetNotifyIconData(CTRL_ICON, notifyIconData[CTRL_ICON], AfxGetApp()->LoadIcon(IDI_CTRL_ON), | |
181 | 177 | AfxGetApp()->LoadIcon(IDI_CTRL_OFF), |
182 | 178 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_CTRL)), 0)); |
183 | 179 | |
184 | 180 | // set notify Alt icon data |
185 | - m_pXkeymacsDll->SetNotifyIconData(ALT_ICON, notifyIconData[ALT_ICON], AfxGetApp()->LoadIcon(IDI_ALT_ON), | |
181 | + CXkeymacsDll::SetNotifyIconData(ALT_ICON, notifyIconData[ALT_ICON], AfxGetApp()->LoadIcon(IDI_ALT_ON), | |
186 | 182 | AfxGetApp()->LoadIcon(IDI_ALT_OFF), |
187 | 183 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_ALT)), 0)); |
188 | 184 | |
189 | - m_pXkeymacsDll->SetKeyboardSpeed(CProfile::GetKeyboardSpeed()); | |
190 | - m_pXkeymacsDll->SetAccelerate(AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_ACCELERATE)), 1)); | |
185 | + CXkeymacsDll::SetKeyboardSpeed(CProfile::GetKeyboardSpeed()); | |
186 | + CXkeymacsDll::SetAccelerate(AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_ACCELERATE)), 1)); | |
191 | 187 | |
192 | - m_pXkeymacsDll->SetCursorData((HCURSOR)::LoadImage(NULL, MAKEINTRESOURCE(IDC_ARROW), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED), | |
188 | + CXkeymacsDll::SetCursorData((HCURSOR)::LoadImage(NULL, MAKEINTRESOURCE(IDC_ARROW), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED), | |
193 | 189 | (HCURSOR)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_DISABLE_TMP_CURSOR), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED), |
194 | 190 | (HCURSOR)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_DISABLE_WOCQ_CURSOR), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED), |
195 | 191 | (HCURSOR)::LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDC_DISABLE_CURSOR), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_SHARED), |
196 | 192 | AfxGetApp()->GetProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_CHANGE_CURSOR)), 0)); |
197 | 193 | |
198 | - m_pXkeymacsDll->SetHooks(); | |
194 | + CXkeymacsDll::SetHooks(); | |
199 | 195 | |
200 | 196 | return 0; |
201 | 197 | } |
@@ -290,7 +286,7 @@ void CMainFrame::ShowRightMenu(const ICON_TYPE icon) | ||
290 | 286 | popUp->SetDefaultItem(IDC_PROPERTIES); |
291 | 287 | |
292 | 288 | CString szDisable(MAKEINTRESOURCE(IDS_ENABLE)); |
293 | - if (m_pXkeymacsDll->IsKeyboardHook()) { | |
289 | + if (CXkeymacsDll::IsKeyboardHook()) { | |
294 | 290 | szDisable.LoadString(IDS_DISABLE); |
295 | 291 | } |
296 | 292 | szDisable += _T("\tCtrl+Q"); |
@@ -359,7 +355,7 @@ LRESULT CMainFrame::WindowProc(const UINT message, const WPARAM wParam, const LP | ||
359 | 355 | } |
360 | 356 | default: |
361 | 357 | if (message == s_uTaskbarRestart) { |
362 | - m_pXkeymacsDll->AddAllShell_NotifyIcon(); | |
358 | + CXkeymacsDll::AddAllShell_NotifyIcon(); | |
363 | 359 | } |
364 | 360 | break; |
365 | 361 | } |
@@ -385,10 +381,10 @@ void CMainFrame::OnOptions() | ||
385 | 381 | // stop/start keyboard hook |
386 | 382 | void CMainFrame::OnDisable() |
387 | 383 | { |
388 | - if (m_pXkeymacsDll->IsKeyboardHook()) { | |
389 | - m_pXkeymacsDll->SetKeyboardHookFlag(FALSE); | |
384 | + if (CXkeymacsDll::IsKeyboardHook()) { | |
385 | + CXkeymacsDll::SetKeyboardHookFlag(FALSE); | |
390 | 386 | } else { |
391 | - m_pXkeymacsDll->SetKeyboardHookFlag(TRUE); | |
387 | + CXkeymacsDll::SetKeyboardHookFlag(TRUE); | |
392 | 388 | } |
393 | 389 | } |
394 | 390 |
@@ -411,8 +407,8 @@ void CMainFrame::OnQuit() | ||
411 | 407 | CloseDialog(m_p109KeyboardDlg[i], &m_nResultKeyboardDlg[JAPANESE_KEYBOARD][i]); |
412 | 408 | } |
413 | 409 | |
414 | - m_pXkeymacsDll->ReleaseHooks(); | |
415 | - m_pXkeymacsDll->DeleteAllShell_NotifyIcon(); | |
410 | + CXkeymacsDll::ReleaseHooks(); | |
411 | + CXkeymacsDll::DeleteAllShell_NotifyIcon(); | |
416 | 412 | |
417 | 413 | PostQuitMessage(0); |
418 | 414 | } |
@@ -459,8 +455,8 @@ void CMainFrame::OnExport() | ||
459 | 455 | |
460 | 456 | void CMainFrame::OnReset() |
461 | 457 | { |
462 | - m_pXkeymacsDll->ReleaseHooks(); | |
463 | - m_pXkeymacsDll->SetHooks(); | |
458 | + CXkeymacsDll::ReleaseHooks(); | |
459 | + CXkeymacsDll::SetHooks(); | |
464 | 460 | } |
465 | 461 | |
466 | 462 | void CMainFrame::OnHelpFinder() |
@@ -86,9 +86,7 @@ private: | ||
86 | 86 | CAboutDlg *m_pAboutDlg; |
87 | 87 | int m_nResultAboutDlg; |
88 | 88 | int m_nResultPropertiesDlg; |
89 | -public: | |
90 | 89 | CProperties *m_pPropertiesDlg; |
91 | - CXkeymacsDll *m_pXkeymacsDll; | |
92 | 90 | }; |
93 | 91 | |
94 | 92 | ///////////////////////////////////////////////////////////////////////////// |
@@ -160,13 +160,12 @@ void COptionsDlg::OnOK() | ||
160 | 160 | AfxGetApp()->WriteProfileInt(CString(), CString(MAKEINTRESOURCE(IDS_REG_ENTRY_ALT)), m_cAlt.GetCheck()); |
161 | 161 | |
162 | 162 | // set dll data |
163 | - CMainFrame *pMainFrame = (CMainFrame*)AfxGetMainWnd(); | |
164 | - pMainFrame->m_pXkeymacsDll->EnableShell_NotifyIcon(CX_ICON, m_cCx.GetCheck()); | |
165 | - pMainFrame->m_pXkeymacsDll->EnableShell_NotifyIcon(MX_ICON, m_cMx.GetCheck()); | |
166 | - pMainFrame->m_pXkeymacsDll->EnableShell_NotifyIcon(META_ICON, m_cM_.GetCheck()); | |
167 | - pMainFrame->m_pXkeymacsDll->EnableShell_NotifyIcon(SHIFT_ICON, m_cShift.GetCheck()); | |
168 | - pMainFrame->m_pXkeymacsDll->EnableShell_NotifyIcon(CTRL_ICON, m_cCtrl.GetCheck()); | |
169 | - pMainFrame->m_pXkeymacsDll->EnableShell_NotifyIcon(ALT_ICON, m_cAlt.GetCheck()); | |
163 | + CXkeymacsDll::EnableShell_NotifyIcon(CX_ICON, m_cCx.GetCheck()); | |
164 | + CXkeymacsDll::EnableShell_NotifyIcon(MX_ICON, m_cMx.GetCheck()); | |
165 | + CXkeymacsDll::EnableShell_NotifyIcon(META_ICON, m_cM_.GetCheck()); | |
166 | + CXkeymacsDll::EnableShell_NotifyIcon(SHIFT_ICON, m_cShift.GetCheck()); | |
167 | + CXkeymacsDll::EnableShell_NotifyIcon(CTRL_ICON, m_cCtrl.GetCheck()); | |
168 | + CXkeymacsDll::EnableShell_NotifyIcon(ALT_ICON, m_cAlt.GetCheck()); | |
170 | 169 | } |
171 | 170 | |
172 | 171 | CDialog::OnOK(); |
@@ -474,7 +474,7 @@ BOOL CALLBACK CProfile::EnumWindowsProc(const HWND hWnd, const LPARAM lParam) | ||
474 | 474 | } |
475 | 475 | return TRUE; |
476 | 476 | } |
477 | - | |
477 | + | |
478 | 478 | ////////////////////////////////////////////////////////////////////// |
479 | 479 | // Construction/Destruction |
480 | 480 | ////////////////////////////////////////////////////////////////////// |
@@ -768,11 +768,9 @@ void CProfile::SaveRegistryData() | ||
768 | 768 | |
769 | 769 | void CProfile::SetDllData() |
770 | 770 | { |
771 | - CMainFrame *pMainFrame = (CMainFrame*)AfxGetMainWnd(); | |
772 | - | |
773 | - pMainFrame->m_pXkeymacsDll->ClearFunctionDefinition(); | |
771 | + CXkeymacsDll::ClearFunctionDefinition(); | |
774 | 772 | for (int nFunctionID = 0; nFunctionID < CDotXkeymacs::GetFunctionNumber(); ++nFunctionID) { |
775 | - pMainFrame->m_pXkeymacsDll->SetFunctionDefinition(nFunctionID, CDotXkeymacs::GetFunctionDefinition(nFunctionID)); | |
773 | + CXkeymacsDll::SetFunctionDefinition(nFunctionID, CDotXkeymacs::GetFunctionDefinition(nFunctionID)); | |
776 | 774 | } |
777 | 775 | |
778 | 776 | for (int nApplicationID = 0; nApplicationID < MAX_APP; ++nApplicationID) { |
@@ -780,24 +778,24 @@ void CProfile::SetDllData() | ||
780 | 778 | CString szApplicationName = m_XkeymacsData[nApplicationID].GetApplicationName(); |
781 | 779 | |
782 | 780 | if (szApplicationName.IsEmpty()) { |
783 | - pMainFrame->m_pXkeymacsDll->Clear(nApplicationID); | |
781 | + CXkeymacsDll::Clear(nApplicationID); | |
784 | 782 | continue; |
785 | 783 | } |
786 | 784 | |
787 | - pMainFrame->m_pXkeymacsDll->SetApplicationName(nApplicationID, szApplicationName); | |
788 | - pMainFrame->m_pXkeymacsDll->SetWindowText(nApplicationID, m_XkeymacsData[nApplicationID].GetWindowText()); | |
789 | - pMainFrame->m_pXkeymacsDll->SetCommandID(nApplicationID, CONTROL, 'X', 0); | |
790 | - pMainFrame->m_pXkeymacsDll->SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', FALSE); | |
785 | + CXkeymacsDll::SetApplicationName(nApplicationID, szApplicationName); | |
786 | + CXkeymacsDll::SetWindowText(nApplicationID, m_XkeymacsData[nApplicationID].GetWindowText()); | |
787 | + CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 0); | |
788 | + CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', FALSE); | |
791 | 789 | |
792 | 790 | for (int nCommandType = 0; nCommandType < MAX_COMMAND_TYPE; ++nCommandType) { |
793 | 791 | for (int nKey = 0; nKey < MAX_KEY; ++nKey) { |
794 | 792 | const int nCommandID = m_XkeymacsData[nApplicationID].GetCommandID(nCommandType, nKey); |
795 | - pMainFrame->m_pXkeymacsDll->SetCommandID(nApplicationID, nCommandType, nKey, nCommandID); | |
793 | + CXkeymacsDll::SetCommandID(nApplicationID, nCommandType, nKey, nCommandID); | |
796 | 794 | const BOOL bAtIbeamCursorOnly = m_XkeymacsData[nApplicationID].GetAtIbeamCursorOnly(nCommandType, nKey); |
797 | - pMainFrame->m_pXkeymacsDll->SetAtIbeamCursorOnly(nApplicationID, nCommandType, nKey, bAtIbeamCursorOnly); | |
795 | + CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, nCommandType, nKey, bAtIbeamCursorOnly); | |
798 | 796 | if ((nCommandType & CONTROLX) && nCommandID) { |
799 | - pMainFrame->m_pXkeymacsDll->SetCommandID(nApplicationID, CONTROL, 'X', 1); // Commands[1] is C-x | |
800 | - pMainFrame->m_pXkeymacsDll->SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly); | |
797 | + CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 1); // Commands[1] is C-x | |
798 | + CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly); | |
801 | 799 | } |
802 | 800 | } |
803 | 801 | } |
@@ -807,22 +805,22 @@ void CProfile::SetDllData() | ||
807 | 805 | int nCommandType = 0; |
808 | 806 | int nKey = 0; |
809 | 807 | CDotXkeymacs::GetKey(nFunctionID, nApplicationID, nKeyID, &nCommandType, &nKey); |
810 | - pMainFrame->m_pXkeymacsDll->SetFunctionKey(nFunctionID, nApplicationID, nCommandType, nKey); | |
808 | + CXkeymacsDll::SetFunctionKey(nFunctionID, nApplicationID, nCommandType, nKey); | |
811 | 809 | if (nCommandType & CONTROLX) { |
812 | - pMainFrame->m_pXkeymacsDll->SetCommandID(nApplicationID, CONTROL, 'X', 1); // Commands[1] is C-x | |
810 | + CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 1); // Commands[1] is C-x | |
813 | 811 | const BOOL bAtIbeamCursorOnly = m_XkeymacsData[nApplicationID].GetAtIbeamCursorOnly(nCommandType, nKey); |
814 | - pMainFrame->m_pXkeymacsDll->SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly); | |
812 | + CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly); | |
815 | 813 | } |
816 | 814 | } |
817 | 815 | } |
818 | 816 | |
819 | - pMainFrame->m_pXkeymacsDll->SetKillRingMax(nApplicationID, m_XkeymacsData[nApplicationID].GetKillRingMax()); | |
820 | - pMainFrame->m_pXkeymacsDll->SetUseDialogSetting(nApplicationID, m_XkeymacsData[nApplicationID].GetUseDialogSetting()); | |
821 | - pMainFrame->m_pXkeymacsDll->SetSettingStyle(nApplicationID, m_XkeymacsData[nApplicationID].GetSettingStyle()); | |
822 | - pMainFrame->m_pXkeymacsDll->SetIgnoreUndefinedMetaCtrl(nApplicationID, m_XkeymacsData[nApplicationID].GetIgnoreUndefinedMetaCtrl()); | |
823 | - pMainFrame->m_pXkeymacsDll->SetIgnoreUndefinedC_x(nApplicationID, m_XkeymacsData[nApplicationID].GetIgnoreUndefinedC_x()); | |
824 | - pMainFrame->m_pXkeymacsDll->SetEnableCUA(nApplicationID, m_XkeymacsData[nApplicationID].GetEnableCUA()); | |
825 | - pMainFrame->m_pXkeymacsDll->Set326Compatible(nApplicationID, m_XkeymacsData[nApplicationID].Get326Compatible()); | |
817 | + CXkeymacsDll::SetKillRingMax(nApplicationID, m_XkeymacsData[nApplicationID].GetKillRingMax()); | |
818 | + CXkeymacsDll::SetUseDialogSetting(nApplicationID, m_XkeymacsData[nApplicationID].GetUseDialogSetting()); | |
819 | + CXkeymacsDll::SetSettingStyle(nApplicationID, m_XkeymacsData[nApplicationID].GetSettingStyle()); | |
820 | + CXkeymacsDll::SetIgnoreUndefinedMetaCtrl(nApplicationID, m_XkeymacsData[nApplicationID].GetIgnoreUndefinedMetaCtrl()); | |
821 | + CXkeymacsDll::SetIgnoreUndefinedC_x(nApplicationID, m_XkeymacsData[nApplicationID].GetIgnoreUndefinedC_x()); | |
822 | + CXkeymacsDll::SetEnableCUA(nApplicationID, m_XkeymacsData[nApplicationID].GetEnableCUA()); | |
823 | + CXkeymacsDll::Set326Compatible(nApplicationID, m_XkeymacsData[nApplicationID].Get326Compatible()); | |
826 | 824 | } |
827 | 825 | } |
828 | 826 |
@@ -89,6 +89,7 @@ BOOL CXkeymacsApp::InitInstance() | ||
89 | 89 | |
90 | 90 | // set registry key |
91 | 91 | CProfile::InitDllData(); |
92 | + CUtils::InitCUtils(); | |
92 | 93 | |
93 | 94 | return TRUE; |
94 | 95 | } |
@@ -246,7 +246,7 @@ DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) | ||
246 | 246 | |
247 | 247 | CXkeymacsDll::CXkeymacsDll() |
248 | 248 | { |
249 | - CUtils::InitCUtils(); | |
249 | + | |
250 | 250 | } |
251 | 251 | |
252 | 252 | CXkeymacsDll::~CXkeymacsDll() |
@@ -53,33 +53,33 @@ class AFX_EXT_CLASS CXkeymacsDll | ||
53 | 53 | public: |
54 | 54 | static void ModifyM_xTip(const TCHAR *const szPath); |
55 | 55 | static BOOL Get326Compatible(); |
56 | - void Set326Compatible(int nApplicationID, BOOL b326Compatible); | |
57 | - void SetCursorData(HCURSOR hEnable, HCURSOR hDisableTMP, HCURSOR hDisableWOCQ, HICON hDisable, BOOL bEnable); | |
56 | + static void Set326Compatible(int nApplicationID, BOOL b326Compatible); | |
57 | + static void SetCursorData(HCURSOR hEnable, HCURSOR hDisableTMP, HCURSOR hDisableWOCQ, HICON hDisable, BOOL bEnable); | |
58 | 58 | static unsigned int GetMaxKeyInterval(void); |
59 | 59 | static void SetKeyboardSpeed(int nKeyboardSpeed); |
60 | 60 | static int GetAccelerate(void); |
61 | 61 | static void SetAccelerate(int nAccelerate); |
62 | - void SetWindowText(int nApplicationID, CString szWindowText); | |
63 | - void AddAllShell_NotifyIcon(); | |
64 | - void DeleteAllShell_NotifyIcon(); | |
65 | - void SetKillRingMax(int nApplicationID, int nKillRingMax); | |
66 | - void CXkeymacsDll::EnableShell_NotifyIcon(ICON_TYPE icon, BOOL bEnable); | |
67 | - void SetNotifyIconData(ICON_TYPE icon, NOTIFYICONDATA stNtfyIcon, HICON hEnable, HICON hDisableTMP, HICON hDisableWOCQ, HICON hDisable, BOOL bEnable); | |
68 | - void SetNotifyIconData(ICON_TYPE icon, NOTIFYICONDATA stNtfyIcon, HICON hOn, HICON hOff, BOOL bEnable); | |
69 | - void Clear(int nApplicationID); | |
70 | - BOOL IsKeyboardHook(); | |
71 | - void SetCommandID(int nApplicationID, int nCommandType, int nKey, int nCommandID); | |
72 | - void SetAtIbeamCursorOnly(int nApplicationID, int nCommandType, int nKey, BOOL bAtIbeamCursorOnly); | |
73 | - void SetApplicationName(int nApplicationID, CString szApplicationName); | |
62 | + static void SetWindowText(int nApplicationID, CString szWindowText); | |
63 | + static void AddAllShell_NotifyIcon(); | |
64 | + static void DeleteAllShell_NotifyIcon(); | |
65 | + static void SetKillRingMax(int nApplicationID, int nKillRingMax); | |
66 | + static void EnableShell_NotifyIcon(ICON_TYPE icon, BOOL bEnable); | |
67 | + static void SetNotifyIconData(ICON_TYPE icon, NOTIFYICONDATA stNtfyIcon, HICON hEnable, HICON hDisableTMP, HICON hDisableWOCQ, HICON hDisable, BOOL bEnable); | |
68 | + static void SetNotifyIconData(ICON_TYPE icon, NOTIFYICONDATA stNtfyIcon, HICON hOn, HICON hOff, BOOL bEnable); | |
69 | + static void Clear(int nApplicationID); | |
70 | + static BOOL IsKeyboardHook(); | |
71 | + static void SetCommandID(int nApplicationID, int nCommandType, int nKey, int nCommandID); | |
72 | + static void SetAtIbeamCursorOnly(int nApplicationID, int nCommandType, int nKey, BOOL bAtIbeamCursorOnly); | |
73 | + static void SetApplicationName(int nApplicationID, CString szApplicationName); | |
74 | 74 | static void ReleaseHooks(); |
75 | 75 | static void ReleaseKeyboardHook(); |
76 | - void SetEnableCUA(int nApplicationID, BOOL bEnableCUA); | |
77 | - void SetIgnoreUndefinedC_x(int nApplicationID, BOOL bIgnoreUndefinedC_x); | |
78 | - void SetIgnoreUndefinedMetaCtrl(int nApplicationID, BOOL bIgnoreUndefinedMetaCtrl); | |
76 | + static void SetEnableCUA(int nApplicationID, BOOL bEnableCUA); | |
77 | + static void SetIgnoreUndefinedC_x(int nApplicationID, BOOL bIgnoreUndefinedC_x); | |
78 | + static void SetIgnoreUndefinedMetaCtrl(int nApplicationID, BOOL bIgnoreUndefinedMetaCtrl); | |
79 | 79 | static void SetHooks(); |
80 | 80 | static void SetKeyboardHook(); |
81 | - void SetSettingStyle(int nApplicationID, int nSettingStyle); | |
82 | - void SetUseDialogSetting(int nApplicationID, BOOL bUseDialogSetting); | |
81 | + static void SetSettingStyle(int nApplicationID, int nSettingStyle); | |
82 | + static void SetUseDialogSetting(int nApplicationID, BOOL bUseDialogSetting); | |
83 | 83 | static void AddKillRing(BOOL bNewData = TRUE); |
84 | 84 | static void CallMacro(); |
85 | 85 | static void ClearFunctionDefinition(); |
@@ -119,7 +119,7 @@ private: | ||
119 | 119 | static HHOOK m_hHookGetMessage; |
120 | 120 | static HHOOK m_hHookShell; |
121 | 121 | static void AddShell_NotifyIcon(ICON_TYPE icon); |
122 | - void DeleteShell_NotifyIcon(ICON_TYPE icon); | |
122 | + static void DeleteShell_NotifyIcon(ICON_TYPE icon); | |
123 | 123 | static BOOL DefiningMacro(); |
124 | 124 | static BOOL IsControl(); |
125 | 125 | static BOOL IsMeta(); |