From ec0e34b4f88ebe03ff12f559e40dda52c51549b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Jun 2015 21:20:39 +0000 Subject: langpack services module destroyed from mir_app the only survived service moved to mir_core git-svn-id: http://svn.miranda-ng.org/main/trunk@14250 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_helpers.inc | 3 +- include/delphi/m_langpack.inc | 88 +------------------------------------------ 2 files changed, 3 insertions(+), 88 deletions(-) (limited to 'include/delphi') diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index f21a2c3f08..a005f5c9ec 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -11,7 +11,6 @@ function CLCDEFAULT_SELBKCOLOUR:dword; function CLCDEFAULT_SELTEXTCOLOUR:dword; function CLCDEFAULT_HOTTEXTCOLOUR:dword; - function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar; function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar; function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int; @@ -325,7 +324,7 @@ end; function Langpack_Register:int_ptr; begin - CallService(MS_LANGPACK_REGISTER,WPARAM(@hLangpack),LPARAM(@PluginInfo)); + mir_getLP(PluginInfo, hLangpack); result:=hLangpack; end; diff --git a/include/delphi/m_langpack.inc b/include/delphi/m_langpack.inc index 79a828a088..3091b574b3 100644 --- a/include/delphi/m_langpack.inc +++ b/include/delphi/m_langpack.inc @@ -25,85 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. const -{ - translates a single string into the user's local language v0.1.1.0+ - wParam=LANG_* flags - lParam=(LPARAM)(const AnsiChar*)szEnglish - returns a pointer to the localised string. If there is no known translation - it will return szEnglish. The return value does not need to be freed in any way - Note that the Translate() macro as defined below will crash plugins that are - loaded into Miranda 0.1.0.1 and earlier. If anyone's actually using one of - these versions, I pity them. -} - MS_LANGPACK_TRANSLATESTRING:PAnsiChar = 'LangPack/TranslateString'; -(* -{ - translates a dialog into the user's local language v0.1.1.0+ - wParam=0 - lParam=(LPARAM)(LANGPACKTRANSLATEDIALOG* )&lptd - returns 0 on success, nonzero on failure - This service only knows about the following controls: - Window titles, STATIC, EDIT, Hyperlink, BUTTON -} -type - IntArray = array [0..1000] of integer; - PLANGPACKTRANSLATEDIALOG = ^TLANGPACKTRANSLATEDIALOG; - TLANGPACKTRANSLATEDIALOG = record - cbSize :int; - flags :dword; - hwndDlg :HWND; - ignoreControls:^IntArray; // zero-terminated list of control IDs *not* to translate - end; - -const - LPTDF_NOIGNOREEDIT = 1; // translate all edit controls. By default - // non-read-only edit controls are not translated - LPTDF_NOTITLE = 2; //do not translate the title of the dialog - -const - MS_LANGPACK_TRANSLATEDIALOG:PAnsiChar = 'LangPack/TranslateDialog'; -*) -{ - translates a menu into the user's local language v0.1.1.0+ - wParam=(WPARAM)(HMENU)hMenu - lParam=0 - returns 0 on success, nonzero on failure -} - MS_LANGPACK_TRANSLATEMENU:PAnsiChar = 'LangPack/TranslateMenu'; - -{ - returns the codepage used in the language pack v0.4.3.0+ - wParam=0 - lParam=0 - returns the codepage stated in the langpack, or CP_ACP if no langpack is present -} - MS_LANGPACK_GETCODEPAGE:PAnsiChar = 'LangPack/GetCodePage'; - -{ - returns the locale id associated with the language pack v0.4.3.0+ - wParam=0 - lParam=0 - returns the Windows locale id stated in the langpack, or LOCALE_USER_DEFAULT if no langpack is present -} - MS_LANGPACK_GETLOCALE:PAnsiChar = 'LangPack/GetLocale'; - -{ - returns the strdup/wcsdup of lparam according to the langpack v0.4.3.0+ - wParam=0 - lParam=(LPARAM)(AnsiChar*)source string - returns a string converted from AnsiChar* to TCHAR* using the langpack codepage. - This string should be freed using mir_free() then -} - MS_LANGPACK_PCHARTOTCHAR:PAnsiChar = 'LangPack/PcharToTchar'; - -{ - initializes the plugin-specific translation context v0.10.0+ - wParam=pointer to the langpack handle - lParam=PLUGININFOEX* of the caller plugin - always returns 0 -} - MS_LANGPACK_REGISTER:PAnsiChar = 'LangPack/Register'; - { reloads langpack wParam=0 (ignored) @@ -114,12 +35,7 @@ const ME_LANGPACK_CHANGE:PAnsiChar = 'LangPack/Changed'; -{ - retrieves the hLangpack of a plugin by its HINSTANCE - wParam = 0 (ignored) - lParam = (LPARAM)(HINSTANCE)plugin's base address - returns hLangpack if found, or 0 if error occurred -} - MS_LANGPACK_LOOKUPHANDLE:PAnsiChar = 'LangPack/LookupHandle'; +procedure mir_getLP(var pInfo:TPLUGININFOEX; var hLang:int); stdcall; + external CoreDLL name 'mir_getLP'; {$ENDIF} -- cgit v1.2.3