diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-22 20:31:16 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-22 20:31:16 +0000 |
commit | 881cdec3f53d98320cee55318f8adbe47b93e5e0 (patch) | |
tree | 56cbfac5f1f6fa442c8c71e0f39b68e088e1c6e1 /plugins/ChangeKeyboardLayout/main.cpp | |
parent | 5e8571847f3ccaa545a9fc1d26466f22ccce2d79 (diff) |
renamed to .cpp
git-svn-id: http://svn.miranda-ng.org/main/trunk@534 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ChangeKeyboardLayout/main.cpp')
-rw-r--r-- | plugins/ChangeKeyboardLayout/main.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/plugins/ChangeKeyboardLayout/main.cpp b/plugins/ChangeKeyboardLayout/main.cpp new file mode 100644 index 0000000000..188813111c --- /dev/null +++ b/plugins/ChangeKeyboardLayout/main.cpp @@ -0,0 +1,75 @@ +#include "commonheaders.h"
+
+struct MM_INTERFACE mmi;
+PLUGINLINK *pluginLink;
+int hLangpack;
+
+PLUGININFOEX pluginInfoEx = {
+ sizeof(PLUGININFOEX),
+ "Change Keyboard Layout",
+ VERSION,
+ "Plugin for change keyboard layout of text (multilayout).",
+ "Yasnovidyashii",
+ "Yasnovidyashii@gmail.com",
+ "© 2006-2009 Mikhail Yur'ev",
+ "http://lemnews.com/forum/viewtopic.php?t = 1493",
+ 0, //not transient
+ UNICODE_AWARE, //doesn't replace anything built-in
+ {0xc5ef53a8, 0x80d4, 0x4ce9, { 0xb3, 0x41, 0xec, 0x90, 0xd3, 0xec, 0x91, 0x56 }} //{c5ef53a8-80d4-4ce9-b341-ec90d3ec9156}
+};
+
+LPCTSTR ptszKeybEng = _T("`1234567890- = \\qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+|QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?");
+HKL hklEng = (HKL)0x04090409;
+
+LPCTSTR ptszSeparators = _T(" \t\n\r");
+
+HANDLE hOptionsInitialize;
+HANDLE hModulesLoaded;
+
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst = hinstDLL;
+ return TRUE;
+}
+
+
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ dwMirandaVersion = mirandaVersion;
+ return &pluginInfoEx;
+}
+
+
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ pluginLink = link;
+ mir_getMMI(&mmi);
+ mir_getLP(&pluginInfoEx);
+ ZeroMemory(hklLayouts, 20 * sizeof(HKL));
+ bLayNum = GetKeyboardLayoutList(20,hklLayouts);
+ if (bLayNum<2)
+ return 1;
+ hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
+ hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded);
+ return 0;
+}
+
+int __declspec(dllexport) Unload(void)
+{
+ DWORD i;
+
+ for (i = 0;i<bLayNum;i++)
+ mir_free(ptszLayStrings[i]);
+
+ UnhookEvent(hOptionsInitialize);
+ UnhookEvent(hIcoLibIconsChanged);
+ UnhookEvent(hModulesLoaded);
+ DestroyServiceFunction(hChangeLayout);
+ DestroyServiceFunction(hGetLayoutOfText);
+ DestroyServiceFunction(hChangeTextLayout);
+ UnhookWindowsHookEx(kbHook_All);
+ return 0;
+}
+
+
|