summaryrefslogtreecommitdiff
path: root/plugins/Pascal_Headers
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-07-03 07:22:09 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-07-03 07:22:09 +0000
commit8b8845c8e142c2e70bc0c2785ddf3a91ad3f84bd (patch)
tree58d80918e28651c678069aa2ee768f801eca74db /plugins/Pascal_Headers
parent980bcaff693a86971750d6e9ffc8ba1e561b8b3a (diff)
New core adaptation (Delphi 7 normal compilation)
API headers update git-svn-id: http://svn.miranda-ng.org/main/trunk@731 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Pascal_Headers')
-rw-r--r--plugins/Pascal_Headers/m_api.pas40
-rw-r--r--plugins/Pascal_Headers/m_core.inc9
-rw-r--r--plugins/Pascal_Headers/m_helpers.inc10
-rw-r--r--plugins/Pascal_Headers/m_idle.inc15
4 files changed, 29 insertions, 45 deletions
diff --git a/plugins/Pascal_Headers/m_api.pas b/plugins/Pascal_Headers/m_api.pas
index 8441e34870..c8692b16db 100644
--- a/plugins/Pascal_Headers/m_api.pas
+++ b/plugins/Pascal_Headers/m_api.pas
@@ -92,27 +92,6 @@ const
const
UNICODE_AWARE = 1;
-type
- PPLUGININFO = ^TPLUGININFO;
- TPLUGININFO = record
- cbSize :int;
- shortName :PAnsiChar;
- version :DWORD;
- description:PAnsiChar; // [TRANSLATED-BY-CORE]
- author :PAnsiChar;
- authorEmail:PAnsiChar;
- copyright :PAnsiChar;
- homepage :PAnsiChar;
- flags :Byte; // right now the only flag, UNICODE_AWARE, is recognized here
- { one of the DEFMOD_* consts in m_plugin or zero, if non zero, this will
- suppress loading of the specified builtin module }
- replacesDefaultModule: int;
- end;
-
-{
- 0.7+
- New plugin loader implementation
-}
// The UUID structure below is used to for plugin UUID's and module type definitions
type
PMUUID = ^TMUUID;
@@ -168,14 +147,14 @@ const
{ Database plugin stuff }
// grokHeader() error codes
- const
- EGROKPRF_NOERROR = 0;
- EGROKPRF_CANTREAD = 1; // can't open the profile for reading
- EGROKPRF_UNKHEADER = 2; // header not supported, not a supported profile
- EGROKPRF_VERNEWER = 3; // header correct, version in profile newer than reader/writer
- EGROKPRF_DAMAGED = 4; // header/version fine, other internal data missing, damaged.
- // makeDatabase() error codes
- EMKPRF_CREATEFAILED = 1; // for some reason CreateFile() didnt like something
+const
+ EGROKPRF_NOERROR = 0;
+ EGROKPRF_CANTREAD = 1; // can't open the profile for reading
+ EGROKPRF_UNKHEADER = 2; // header not supported, not a supported profile
+ EGROKPRF_VERNEWER = 3; // header correct, version in profile newer than reader/writer
+ EGROKPRF_DAMAGED = 4; // header/version fine, other internal data missing, damaged.
+// makeDatabase() error codes
+ EMKPRF_CREATEFAILED = 1; // for some reason CreateFile() didnt like something
type
PDATABASELINK = ^TDATABASELINK;
@@ -215,8 +194,7 @@ type
}
grokHeader : function (profile:PAnsiChar; error:Pint):int; cdecl;
{
- Affect: Tell the database to create all services/hooks that a 3.xx legecy database might support into link,
- which is a PLUGINLINK structure
+ Affect: Tell the database to create all services/hooks that a 3.xx legecy database might support into link
Returns: 0 on success, nonzero on failure
}
Load : function (profile:PAnsiChar):int; cdecl;
diff --git a/plugins/Pascal_Headers/m_core.inc b/plugins/Pascal_Headers/m_core.inc
index a46174c193..bbf0bcba56 100644
--- a/plugins/Pascal_Headers/m_core.inc
+++ b/plugins/Pascal_Headers/m_core.inc
@@ -169,8 +169,6 @@ function SetHookDefaultForHookableEvent(hEvent:THANDLE; pfnHook:TMIRANDAHOOK):in
external CoreDLL name 'SetHookDefaultForHookableEvent';
function CallPluginEventHook(hInst:HINST; hEvent:THANDLE; wParam:WPARAM; lParam:LPARAM):int; stdcall;
external CoreDLL name 'CallPluginEventHook';
-function CallHookSubscribers(hEvent:THANDLE; wParam:WPARAM; lParam:LPARAM):int; stdcall;
- external CoreDLL name 'CallHookSubscribers';
function NotifyEventHooks(hEvent:THANDLE; wParam:WPARAM; lParam:LPARAM): int; stdcall;
external CoreDLL name 'NotifyEventHooks';
@@ -498,8 +496,8 @@ function forkthread(func:pThreadFunc; stacksize:uint; arg:pointer):uint_ptr; std
function forkthreadex(sec:pointer; stacksize:uint; func:pThreadFuncEx; owner:pointer; arg:pointer; thraddr:puint_ptr):uint_ptr; stdcall;
external CoreDLL name 'forkthreadex';
-procedure Thread_SetName(dwThreadID:dword; const szThreadName:pAnsiChar); stdcall;
- external CoreDLL name 'Thread_SetName';
+procedure Thread_SetName(const szThreadName:pAnsiChar); stdcall;
+ external CoreDLL name 'Thread_SetName';
procedure KillObjectThreads(pObject:pointer); stdcall;
external CoreDLL name 'KillObjectThreads';
@@ -507,7 +505,7 @@ procedure KillObjectThreads(pObject:pointer); stdcall;
///////////////////////////////////////////////////////////////////////////////
// utf8 interface
-
+{ commented to avoid newer Delphi version conflicts
function Utf8Decode(str:PAnsiChar; var ucs2:pWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8Decode';
function Utf8DecodeCP(str:PAnsiChar; codepage:int; var ucs2:pWideChar):PAnsiChar;stdcall;
@@ -526,6 +524,7 @@ function Utf8EncodeW(const src:PWideChar):PAnsiChar;stdcall;
function Ucs2toUtf8Len(const src:pWideChar):int; stdcall;
external CoreDLL name 'Ucs2toUtf8Len';
+}
// aliases
function mir_utf8decode(str:PAnsiChar; var ucs2:pWideChar):PAnsiChar;stdcall;
external CoreDLL name 'Utf8Decode';
diff --git a/plugins/Pascal_Headers/m_helpers.inc b/plugins/Pascal_Headers/m_helpers.inc
index e4297b3c16..34351ec63d 100644
--- a/plugins/Pascal_Headers/m_helpers.inc
+++ b/plugins/Pascal_Headers/m_helpers.inc
@@ -3,7 +3,7 @@
function ProtoServiceExists(const proto,service: PAnsiChar): int;
function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar;
-function CreateVersionStringPlugin(pluginInfo:PPluginInfo;buf:PAnsiChar):PAnsiChar;
+function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar;
function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int;
function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int;
@@ -35,6 +35,7 @@ function Translate(sz: PAnsiChar): PAnsiChar;
function Translatew(sz: PWideChar): PWideChar;
function TranslateString(const sz: AnsiString): AnsiString;
function TranslateWideString(const sz:WideString):WideString;
+function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
procedure TranslateDialogDefault(hwndDlg: THandle);
procedure TranslateMenu(hMenu: HMENU);
function Langpack_PCharToTChar(astr:PAnsiChar):int_ptr;
@@ -100,7 +101,7 @@ begin
result:=buf;
end;
-function CreateVersionStringPlugin(pluginInfo:PPluginInfo;buf:PAnsiChar):PAnsiChar;
+function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar;
begin
result:=CreateVersionString(pluginInfo^.version,buf);
end;
@@ -299,6 +300,11 @@ begin
CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
end;
+function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
+begin
+ Result := String(PChar(CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
+end;
+
procedure TranslateDialogDefault(hwndDlg: THandle);
begin
TranslateDialog_LP(hwndDlg,hLangpack);
diff --git a/plugins/Pascal_Headers/m_idle.inc b/plugins/Pascal_Headers/m_idle.inc
index c01da2367b..bda2caea84 100644
--- a/plugins/Pascal_Headers/m_idle.inc
+++ b/plugins/Pascal_Headers/m_idle.inc
@@ -53,13 +53,14 @@ const
type
PMIRANDA_IDLE_INFO = ^TMIRANDA_IDLE_INFO;
TMIRANDA_IDLE_INFO = record
- cbSize : int; // sizeof()
- idleTime: int; // idle in mins, if zero then disabled
- privacy : int; // user doesnt want other people seeing anything more than they are idle
- aaStatus: int; // status to go to when user is auto away
- aaLock : int; // the status shouldn't be unset if its set
- idleType: int;
- end;
+ cbSize : int; // sizeof()
+ idleTime : int; // idle in mins, if zero then disabled
+ privacy : int; // user doesnt want other people seeing anything more than they are idle
+ aaStatus : int; // status to go to when user is auto away
+ aaLock : int; // the status shouldn't be unset if its set
+ idleType : int;
+ idlesoundsoff: int;
+ end;
{
wParam; 0
lParam: address of MIRANDA_IDLE_INFO