From be616d81bdaf8fd4ae61b0a145fb81bbdf467994 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jun 2015 22:03:02 +0000 Subject: YEEHAW! CLISTMENUITEM::pszPopupName also died git-svn-id: http://svn.miranda-ng.org/main/trunk@14404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_clist.inc | 30 ++++++++++++++---------------- include/delphi/m_genmenu.inc | 23 +++++++++++++++++++---- 2 files changed, 33 insertions(+), 20 deletions(-) (limited to 'include/delphi') diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index d8e9147711..7fe96dd4ff 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -52,22 +52,20 @@ type // Use LPGEN instead which are just dummy wrappers/markers for "lpgen.pl". PCLISTMENUITEM = ^TCLISTMENUITEM; TCLISTMENUITEM = record - szName : TChar; // [TRANSLATED-BY-CORE] text of the menu item - flags : dword; - position : int; // approx position on the menu, lower numbers go nearer the top - hIcon : THANDLE; // icon to put by the item, if this was *not* loaded from - // a resource, you can delete it straight after the call - //icolibItem:THANDLE; if CMIF_ICONFROMICOLIB used - pszService : PAnsiChar; // name of the service to call when the service is clicked - szPopupName : TChar; // [TRANSLATED-BY-CORE] name of the popup menu that this item is on, if this - // is NULL the iteem is on the root of the menu - // or hParentMenu:HGENMENU - valid if CMIF_ROOTHANDLE is set. NULL or (HGENMENU)-1 means the root menu - pszContactOwner: PAnsiChar; // contact menus only, the protocol module that owns - // the contacts to which this to which this menu item - // applies, NULL(0) if it applies to all contacts. - // if it applies to multiple but not all protocols - // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU - hLangpack : int; // plugin's hLangpack (added automatically) + szName : TChar; // [TRANSLATED-BY-CORE] text of the menu item + flags : dword; + position : int; // approx position on the menu, lower numbers go nearer the top + hIcon : THANDLE; // icon to put by the item, if this was *not* loaded from + // a resource, you can delete it straight after the call + pszService : PAnsiChar; // name of the service to call when the service is clicked + hParentMenu : THANDLE; // parent menu hamdle + + pszContactOwner: PAnsiChar; // contact menus only, the protocol module that owns + // the contacts to which this to which this menu item + // applies, NULL(0) if it applies to all contacts. + // if it applies to multiple but not all protocols + // add multiple menu items or use ME_CLIST_PREBUILDCONTACTMENU + hLangpack : int; // plugin's hLangpack (added automatically) end; const diff --git a/include/delphi/m_genmenu.inc b/include/delphi/m_genmenu.inc index 400abdf6ec..b152cb8106 100644 --- a/include/delphi/m_genmenu.inc +++ b/include/delphi/m_genmenu.inc @@ -86,6 +86,13 @@ plugin may add different menu items with some service. (pszPopupName=(AnsiChar *)hMenuItem - for make child of popup) } +// predefined menu object codes +const + MO_MAIN = -1; + MO_CONTACT = -2; + MO_PROTO = -3; + MO_STATUS = -4; + // Group MENU type PGroupMenuParam = ^TGroupMenuParam; @@ -194,7 +201,7 @@ type result hMenu } -function Menu_Build(parent:HMENU; menuObject:THANDLE; wParam:WPARAM; lParam:LPARAM) : HMENU; stdcall; +function Menu_Build(parent:HMENU; menuObject:integer; wParam:WPARAM; lParam:LPARAM) : HMENU; stdcall; external AppDLL name 'Menu_Build'; { @@ -215,6 +222,14 @@ function Menu_ProcessCommand(hMenuItem:HGENMENU; lParam:LPARAM) : integer; stdca function Menu_ProcessCommandById(iCommand:integer; lParam:LPARAM) : integer; stdcall; external AppDLL name 'Menu_ProcessCommandById'; +{ + creates a submenu + returns=MenuObjectHandle on success,-1 on failure +} + +function Menu_CreateRoot(menuObject:integer; const name:PWideChar; position:integer; icon:THANDLE; lang:integer) : THANDLE; stdcall; + external AppDLL name 'Menu_CreateRoot'; + { returns=MenuObjectHandle on success,-1 on failure } @@ -228,7 +243,7 @@ function Menu_AddObject(const name, displayName, checkService, execService:PAnsi call this service.MO_REMOVEMENUOBJECT NOT free it. } -function Menu_RemoveObject(hMenuObject:THANDLE) : integer; stdcall; +function Menu_RemoveObject(hMenuObject:integer) : integer; stdcall; external AppDLL name 'Menu_RemoveObject'; { @@ -244,7 +259,7 @@ function Menu_RemoveItem(hMenuItem:HGENMENU) : integer; stdcall; return MenuItemHandle on success,-1 on failure } -function Menu_AddItem(hMenuObject:THANDLE; var tmi:TMO_MenuItem) : integer; stdcall; +function Menu_AddItem(hMenuObject:integer; var tmi:TMO_MenuItem) : integer; stdcall; external AppDLL name 'Menu_AddItem'; { @@ -275,7 +290,7 @@ function Menu_GetDefaultItem(hMenuItem:HGENMENU) : HGENMENU; stdcall; this should be called in WM_KEYDOWN } -function Menu_ProcessHotKey(hMenuObject:THANDLE; vKey:DWORD) : integer; stdcall; +function Menu_ProcessHotKey(hMenuObject:integer; vKey:DWORD) : integer; stdcall; external AppDLL name 'Menu_ProcessHotKey'; { -- cgit v1.2.3