From 209e1040e34c50e424a7aa0a7c860c7fc279a76f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jul 2015 19:04:21 +0000 Subject: group menu services moved to core git-svn-id: http://svn.miranda-ng.org/main/trunk@14472 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_clist.h | 27 +++++++++------------------ include/m_clistint.h | 29 ++++++++++++++--------------- include/m_system.h | 2 +- 3 files changed, 24 insertions(+), 34 deletions(-) (limited to 'include') diff --git a/include/m_clist.h b/include/m_clist.h index 1453f76e29..ec9390fe20 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -126,41 +126,32 @@ struct GroupMenuParam // builds the Group menu // wParam=lParam=0 // returns a HMENU identifying the menu. -#define MS_CLIST_MENUBUILDGROUP "CList/MenuBuildGroup" +EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildGroupMenu(void); // add a new item to the Group menus // wParam=GroupMenuParam*, params to call when exec menuitem // lParam=(LPARAM)(TMO_MenuItem*)&mi - -__forceinline HGENMENU Menu_AddGroupMenuItem(GroupMenuParam *gmp, TMO_MenuItem *mi) -{ - return (HGENMENU)CallService("CList/AddGroupMenuItem", (WPARAM)gmp, (LPARAM)mi); -} +EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddGroupMenuItem(TMO_MenuItem *mi, GroupMenuParam *gmp = NULL); // the Group menu is about to be built -// wParam=lParam=0 -#define ME_CLIST_PREBUILDGROUPMENU "CList/PreBuildGroupMenu" +// wParam = lParam = 0 +#define ME_CLIST_PREBUILDGROUPMENU "CList/PreBuildGroupMenu" ///////////////////////////////////////////////////////////////////////////////////////// // SUBGROUP MENU // builds the SubGroup menu -// wParam=lParam=0 // returns a HMENU identifying the menu. -#define MS_CLIST_MENUBUILDSUBGROUP "CList/MenuBuildSubGroup" +EXTERN_C MIR_APP_DLL(HMENU) Menu_BuildSubGroupMenu(struct ClcGroup *group); // add a new item to the SubGroup menus // wParam=GroupMenuParam*, params to call when exec menuitem // lParam=(LPARAM)(TMO_MenuItem*)&mi - -__forceinline HGENMENU Menu_AddSubGroupMenuItem(GroupMenuParam *gmp, TMO_MenuItem *mi) -{ - return (HGENMENU)CallService("CList/AddSubGroupMenuItem", (WPARAM)gmp, (LPARAM)mi); -} +EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddSubGroupMenuItem(TMO_MenuItem *mi, GroupMenuParam *gmp = NULL); // the SubGroup menu is about to be built -// wParam=lParam=0 -#define ME_CLIST_PREBUILDSUBGROUPMENU "CList/PreBuildSubGroupMenu" +// wParam = lParam = 0 +#define ME_CLIST_PREBUILDSUBGROUPMENU "CList/PreBuildSubGroupMenu" ///////////////////////////////////////////////////////////////////////////////////////// // TRAY MENU @@ -168,7 +159,7 @@ __forceinline HGENMENU Menu_AddSubGroupMenuItem(GroupMenuParam *gmp, TMO_MenuIte // builds the tray menu // wParam=lParam=0 // returns a HMENU identifying the menu. -#define MS_CLIST_MENUBUILDTRAY "CList/MenuBuildTray" +#define MS_CLIST_MENUBUILDTRAY "CList/MenuBuildTray" // add a new item to the tray menus // wParam=0 diff --git a/include/m_clistint.h b/include/m_clistint.h index 4510b963cf..31203835e6 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -239,22 +239,21 @@ typedef struct _menuProto * CLIST_INTERFACE structure definition ***************************************************************************/ -typedef struct { +struct ClcProtoStatus +{ char *szProto; DWORD dwStatus; -} - ClcProtoStatus; +}; -typedef struct +struct ClcCacheEntryBase { MCONTACT hContact; TCHAR* tszName; TCHAR* tszGroup; int bIsHidden; -} - ClcCacheEntryBase; +}; -typedef struct +struct CLIST_INTERFACE { int version; @@ -487,18 +486,18 @@ typedef struct int (*pfnGetAverageMode)(int *pNetProtoCount); void (*pfnInitAutoRebuild)(HWND hwnd); void (*pfnSetContactCheckboxes)(ClcContact *cc, int checked); -} - CLIST_INTERFACE; - -extern CLIST_INTERFACE cli, *pcli; +}; -// Miranda 0.4.3.0+ // retrieves the pointer to a CLIST_INTERFACE structure // NOTE: valid only for the clist clone building, not for the regular use #define MS_CLIST_RETRIEVE_INTERFACE "CList/RetrieveInterface" -__forceinline void mir_getCLI() -{ pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0); -} +#ifndef MIR_APP_EXPORTS + extern CLIST_INTERFACE *pcli; + + __forceinline void mir_getCLI() + { pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0); + } +#endif #endif // M_CLISTINT_H__ diff --git a/include/m_system.h b/include/m_system.h index d29911c99f..2065a13813 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -197,7 +197,7 @@ of shutting down */ #define MS_SYSTEM_GETBUILDSTRING "Miranda/GetBuildString" -#ifdef _STATIC +#ifdef MIR_APP_EXPORTS INT_PTR MirandaIsTerminated(WPARAM, LPARAM); __forceinline INT_PTR Miranda_Terminated(void) -- cgit v1.2.3