summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
commit88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch)
treeb3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /include
parent9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff)
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_clist.inc39
-rw-r--r--include/m_clist.h32
-rw-r--r--include/m_genmenu.h5
3 files changed, 21 insertions, 55 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index ccd53cca61..cf5df8da4b 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -121,36 +121,22 @@ const
}
MS_CLIST_ADDCONTACTMENUITEM:PAnsiChar = 'CList/AddContactMenuItem';
MS_CLIST_ADDSTATUSMENUITEM :PAnsiChar = 'CList/AddStatusMenuItem';
-//adds a protocol menu item v0.9+
MS_CLIST_ADDPROTOMENUITEM :PAnsiChar = 'CList/AddProtoMenuItem';
- CMIM_NAME = $80000000;
- CMIM_FLAGS = $40000000;
- CMIM_ICON = $20000000;
- CMIM_HOTKEY = $10000000;
- CMIM_ALL = $F0000000;
+{
+ Affect : Modify an existing menu item, see notes
+ Returns: 0 on success, [non zero] on failure
+}
- {
- wParam : HMENUITEM
- lParam : Pointer to a initalised TCLISTMENUITEM
- Affect : Modify an existing menu item, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : hMenuItem will have been returned by MS_CLIST_ADD[MAIN]MENUITEM
- TCLISTMENUITEM.flags should contain CMIM_* constants (see above)
- to mark which fields should be updated, if it's not present, they
- can't be updated -- if flags do not exist for a field it can not
- be updated.
- Version: v0.1.0.1+
- }
- MS_CLIST_MODIFYMENUITEM:PAnsiChar = 'CList/ModifyMenuItem';
+function Menu_ModifyItem(hMenu:HGENMENU; const name:PWideChar; icon:THANDLE=INVALID_HANDLE_VALUE; flags:int=-1) : int; stdcall;
+ external AppDll name 'Menu_ModifyItem';
- {
- wParam : (HGENMENU)hMenuItem
- lParam : (bool) enable = TRUE, disable = FALSE
- Notes : changes menu item's visibility
- Version: v0.94.2+
- }
- MS_CLIST_SHOWHIDEMENUITEM:PAnsiChar = 'CList/ShowHideMenuItem';
+{
+ Notes : changes menu item's visibility
+}
+
+procedure Menu_ShowItem(hMenu:HGENMENU; bShow:BYTE); stdcall;
+ external AppDll name 'Menu_ShowItem';
{
wParam : TMCONTACT
@@ -160,6 +146,7 @@ const
to the contact that has them
Version: v0.1.0.1+
}
+const
ME_CLIST_PREBUILDCONTACTMENU:PAnsiChar = 'CList/PreBuildContactMenu';
type
diff --git a/include/m_clist.h b/include/m_clist.h
index a6c7f06483..049d37a7f1 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -173,32 +173,16 @@ __forceinline HGENMENU Menu_AddProtoMenuItem(CLISTMENUITEM *mi)
return (HGENMENU)CallService("CList/AddProtoMenuItem", 0, (LPARAM)mi);
}
-//modify an existing menu item v0.1.0.1+
-//wParam = (WPARAM)(HGENMENU)hMenuItem
-//lParam = (LPARAM)(CLISTMENUITEM*)&clmi
-//returns 0 on success, nonzero on failure
-//hMenuItem will have been returned by clist/add*menuItem
-//clmi.flags should contain cmim_ constants below specifying which fields to
-//update. Fields without a mask flag cannot be changed and will be ignored
-#define CMIM_NAME 0x80000000
-#define CMIM_FLAGS 0x40000000
-#define CMIM_ICON 0x20000000
-#define CMIM_HOTKEY 0x10000000
-#define CMIM_ALL 0xF0000000
-#define MS_CLIST_MODIFYMENUITEM "CList/ModifyMenuItem"
-
-__forceinline void Menu_ModifyItem(HGENMENU hMenuItem, CLISTMENUITEM *clmi)
-{ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItem, (LPARAM)clmi);
-}
+/////////////////////////////////////////////////////////////////////////////////////////
+// modify an existing menu item
+// returns 0 on success, nonzero on failure
-//changes menu item's visibility v0.94.2+
-//wParam = (WPARAM)(HGENMENU)hMenuItem
-//lParam = (BOOL) enable = TRUE, disable = FALSE
-#define MS_CLIST_SHOWHIDEMENUITEM "CList/ShowHideMenuItem"
+EXTERN_C MIR_APP_DLL(int) Menu_ModifyItem(HGENMENU hMenuItem, const TCHAR *ptszName, HANDLE hIcon = INVALID_HANDLE_VALUE, int iFlags = -1);
-__forceinline void Menu_ShowItem(HGENMENU hMenuItem, BOOL bShow)
-{ CallService(MS_CLIST_SHOWHIDEMENUITEM, (WPARAM)hMenuItem, bShow);
-}
+/////////////////////////////////////////////////////////////////////////////////////////
+// changes menu item's visibility
+
+EXTERN_C MIR_APP_DLL(void) Menu_ShowItem(HGENMENU hMenuItem, bool bShow);
//the context menu for a contact is about to be built v0.1.0.1+
//wParam = (MCONTACT)hContact
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index 55ba8115ee..2b29a4bb51 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -265,11 +265,6 @@ typedef struct
//Useful to get and free ownerdata before delete menu item.
#define MO_MENUITEMGETOWNERDATA "MO/MenuItemGetOwnerData"
-//wparam MenuItemHandle
-//lparam PMO_MenuItem
-//returns 0 on success,-1 on failure
-#define MO_MODIFYMENUITEM "MO/ModifyMenuItem"
-
//wparam=MenuItemHandle
//lparam=PMO_MenuItem
//returns 0 and filled PMO_MenuItem structure on success and