summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
commit10bc9e42dfba6ed8be41199243d688c2e367dc0d (patch)
tree891aca91eeb2feddb6c76498c4eb880689360fe6 /include
parent5dac5be47f2d9af8cbceead6511ff4c0fc40bab5 (diff)
MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members
git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r--include/delphi/m_clist.inc31
-rw-r--r--include/delphi/m_clistint.inc11
-rw-r--r--include/m_clist.h45
-rw-r--r--include/m_clistint.h9
-rw-r--r--include/m_popup.h4
5 files changed, 22 insertions, 78 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 9c54fae5d5..388990f8af 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -33,19 +33,6 @@ const
}
MS_CLIST_GETSTATUSMODE:PAnsiChar = 'CList/GetStatusMode';
- GSMDF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
- GSMDF_UNTRANSLATED = 4;
-
- {
- wParam : status_mode
- lParam : flags
- Affect : Get a textual description of the given status mode
- Returns: pointer to a static buffer of the description of the given status mode
- or NULL(0) if the mode was unknown.
- Version: v0.1.0.1+
- }
- MS_CLIST_GETSTATUSMODEDESCRIPTION:PAnsiChar = 'CList/GetStatusModeDescription';
-
function Menu_BuildContactMenu(hContact:TMCONTACT) : HMENU; stdcall;
external AppDll name 'Menu_BuildContactMenu';
@@ -110,24 +97,6 @@ const
}
ME_CLIST_DOUBLECLICKED:PAnsiChar = 'CList/DoubleClicked';
- GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
- GCDNF_UNICODE = 2; // will return TCHAR* instead of AnsiChar*
- GCDNF_NOCACHE = 4; // will not use the cache
- {
- wParam : TMCONTACT
- lParam : flags
- Affect : Gets the string that the contact list will use to represent a contact
- Returns: Always a pointer
- Notes : Returns a pointer to the name, will always succeed, even if it needs
- to return "(Unknown Contact)"
- -
- this pointer is a statically allocated buffer which will
- be overwritten on every call to this service, callers should make
- sure that they copy the information before they call it again
- Version: v0.1.2.0+, 0.2.0+ ONLY (0.3a supports the contacts module)
- }
- MS_CLIST_GETCONTACTDISPLAYNAME:PAnsiChar = 'CList/GetContactDisplayName';
-
{
Invalidates the display name cache
wParam=(WPARAM)(HANDLE)hContact
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index 33e2ab5d7e..108163db8b 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -273,6 +273,10 @@ const
* CLIST_INTERFACE structure definition
************************************************************************** }
+const
+ GCDNF_NOMYHANDLE = 1; // will never return the user's custom name
+ GCDNF_NOCACHE = 4; // will not use the cache
+
type
PClcProtoStatus = ^TClcProtoStatus;
TClcProtoStatus = record
@@ -396,7 +400,7 @@ type
(* clistmod.c *)
pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
pfnShowHide : function (_para1:WPARAM; _para2:LPARAM):int; cdecl;
- pfnGetStatusModeDescription : function (mode:int; flags:int):TChar; cdecl;
+ pfnGetStatusModeDescription : function (mode:int; flags:int) : PWideChar; cdecl;
(* clistsettings.c *)
pfnGetCacheEntry : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
@@ -404,12 +408,11 @@ type
pfnCheckCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
pfnFreeCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
- pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):TChar; cdecl;
+ pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):PWideChar; cdecl;
pfnInvalidateDisplayNameCacheEntry : procedure (hContact:TMCONTACT); cdecl;
(* clisttray.c *)
- pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar;
- szPreferredProto:PAnsiChar); cdecl;
+ pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar; szPreferredProto:PAnsiChar); cdecl;
pfnTrayIconUpdateBase : procedure (szChangedProto:PAnsiChar); cdecl;
pfnTrayIconSetToBase : procedure (szPreferredProto:PAnsiChar); cdecl;
pfnTrayIconIconsChanged : procedure ; cdecl;
diff --git a/include/m_clist.h b/include/m_clist.h
index b519ec8d9b..1453f76e29 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -60,22 +60,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define MS_CLIST_GETSTATUSMODE "CList/GetStatusMode"
/////////////////////////////////////////////////////////////////////////////////////////
-// gets a textual description of the given status mode
-// wParam = status mode, from statusmodes.h
-// lParam = flags, below
-// returns a static buffer of the description of the given status mode
-// returns NULL if the status mode was unknown
-
-#define GSMDF_UNICODE 2 //will return TCHAR* instead of char*
-#if defined(_UNICODE)
- #define GSMDF_TCHAR GSMDF_UNICODE //will return TCHAR* instead of char*
-#else
- #define GSMDF_TCHAR 0 //will return char*, as usual
-#endif
-#define GSMDF_UNTRANSLATED 4
-#define MS_CLIST_GETSTATUSMODEDESCRIPTION "CList/GetStatusModeDescription"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// MAIN MENU
// adds a new element into main menu
@@ -231,31 +215,6 @@ typedef struct {
#define ME_CLIST_DOUBLECLICKED "CList/DoubleClicked"
/////////////////////////////////////////////////////////////////////////////////////////
-// gets the string that the contact list will use to represent a contact
-// wParam = (MCONTACT)hContact
-// lParam = flags
-// returns a pointer to the name, will always succeed, even if it needs to
-// return "(Unknown Contact)"
-// this pointer is to a statically allocated buffer which will be overwritten
-// on every call to this service. Callers should make sure that they copy the
-// information before they call this service again.
-
-#define GCDNF_NOMYHANDLE 1 //will never return the user's custom name
-#define GCDNF_UNICODE 2 //will return TCHAR* instead of char*
-#define GCDNF_NOCACHE 4 //will not use the cache
-
-#if defined(_UNICODE)
- #define GCDNF_TCHAR GCDNF_UNICODE //will return TCHAR* instead of char*
-#else
- #define GCDNF_TCHAR 0 //will return char*, as usual
-#endif
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// even if it's the one that should be displayed.
-// v0.3.0.0+ if using GCDNF_NOMYHANDLE you must free your string
-#define MS_CLIST_GETCONTACTDISPLAYNAME "CList/GetContactDisplayName"
-
-/////////////////////////////////////////////////////////////////////////////////////////
// Invalidates the display name cache
// wParam = (MCONTACT)hContact
// lParam = not used
@@ -645,4 +604,8 @@ typedef struct {
#define SETTING_BRINGTOFRONT_DEFAULT 0
+#ifndef M_CLISTINT_H__
+#include <m_clistint.h>
+#endif
+
#endif // M_CLIST_H__
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 7890028d09..4510b963cf 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -27,7 +27,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <CommCtrl.h>
+#ifndef M_CLIST_H__
#include <m_clist.h>
+#endif
+
#include <m_protocols.h>
#include <m_clc.h>
@@ -343,6 +346,8 @@ typedef struct
/* clistmod.c */
int (*pfnIconFromStatusMode)(const char *szProto, int status, MCONTACT hContact);
int (*pfnShowHide)(WPARAM, LPARAM);
+
+ #define GSMDF_UNTRANSLATED 4 // don't tranlate the result
TCHAR* (*pfnGetStatusModeDescription)(int mode, int flags);
/* clistsettings.c */
@@ -351,6 +356,10 @@ typedef struct
void (*pfnCheckCacheItem)(ClcCacheEntry*);
void (*pfnFreeCacheItem)(ClcCacheEntry*);
+ #define GCDNF_NOMYHANDLE 1 // will never return the user's custom name
+ #define GCDNF_UNICODE 2 // will return TCHAR* instead of char*
+ #define GCDNF_NOCACHE 4 // will not use the cache
+
TCHAR* (*pfnGetContactDisplayName)(MCONTACT hContact, int mode);
void (*pfnInvalidateDisplayNameCacheEntry)(MCONTACT hContact);
diff --git a/include/m_popup.h b/include/m_popup.h
index 827615c902..feb7834b93 100644
--- a/include/m_popup.h
+++ b/include/m_popup.h
@@ -192,12 +192,12 @@ typedef struct
HICON lchIcon;
union
{
- WCHAR lptzContactName[MAX_CONTACTNAME];
+ TCHAR lptzContactName[MAX_CONTACTNAME];
WCHAR lpwzContactName[MAX_CONTACTNAME];
};
union
{
- WCHAR lptzText[MAX_SECONDLINE];
+ TCHAR lptzText[MAX_SECONDLINE];
WCHAR lpwzText[MAX_SECONDLINE];
};
COLORREF colorBack;