OSDN Git Service

Move CXkeymacsData in xkeymacsdll/xkeymacsdll.{cpp,h} to
[xkeymacs/xkeymacs.git] / xkeymacsdll / xkeymacsdll.cpp
index 2317a36..44b9cc7 100644 (file)
@@ -1287,80 +1287,6 @@ HOOK_RECURSIVE_KEY:
        return TRUE;\r
 }\r
 \r
-//////////////////////////////////////////////////////////////////////\r
-// CXkeymacsData Class\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-//////////////////////////////////////////////////////////////////////\r
-// Construction/Destruction\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-CXkeymacsData::CXkeymacsData()\r
-{\r
-       ClearAll();\r
-}\r
-\r
-CXkeymacsData::~CXkeymacsData()\r
-{\r
-\r
-}\r
-\r
-// set application name\r
-void CXkeymacsData::SetApplicationName(LPCTSTR lpszApplicationName)\r
-{\r
-       m_strApplicationName.Format(lpszApplicationName);\r
-}\r
-\r
-// return application name\r
-CString CXkeymacsData::GetApplicationName()\r
-{\r
-       return m_strApplicationName;\r
-}\r
-\r
-// set hook or not\r
-void CXkeymacsData::SetCommandID(int nCommandType, int nKey, int nCommandID)\r
-{\r
-       ASSERT(0 <= nCommandType        || nCommandType < MAX_COMMAND_TYPE);\r
-       ASSERT(0 <= nKey                        || nKey                 < MAX_KEY);\r
-\r
-       m_nCommandID[nCommandType][nKey] = nCommandID;\r
-}\r
-\r
-// return hook or not\r
-int CXkeymacsData::GetCommandID(int nCommandType, int nKey)\r
-{\r
-       ASSERT(0 <= nCommandType        || nCommandType < MAX_COMMAND_TYPE);\r
-       ASSERT(0 <= nKey                        || nKey                 < MAX_KEY);\r
-\r
-       return m_nCommandID[nCommandType][nKey];\r
-}\r
-\r
-// set hook at ibeam cursor only or not\r
-void CXkeymacsData::SetAtIbeamCursorOnly(int nCommandType, int nKey, BOOL bAtIbeamCursorOnly)\r
-{\r
-       ASSERT(0 <= nCommandType        || nCommandType < MAX_COMMAND_TYPE);\r
-       ASSERT(0 <= nKey                        || nKey                 < MAX_KEY);\r
-\r
-       m_bAtIbeamCursorOnly[nCommandType][nKey] = bAtIbeamCursorOnly;\r
-}\r
-\r
-// get hook at ibeam cursor only or not\r
-BOOL CXkeymacsData::GetAtIbeamCursorOnly(int nCommandType, int nKey)\r
-{\r
-       ASSERT(0 <= nCommandType        || nCommandType < MAX_COMMAND_TYPE);\r
-       ASSERT(0 <= nKey                        || nKey                 < MAX_KEY);\r
-\r
-       return m_bAtIbeamCursorOnly[nCommandType][nKey];\r
-}\r
-\r
-// clear all data\r
-void CXkeymacsData::ClearAll()\r
-{\r
-       ZeroMemory(m_nCommandID, sizeof(m_nCommandID));\r
-       ZeroMemory(m_bAtIbeamCursorOnly, sizeof(m_bAtIbeamCursorOnly));\r
-       m_strApplicationName.Empty();\r
-}\r
-\r
 void CXkeymacsDll::SetApplicationName(int nApplicationID, CString szApplicationName)\r
 {\r
        ZeroMemory(m_szSpecialApp[nApplicationID], sizeof(m_szSpecialApp[nApplicationID]));\r
@@ -1408,32 +1334,6 @@ void CXkeymacsDll::Clear(int nApplicationID)
        }\r
 }\r
 \r
-void CXkeymacsData::SetApplicationTitle(LPCTSTR lpszApplicationTitle)\r
-{\r
-       m_strApplicationTitle.Format(lpszApplicationTitle);\r
-\r
-       // delete white space at the end of the application title.\r
-       while (!m_strApplicationTitle.IsEmpty()\r
-               && _istspace(m_strApplicationTitle.GetAt(m_strApplicationTitle.GetLength() - 1))) {\r
-               m_strApplicationTitle.Delete(m_strApplicationTitle.GetLength() - 1);\r
-       }\r
-}\r
-\r
-CString CXkeymacsData::GetApplicationTitle()\r
-{\r
-       return m_strApplicationTitle;\r
-}\r
-\r
-void CXkeymacsData::SetKillRingMax(int nKillRingMax)\r
-{\r
-       m_nKillRingMax = nKillRingMax;\r
-}\r
-\r
-int CXkeymacsData::GetKillRingMax()\r
-{\r
-       return m_nKillRingMax;\r
-}\r
-\r
 BOOL CXkeymacsDll::IsValidKey(BYTE bVk)\r
 {\r
        if (bVk == 0xf0) {      // 0xf0: Eisu key. GetAsyncKeyState returns the wrong state of Eisu key.\r
@@ -1650,62 +1550,21 @@ int CXkeymacsDll::GetMickey(int nDifferential, int nThreshold1, int nThreshold2,
        return nDifferential;\r
 }\r
 \r
-\r
-int CXkeymacsData::GetSettingStyle()\r
-{\r
-       return m_nSettingStyle;\r
-}\r
-\r
-void CXkeymacsData::SetSettingStyle(int nSettingStyle)\r
-{\r
-       m_nSettingStyle = nSettingStyle;\r
-}\r
-\r
 void CXkeymacsDll::SetSettingStyle(int nApplicationID, int nSettingStyle)\r
 {\r
        m_nSettingStyle[nApplicationID] = nSettingStyle;\r
 }\r
 \r
-void CXkeymacsData::SetIgnoreUndefinedMetaCtrl(BOOL bIgnoreUndefinedMetaCtrl)\r
-{\r
-       m_bIgnoreUndefinedMetaCtrl = bIgnoreUndefinedMetaCtrl;\r
-}\r
-\r
-BOOL CXkeymacsData::GetIgnoreUndefinedMetaCtrl()\r
-{\r
-       return m_bIgnoreUndefinedMetaCtrl;\r
-}\r
-\r
 void CXkeymacsDll::SetIgnoreUndefinedMetaCtrl(int nApplicationID, BOOL bIgnoreUndefinedMetaCtrl)\r
 {\r
        m_bIgnoreUndefinedMetaCtrl[nApplicationID] = bIgnoreUndefinedMetaCtrl;\r
 }\r
 \r
-void CXkeymacsData::SetIgnoreUndefinedC_x(BOOL bIgnoreUndefinedC_x)\r
-{\r
-       m_bIgnoreUndefinedC_x = bIgnoreUndefinedC_x;\r
-}\r
-\r
-BOOL CXkeymacsData::GetIgnoreUndefinedC_x()\r
-{\r
-       return m_bIgnoreUndefinedC_x;\r
-}\r
-\r
 void CXkeymacsDll::SetIgnoreUndefinedC_x(int nApplicationID, BOOL bIgnoreUndefinedC_x)\r
 {\r
        m_bIgnoreUndefinedC_x[nApplicationID] = bIgnoreUndefinedC_x;\r
 }\r
 \r
-void CXkeymacsData::SetEnableCUA(BOOL bEnableCUA)\r
-{\r
-       m_bEnableCUA = bEnableCUA;\r
-}\r
-\r
-BOOL CXkeymacsData::GetEnableCUA()\r
-{\r
-       return m_bEnableCUA;\r
-}\r
-\r
 void CXkeymacsDll::SetEnableCUA(int nApplicationID, BOOL bEnableCUA)\r
 {\r
        m_bEnableCUA[nApplicationID] = bEnableCUA;\r
@@ -1716,16 +1575,6 @@ BOOL CXkeymacsDll::GetEnableCUA()
        return m_bEnableCUA[m_nApplicationID];\r
 }\r
 \r
-void CXkeymacsData::SetUseDialogSetting(BOOL bUseDialogSetting)\r
-{\r
-       m_bUseDialogSetting = bUseDialogSetting;\r
-}\r
-\r
-BOOL CXkeymacsData::GetUseDialogSetting()\r
-{\r
-       return m_bUseDialogSetting;\r
-}\r
-\r
 void CXkeymacsDll::DefiningMacro(BOOL bDefiningMacro)\r
 {\r
        m_bDefiningMacro = bDefiningMacro;\r
@@ -2253,31 +2102,6 @@ void CXkeymacsDll::AddAllShell_NotifyIcon()
        }\r
 }\r
 \r
-void CXkeymacsData::SetWindowText(LPCTSTR lpszWindowText)\r
-{\r
-       m_nWindowTextType = CUtils::GetWindowTextType(lpszWindowText);\r
-       if (m_nWindowTextType == IDS_WINDOW_TEXT_IGNORE) {\r
-               m_strWindowText = _T('*');\r
-       } else {\r
-               m_strWindowText.Format(lpszWindowText);\r
-       }\r
-}\r
-\r
-CString CXkeymacsData::GetWindowText()\r
-{\r
-       return m_strWindowText;\r
-}\r
-\r
-void CXkeymacsData::SetWindowTextType(int nWindowTextType)\r
-{\r
-       m_nWindowTextType = nWindowTextType;\r
-}\r
-\r
-int CXkeymacsData::GetWindowTextType()\r
-{\r
-       return m_nWindowTextType;\r
-}\r
-\r
 BOOL CXkeymacsDll::IsMatchWindowText(CString szWindowText)\r
 {\r
        BOOL bIsMatchWindowText = TRUE;\r
@@ -2355,16 +2179,6 @@ void CXkeymacsDll::DoSetCursor()
        }\r
 }\r
 \r
-BOOL CXkeymacsData::Get326Compatible()\r
-{\r
-       return m_b326Compatible;\r
-}\r
-\r
-void CXkeymacsData::Set326Compatible(BOOL b326Compatible)\r
-{\r
-       m_b326Compatible = b326Compatible;\r
-}\r
-\r
 void CXkeymacsDll::Set326Compatible(int nApplicationID, BOOL b326Compatible)\r
 {\r
        m_b326Compatible[nApplicationID] = b326Compatible;\r