summaryrefslogtreecommitdiff
path: root/include/m_genmenu.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
commite58823d961a630eb62e60d2ccb443761ba5f1704 (patch)
tree62d071be480d57af2a53f154a1468abe0b9449ff /include/m_genmenu.h
parent721aea0764451e985d575236205808bbef298244 (diff)
- all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs.
- massive cleanup of the menu-related code git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_genmenu.h')
-rw-r--r--include/m_genmenu.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/include/m_genmenu.h b/include/m_genmenu.h
index cea3107730..c0d20fc9f1 100644
--- a/include/m_genmenu.h
+++ b/include/m_genmenu.h
@@ -5,6 +5,8 @@
#include <m_clist.h>
#endif
+extern int hLangpack;
+
/*
Main features:
1) Independet from clist,may be used in any module.
@@ -96,6 +98,13 @@ plugin may add different menu items with some service.
*/
// SubGroup MENU
+
+// Group MENU
+typedef struct{
+int wParam;
+int lParam;
+}GroupMenuParam,*lpGroupMenuParam;
+
//remove a item from SubGroup menu
//wParam=hMenuItem returned by MS_CLIST_ADDSubGroupMENUITEM
//lParam=0
@@ -110,22 +119,18 @@ plugin may add different menu items with some service.
//add a new item to the SubGroup menus
//wParam=lpGroupMenuParam, params to call when exec menuitem
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-#define MS_CLIST_ADDSUBGROUPMENUITEM "CList/AddSubGroupMenuItem"
+
+__inline static HGENMENU Menu_AddSubGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUITEM *mi)
+{ mi->hLangpack = hLangpack;
+ return (HGENMENU)CallService("CList/AddSubGroupMenuItem", (WPARAM)gmp, (LPARAM)mi);
+}
//the SubGroup menu is about to be built
//wParam=lParam=0
#define ME_CLIST_PREBUILDSUBGROUPMENU "CList/PreBuildSubGroupMenu"
-// SubGroup MENU
-
-// Group MENU
-typedef struct{
-int wParam;
-int lParam;
-}GroupMenuParam,*lpGroupMenuParam;
-
//remove a item from Group menu
-//wParam=hMenuItem returned by MS_CLIST_ADDGroupMENUITEM
+//wParam=hMenuItem returned by MS_CLIST_ADDGROUPMENUITEM
//lParam=0
//returns 0 on success, nonzero on failure
#define MS_CLIST_REMOVEGROUPMENUITEM "CList/RemoveGroupMenuItem"
@@ -138,7 +143,11 @@ int lParam;
//add a new item to the Group menus
//wParam=lpGroupMenuParam, params to call when exec menuitem
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-#define MS_CLIST_ADDGROUPMENUITEM "CList/AddGroupMenuItem"
+
+__inline static HGENMENU Menu_AddGroupMenuItem(lpGroupMenuParam gmp, CLISTMENUITEM *mi)
+{ mi->hLangpack = hLangpack;
+ return (HGENMENU)CallService("CList/AddGroupMenuItem", (WPARAM)gmp, (LPARAM)mi);
+}
//the Group menu is about to be built
//wParam=lParam=0
@@ -162,7 +171,11 @@ int lParam;
//add a new item to the tray menus
//wParam=0
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-#define MS_CLIST_ADDTRAYMENUITEM "CList/AddTrayMenuItem"
+
+__inline static HGENMENU Menu_AddTrayMenuItem(CLISTMENUITEM *mi)
+{ mi->hLangpack = hLangpack;
+ return (HGENMENU)CallService("CList/AddTrayMenuItem", 0, (LPARAM)mi);
+}
//the tray menu is about to be built
//wParam=lParam=0
@@ -174,11 +187,6 @@ int lParam;
//wParam=lParam=0
#define ME_CLIST_PREBUILDSTATUSMENU "CList/PreBuildStatusMenu"
-//add a new item to the status menu
-//wParam=0
-//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-#define MS_CLIST_ADDSTATUSMENUITEM "CList/AddStatusMenuItem"
-
//remove a item from main menu
//wParam=hMenuItem returned by MS_CLIST_ADDMAINMENUITEM
//lParam=0