From dbebd421bbee09149a26b106ae32de795b683711 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 6 Nov 2023 12:03:01 +0300 Subject: =?UTF-8?q?fixes=20#3812=20(Pascal:=20=D0=B1=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D1=88=D0=B0=D1=8F=20=D1=87=D0=B0=D1=81=D1=82=D1=8C=20=D0=BF?= =?UTF-8?q?=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD=D0=BE=D0=B2=20=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=BD=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2?= =?UTF-8?q?=D0=B5=D0=B4=D0=B5=D0=BD=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/delphi/interfaces.inc | 41 ------------------------- include/delphi/m_api.pas | 38 ++++++----------------- include/delphi/m_genmenu.inc | 16 +++++----- include/delphi/testdll.dpr | 70 ------------------------------------------- 4 files changed, 17 insertions(+), 148 deletions(-) delete mode 100644 include/delphi/interfaces.inc delete mode 100644 include/delphi/testdll.dpr (limited to 'include/delphi') diff --git a/include/delphi/interfaces.inc b/include/delphi/interfaces.inc deleted file mode 100644 index 8aa46f59f2..0000000000 --- a/include/delphi/interfaces.inc +++ /dev/null @@ -1,41 +0,0 @@ -// Used to define the end of the MirandaPluginInterface list -const MIID_LAST :MUUID='{00000000-0000-0000-0000-000000000000}'; - -// My -const MIID_ACTMAN :MUUID='{9584DA04-FB4F-40C1-9325-E4F9CAAFCB5D}'; -const MIID_USEACTIONS :MUUID='{A63473F7-F8BF-46E7-9DF0-042DBE4CF579}'; -const MIID_MRADIO :MUUID='{EEBC474C-B0AD-470F-99A8-9DD9210CE233}'; -const MIID_WATRACK :MUUID='{FC6C81F4-837E-4430-9601-A0AA43177AE3}'; -const MIID_QUICKSEARCH :MUUID='{E4058506-6494-4D60-9CF4-40BF545F78BD}'; -const MIID_HKMANAGER :MUUID='{C48EE4EB-BC04-4A88-A2D0-727227BBAF48}'; -const MIID_TRANSLATE :MUUID='{0C0954EA-43D7-4452-99AC-F084D4456716}'; - -// Replaceable internal modules interface ids -const MIID_HISTORY :MUUID='{5CA0CBC1-999A-4EA2-8B44-F8F67D7F8EBE}'; -const MIID_UIUSERINFO :MUUID='{570B931C-9AF8-48F1-AD9F-C4498C618A77}'; -const MIID_SRAUTH :MUUID='{377780B9-2B3B-405B-9F36-B3C4878E6F33}'; -const MIID_SRAWAY :MUUID='{5AB54C76-1B4C-4A00-B404-48CBEA5FEFE7}'; -const MIID_SREMAIL :MUUID='{D005B5A6-1B66-445A-B603-74D4D4552DE2}'; -const MIID_SRFILE :MUUID='{989D104D-ACB7-4EE0-B96D-67CE4653B695}'; -const MIID_UIHELP :MUUID='{F2D35C3C-861A-4CC3-A78F-D1F7850441CB}'; -const MIID_UIHISTORY :MUUID='{7F7E3D98-CE1F-4962-8284-968550F1D3D9}'; -const MIID_AUTOAWAY :MUUID='{9C87F7DC-3BD7-4983-B7FB-B848FDBC91F0}'; -const MIID_USERONLINE :MUUID='{130829E0-2463-4FF8-BBC8-CE73C0188442}'; -const MIID_IDLE :MUUID='{296F9F3B-5B6F-40E5-8FB0-A6496C18BF0A}'; -const MIID_CRYPTO :MUUID='{415CA6E1-895F-40E6-87BD-9B396016D0E5}'; -const MIID_SSL :MUUID='{3BBBBD20-20E6-479B-BD4B-E84DE2627120}'; - -// Common plugin interfaces (core plugins) -const MIID_DATABASE :MUUID='{AE77FD33-E484-4DC7-8CBC-099FEDCCCFDD}'; -const MIID_CLIST :MUUID='{9D8DA8BF-665B-4908-9E61-9F7598AE330E}'; -const MIID_CHAT :MUUID='{23576A43-3A26-4357-9B1B-4A719E425D48}'; -const MIID_SRMM :MUUID='{58C7EEA6-F9DB-4DD9-8036-AE802BC0414C}'; -const MIID_IMPORT :MUUID='{5F3BCAD4-75F8-476E-B36B-2B307032490C}'; -const MIID_TESTPLUGIN :MUUID='{53B974F4-3C74-4DBA-8FC2-6F92FE013B8C}'; - -{ - Special exception interface for protocols. - This interface allows more than one plugin to implement it at the same time -} -const MIID_PROTOCOL :MUUID='{2A3C815E-A7D9-424B-BA30-02D083229085}'; -const MIID_SERVICEMODE :MUUID='{8A92C026-953A-4F5F-9921-F2C2DC195EC5}'; diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas index 3b0c5a90f8..38c0b8afc6 100644 --- a/include/delphi/m_api.pas +++ b/include/delphi/m_api.pas @@ -105,39 +105,19 @@ type {-- start newpluginapi --} const UNICODE_AWARE = 1; - STATIC_PLUGIN = 2; - -// The UUID structure below is used to for plugin UUID's and module type definitions -type - PMUUID = ^TMUUID; - MUUID = System.TGUID; - - TMUUID = MUUID; -{ - MUUID = record - a:cardinal; - b:word; - c:word; - d:array [0..7] of byte; - end; -} - -{$include interfaces.inc} type PPLUGININFOEX = ^TPLUGININFOEX; TPLUGININFOEX = record - cbSize :int; - shortName :PAnsiChar; - version :dword; - description:PAnsiChar; - author :PAnsiChar; - copyright :PAnsiChar; - homepage :PAnsiChar; - flags :byte; // right now the only flag, UNICODE_AWARE, is recognized here - case boolean of - false: (dummy:longword); - true : (uuid :MUUID); // plugin's unique identifier + cbSize : int; + shortName : PAnsiChar; + version : dword; + description: PAnsiChar; + author : PAnsiChar; + copyright : PAnsiChar; + homepage : PAnsiChar; + flags : integer; // right now the only flag, UNICODE_AWARE, is recognized here + uuid : TGUID; // plugin's unique identifier end; type diff --git a/include/delphi/m_genmenu.inc b/include/delphi/m_genmenu.inc index 5374a42731..4ccbbb04d0 100644 --- a/include/delphi/m_genmenu.inc +++ b/include/delphi/m_genmenu.inc @@ -150,14 +150,14 @@ const type PMO_MenuItem = ^TMO_MenuItem; TMO_MenuItem = record - position :int; - pszService:PAnsiChar; - root :HGENMENU; - szName :TCHAR; - flags :integer; - hIcon :HICON; // or hIcolibItem:THANDLE; - pPlugin :Pointer; - uid :MUUID; + position : int; + pszService: PAnsiChar; + root : HGENMENU; + szName : TCHAR; + flags : integer; + hIcon : HICON; // or hIcolibItem:THANDLE; + pPlugin : Pointer; + uid : TGUID; end; { diff --git a/include/delphi/testdll.dpr b/include/delphi/testdll.dpr deleted file mode 100644 index 49d9670385..0000000000 --- a/include/delphi/testdll.dpr +++ /dev/null @@ -1,70 +0,0 @@ -library testdll; - -uses - m_api, Windows; - -var - PluginInterfaces:array [0..1] of MUUID; - -function PluginMenuCommand(wParam: WPARAM; lParam: LPARAM):int_ptr; cdecl; -begin - Result:=0; - // this is called by Miranda, thus has to use the cdecl calling convention - // all services and hooks need this. - MessageBox(0, 'Just groovy, baby!', 'Plugin-o-rama', MB_OK); -end; - -function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl; -var - mi:TCListMenuItem; -begin - Result:=0; - UnhookEvent(onloadhook); - - CreateServiceFunction('TestPlug/MenuCommand', @PluginMenuCommand); - FillChar(mi,SizeOf(mi),0); - mi.cbSize :=SizeOf(mi); - mi.position :=$7FFFFFFF; - mi.flags :=0; - mi.hIcon :=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA); - mi.szName.a :='&Test Plugin...'; - mi.pszService:='TestPlug/MenuCommand'; - Menu_AddMainMenuItem(@mi) -end; - -function Load():int; cdecl; -begin - Langpack_register; - HookEvent(ME_SYSTEM_MODULESLOADED,@OnModulesLoaded); - - Result:=0; -end; - -function Unload:int; cdecl; -begin - Result:=0; -end; - -function MirandaPluginInterfaces:PMUUID; cdecl; -begin - PluginInterfaces[0]:=MIID_TESTPLUGIN; - PluginInterfaces[1]:=MIID_LAST; - result:=@PluginInterfaces; -end; - -exports - Load, Unload, - MirandaPluginInterfaces; - -begin - PluginInfo.cbSize :=SizeOf(TPLUGININFOEX); - PluginInfo.shortName :='Plugin Template'; - PluginInfo.version :=$00000001; - PluginInfo.description:='The long description of your plugin, to go in the plugin options dialog'; - PluginInfo.author :='J. Random Hacker'; - PluginInfo.copyright :='(c) 2003 J. Random Hacker'; - PluginInfo.homepage :='http://miranda-icq.sourceforge.net/'; - PluginInfo.flags :=UNICODE_AWARE; - PluginInfo.uuid :=MIID_TESTPLUGIN;//'{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}'; - -end. -- cgit v1.2.3