From cdd0b356b00028e3146e58bb7412af159587bf66 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jul 2015 20:32:40 +0000 Subject: port of menu changes to pascal headers git-svn-id: http://svn.miranda-ng.org/main/trunk@14477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_genmenu.inc | 19 ------------------- include/delphi/m_helpers.inc | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 20 deletions(-) (limited to 'include/delphi') diff --git a/include/delphi/m_genmenu.inc b/include/delphi/m_genmenu.inc index 634463e4d7..009f06d508 100644 --- a/include/delphi/m_genmenu.inc +++ b/include/delphi/m_genmenu.inc @@ -110,13 +110,6 @@ const // TRAY MENU -{ - add a new item to the tray menus - wParam=0 - lParam=(LPARAM)(CLISTMENUITEM*)&mi -} - MS_CLIST_ADDTRAYMENUITEM:PAnsiChar = 'CList/AddTrayMenuItem'; - { the tray menu is about to be built wParam=lParam=0 @@ -166,18 +159,6 @@ type hLangpack :int; end; -function _AddMainMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall; - external AppDll name 'Menu_AddMainMenuItem'; - -function _AddContactMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; - external AppDll name 'Menu_AddContactMenuItem'; - -function _AddProtoMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; - external AppDll name 'Menu_AddProtoMenuItem'; - -function _AddStatusMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; - external AppDll name 'Menu_AddStatusMenuItem'; - { This structure passed to CheckService. } diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index 2d1cdadeeb..3bad7b4ed7 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -93,6 +93,21 @@ function Crypto_GetProvider(pszName:PAnsiChar):PCRYPTO_PROVIDER; var hLangpack:int = 0; +function _AddMainMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall; + external AppDll name 'Menu_AddMainMenuItem'; + +function _AddContactMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; + external AppDll name 'Menu_AddContactMenuItem'; + +function _AddProtoMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; + external AppDll name 'Menu_AddProtoMenuItem'; + +function _AddStatusMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; + external AppDll name 'Menu_AddStatusMenuItem'; + +function _AddTrayMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall; + external AppDll name 'Menu_AddTrayMenuItem'; + //----- CListint ----- function IsHContactGroup(h:TMCONTACT):bool; @@ -417,7 +432,7 @@ end; function Menu_AddTrayMenuItem(mi:PMO_MenuItem):HGENMENU; begin mi^.hLangpack:=hLangpack; - result:=CallService(MS_CLIST_ADDTRAYMENUITEM, 0,LPARAM(mi)); + result:=_AddTrayMenuItem(mi); end; -- cgit v1.2.3