diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_avatars.h | 26 | ||||
-rw-r--r-- | include/m_clistint.h | 6 | ||||
-rw-r--r-- | include/m_core.h | 1 | ||||
-rw-r--r-- | include/m_crypto.h | 2 | ||||
-rw-r--r-- | include/m_fontservice.h | 4 | ||||
-rw-r--r-- | include/m_hotkeys.h | 2 | ||||
-rw-r--r-- | include/m_options.h | 7 | ||||
-rw-r--r-- | include/m_popup.h | 33 | ||||
-rw-r--r-- | include/m_srmm_int.h | 6 | ||||
-rw-r--r-- | include/m_types.h | 4 |
10 files changed, 57 insertions, 34 deletions
diff --git a/include/m_avatars.h b/include/m_avatars.h index 6d83b924c4..e224c058e3 100644 --- a/include/m_avatars.h +++ b/include/m_avatars.h @@ -72,15 +72,15 @@ unless AF_FETCHIFPROTONOTVISIBLE is set. struct AVATARCACHEENTRY
{
- MCONTACT hContact; // contacts handle, 0, if it is a protocol avatar
- HBITMAP hbmPic; // bitmap handle of the picutre itself
- DWORD dwFlags; // see above for flag values
- LONG bmHeight, bmWidth; // bitmap dimensions
- DWORD t_lastAccess; // last access time (currently unused, but plugins should still
+ MCONTACT hContact; // contacts handle, 0, if it is a protocol avatar
+ HBITMAP hbmPic; // bitmap handle of the picutre itself
+ uint32_t dwFlags; // see above for flag values
+ int bmHeight, bmWidth; // bitmap dimensions
+ uint32_t t_lastAccess; // last access time (currently unused, but plugins should still
// use it whenever they access the avatar. may be used in the future
- // to implement cache expiration
- LPVOID lpDIBSection; // unused field
- wchar_t szFilename[MAX_PATH]; // filename of the avatar (absolute path)
+ // to implement cache expiration
+ void *lpDIBSection; // unused field
+ wchar_t szFilename[MAX_PATH]; // filename of the avatar (absolute path)
};
#define AVDRQ_FALLBACKPROTO 0x0001 // use the protocol picture as fallback (currently not used)
@@ -103,12 +103,12 @@ struct AVATARDRAWREQUEST MCONTACT hContact; // the contact for which the avatar should be drawn. set it to 0 to draw a protocol picture
HDC hTargetDC; // target device context
RECT rcDraw; // target rectangle. The avatar will be centered within the rectangle and scaled to fit.
- DWORD dwFlags; // flags (see above for valid bitflags)
- DWORD dwReserved; // for future use
- DWORD dwInternal; // don't use it
+ uint32_t dwFlags; // flags (see above for valid bitflags)
+ uint32_t dwReserved; // for future use
+ uint32_t dwInternal; // don't use it
COLORREF clrBorder; // color for the border (used with AVDRQ_DRAWBORDER)
- UCHAR radius; // radius (used with AVDRQ_ROUNDEDCORNER)
- UCHAR alpha; // alpha value for semi-transparent avatars (valid values form 1 to 255, if it is set to 0
+ uint8_t radius; // radius (used with AVDRQ_ROUNDEDCORNER)
+ uint8_t alpha; // alpha value for semi-transparent avatars (valid values form 1 to 255, if it is set to 0
// the avatar won't be transparent.
char *szProto; // only used when AVDRQ_PROTOPICT or AVDRQ_OWNPIC is set
};
diff --git a/include/m_clistint.h b/include/m_clistint.h index 103a27f4a4..9bd291d839 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_CLISTINT_H__
#define M_CLISTINT_H__ 1
-#include <CommCtrl.h>
-
#ifndef M_CLIST_H__
#include <m_clist.h>
#endif
@@ -307,7 +305,7 @@ struct CLIST_INTERFACE {
HWND hwndContactList, hwndContactTree, hwndStatus;
HMENU hMenuMain;
- HMODULE hInst;
+ HINSTANCE hInst;
// clc.h
LRESULT (CALLBACK *pfnContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -377,7 +375,7 @@ struct CLIST_INTERFACE void (*pfnCluiProtocolStatusChanged)(int status, const char *szProto);
void (*pfnLoadCluiGlobalOpts)(void);
- BOOL (*pfnInvalidateRect)(HWND hwnd, CONST RECT* lpRect, BOOL bErase);
+ BOOL (*pfnInvalidateRect)(HWND hwnd, const RECT* lpRect, BOOL bErase);
void (*pfnOnCreateClc)(void);
/* contact.c */
diff --git a/include/m_core.h b/include/m_core.h index f74603f510..780c39ddd5 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <sal.h> #endif +#include <stdarg.h> #include <stdint.h> #include <stdlib.h> diff --git a/include/m_crypto.h b/include/m_crypto.h index d13a6b053e..b16bf2c35c 100644 --- a/include/m_crypto.h +++ b/include/m_crypto.h @@ -61,7 +61,7 @@ struct MICryptoEngine // lParam = (CRYPTO_PROVIDER*)
// returns HANDLE on success or NULL on failure
-typedef MICryptoEngine* (__cdecl *pfnCryptoProviderFactory)(void);
+typedef MICryptoEngine* (MIR_CDECL *pfnCryptoProviderFactory)(void);
#define CPF_UNICODE 1
diff --git a/include/m_fontservice.h b/include/m_fontservice.h index 61ac81df28..d95642d3b5 100644 --- a/include/m_fontservice.h +++ b/include/m_fontservice.h @@ -112,8 +112,8 @@ EXTERN_C MIR_APP_DLL(int) Font_RegisterW(FontIDW *pFont, HPLUGIN); // global default font is gotten using SPI_GETICONTITLELOGFONT, color COLOR_WINDOWTEXT, size 8.
// returns the font's colour
-EXTERN_C MIR_APP_DLL(COLORREF) Font_Get(const char *szGroup, const char *szName, LOGFONTA *pFont);
-EXTERN_C MIR_APP_DLL(COLORREF) Font_GetW(const wchar_t *wszGroup, const wchar_t *wszName, LOGFONTW *pFont);
+EXTERN_C MIR_APP_DLL(COLORREF) Font_Get(const char *szGroup, const char *szName, struct LOGFONTA *pFont);
+EXTERN_C MIR_APP_DLL(COLORREF) Font_GetW(const wchar_t *wszGroup, const wchar_t *wszName, struct LOGFONTW *pFont);
__forceinline COLORREF Font_Get(FontID &p, LOGFONTA *pFont)
{ return Font_Get(p.group, p.name, pFont);
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index df11425339..6c6eea4c7a 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -64,7 +64,7 @@ EXTERN_C MIR_APP_DLL(int) Hotkey_Unregister(const char *pszName); // Checks if "manual" hotkey was activated and returns its id.
// Returns lParam associated with activated hotkey
-EXTERN_C MIR_APP_DLL(int) Hotkey_Check(MSG *pEvent, const char *pszSection);
+EXTERN_C MIR_APP_DLL(int) Hotkey_Check(struct MSG *pEvent, const char *pszSection);
/////////////////////////////////////////////////////////////////////////////////////////
// Subclasss/unsubclass edit box to act as hotkey control
diff --git a/include/m_options.h b/include/m_options.h index 3092585d43..9c4783fa66 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -63,11 +63,14 @@ struct OPTIONSDIALOGPAGE {
int position; // a position number, lower numbers are topmost
MAllStrings szTitle, szGroup, szTab; // [TRANSLATED-BY-CORE]
- DLGPROC pfnDlgProc;
char *pszTemplate;
- HPLUGIN pPlugin;
DWORD flags;
+ #ifdef _WINDOWS
+ DLGPROC pfnDlgProc;
+ HPLUGIN pPlugin;
+ #endif
+
union {
LPARAM dwInitParam; // a value to pass to lParam of WM_INITDIALOG message
class CDlgBase *pDialog;
diff --git a/include/m_popup.h b/include/m_popup.h index 6a0bf86fa3..fa279b9e63 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -90,9 +90,11 @@ struct POPUPDATA2 int iSeconds;
DWORD dwTimestamp;
- // plugin bindings
- WNDPROC PluginWindowProc;
- void *PluginData;
+ #ifdef _WINDOWS
+ // plugin bindings
+ WNDPROC PluginWindowProc;
+ void *PluginData;
+ #endif
// popup actions
int actionCount;
@@ -125,8 +127,10 @@ struct POPUPDATA char lpzText[MAX_SECONDLINE];
COLORREF colorBack;
COLORREF colorText;
- WNDPROC PluginWindowProc;
- void *PluginData;
+ #ifdef _WINDOWS
+ WNDPROC PluginWindowProc;
+ void *PluginData;
+ #endif
int iSeconds; // Custom delay time in seconds. -1 means "forever", 0 means "default time".
};
@@ -142,8 +146,10 @@ struct POPUPDATAW wchar_t lpwzText[MAX_SECONDLINE];
COLORREF colorBack;
COLORREF colorText;
- WNDPROC PluginWindowProc;
- void *PluginData;
+ #ifdef _WINDOWS
+ WNDPROC PluginWindowProc;
+ void *PluginData;
+ #endif
int iSeconds; // Custom delay time in seconds. -1 means "forever", 0 means "default time".
HANDLE hNotification;
int actionCount;
@@ -218,12 +224,14 @@ struct POPUPACTIONID LPARAM lParam;
};
+#ifdef _WINDOWS
#define UM_POPUPMODIFYACTIONICON (WM_USER + 0x0205)
__forceinline int PUModifyActionIcon(HWND hWndPopup, WPARAM wParam, LPARAM lParam, HICON hIcon)
{
POPUPACTIONID actionId = { wParam, lParam };
return (int)SendMessage(hWndPopup, UM_POPUPMODIFYACTIONICON, (WPARAM)&actionId, (LPARAM)hIcon);
}
+#endif
// UM_POPUPSHOW
// Show popup at position
@@ -286,7 +294,9 @@ typedef struct char *lpzLAction;
char *lpzRAction;
char *pszReserved1; // reserved for future use
- DLGPROC pfnReserved2; // reserved for future use
+ #ifdef _WINDOWS
+ DLGPROC pfnReserved2; // reserved for future use
+ #endif
} POPUPNOTIFICATION, *LPPOPUPNOTIFICATION;
EXTERN_C MIR_APP_DLL(HANDLE) PURegisterNotification(LPPOPUPNOTIFICATION notification);
@@ -320,6 +330,8 @@ Modify Popup Action Icon wParam = 0
lParam = (LPARAM)(HANDLE)hEventUnhooked
*/
+
+#ifdef _WINDOWS
#define UM_POPUPUNHOOKCOMPLETE (WM_USER + 0x0206)
__forceinline int PUUnhookEventAsync(HWND hwndPopup, HANDLE hEvent)
@@ -332,6 +344,7 @@ __forceinline int PUUnhookEventAsync(HWND hwndPopup, HANDLE hEvent) PostMessage(hwndPopup, UM_POPUPUNHOOKCOMPLETE, 0, (LPARAM)hEvent);
return 0;
}
+#endif
#ifdef __cplusplus
/* Popup/RegisterVfx
@@ -404,7 +417,9 @@ struct POPUPCLASS char *pszName;
MAllStrings pszDescription;
HICON hIcon;
- WNDPROC PluginWindowProc;
+ #ifdef _WINDOWS
+ WNDPROC PluginWindowProc;
+ #endif
LPARAM lParam; //APF_RETURN_HWND, APF_CUSTOM_POPUP ... as above
};
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 62d0b2d689..7dc1d9cb62 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -136,7 +136,7 @@ public: virtual INT_PTR Notify(WPARAM, LPARAM) { return 0; } }; -typedef CSrmmLogWindow *(__cdecl *pfnSrmmLogCreator)(CMsgDialog &pDlg); +typedef CSrmmLogWindow *(MIR_CDECL *pfnSrmmLogCreator)(CMsgDialog &pDlg); EXTERN_C MIR_APP_DLL(HANDLE) RegisterSrmmLog(const char *pszShortName, const wchar_t *pwszScreenName, pfnSrmmLogCreator fnBuilder); EXTERN_C MIR_APP_DLL(void) UnregisterSrmmLog(HANDLE); @@ -197,8 +197,10 @@ protected: bool AllowTyping() const; int NotifyEvent(int code); + #ifdef _WINDOWS bool ProcessFileDrop(HDROP hDrop, MCONTACT hContact); bool PasteFilesAsURL(HDROP hDrop); + #endif bool ProcessHotkeys(int key, bool bShift, bool bCtrl, bool bAlt); void RefreshButtonStatus(void); void RunUserMenu(HWND hwndOwner, struct USERINFO *ui, const POINT &pt); @@ -277,7 +279,7 @@ class CMsgDialog : public CSrmmBaseDialog {}; ///////////////////////////////////////////////////////////////////////////////////////// // receives LOGSTREAMDATA* as the first parameter -EXTERN_C MIR_APP_DLL(DWORD) CALLBACK Srmm_LogStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb); +EXTERN_C MIR_APP_DLL(DWORD) CALLBACK Srmm_LogStreamCallback(UINT_PTR dwCookie, BYTE *pbBuff, LONG cb, LONG *pcb); ///////////////////////////////////////////////////////////////////////////////////////// // sends a message to all SRMM windows diff --git a/include/m_types.h b/include/m_types.h index e95b10718a..73aa902cc7 100644 --- a/include/m_types.h +++ b/include/m_types.h @@ -46,6 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SW_HIDE 0 #define SW_SHOW 5 #define MAX_PATH 260 +#define LF_FACESIZE 32 #define _TRUNCATE size_t(-1) #define INVALID_HANDLE_VALUE HANDLE(-1) @@ -97,7 +98,10 @@ struct SIZE { int width, height; }; #define _vsnprintf vsnprintf #define _vsnwprintf vswprintf +#define __forceinline inline + #define DECLARE_HANDLE(name) struct _##name { int unused; }; typedef struct _##name *name +DECLARE_HANDLE(HDC); DECLARE_HANDLE(HWND); DECLARE_HANDLE(HFONT); DECLARE_HANDLE(HICON); |