From 3f23417a1099f73dc28ec1b7d6ec2a1a7fc2b7a2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Jun 2012 20:53:59 +0000 Subject: - PLUGININFO structure removed at all; - Options_AddPage & UserInfo_AddPage replaced MS_OPT_ADDPAGE & MS_USERINFO_ADDPAGE services respectively - total internal redesign of options' translation - code reformatting git-svn-id: http://svn.miranda-ng.org/main/trunk@477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_button.h | 4 +- include/m_clc.h | 2 +- include/m_clist.h | 10 +- include/m_clistint.h | 248 ++++++++++++++++++++++++------------------------- include/m_contacts.h | 2 +- include/m_database.h | 16 ++-- include/m_hotkeys.h | 2 +- include/m_langpack.h | 14 +-- include/m_netlib.h | 38 ++++---- include/m_options.h | 25 +++-- include/m_plugins.h | 2 +- include/m_protocols.h | 20 ++-- include/m_protoint.h | 140 ++++++++++++++-------------- include/m_protosvc.h | 10 +- include/m_skin.h | 2 +- include/m_system.h | 82 ++++++++-------- include/m_system_cpp.h | 126 ++++++++++++------------- include/m_timezones.h | 24 ++--- include/m_userinfo.h | 9 +- include/m_utils.h | 24 ++--- include/m_xml.h | 120 ++++++++++++------------ include/newpluginapi.h | 66 +++++-------- include/win2k.h | 18 ++-- 23 files changed, 498 insertions(+), 506 deletions(-) (limited to 'include') diff --git a/include/m_button.h b/include/m_button.h index 293d30c893..cb2528c4ce 100644 --- a/include/m_button.h +++ b/include/m_button.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_BUTTON_H__ #define M_BUTTON_H__ 1 -#define MIRANDABUTTONCLASS _T( "MButtonClass" ) // Class of the control +#define MIRANDABUTTONCLASS _T("MButtonClass") // Class of the control // Sets whether a dropdown arrow is used @@ -58,7 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // lParam = not used // Usage: SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)"My Tip", BATF_* flags); #define BATF_UNICODE 1 -#if defined( _UNICODE ) +#if defined(_UNICODE) #define BATF_TCHAR BATF_UNICODE #else #define BATF_TCHAR 0 diff --git a/include/m_clc.h b/include/m_clc.h index e2b6cd036a..4463b584b9 100644 --- a/include/m_clc.h +++ b/include/m_clc.h @@ -162,7 +162,7 @@ typedef struct { #define CLM_ADDINFOITEMA (CLM_FIRST+48) //lParam=&cii, returns hItem #define CLM_ADDINFOITEMW (CLM_FIRST+53) //lParam=&cii, returns hItem -#if defined( _UNICODE ) +#if defined(_UNICODE) #define CLM_ADDINFOITEM CLM_ADDINFOITEMW #else #define CLM_ADDINFOITEM CLM_ADDINFOITEMA diff --git a/include/m_clist.h b/include/m_clist.h index 40288608e5..7289f778f2 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -63,7 +63,7 @@ extern int hLangpack; #define GSMDF_PREFIXONLINE 1 //prefix "Online: " to all status modes that //imply online, eg "Online: Away" #define GSMDF_UNICODE 2 //will return TCHAR* instead of char* -#if defined( _UNICODE ) +#if defined(_UNICODE) #define GSMDF_TCHAR GSMDF_UNICODE //will return TCHAR* instead of char* #else #define GSMDF_TCHAR 0 //will return char*, as usual @@ -119,7 +119,7 @@ typedef struct { #define CLISTMENUITEM_OLDSIZE_V1 (offsetof(CLISTMENUITEM,hLangpack)) -#define HGENMENU_ROOT (( HGENMENU )-1) +#define HGENMENU_ROOT ((HGENMENU)-1) #define CMIF_GRAYED 1 #define CMIF_CHECKED 2 @@ -131,7 +131,7 @@ typedef struct { #define CMIF_ROOTHANDLE 384 //means that hParentMenu member is set #define CMIF_UNICODE 512 //will return TCHAR* instead of char* -#if defined( _UNICODE ) +#if defined(_UNICODE) #define CMIF_TCHAR CMIF_UNICODE //will return TCHAR* instead of char* #else #define CMIF_TCHAR 0 //will return char*, as usual @@ -242,7 +242,7 @@ sense to store all this information in memory, etc. #define GCDNF_UNICODE 2 //will return TCHAR* instead of char* #define GCDNF_NOCACHE 4 //will not use the cache -#if defined( _UNICODE ) +#if defined(_UNICODE) #define GCDNF_TCHAR GCDNF_UNICODE //will return TCHAR* instead of char* #else #define GCDNF_TCHAR 0 //will return char*, as usual @@ -297,7 +297,7 @@ typedef struct { #define CLEF_PROTOCOLGLOBAL 8 //set event globally for protocol, hContact has to be NULL, //lpszProtocol the protocol ID name to be set -#if defined( _UNICODE ) +#if defined(_UNICODE) #define CLEF_TCHAR CLEF_UNICODE //will use TCHAR* instead of char* #else #define CLEF_TCHAR 0 //will return char*, as usual diff --git a/include/m_clistint.h b/include/m_clistint.h index 625289d709..fc628e8f50 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -186,7 +186,7 @@ typedef struct { HANDLE hContact; TCHAR* name; - #if defined( _UNICODE ) + #if defined(_UNICODE) char* szName; #endif TCHAR* group; @@ -206,134 +206,134 @@ typedef struct ClcProtoStatus *clcProto; /* clc.h */ - void ( *pfnClcOptionsChanged )( void ); - void ( *pfnClcBroadcast )( int, WPARAM, LPARAM ); - HMENU ( *pfnBuildGroupPopupMenu )( struct ClcGroup* ); + void (*pfnClcOptionsChanged)(void); + void (*pfnClcBroadcast)(int, WPARAM, LPARAM); + HMENU (*pfnBuildGroupPopupMenu)(struct ClcGroup*); - LRESULT ( CALLBACK *pfnContactListControlWndProc )( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); + LRESULT (CALLBACK *pfnContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); /* clcfiledrop.c */ - void ( *pfnRegisterFileDropping )( HWND hwnd ); - void ( *pfnUnregisterFileDropping )( HWND hwnd ); + void (*pfnRegisterFileDropping)(HWND hwnd); + void (*pfnUnregisterFileDropping)(HWND hwnd); /* clcidents.c */ - int ( *pfnGetRowsPriorTo )( struct ClcGroup *group, struct ClcGroup *subgroup, int contactIndex ); - int ( *pfnFindItem )( HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **contact, struct ClcGroup **subgroup, int *isVisible ); - int ( *pfnGetRowByIndex )( struct ClcData *dat, int testindex, struct ClcContact **contact, struct ClcGroup **subgroup ); - HANDLE ( *pfnContactToHItem )( struct ClcContact* contact ); - HANDLE ( *pfnContactToItemHandle )( struct ClcContact * contact, DWORD * nmFlags ); + int (*pfnGetRowsPriorTo)(struct ClcGroup *group, struct ClcGroup *subgroup, int contactIndex); + int (*pfnFindItem)(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **contact, struct ClcGroup **subgroup, int *isVisible); + int (*pfnGetRowByIndex)(struct ClcData *dat, int testindex, struct ClcContact **contact, struct ClcGroup **subgroup); + HANDLE (*pfnContactToHItem)(struct ClcContact* contact); + HANDLE (*pfnContactToItemHandle)(struct ClcContact * contact, DWORD * nmFlags); /* clcitems.c */ - struct ClcContact* ( *pfnCreateClcContact )( void ); - struct ClcGroup* ( *pfnAddGroup )( HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers ); - struct ClcGroup* ( *pfnRemoveItemFromGroup )(HWND hwnd, struct ClcGroup *group, struct ClcContact *contact, int updateTotalCount); - - void ( *pfnFreeContact )( struct ClcContact *contact ); - void ( *pfnFreeGroup )( struct ClcGroup *group ); - - int ( *pfnAddInfoItemToGroup )(struct ClcGroup *group, int flags, const TCHAR *pszText); - int ( *pfnAddItemToGroup )( struct ClcGroup *group, int iAboveItem ); - int ( *pfnAddContactToGroup )( struct ClcData *dat, struct ClcGroup *group, HANDLE hContact ); - void ( *pfnAddContactToTree )( HWND hwnd, struct ClcData *dat, HANDLE hContact, int updateTotalCount, int checkHideOffline); - void ( *pfnDeleteItemFromTree )( HWND hwnd, HANDLE hItem ); - void ( *pfnRebuildEntireList )( HWND hwnd, struct ClcData *dat ); - int ( *pfnGetGroupContentsCount )( struct ClcGroup *group, int visibleOnly ); - void ( *pfnSortCLC )( HWND hwnd, struct ClcData *dat, int useInsertionSort ); - void ( *pfnSaveStateAndRebuildList )(HWND hwnd, struct ClcData *dat); + struct ClcContact* (*pfnCreateClcContact)(void); + struct ClcGroup* (*pfnAddGroup)(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers); + struct ClcGroup* (*pfnRemoveItemFromGroup)(HWND hwnd, struct ClcGroup *group, struct ClcContact *contact, int updateTotalCount); + + void (*pfnFreeContact)(struct ClcContact *contact); + void (*pfnFreeGroup)(struct ClcGroup *group); + + int (*pfnAddInfoItemToGroup)(struct ClcGroup *group, int flags, const TCHAR *pszText); + int (*pfnAddItemToGroup)(struct ClcGroup *group, int iAboveItem); + int (*pfnAddContactToGroup)(struct ClcData *dat, struct ClcGroup *group, HANDLE hContact); + void (*pfnAddContactToTree)(HWND hwnd, struct ClcData *dat, HANDLE hContact, int updateTotalCount, int checkHideOffline); + void (*pfnDeleteItemFromTree)(HWND hwnd, HANDLE hItem); + void (*pfnRebuildEntireList)(HWND hwnd, struct ClcData *dat); + int (*pfnGetGroupContentsCount)(struct ClcGroup *group, int visibleOnly); + void (*pfnSortCLC)(HWND hwnd, struct ClcData *dat, int useInsertionSort); + void (*pfnSaveStateAndRebuildList)(HWND hwnd, struct ClcData *dat); /* clcmsgs.c */ - LRESULT ( *pfnProcessExternalMessages )(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam ); + LRESULT (*pfnProcessExternalMessages)(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); /* clcpaint.c */ - void ( *pfnPaintClc )( HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint ); + void (*pfnPaintClc)(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint); /* clcutils.c */ - char* ( *pfnGetGroupCountsText )(struct ClcData *dat, struct ClcContact *contact ); - int ( *pfnHitTest )( HWND hwnd, struct ClcData *dat, int testx, int testy, struct ClcContact **contact, struct ClcGroup **group, DWORD * flags ); - void ( *pfnScrollTo )( HWND hwnd, struct ClcData *dat, int desty, int noSmooth ); - void ( *pfnEnsureVisible )(HWND hwnd, struct ClcData *dat, int iItem, int partialOk ); - void ( *pfnRecalcScrollBar )( HWND hwnd, struct ClcData *dat ); - void ( *pfnSetGroupExpand )( HWND hwnd, struct ClcData *dat, struct ClcGroup *group, int newState ); - void ( *pfnDoSelectionDefaultAction )( HWND hwnd, struct ClcData *dat ); - int ( *pfnFindRowByText )(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk ); - void ( *pfnEndRename )(HWND hwnd, struct ClcData *dat, int save ); - void ( *pfnDeleteFromContactList )( HWND hwnd, struct ClcData *dat ); - void ( *pfnBeginRenameSelection )( HWND hwnd, struct ClcData *dat ); - void ( *pfnCalcEipPosition )( struct ClcData *dat, struct ClcContact *contact, struct ClcGroup *group, POINT *result); - int ( *pfnGetDropTargetInformation )( HWND hwnd, struct ClcData *dat, POINT pt ); - int ( *pfnClcStatusToPf2 )( int status ); - int ( *pfnIsHiddenMode )( struct ClcData *dat, int status ); - void ( *pfnHideInfoTip )( HWND hwnd, struct ClcData *dat ); - void ( *pfnNotifyNewContact )( HWND hwnd, HANDLE hContact ); - DWORD ( *pfnGetDefaultExStyle )( void ); - void ( *pfnGetDefaultFontSetting )( int i, LOGFONT* lf, COLORREF* colour ); - void ( *pfnGetFontSetting )( int i, LOGFONT* lf, COLORREF* colour ); - void ( *pfnLoadClcOptions )( HWND hwnd, struct ClcData *dat ); - void ( *pfnRecalculateGroupCheckboxes )( HWND hwnd, struct ClcData *dat ); - void ( *pfnSetGroupChildCheckboxes )( struct ClcGroup *group, int checked ); - void ( *pfnInvalidateItem )( HWND hwnd, struct ClcData *dat, int iItem ); - - int ( *pfnGetRowBottomY )(struct ClcData *dat, int item); - int ( *pfnGetRowHeight )(struct ClcData *dat, int item); - int ( *pfnGetRowTopY )(struct ClcData *dat, int item); - int ( *pfnGetRowTotalHeight )(struct ClcData *dat); - int ( *pfnRowHitTest )(struct ClcData *dat, int y); + char* (*pfnGetGroupCountsText)(struct ClcData *dat, struct ClcContact *contact); + int (*pfnHitTest)(HWND hwnd, struct ClcData *dat, int testx, int testy, struct ClcContact **contact, struct ClcGroup **group, DWORD * flags); + void (*pfnScrollTo)(HWND hwnd, struct ClcData *dat, int desty, int noSmooth); + void (*pfnEnsureVisible)(HWND hwnd, struct ClcData *dat, int iItem, int partialOk); + void (*pfnRecalcScrollBar)(HWND hwnd, struct ClcData *dat); + void (*pfnSetGroupExpand)(HWND hwnd, struct ClcData *dat, struct ClcGroup *group, int newState); + void (*pfnDoSelectionDefaultAction)(HWND hwnd, struct ClcData *dat); + int (*pfnFindRowByText)(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk); + void (*pfnEndRename)(HWND hwnd, struct ClcData *dat, int save); + void (*pfnDeleteFromContactList)(HWND hwnd, struct ClcData *dat); + void (*pfnBeginRenameSelection)(HWND hwnd, struct ClcData *dat); + void (*pfnCalcEipPosition)(struct ClcData *dat, struct ClcContact *contact, struct ClcGroup *group, POINT *result); + int (*pfnGetDropTargetInformation)(HWND hwnd, struct ClcData *dat, POINT pt); + int (*pfnClcStatusToPf2)(int status); + int (*pfnIsHiddenMode)(struct ClcData *dat, int status); + void (*pfnHideInfoTip)(HWND hwnd, struct ClcData *dat); + void (*pfnNotifyNewContact)(HWND hwnd, HANDLE hContact); + DWORD (*pfnGetDefaultExStyle)(void); + void (*pfnGetDefaultFontSetting)(int i, LOGFONT* lf, COLORREF* colour); + void (*pfnGetFontSetting)(int i, LOGFONT* lf, COLORREF* colour); + void (*pfnLoadClcOptions)(HWND hwnd, struct ClcData *dat); + void (*pfnRecalculateGroupCheckboxes)(HWND hwnd, struct ClcData *dat); + void (*pfnSetGroupChildCheckboxes)(struct ClcGroup *group, int checked); + void (*pfnInvalidateItem)(HWND hwnd, struct ClcData *dat, int iItem); + + int (*pfnGetRowBottomY)(struct ClcData *dat, int item); + int (*pfnGetRowHeight)(struct ClcData *dat, int item); + int (*pfnGetRowTopY)(struct ClcData *dat, int item); + int (*pfnGetRowTotalHeight)(struct ClcData *dat); + int (*pfnRowHitTest)(struct ClcData *dat, int y); /* clistevents.c */ - int ( *pfnEventsProcessContactDoubleClick )( HANDLE hContact ); - int ( *pfnEventsProcessTrayDoubleClick )( int ); + int (*pfnEventsProcessContactDoubleClick)(HANDLE hContact); + int (*pfnEventsProcessTrayDoubleClick)(int); /* clistmod.c */ - int ( *pfnIconFromStatusMode )( const char *szProto, int status, HANDLE hContact ); - int ( *pfnShowHide )( WPARAM, LPARAM ); - TCHAR* ( *pfnGetStatusModeDescription )( int mode, int flags ); + int (*pfnIconFromStatusMode)(const char *szProto, int status, HANDLE hContact); + int (*pfnShowHide)(WPARAM, LPARAM); + TCHAR* (*pfnGetStatusModeDescription)(int mode, int flags); /* clistsettings.c */ - ClcCacheEntryBase* ( *pfnGetCacheEntry )( HANDLE hContact ); - ClcCacheEntryBase* ( *pfnCreateCacheItem )( HANDLE hContact ); - void ( *pfnCheckCacheItem )( ClcCacheEntryBase* ); - void ( *pfnFreeCacheItem )( ClcCacheEntryBase* ); + ClcCacheEntryBase* (*pfnGetCacheEntry)(HANDLE hContact); + ClcCacheEntryBase* (*pfnCreateCacheItem)(HANDLE hContact); + void (*pfnCheckCacheItem)(ClcCacheEntryBase*); + void (*pfnFreeCacheItem)(ClcCacheEntryBase*); - TCHAR* ( *pfnGetContactDisplayName )( HANDLE hContact, int mode ); - void ( *pfnInvalidateDisplayNameCacheEntry )( HANDLE hContact ); + TCHAR* (*pfnGetContactDisplayName)(HANDLE hContact, int mode); + void (*pfnInvalidateDisplayNameCacheEntry)(HANDLE hContact); /* clisttray.c */ - void ( *pfnTrayIconUpdateWithImageList )( int iImage, const TCHAR *szNewTip, char *szPreferredProto ); - void ( *pfnTrayIconUpdateBase )( const char *szChangedProto ); - void ( *pfnTrayIconSetToBase )( char *szPreferredProto ); - void ( *pfnTrayIconIconsChanged )( void ); - int ( *pfnTrayIconPauseAutoHide )( WPARAM wParam, LPARAM lParam ); - INT_PTR ( *pfnTrayIconProcessMessage )( WPARAM wParam, LPARAM lParam ); - int ( *pfnCListTrayNotify )( MIRANDASYSTRAYNOTIFY* ); + void (*pfnTrayIconUpdateWithImageList)(int iImage, const TCHAR *szNewTip, char *szPreferredProto); + void (*pfnTrayIconUpdateBase)(const char *szChangedProto); + void (*pfnTrayIconSetToBase)(char *szPreferredProto); + void (*pfnTrayIconIconsChanged)(void); + int (*pfnTrayIconPauseAutoHide)(WPARAM wParam, LPARAM lParam); + INT_PTR (*pfnTrayIconProcessMessage)(WPARAM wParam, LPARAM lParam); + int (*pfnCListTrayNotify)(MIRANDASYSTRAYNOTIFY*); /* clui.c */ - LRESULT ( CALLBACK *pfnContactListWndProc )( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); + LRESULT (CALLBACK *pfnContactListWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); - void ( *pfnCluiProtocolStatusChanged )( int status, const char* szProto ); - void ( *pfnDrawMenuItem )( LPDRAWITEMSTRUCT, HICON, HICON ); - void ( *pfnLoadCluiGlobalOpts )( void ); - BOOL ( *pfnInvalidateRect )( HWND hwnd, CONST RECT* lpRect, BOOL bErase ); - void ( *pfnOnCreateClc )( void ); + void (*pfnCluiProtocolStatusChanged)(int status, const char* szProto); + void (*pfnDrawMenuItem)(LPDRAWITEMSTRUCT, HICON, HICON); + void (*pfnLoadCluiGlobalOpts)(void); + BOOL (*pfnInvalidateRect)(HWND hwnd, CONST RECT* lpRect, BOOL bErase); + void (*pfnOnCreateClc)(void); /* contact.c */ - void ( *pfnChangeContactIcon )( HANDLE hContact, int iIcon, int add ); - void ( *pfnLoadContactTree )( void ); - int ( *pfnCompareContacts )( const struct ClcContact *contact1, const struct ClcContact *contact2 ); - void ( *pfnSortContacts )( void ); - int ( *pfnSetHideOffline )( WPARAM wParam, LPARAM lParam ); + void (*pfnChangeContactIcon)(HANDLE hContact, int iIcon, int add); + void (*pfnLoadContactTree)(void); + int (*pfnCompareContacts)(const struct ClcContact *contact1, const struct ClcContact *contact2); + void (*pfnSortContacts)(void); + int (*pfnSetHideOffline)(WPARAM wParam, LPARAM lParam); /* docking.c */ - int ( *pfnDocking_ProcessWindowMessage )( WPARAM wParam, LPARAM lParam ); + int (*pfnDocking_ProcessWindowMessage)(WPARAM wParam, LPARAM lParam); /* group.c */ - TCHAR* ( *pfnGetGroupName )( int idx, DWORD* pdwFlags ); - int ( *pfnRenameGroup )( int groupID, TCHAR* newName ); + TCHAR* (*pfnGetGroupName)(int idx, DWORD* pdwFlags); + int (*pfnRenameGroup)(int groupID, TCHAR* newName); /* keyboard.c */ - int ( *pfnHotKeysRegister )( HWND hwnd ); - void ( *pfnHotKeysUnregister )( HWND hwnd ); - int ( *pfnHotKeysProcess )( HWND hwnd, WPARAM wParam, LPARAM lParam ); - int ( *pfnHotkeysProcessMessage )( WPARAM wParam, LPARAM lParam ); + int (*pfnHotKeysRegister)(HWND hwnd); + void (*pfnHotKeysUnregister)(HWND hwnd); + int (*pfnHotKeysProcess)(HWND hwnd, WPARAM wParam, LPARAM lParam); + int (*pfnHotkeysProcessMessage)(WPARAM wParam, LPARAM lParam); /************************************************************************************* * version 2 - events processing @@ -341,20 +341,20 @@ typedef struct EventList events; - struct CListEvent* ( *pfnCreateEvent )( void ); - void ( *pfnFreeEvent )( struct CListEvent* ); + struct CListEvent* (*pfnCreateEvent)(void); + void (*pfnFreeEvent)(struct CListEvent*); - struct CListEvent* ( *pfnAddEvent )( CLISTEVENT* ); - CLISTEVENT* ( *pfnGetEvent )( HANDLE hContact, int idx ); + struct CListEvent* (*pfnAddEvent)(CLISTEVENT*); + CLISTEVENT* (*pfnGetEvent)(HANDLE hContact, int idx); - int ( *pfnRemoveEvent )( HANDLE hContact, HANDLE hDbEvent ); - int ( *pfnGetImlIconIndex )( HICON hIcon ); + int (*pfnRemoveEvent)(HANDLE hContact, HANDLE hDbEvent); + int (*pfnGetImlIconIndex)(HICON hIcon); /************************************************************************************* * version 3 additions *************************************************************************************/ - int ( *pfnGetWindowVisibleState )( HWND hWnd, int iStepX, int iStepY ); + int (*pfnGetWindowVisibleState)(HWND hWnd, int iStepX, int iStepY); /************************************************************************************* * version 4 additions (0.7.0.x) - genmenu @@ -367,12 +367,12 @@ typedef struct int currentStatusMenuItem, currentDesiredStatusMode; BOOL bDisplayLocked; - HGENMENU ( *pfnGetProtocolMenu )( const char* ); - int ( *pfnStub2 )( int ); + HGENMENU (*pfnGetProtocolMenu)(const char*); + int (*pfnStub2)(int); - int ( *pfnGetProtocolVisibility )( const char* ); - int ( *pfnGetProtoIndexByPos )( PROTOCOLDESCRIPTOR** proto, int protoCnt, int Pos); - void ( *pfnReloadProtoMenus )( void ); + int (*pfnGetProtocolVisibility)(const char*); + int (*pfnGetProtoIndexByPos)(PROTOCOLDESCRIPTOR** proto, int protoCnt, int Pos); + void (*pfnReloadProtoMenus)(void); /************************************************************************************* * version 5 additions (0.7.0.x) - tray icons @@ -386,29 +386,29 @@ typedef struct TCHAR* szTip; BOOL bTrayMenuOnScreen; - HICON ( *pfnGetIconFromStatusMode )( HANDLE hContact, const char *szProto, int status ); + HICON (*pfnGetIconFromStatusMode)(HANDLE hContact, const char *szProto, int status); - void ( *pfnInitTray )( void ); - int ( *pfnTrayIconAdd )( HWND hwnd, const char *szProto, const char *szIconProto, int status ); - int ( *pfnTrayIconDestroy )( HWND hwnd ); - int ( *pfnTrayIconInit )( HWND hwnd ); - TCHAR* ( *pfnTrayIconMakeTooltip )( const TCHAR *szPrefix, const char *szProto ); - void ( *pfnTrayIconRemove )( HWND hwnd, const char *szProto ); - int ( *pfnTrayIconSetBaseInfo )( HICON hIcon, const char *szPreferredProto ); - void ( *pfnTrayIconTaskbarCreated )( HWND hwnd ); - int ( *pfnTrayIconUpdate )( HICON hNewIcon, const TCHAR *szNewTip, const char *szPreferredProto, int isBase ); + void (*pfnInitTray)(void); + int (*pfnTrayIconAdd)(HWND hwnd, const char *szProto, const char *szIconProto, int status); + int (*pfnTrayIconDestroy)(HWND hwnd); + int (*pfnTrayIconInit)(HWND hwnd); + TCHAR* (*pfnTrayIconMakeTooltip)(const TCHAR *szPrefix, const char *szProto); + void (*pfnTrayIconRemove)(HWND hwnd, const char *szProto); + int (*pfnTrayIconSetBaseInfo)(HICON hIcon, const char *szPreferredProto); + void (*pfnTrayIconTaskbarCreated)(HWND hwnd); + int (*pfnTrayIconUpdate)(HICON hNewIcon, const TCHAR *szNewTip, const char *szPreferredProto, int isBase); - void ( *pfnUninitTray )( void ); - void ( *pfnLockTray )( void ); - void ( *pfnUnlockTray )( void ); + void (*pfnUninitTray)(void); + void (*pfnLockTray)(void); + void (*pfnUnlockTray)(void); - VOID ( CALLBACK *pfnTrayCycleTimerProc )( HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime ); + VOID (CALLBACK *pfnTrayCycleTimerProc)(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); /************************************************************************************* * version 6 additions (0.8.0.x) - accounts *************************************************************************************/ - int ( *pfnGetAccountIndexByPos )( int pos ); - int ( *pfnConvertMenu )( CLISTMENUITEM*, TMO_MenuItem* ); + int (*pfnGetAccountIndexByPos)(int pos); + int (*pfnConvertMenu)(CLISTMENUITEM*, TMO_MenuItem*); } CLIST_INTERFACE; diff --git a/include/m_contacts.h b/include/m_contacts.h index 549c9d589e..dd14dfd39d 100644 --- a/include/m_contacts.h +++ b/include/m_contacts.h @@ -88,7 +88,7 @@ typedef struct { // Add this flag if you want to get the Unicode info #define CNF_UNICODE 0x80 -#if defined( _UNICODE ) +#if defined(_UNICODE) #define CNF_TCHAR CNF_UNICODE // will use TCHAR* instead of char* #else #define CNF_TCHAR 0 // will return char*, as usual diff --git a/include/m_database.h b/include/m_database.h index 2675b5e148..f23fbbbe21 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -87,7 +87,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DBVT_BLOB 254 //cpbVal and pbVal are valid #define DBVT_UTF8 253 //pszVal is valid #define DBVT_WCHAR 252 //pszVal is valid -#if defined( _UNICODE ) +#if defined(_UNICODE) #define DBVT_TCHAR DBVT_WCHAR #else #define DBVT_TCHAR DBVT_ASCIIZ @@ -145,7 +145,7 @@ Returns 0 on success or nonzero otherwise #define MS_DB_GETPROFILEPATH "DB/GetProfilePath" #define MS_DB_GETPROFILEPATHW "DB/GetProfilePathW" -#if defined( _UNICODE ) +#if defined(_UNICODE) #define MS_DB_GETPROFILEPATHT MS_DB_GETPROFILEPATHW #define MS_DB_GETPROFILENAMET MS_DB_GETPROFILENAMEW #else @@ -514,17 +514,17 @@ typedef struct { #define MS_DB_EVENT_GETTEXT "DB/Event/GetText" -__inline static char* DbGetEventTextA( DBEVENTINFO* dbei, int codepage ) +__inline static char* DbGetEventTextA(DBEVENTINFO* dbei, int codepage) { DBEVENTGETTEXT temp = { dbei, DBVT_ASCIIZ, codepage }; return (char*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp); } -__inline static WCHAR* DbGetEventTextW( DBEVENTINFO* dbei, int codepage ) +__inline static WCHAR* DbGetEventTextW(DBEVENTINFO* dbei, int codepage) { DBEVENTGETTEXT temp = { dbei, DBVT_WCHAR, codepage }; return (WCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp); } -__inline static TCHAR* DbGetEventTextT( DBEVENTINFO* dbei, int codepage ) +__inline static TCHAR* DbGetEventTextT(DBEVENTINFO* dbei, int codepage) { DBEVENTGETTEXT temp = { dbei, DBVT_TCHAR, codepage }; return (TCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&temp); } @@ -555,9 +555,9 @@ Caller must free the result using mir_free #define MS_DB_EVENT_GETSTRINGT "DB/Event/GetStringT" -__inline static TCHAR* DbGetEventStringT( DBEVENTINFO* dbei, const char* str ) +__inline static TCHAR* DbGetEventStringT(DBEVENTINFO* dbei, const char* str) { - return (TCHAR*)CallService( MS_DB_EVENT_GETSTRINGT, (WPARAM)dbei, (LPARAM)str ); + return (TCHAR*)CallService(MS_DB_EVENT_GETSTRINGT, (WPARAM)dbei, (LPARAM)str); } /* DB/Event/MarkRead @@ -675,7 +675,7 @@ it would have been at the time and date the stamp contains. This service isn't nearly as useful as db/time/TimestampToString below and I recommend avoiding its use when possible so that you don't get your timezones mixed up (like I did. Living at GMT makes things easier for me, but has certain -disadvantages :-) ). +disadvantages :-)). */ #define MS_DB_TIME_TIMESTAMPTOLOCAL "DB/Time/TimestampToLocal" diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index 5522f49bc9..6bb568d618 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define HKD_UNICODE 0x0001 -#if defined( _UNICODE ) +#if defined(_UNICODE) #define HKD_TCHAR HKD_UNICODE #else #define HKD_TCHAR 0 diff --git a/include/m_langpack.h b/include/m_langpack.h index e601b58c49..d1dfb9d326 100644 --- a/include/m_langpack.h +++ b/include/m_langpack.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_LANGPACK_H__ #define M_LANGPACK_H__ -#if !defined( _STATIC ) +#if !defined(_STATIC) #define MIRANDA_CUSTOM_LP #endif @@ -41,7 +41,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //these versions, I pity them. #define MS_LANGPACK_TRANSLATESTRING "LangPack/TranslateString" -#if defined( MIRANDA_CUSTOM_LP ) +#if defined(MIRANDA_CUSTOM_LP) extern int hLangpack; @@ -105,7 +105,7 @@ typedef struct { #define MS_LANGPACK_TRANSLATEDIALOG "LangPack/TranslateDialog" -#if defined( MIRANDA_CUSTOM_LP ) +#if defined(MIRANDA_CUSTOM_LP) __inline static INT_PTR TranslateDialogDefault(HWND hwndDlg) { @@ -137,7 +137,7 @@ __inline static INT_PTR TranslateDialogDefault(HWND hwndDlg) //returns 0 on success, nonzero on failure #define MS_LANGPACK_TRANSLATEMENU "LangPack/TranslateMenu" -#if defined( MIRANDA_CUSTOM_LP ) +#if defined(MIRANDA_CUSTOM_LP) __inline static INT_PTR TranslateMenu(HMENU hMenu) { return CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hMenu, hLangpack); @@ -170,7 +170,7 @@ __inline static INT_PTR TranslateMenu(HMENU hMenu) //This string should be freed using mir_free() then #define MS_LANGPACK_PCHARTOTCHAR "LangPack/PcharToTchar" -#if defined( MIRANDA_CUSTOM_LP ) +#if defined(MIRANDA_CUSTOM_LP) __inline static INT_PTR Langpack_PCharToTChar(const char* str) { return CallService(MS_LANGPACK_PCHARTOTCHAR, hLangpack, (LPARAM)str); @@ -190,8 +190,8 @@ __inline static INT_PTR Langpack_PCharToTChar(const char* str) //always returns 0 #define MS_LANGPACK_REGISTER "LangPack/Register" -#if defined( MIRANDA_CUSTOM_LP ) -__forceinline void mir_getLP( const PLUGININFOEX* pInfo ) +#if defined(MIRANDA_CUSTOM_LP) +__forceinline void mir_getLP(const PLUGININFOEX* pInfo) { CallService(MS_LANGPACK_REGISTER, (WPARAM)&hLangpack, (LPARAM)pInfo); } #endif diff --git a/include/m_netlib.h b/include/m_netlib.h index 689d352ea9..20db435de5 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -174,7 +174,7 @@ should use the MSG_DUMPPROXY flag so that the logging is neat. //Gets the user-configured settings for a netlib user //wParam=(WPARAM)(HANDLE)hUser //lParam=(LPARAM)(NETLIBUSERSETTINGS*)&nlus -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //The pointers referred to in the returned struct will remain valid until //the hUser handle is closed, or until the user changes the settings in the //options page, so it's best not to rely on them for too long. @@ -207,7 +207,7 @@ typedef struct { //Changes the user-configurable settings for a netlib user //wParam=(WPARAM)(HANDLE)hUser //lParam=(LPARAM)(NETLIBUSERSETTINGS*)&nlus -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //This function is only really useful for people that specify NUF_NOOPTIONS //and want to create their own options. //Even if a setting is not active (eg szProxyAuthPassword when useProxyAuth is @@ -218,7 +218,7 @@ typedef struct { //Closes a netlib handle //wParam=(WPARAM)(HANDLE)hNetlibHandle //lParam=0 -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //This function should be called on all handles returned by netlib functions //once you are done with them. If it's called on a socket-type handle, the //socket will be closed. @@ -351,7 +351,7 @@ struct NETLIBOPENCONNECTION_tag { //Sets the required information for an HTTP proxy connection //wParam=(WPARAM)(HANDLE)hConnection //lParam=(LPARAM)(NETLIBHTTPPROXYINFO*)&nlhpi -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //This function is designed to be called from within pfnHttpGatewayInit //See notes below MS_NETLIB_REGISTERUSER. //Errors: ERROR_INVALID_PARAMETER @@ -392,7 +392,7 @@ typedef struct { //Base64 decode a string. See rfc1421. //wParam=0 //lParam=(LPARAM)(NETLIBBASE64*)&nlb64 -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //nlb64.pszEncoded and nlb64.cchEncoded contain the input string and its length //(excluding terminating zero). //nlb64.pbDecoded and nlb64.cbDecoded contain the buffer in which to put the @@ -412,7 +412,7 @@ typedef struct { //Base64 encode a string. See rfc1421. //wParam=0 //lParam=(LPARAM)(NETLIBBASE64*)&nlb64 -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //nlb64.pbDecoded and nlb64.cbDecoded contain the input buffer and its length //nlb64.pszEncoded and nlb64.cchEncoded contain the buffer in which to put the //output and the length of this buffer. The maximum output size for a given @@ -546,7 +546,7 @@ struct NETLIBHTTPREQUEST_tag { //Free the memory used by a NETLIBHTTPREQUEST structure //wParam=0 //lParam=(LPARAM)(NETLIBHTTPREQUEST*)pnlhr -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //This should only be called on structures returned by //MS_NETLIB_RECVHTTPHEADERS or MS_NETLIB_HTTPTRANSACTION. Calling it on an //arbitrary structure will have disastrous results. @@ -721,7 +721,7 @@ typedef struct { //Add a message to the log (if it's running) //wParam=(WPARAM)(HANDLE)hUser //lParam=(LPARAM)(const char *)szMessage -//Returns nonzero on success, 0 on failure (!! this is different to most of the rest of Miranda, but consistent with netlib) +//Returns nonzero on success, 0 on failure ( !! this is different to most of the rest of Miranda, but consistent with netlib) //Do not include a final line ending in szMessage. //Errors: ERROR_INVALID_PARAMETER #define MS_NETLIB_LOG "Netlib/Log" @@ -751,7 +751,7 @@ typedef struct //here's a handy piece of code to let you log using printf-style specifiers: //#include and before including this header in order to //use it. -#if defined va_start && (defined _STDIO_DEFINED || defined _STDIO_H_) && (!defined NETLIB_NOLOGGING) +#if defined va_start && (defined _STDIO_DEFINED || defined _STDIO_H_) && ( !defined NETLIB_NOLOGGING) static INT_PTR Netlib_Logf(HANDLE hUser, const char *fmt, ...) { va_list va; @@ -807,9 +807,9 @@ static INT_PTR Netlib_Logf(HANDLE hUser, const char *fmt, ...) // Known providers: Basic, NTLM, Negotiate, Kerberos, GSSAPI - (Kerberos SASL) #define MS_NETLIB_INITSECURITYPROVIDER "Netlib/InitSecurityProvider" -static __inline HANDLE Netlib_InitSecurityProvider( char* szProviderName ) +static __inline HANDLE Netlib_InitSecurityProvider(char* szProviderName) { - return (HANDLE)CallService( MS_NETLIB_INITSECURITYPROVIDER, 0, (LPARAM)szProviderName ); + return (HANDLE)CallService(MS_NETLIB_INITSECURITYPROVIDER, 0, (LPARAM)szProviderName); } typedef struct { @@ -822,10 +822,10 @@ typedef struct { #define MS_NETLIB_INITSECURITYPROVIDER2 "Netlib/InitSecurityProvider2" -static __inline HANDLE Netlib_InitSecurityProvider2( const TCHAR* szProviderName, const TCHAR* szPrincipal ) +static __inline HANDLE Netlib_InitSecurityProvider2(const TCHAR* szProviderName, const TCHAR* szPrincipal) { NETLIBNTLMINIT2 temp = { sizeof(temp), szProviderName, szPrincipal, NNR_TCHAR }; - return (HANDLE)CallService( MS_NETLIB_INITSECURITYPROVIDER2, 0, (LPARAM)&temp ); + return (HANDLE)CallService(MS_NETLIB_INITSECURITYPROVIDER2, 0, (LPARAM)&temp); } @@ -833,9 +833,9 @@ static __inline HANDLE Netlib_InitSecurityProvider2( const TCHAR* szProviderName // Right now only NTLM is supported #define MS_NETLIB_DESTROYSECURITYPROVIDER "Netlib/DestroySecurityProvider" -static __inline void Netlib_DestroySecurityProvider( char* szProviderName, HANDLE hProvider ) +static __inline void Netlib_DestroySecurityProvider(char* szProviderName, HANDLE hProvider) { - CallService( MS_NETLIB_DESTROYSECURITYPROVIDER, (WPARAM)szProviderName, (LPARAM)hProvider ); + CallService(MS_NETLIB_DESTROYSECURITYPROVIDER, (WPARAM)szProviderName, (LPARAM)hProvider); } // Returns the NTLM response string. The result value should be freed using mir_free @@ -849,10 +849,10 @@ typedef struct { #define MS_NETLIB_NTLMCREATERESPONSE "Netlib/NtlmCreateResponse" -static __inline char* Netlib_NtlmCreateResponse( HANDLE hProvider, char* szChallenge, char* login, char* psw ) +static __inline char* Netlib_NtlmCreateResponse(HANDLE hProvider, char* szChallenge, char* login, char* psw) { NETLIBNTLMREQUEST temp = { szChallenge, login, psw }; - return (char*)CallService( MS_NETLIB_NTLMCREATERESPONSE, (WPARAM)hProvider, (LPARAM)&temp ); + return (char*)CallService(MS_NETLIB_NTLMCREATERESPONSE, (WPARAM)hProvider, (LPARAM)&temp); } typedef struct { @@ -867,10 +867,10 @@ typedef struct { #define MS_NETLIB_NTLMCREATERESPONSE2 "Netlib/NtlmCreateResponse2" -static __inline char* Netlib_NtlmCreateResponse2( HANDLE hProvider, char* szChallenge, TCHAR* szLogin, TCHAR* szPass, unsigned *complete ) +static __inline char* Netlib_NtlmCreateResponse2(HANDLE hProvider, char* szChallenge, TCHAR* szLogin, TCHAR* szPass, unsigned *complete) { NETLIBNTLMREQUEST2 temp = { sizeof(temp), szChallenge, szLogin, szPass, *complete, NNR_TCHAR }; - char* res = (char*)CallService( MS_NETLIB_NTLMCREATERESPONSE2, (WPARAM)hProvider, (LPARAM)&temp ); + char* res = (char*)CallService(MS_NETLIB_NTLMCREATERESPONSE2, (WPARAM)hProvider, (LPARAM)&temp); *complete = temp.complete; return res; } diff --git a/include/m_options.h b/include/m_options.h index 75c2df4057..5da817a71a 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_OPTIONS_H__ #define M_OPTIONS_H__ +extern int hLangpack; + /* Opt/Initialise The user opened the options dialog. Modules should do whatever initialisation they need and call opt/addpage one or more times if they want pages displayed @@ -77,18 +79,15 @@ typedef struct { int nExpertOnlyControls; //v0.1.2.1+ these controls will be hidden in simple mode. Array must remain valid for duration of dlg. union { - char* pszTab; //v0.6.0.0+ [TRANSLATED-BY-CORE] - TCHAR* ptszTab; //v0.6.0.0+ - }; + char* pszTab; //v0.6.0.0+ [TRANSLATED-BY-CORE] + TCHAR* ptszTab; //v0.6.0.0+ + }; LPARAM dwInitParam; //v0.8.0.0+ a value to pass to lParam of WM_INITDIALOG message + int hLangpack; } OPTIONSDIALOGPAGE; -#define OPTIONPAGE_OLD_SIZE (offsetof(OPTIONSDIALOGPAGE, flags)) -#define OPTIONPAGE_OLD_SIZE2 (offsetof(OPTIONSDIALOGPAGE, pszTab)) -#define OPTIONPAGE_OLD_SIZE3 (offsetof(OPTIONSDIALOGPAGE, dwInitParam)) - #define ODPF_SIMPLEONLY 1 // page is only shown when in simple mode #define ODPF_EXPERTONLY 2 // " expert mode #define ODPF_BOLDGROUPS 4 // give group box titles a bold font @@ -96,7 +95,7 @@ typedef struct { #define ODPF_USERINFOTAB 16 // options page is tabbed #define ODPF_DONTTRANSLATE 32 // do not translate option page title -#if defined( _UNICODE ) +#if defined(_UNICODE) #define ODPF_TCHAR ODPF_UNICODE #else #define ODPF_TCHAR 0 @@ -105,7 +104,11 @@ typedef struct { #define PSN_EXPERTCHANGED 2 //sent to pages via WM_NOTIFY when the expert checkbox is clicked. lParam=new state #define PSM_ISEXPERT (WM_USER+101) //returns true/false #define PSM_GETBOLDFONT (WM_USER+102) //returns HFONT used for group box titles -#define MS_OPT_ADDPAGE "Opt/AddPage" + +__inline static INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp) +{ odp->hLangpack = hLangpack; + return CallService("Opt/AddPage", wParam, (LPARAM)odp); +} //Opens the options dialog, optionally at the specified page v0.1.2.1+ //wParam=0 @@ -120,7 +123,9 @@ typedef struct { //specific page const char *pszTab; //set to NULL to just open the options at no //specific tab -} OPENOPTIONSDIALOG; +} + OPENOPTIONSDIALOG; + #define MS_OPT_OPENOPTIONS "Opt/OpenOptions" //Opens the options dialog, with only specified page v0.8.0.x+ diff --git a/include/m_plugins.h b/include/m_plugins.h index 402da041d7..95657cd1bb 100644 --- a/include/m_plugins.h +++ b/include/m_plugins.h @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct PLUGIN_DB_ENUM { int cbSize; // 0 = continue, 1 = found, -1 = stop now - int (*pfnEnumCallback) ( const char * pluginname, /*DATABASELINK*/ void * link, LPARAM lParam); + int (*pfnEnumCallback) (const char * pluginname, /*DATABASELINK*/ void * link, LPARAM lParam); LPARAM lParam; } PLUGIN_DB_ENUM; #define MS_PLUGINS_ENUMDBPLUGINS "Plugins/DbEnumerate" diff --git a/include/m_protocols.h b/include/m_protocols.h index 8ee54722c2..88553d6ae0 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -108,7 +108,7 @@ typedef struct { #define PFTS_UNICODE 2 #define PFTS_UTF 4 -#if defined( _UNICODE ) +#if defined(_UNICODE) #define PFTS_TCHAR PFTS_UNICODE #else #define PFTS_TCHAR 0 @@ -173,13 +173,13 @@ PROTOFILETRANSFERSTATUS; #define PROTOCOLDESCRIPTOR_V3_SIZE (sizeof(size_t)+sizeof(INT_PTR)+sizeof(char*)) // initializes an empty account -typedef struct tagPROTO_INTERFACE* ( *pfnInitProto )( const char* szModuleName, const TCHAR* szUserName ); +typedef struct tagPROTO_INTERFACE* (*pfnInitProto)(const char* szModuleName, const TCHAR* szUserName); // deallocates an account instance -typedef int ( *pfnUninitProto )( struct tagPROTO_INTERFACE* ); +typedef int (*pfnUninitProto)(struct tagPROTO_INTERFACE*); // removes an account from the database -typedef int ( *pfnDestroyProto )( struct tagPROTO_INTERFACE* ); +typedef int (*pfnDestroyProto)(struct tagPROTO_INTERFACE*); typedef struct { size_t cbSize; @@ -293,8 +293,8 @@ typedef struct tagACCOUNT //lParam=(LPARAM)(PROTOACCOUNT**)paAccounts #define MS_PROTO_ENUMACCOUNTS "Proto/EnumAccounts" -__inline static INT_PTR ProtoEnumAccounts( int* accNumber, PROTOACCOUNT*** accArray ) -{ return CallService( MS_PROTO_ENUMACCOUNTS, ( WPARAM )accNumber, (LPARAM)accArray ); +__inline static INT_PTR ProtoEnumAccounts(int* accNumber, PROTOACCOUNT*** accArray) +{ return CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)accNumber, (LPARAM)accArray); } //retrieves an account's interface by its physical name (database module) @@ -303,8 +303,8 @@ __inline static INT_PTR ProtoEnumAccounts( int* accNumber, PROTOACCOUNT*** accAr //return value = PROTOACCOUNT* or NULL #define MS_PROTO_GETACCOUNT "Proto/GetAccount" -__inline static PROTOACCOUNT* ProtoGetAccount( const char* accName ) -{ return (PROTOACCOUNT*)CallService( MS_PROTO_GETACCOUNT, 0, (LPARAM)accName ); +__inline static PROTOACCOUNT* ProtoGetAccount(const char* accName) +{ return (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)accName); } //this event is fired when the accounts list gets changed @@ -331,9 +331,9 @@ __inline static PROTOACCOUNT* ProtoGetAccount( const char* accName ) //Returns 1 if an account is valid and enabled, 0 otherwise #define MS_PROTO_ISACCOUNTENABLED "Proto/IsAccountEnabled" -__inline static int IsAccountEnabled( const PROTOACCOUNT* pa ) +__inline static int IsAccountEnabled(const PROTOACCOUNT* pa) { - return (int)CallService( MS_PROTO_ISACCOUNTENABLED, 0, (LPARAM)pa ); + return (int)CallService(MS_PROTO_ISACCOUNTENABLED, 0, (LPARAM)pa); } //determines if an account is locked or not diff --git a/include/m_protoint.h b/include/m_protoint.h index 0eac0f0015..d4c7c73b91 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -44,52 +44,52 @@ typedef enum #ifndef __cplusplus typedef struct tagPROTO_INTERFACE_VTBL { - HANDLE ( *AddToList )( struct tagPROTO_INTERFACE*, int flags, PROTOSEARCHRESULT* psr ); - HANDLE ( *AddToListByEvent )( struct tagPROTO_INTERFACE*, int flags, int iContact, HANDLE hDbEvent ); + HANDLE (*AddToList)(struct tagPROTO_INTERFACE*, int flags, PROTOSEARCHRESULT* psr); + HANDLE (*AddToListByEvent)(struct tagPROTO_INTERFACE*, int flags, int iContact, HANDLE hDbEvent); - int ( *Authorize )( struct tagPROTO_INTERFACE*, HANDLE hContact ); - int ( *AuthDeny )( struct tagPROTO_INTERFACE*, HANDLE hContact, const TCHAR* szReason ); - int ( *AuthRecv )( struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT* ); - int ( *AuthRequest )( struct tagPROTO_INTERFACE*, HANDLE hContact, const TCHAR* szMessage ); + int (*Authorize)(struct tagPROTO_INTERFACE*, HANDLE hContact); + int (*AuthDeny)(struct tagPROTO_INTERFACE*, HANDLE hContact, const TCHAR* szReason); + int (*AuthRecv)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*); + int (*AuthRequest)(struct tagPROTO_INTERFACE*, HANDLE hContact, const TCHAR* szMessage); - HANDLE ( *ChangeInfo )( struct tagPROTO_INTERFACE*, int iInfoType, void* pInfoData ); + HANDLE (*ChangeInfo)(struct tagPROTO_INTERFACE*, int iInfoType, void* pInfoData); - HANDLE ( *FileAllow )( struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath ); - int ( *FileCancel )( struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer ); - int ( *FileDeny )( struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason ); - int ( *FileResume )( struct tagPROTO_INTERFACE*, HANDLE hTransfer, int* action, const PROTOCHAR** szFilename ); + HANDLE (*FileAllow)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath); + int (*FileCancel)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer); + int (*FileDeny)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason); + int (*FileResume)(struct tagPROTO_INTERFACE*, HANDLE hTransfer, int* action, const PROTOCHAR** szFilename); - DWORD_PTR ( *GetCaps )( struct tagPROTO_INTERFACE*, int type, HANDLE hContact ); - HICON ( *GetIcon )( struct tagPROTO_INTERFACE*, int iconIndex ); - int ( *GetInfo )( struct tagPROTO_INTERFACE*, HANDLE hContact, int infoType ); + DWORD_PTR (*GetCaps)(struct tagPROTO_INTERFACE*, int type, HANDLE hContact); + HICON (*GetIcon)(struct tagPROTO_INTERFACE*, int iconIndex); + int (*GetInfo)(struct tagPROTO_INTERFACE*, HANDLE hContact, int infoType); - HANDLE ( *SearchBasic )( struct tagPROTO_INTERFACE*, const PROTOCHAR* id ); - HANDLE ( *SearchByEmail )( struct tagPROTO_INTERFACE*, const PROTOCHAR* email ); - HANDLE ( *SearchByName )( struct tagPROTO_INTERFACE*, const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName ); - HWND ( *SearchAdvanced )( struct tagPROTO_INTERFACE*, HWND owner ); - HWND ( *CreateExtendedSearchUI )( struct tagPROTO_INTERFACE*, HWND owner ); + HANDLE (*SearchBasic)(struct tagPROTO_INTERFACE*, const PROTOCHAR* id); + HANDLE (*SearchByEmail)(struct tagPROTO_INTERFACE*, const PROTOCHAR* email); + HANDLE (*SearchByName)(struct tagPROTO_INTERFACE*, const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName); + HWND (*SearchAdvanced)(struct tagPROTO_INTERFACE*, HWND owner); + HWND (*CreateExtendedSearchUI)(struct tagPROTO_INTERFACE*, HWND owner); - int ( *RecvContacts )( struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT* ); - int ( *RecvFile )( struct tagPROTO_INTERFACE*, HANDLE hContact, PROTOFILEEVENT* ); - int ( *RecvMsg )( struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT* ); - int ( *RecvUrl )( struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT* ); + int (*RecvContacts)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*); + int (*RecvFile)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTOFILEEVENT*); + int (*RecvMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*); + int (*RecvUrl)(struct tagPROTO_INTERFACE*, HANDLE hContact, PROTORECVEVENT*); - int ( *SendContacts )( struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList ); - HANDLE ( *SendFile )( struct tagPROTO_INTERFACE*, HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles ); - int ( *SendMsg )( struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, const char* msg ); - int ( *SendUrl )( struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, const char* url ); + int (*SendContacts)(struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList); + HANDLE (*SendFile)(struct tagPROTO_INTERFACE*, HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles); + int (*SendMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, const char* msg); + int (*SendUrl)(struct tagPROTO_INTERFACE*, HANDLE hContact, int flags, const char* url); - int ( *SetApparentMode )( struct tagPROTO_INTERFACE*, HANDLE hContact, int mode ); - int ( *SetStatus )( struct tagPROTO_INTERFACE*, int iNewStatus ); + int (*SetApparentMode)(struct tagPROTO_INTERFACE*, HANDLE hContact, int mode); + int (*SetStatus)(struct tagPROTO_INTERFACE*, int iNewStatus); - HANDLE ( *GetAwayMsg )( struct tagPROTO_INTERFACE*, HANDLE hContact ); - int ( *RecvAwayMsg )( struct tagPROTO_INTERFACE*, HANDLE hContact, int mode, PROTORECVEVENT* evt ); - int ( *SendAwayMsg )( struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hProcess, const char* msg ); - int ( *SetAwayMsg )( struct tagPROTO_INTERFACE*, int iStatus, const PROTOCHAR* msg ); + HANDLE (*GetAwayMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact); + int (*RecvAwayMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, int mode, PROTORECVEVENT* evt); + int (*SendAwayMsg)(struct tagPROTO_INTERFACE*, HANDLE hContact, HANDLE hProcess, const char* msg); + int (*SetAwayMsg)(struct tagPROTO_INTERFACE*, int iStatus, const PROTOCHAR* msg); - int ( *UserIsTyping )( struct tagPROTO_INTERFACE*, HANDLE hContact, int type ); + int (*UserIsTyping)(struct tagPROTO_INTERFACE*, HANDLE hContact, int type); - int ( *OnEvent )( struct tagPROTO_INTERFACE*, PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam ); + int (*OnEvent)(struct tagPROTO_INTERFACE*, PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam); } PROTO_INTERFACE_VTBL; #endif @@ -111,52 +111,52 @@ typedef struct tagPROTO_INTERFACE DWORD reserved[ 40 ]; #ifdef __cplusplus - virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr ) = 0; - virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent ) = 0; + virtual HANDLE __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) = 0; + virtual HANDLE __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) = 0; - virtual int __cdecl Authorize( HANDLE hDbEvent ) = 0; - virtual int __cdecl AuthDeny( HANDLE hDbEvent, const PROTOCHAR* szReason ) = 0; - virtual int __cdecl AuthRecv( HANDLE hContact, PROTORECVEVENT* ) = 0; - virtual int __cdecl AuthRequest( HANDLE hContact, const PROTOCHAR* szMessage ) = 0; + virtual int __cdecl Authorize(HANDLE hDbEvent) = 0; + virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason) = 0; + virtual int __cdecl AuthRecv(HANDLE hContact, PROTORECVEVENT*) = 0; + virtual int __cdecl AuthRequest(HANDLE hContact, const PROTOCHAR* szMessage) = 0; - virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData ) = 0; + virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData) = 0; - virtual HANDLE __cdecl FileAllow( HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath ) = 0; - virtual int __cdecl FileCancel( HANDLE hContact, HANDLE hTransfer ) = 0; - virtual int __cdecl FileDeny( HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason ) = 0; - virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename ) = 0; + virtual HANDLE __cdecl FileAllow(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath) = 0; + virtual int __cdecl FileCancel(HANDLE hContact, HANDLE hTransfer) = 0; + virtual int __cdecl FileDeny(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason) = 0; + virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename) = 0; - virtual DWORD_PTR __cdecl GetCaps( int type, HANDLE hContact = NULL ) = 0; - virtual HICON __cdecl GetIcon( int iconIndex ) = 0; - virtual int __cdecl GetInfo( HANDLE hContact, int infoType ) = 0; + virtual DWORD_PTR __cdecl GetCaps(int type, HANDLE hContact = NULL) = 0; + virtual HICON __cdecl GetIcon(int iconIndex) = 0; + virtual int __cdecl GetInfo(HANDLE hContact, int infoType) = 0; - virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id ) = 0; - virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email ) = 0; - virtual HANDLE __cdecl SearchByName( const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName ) = 0; - virtual HWND __cdecl SearchAdvanced( HWND owner ) = 0; - virtual HWND __cdecl CreateExtendedSearchUI( HWND owner ) = 0; + virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id) = 0; + virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email) = 0; + virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) = 0; + virtual HWND __cdecl SearchAdvanced(HWND owner) = 0; + virtual HWND __cdecl CreateExtendedSearchUI(HWND owner) = 0; - virtual int __cdecl RecvContacts( HANDLE hContact, PROTORECVEVENT* ) = 0; - virtual int __cdecl RecvFile( HANDLE hContact, PROTOFILEEVENT* ) = 0; - virtual int __cdecl RecvMsg( HANDLE hContact, PROTORECVEVENT* ) = 0; - virtual int __cdecl RecvUrl( HANDLE hContact, PROTORECVEVENT* ) = 0; + virtual int __cdecl RecvContacts(HANDLE hContact, PROTORECVEVENT*) = 0; + virtual int __cdecl RecvFile(HANDLE hContact, PROTOFILEEVENT*) = 0; + virtual int __cdecl RecvMsg(HANDLE hContact, PROTORECVEVENT*) = 0; + virtual int __cdecl RecvUrl(HANDLE hContact, PROTORECVEVENT*) = 0; - virtual int __cdecl SendContacts( HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList ) = 0; - virtual HANDLE __cdecl SendFile( HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles ) = 0; - virtual int __cdecl SendMsg( HANDLE hContact, int flags, const char* msg ) = 0; - virtual int __cdecl SendUrl( HANDLE hContact, int flags, const char* url ) = 0; + virtual int __cdecl SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList) = 0; + virtual HANDLE __cdecl SendFile(HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles) = 0; + virtual int __cdecl SendMsg(HANDLE hContact, int flags, const char* msg) = 0; + virtual int __cdecl SendUrl(HANDLE hContact, int flags, const char* url) = 0; - virtual int __cdecl SetApparentMode( HANDLE hContact, int mode ) = 0; - virtual int __cdecl SetStatus( int iNewStatus ) = 0; + virtual int __cdecl SetApparentMode(HANDLE hContact, int mode) = 0; + virtual int __cdecl SetStatus(int iNewStatus) = 0; - virtual HANDLE __cdecl GetAwayMsg( HANDLE hContact ) = 0; - virtual int __cdecl RecvAwayMsg( HANDLE hContact, int mode, PROTORECVEVENT* evt ) = 0; - virtual int __cdecl SendAwayMsg( HANDLE hContact, HANDLE hProcess, const char* msg ) = 0; - virtual int __cdecl SetAwayMsg( int iStatus, const PROTOCHAR* msg ) = 0; + virtual HANDLE __cdecl GetAwayMsg(HANDLE hContact) = 0; + virtual int __cdecl RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT* evt) = 0; + virtual int __cdecl SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char* msg) = 0; + virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg) = 0; - virtual int __cdecl UserIsTyping( HANDLE hContact, int type ) = 0; + virtual int __cdecl UserIsTyping(HANDLE hContact, int type) = 0; - virtual int __cdecl OnEvent( PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam ) = 0; + virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) = 0; #endif } PROTO_INTERFACE; diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 3eb934b532..264adac76d 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -316,7 +316,7 @@ will pick this up and everything will be good. //the ack is complete. #define PSR_UNICODE 1 // return Unicode status -#if defined( _UNICODE ) +#if defined(_UNICODE) #define PSR_TCHAR PSR_UNICODE #else #define PSR_TCHAR 0 @@ -495,7 +495,7 @@ typedef struct { // Remember to mir_free the return value #define SGMA_UNICODE 1 // return Unicode status -#if defined( _UNICODE ) +#if defined(_UNICODE) #define SGMA_TCHAR SGMA_UNICODE #else #define SGMA_TCHAR 0 @@ -509,7 +509,7 @@ typedef struct { // return=0 for success #define SMNN_UNICODE 1 // return Unicode status -#if defined( _UNICODE ) +#if defined(_UNICODE) #define SMNN_TCHAR SMNN_UNICODE #else #define SMNN_TCHAR 0 @@ -526,7 +526,7 @@ typedef struct { // WAYD = What are you doing #define WAYD_UNICODE 1 // return Unicode texts -#if defined( _UNICODE ) +#if defined(_UNICODE) #define WAYD_TCHAR WAYD_UNICODE #else #define WAYD_TCHAR 0 @@ -723,7 +723,7 @@ typedef struct { #define PREF_RTL 4 // 0.5+ addition: support for right-to-left messages #define PREF_UTF 8 // message is in utf-8 (0.7.0+) -#if defined( _UNICODE ) +#if defined(_UNICODE) #define PREF_TCHAR PREF_UNICODE #else #define PREF_TCHAR 0 diff --git a/include/m_skin.h b/include/m_skin.h index 31fd5e2361..0a5da39889 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -121,7 +121,7 @@ __inline static HICON LoadSkinnedProtoIconBig(const char *szProto, int status) { #define SSDF_UNICODE 0x0001 -#if defined( _UNICODE ) +#if defined(_UNICODE) #define SSDF_TCHAR SSDF_UNICODE #else #define SSDF_TCHAR 0 diff --git a/include/m_system.h b/include/m_system.h index 1b2ed6f11f..d17896a0a5 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -58,7 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //wParam=lParam=0 #define ME_SYSTEM_SHUTDOWN "Miranda/System/Shutdown" -//restarts miranda ( 0.8+ ) +//restarts miranda (0.8+) //wParam=lParam=0 #define MS_SYSTEM_RESTART "Miranda/System/Restart" @@ -157,15 +157,15 @@ struct MM_INTERFACE wchar_t* (*mir_a2u_cp) (const char* src, int codepage); wchar_t* (*mir_a2u)(const char* src); char* (*mir_u2a_cp)(const wchar_t* src, int codepage); - char* (*mir_u2a)( const wchar_t* src); + char* (*mir_u2a)(const wchar_t* src); }; #define MS_SYSTEM_GET_MMI "Miranda/System/GetMMI" -__forceinline INT_PTR mir_getMMI( struct MM_INTERFACE* dest ) +__forceinline INT_PTR mir_getMMI(struct MM_INTERFACE* dest) { dest->cbSize = sizeof(*dest); - return CallService( MS_SYSTEM_GET_MMI, 0, (LPARAM)dest ); + return CallService(MS_SYSTEM_GET_MMI, 0, (LPARAM)dest); } #ifndef _STATIC @@ -191,7 +191,7 @@ __forceinline INT_PTR mir_getMMI( struct MM_INTERFACE* dest ) WCHAR* mir_wstrdup(const WCHAR *src); #endif -#if defined( _UNICODE ) +#if defined(_UNICODE) #define mir_tstrdup mir_wstrdup #else #define mir_tstrdup mir_strdup @@ -210,7 +210,7 @@ wParam=0, lParam = (LPARAM)LIST_INTERFACE* #define LIST_INTERFACE_V2_SIZE (sizeof(size_t)+9*sizeof(void*)) #define LIST_INTERFACE_V3_SIZE (sizeof(size_t)+11*sizeof(void*)) -typedef int ( *FSortFunc )( void*, void* ); +typedef int (*FSortFunc)(void*, void*); // Assumes first 32 bit value of the data is the numeric key // and uses it to perform sort/search operations, this results @@ -235,28 +235,28 @@ struct LIST_INTERFACE { size_t cbSize; - SortedList* ( *List_Create )( int, int ); - void ( *List_Destroy )( SortedList* ); + SortedList* (*List_Create)(int, int); + void (*List_Destroy)(SortedList*); - void* ( *List_Find )( SortedList*, void* ); - int ( *List_GetIndex )( SortedList*, void*, int* ); - int ( *List_Insert )( SortedList*, void*, int ); - int ( *List_Remove )( SortedList*, int ); - int ( *List_IndexOf )( SortedList*, void* ); + void* (*List_Find)(SortedList*, void*); + int (*List_GetIndex)(SortedList*, void*, int*); + int (*List_Insert)(SortedList*, void*, int); + int (*List_Remove)(SortedList*, int); + int (*List_IndexOf)(SortedList*, void*); - int ( *List_InsertPtr)( SortedList* list, void* p ); - int ( *List_RemovePtr)( SortedList* list, void* p ); + int (*List_InsertPtr)(SortedList* list, void* p); + int (*List_RemovePtr)(SortedList* list, void* p); - void ( *List_Copy )( SortedList* src, SortedList* dst, size_t ); - void ( *List_ObjCopy )( SortedList* src, SortedList* dst, size_t ); + void (*List_Copy)(SortedList* src, SortedList* dst, size_t); + void (*List_ObjCopy)(SortedList* src, SortedList* dst, size_t); }; #define MS_SYSTEM_GET_LI "Miranda/System/GetLI" -__forceinline INT_PTR mir_getLI( struct LIST_INTERFACE* dest ) +__forceinline INT_PTR mir_getLI(struct LIST_INTERFACE* dest) { dest->cbSize = sizeof(*dest); - return CallService( MS_SYSTEM_GET_LI, 0, (LPARAM)dest ); + return CallService(MS_SYSTEM_GET_LI, 0, (LPARAM)dest); } /* @@ -276,33 +276,33 @@ struct UTF8_INTERFACE // if the second parameter is present, the additional wchar_t* string gets allocated, // and filled with the decoded utf8 content without any information loss. // this string should be freed using mir_free() - char* ( *utf8_decode )( char* str, wchar_t** ucs2 ); - char* ( *utf8_decodecp )( char* str, int codepage, wchar_t** ucs2 ); + char* (*utf8_decode)(char* str, wchar_t** ucs2); + char* (*utf8_decodecp)(char* str, int codepage, wchar_t** ucs2); // encodes an ANSI string into a utf8 format using the current langpack code page, // or CP_ACP, if lanpack is missing // the resulting string should be freed using mir_free - char* ( *utf8_encode )( const char* src ); - char* ( *utf8_encodecp )( const char* src, int codepage ); + char* (*utf8_encode)(const char* src); + char* (*utf8_encodecp)(const char* src, int codepage); // encodes an WCHAR string into a utf8 format // the resulting string should be freed using mir_free - char* ( *utf8_encodeW )( const wchar_t* src ); + char* (*utf8_encodeW)(const wchar_t* src); // decodes utf8 and returns the result as wchar_t* that should be freed using mir_free() // the input buffer remains unchanged - wchar_t* ( *utf8_decodeW )( const char* str ); + wchar_t* (*utf8_decodeW)(const char* str); // returns the predicted length of the utf-8 string - int ( *utf8_lenW )( const wchar_t* src ); + int (*utf8_lenW)(const wchar_t* src); }; #define MS_SYSTEM_GET_UTFI "Miranda/System/GetUTFI" -__forceinline INT_PTR mir_getUTFI( struct UTF8_INTERFACE* dest ) +__forceinline INT_PTR mir_getUTFI(struct UTF8_INTERFACE* dest) { dest->cbSize = sizeof(*dest); - return CallService( MS_SYSTEM_GET_UTFI, 0, (LPARAM)dest ); + return CallService(MS_SYSTEM_GET_UTFI, 0, (LPARAM)dest); } extern struct UTF8_INTERFACE utfi; @@ -322,7 +322,7 @@ __forceinline char* mir_utf8decodeA(const char* src) return tmp; } -#if defined( _UNICODE ) +#if defined(_UNICODE) #define mir_utf8decodeT mir_utf8decodeW #define mir_utf8encodeT mir_utf8encodeW #else @@ -429,9 +429,9 @@ typedef void (__cdecl *pThreadFunc)(void*); #define MS_SYSTEM_FORK_THREAD "Miranda/Thread/Fork" -__forceinline HANDLE mir_forkthread( pThreadFunc aFunc, void* arg ) +__forceinline HANDLE mir_forkthread(pThreadFunc aFunc, void* arg) { - return (HANDLE)CallService( MS_SYSTEM_FORK_THREAD, (WPARAM)aFunc, (LPARAM)arg ); + return (HANDLE)CallService(MS_SYSTEM_FORK_THREAD, (WPARAM)aFunc, (LPARAM)arg); } /* 0.5.2+ @@ -457,14 +457,14 @@ typedef struct #define MS_SYSTEM_FORK_THREAD_EX "Miranda/Thread/ForkEx" -static __inline HANDLE mir_forkthreadex( pThreadFuncEx aFunc, void* arg, int stackSize, unsigned* pThreadID ) +static __inline HANDLE mir_forkthreadex(pThreadFuncEx aFunc, void* arg, int stackSize, unsigned* pThreadID) { FORK_THREADEX_PARAMS params; params.pFunc = aFunc; params.arg = arg; params.iStackSize = stackSize; params.threadID = pThreadID; - return (HANDLE)CallService( MS_SYSTEM_FORK_THREAD_EX, 0, (LPARAM)¶ms ); + return (HANDLE)CallService(MS_SYSTEM_FORK_THREAD_EX, 0, (LPARAM)¶ms); } /* 0.8.0+ @@ -476,14 +476,14 @@ passes the owner info and extended parameters info and returns the thread id */ -static __inline HANDLE mir_forkthreadowner( pThreadFuncOwner aFunc, void* owner, void* arg, unsigned* pThreadID ) +static __inline HANDLE mir_forkthreadowner(pThreadFuncOwner aFunc, void* owner, void* arg, unsigned* pThreadID) { FORK_THREADEX_PARAMS params; - params.pFunc = ( pThreadFuncEx )aFunc; + params.pFunc = (pThreadFuncEx)aFunc; params.arg = arg; params.iStackSize = 0; params.threadID = pThreadID; - return (HANDLE)CallService( MS_SYSTEM_FORK_THREAD_EX, (WPARAM)owner, (LPARAM)¶ms ); + return (HANDLE)CallService(MS_SYSTEM_FORK_THREAD_EX, (WPARAM)owner, (LPARAM)¶ms); } @@ -608,18 +608,18 @@ obtain this filter and call it inside the __except section 0.8.0+ addition (2008/07/20) */ -typedef DWORD ( __cdecl *pfnExceptionFilter )( DWORD code, EXCEPTION_POINTERS* info ); +typedef DWORD (__cdecl *pfnExceptionFilter)(DWORD code, EXCEPTION_POINTERS* info); #define MS_SYSTEM_GETEXCEPTFILTER "System/GetExceptFilter" -__inline static pfnExceptionFilter Miranda_GetExceptFilter( void ) -{ return ( pfnExceptionFilter )CallService( MS_SYSTEM_GETEXCEPTFILTER, 0, 0 ); +__inline static pfnExceptionFilter Miranda_GetExceptFilter(void) +{ return (pfnExceptionFilter)CallService(MS_SYSTEM_GETEXCEPTFILTER, 0, 0); } #define MS_SYSTEM_SETEXCEPTFILTER "System/SetExceptFilter" -__inline static pfnExceptionFilter Miranda_SetExceptFilter( pfnExceptionFilter foo ) -{ return ( pfnExceptionFilter )CallService( MS_SYSTEM_SETEXCEPTFILTER, 0, (LPARAM)foo ); +__inline static pfnExceptionFilter Miranda_SetExceptFilter(pfnExceptionFilter foo) +{ return (pfnExceptionFilter)CallService(MS_SYSTEM_SETEXCEPTFILTER, 0, (LPARAM)foo); } diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index 3187948810..1a6cb833f2 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -25,13 +25,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_system.h" -#if defined( _UNICODE ) +#if defined(_UNICODE) #define tstring wstring #else #define tstring string #endif -#if defined( __cplusplus ) +#if defined(__cplusplus) extern LIST_INTERFACE li; #define NumericKeySortT -1 @@ -40,64 +40,64 @@ extern LIST_INTERFACE li; template struct LIST { - typedef int ( *FTSortFunc )( const T* p1, const T* p2 ); + typedef int (*FTSortFunc)(const T* p1, const T* p2); - __inline LIST( int aincr, FTSortFunc afunc = NULL ) - { memset( this, 0, sizeof( *this )); + __inline LIST(int aincr, FTSortFunc afunc = NULL) + { memset(this, 0, sizeof(*this)); increment = aincr; sortFunc = afunc; } - __inline LIST( int aincr, INT_PTR id ) - { memset( this, 0, sizeof( *this )); + __inline LIST(int aincr, INT_PTR id) + { memset(this, 0, sizeof(*this)); increment = aincr; - sortFunc = FTSortFunc( id ); + sortFunc = FTSortFunc(id); } - __inline T* operator[]( int idx ) const { return ( idx >= 0 && idx < count ) ? items[idx] : NULL; } - __inline int getCount( void ) const { return count; } - __inline T** getArray( void ) const { return items; } + __inline T* operator[](int idx) const { return (idx >= 0 && idx < count) ? items[idx] : NULL; } + __inline int getCount(void) const { return count; } + __inline T** getArray(void) const { return items; } - #if defined( _STATIC ) - __inline LIST( const LIST& x ) + #if defined(_STATIC) + __inline LIST(const LIST& x) { items = NULL; - List_Copy(( SortedList* )&x, ( SortedList* )this, sizeof( T )); + List_Copy((SortedList*)&x, (SortedList*)this, sizeof(T)); } - __inline int getIndex( T* p ) const + __inline int getIndex(T* p) const { int idx; - return ( !List_GetIndex(( SortedList* )this, p, &idx )) ? -1 : idx; + return ( !List_GetIndex((SortedList*)this, p, &idx)) ? -1 : idx; } - __inline void destroy( void ) { List_Destroy(( SortedList* )this ); } + __inline void destroy(void) { List_Destroy((SortedList*)this); } - __inline T* find( T* p ) { return ( T* )List_Find(( SortedList* )this, p ); } - __inline int indexOf( T* p ) { return List_IndexOf(( SortedList* )this, p ); } - __inline int insert( T* p, int idx ) { return List_Insert(( SortedList* )this, p, idx ); } - __inline int remove( int idx ) { return List_Remove(( SortedList* )this, idx ); } + __inline T* find(T* p) { return (T*)List_Find((SortedList*)this, p); } + __inline int indexOf(T* p) { return List_IndexOf((SortedList*)this, p); } + __inline int insert(T* p, int idx) { return List_Insert((SortedList*)this, p, idx); } + __inline int remove(int idx) { return List_Remove((SortedList*)this, idx); } - __inline int insert( T* p ) { return List_InsertPtr(( SortedList* )this, p ); } - __inline int remove( T* p ) { return List_RemovePtr(( SortedList* )this, p ); } + __inline int insert(T* p) { return List_InsertPtr((SortedList*)this, p); } + __inline int remove(T* p) { return List_RemovePtr((SortedList*)this, p); } #else - __inline LIST( const LIST& x ) + __inline LIST(const LIST& x) { items = NULL; - li.List_Copy(( SortedList* )&x, ( SortedList* )this, sizeof( T )); + li.List_Copy((SortedList*)&x, (SortedList*)this, sizeof(T)); } - __inline int getIndex( T* p ) const + __inline int getIndex(T* p) const { int idx; - return ( !li.List_GetIndex(( SortedList* )this, p, &idx )) ? -1 : idx; + return ( !li.List_GetIndex((SortedList*)this, p, &idx)) ? -1 : idx; } - __inline void destroy( void ) { li.List_Destroy(( SortedList* )this ); } + __inline void destroy(void) { li.List_Destroy((SortedList*)this); } - __inline T* find( T* p ) { return ( T* )li.List_Find(( SortedList* )this, p ); } - __inline int indexOf( T* p ) { return li.List_IndexOf(( SortedList* )this, p ); } - __inline int insert( T* p, int idx ) { return li.List_Insert(( SortedList* )this, p, idx ); } - __inline int remove( int idx ) { return li.List_Remove(( SortedList* )this, idx ); } + __inline T* find(T* p) { return (T*)li.List_Find((SortedList*)this, p); } + __inline int indexOf(T* p) { return li.List_IndexOf((SortedList*)this, p); } + __inline int insert(T* p, int idx) { return li.List_Insert((SortedList*)this, p, idx); } + __inline int remove(int idx) { return li.List_Remove((SortedList*)this, idx); } - __inline int insert( T* p ) { return li.List_InsertPtr(( SortedList* )this, p ); } - __inline int remove( T* p ) { return li.List_RemovePtr(( SortedList* )this, p ); } + __inline int insert(T* p) { return li.List_InsertPtr((SortedList*)this, p); } + __inline int remove(T* p) { return li.List_RemovePtr((SortedList*)this, p); } #endif protected: @@ -108,71 +108,71 @@ protected: template struct OBJLIST : public LIST { - typedef int ( *FTSortFunc )( const T* p1, const T* p2 ); + typedef int (*FTSortFunc)(const T* p1, const T* p2); - __inline OBJLIST( int aincr, FTSortFunc afunc = NULL ) : - LIST( aincr, afunc ) + __inline OBJLIST(int aincr, FTSortFunc afunc = NULL) : + LIST(aincr, afunc) {} - __inline OBJLIST( int aincr, INT_PTR id ) : - LIST( aincr, ( FTSortFunc ) id ) + __inline OBJLIST(int aincr, INT_PTR id) : + LIST(aincr, (FTSortFunc) id) {} - __inline OBJLIST( const OBJLIST& x ) : - LIST( x.increment, x.sortFunc ) + __inline OBJLIST(const OBJLIST& x) : + LIST(x.increment, x.sortFunc) { items = NULL; - #if defined( _STATIC ) - List_ObjCopy(( SortedList* )&x, ( SortedList* )this, sizeof( T )); + #if defined(_STATIC) + List_ObjCopy((SortedList*)&x, (SortedList*)this, sizeof(T)); #else - li.List_ObjCopy(( SortedList* )&x, ( SortedList* )this, sizeof( T )); + li.List_ObjCopy((SortedList*)&x, (SortedList*)this, sizeof(T)); #endif } - __inline OBJLIST& operator=( const OBJLIST& x ) + __inline OBJLIST& operator=(const OBJLIST& x) { destroy(); - #if defined( _STATIC ) - List_ObjCopy(( SortedList* )&x, ( SortedList* )this, sizeof( T )); + #if defined(_STATIC) + List_ObjCopy((SortedList*)&x, (SortedList*)this, sizeof(T)); #else - li.List_ObjCopy(( SortedList* )&x, ( SortedList* )this, sizeof( T )); + li.List_ObjCopy((SortedList*)&x, (SortedList*)this, sizeof(T)); #endif return *this; } ~OBJLIST() { - #if !defined( _STATIC ) + #if !defined(_STATIC) if (li.cbSize != 0) #endif destroy(); } - __inline void destroy( void ) + __inline void destroy(void) { - for ( int i=0; i < this->count; i++ ) + for (int i=0; i < this->count; i++) delete this->items[i]; - #if defined( _STATIC ) - List_Destroy(( SortedList* )this ); + #if defined(_STATIC) + List_Destroy((SortedList*)this); #else - li.List_Destroy(( SortedList* )this ); + li.List_Destroy((SortedList*)this); #endif } - __inline int remove( int idx ) { + __inline int remove(int idx) { delete this->items[idx]; - #if defined( _STATIC ) - return List_Remove(( SortedList* )this, idx ); + #if defined(_STATIC) + return List_Remove((SortedList*)this, idx); #else - return li.List_Remove(( SortedList* )this, idx ); + return li.List_Remove((SortedList*)this, idx); #endif } - __inline int remove( T* p ) + __inline int remove(T* p) { - #if defined( _STATIC ) - if ( li.List_RemovePtr(( SortedList* )this, p ) != -1 ) + #if defined(_STATIC) + if (li.List_RemovePtr((SortedList*)this, p) != -1) #else - if ( li.List_RemovePtr(( SortedList* )this, p ) != -1 ) + if (li.List_RemovePtr((SortedList*)this, p) != -1) #endif { delete p; @@ -181,7 +181,7 @@ template struct OBJLIST : public LIST return 0; } - __inline T& operator[]( int idx ) const { return *this->items[idx]; } + __inline T& operator[](int idx) const { return *this->items[idx]; } }; #endif diff --git a/include/m_timezones.h b/include/m_timezones.h index 335cce00f2..39681cef1c 100644 --- a/include/m_timezones.h +++ b/include/m_timezones.h @@ -37,22 +37,22 @@ typedef struct { size_t cbSize; - HANDLE ( *createByName )( LPCTSTR tszName, DWORD dwFlags ); - HANDLE ( *createByContact )( HANDLE hContact, DWORD dwFlags ); - void ( *storeByContact )( HANDLE hContact, HANDLE hTZ ); + HANDLE (*createByName)(LPCTSTR tszName, DWORD dwFlags); + HANDLE (*createByContact)(HANDLE hContact, DWORD dwFlags); + void (*storeByContact)(HANDLE hContact, HANDLE hTZ); - int ( *printDateTime )( HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags ); - int ( *printTimeStamp )( HANDLE hTZ, time_t ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags ); + int (*printDateTime)(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags); + int (*printTimeStamp)(HANDLE hTZ, time_t ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags); - int ( *prepareList )( HANDLE hContact, HWND hWnd, DWORD dwFlags ); - int ( *selectListItem )( HANDLE hContact, HWND hWnd, DWORD dwFlags ); - void ( *storeListResults )( HANDLE hContact, HWND hWnd, DWORD dwFlags ); + int (*prepareList)(HANDLE hContact, HWND hWnd, DWORD dwFlags); + int (*selectListItem)(HANDLE hContact, HWND hWnd, DWORD dwFlags); + void (*storeListResults)(HANDLE hContact, HWND hWnd, DWORD dwFlags); - int ( *getTimeZoneTime )( HANDLE hTZ, SYSTEMTIME *st ); - time_t ( *timeStampToTimeZoneTimeStamp )( HANDLE hTZ, time_t ts ); + int (*getTimeZoneTime)(HANDLE hTZ, SYSTEMTIME *st); + time_t (*timeStampToTimeZoneTimeStamp)(HANDLE hTZ, time_t ts); - LPTIME_ZONE_INFORMATION ( *getTzi )( HANDLE hTZ ); - LPCTSTR ( *getTzName )( HANDLE hTZ ); + LPTIME_ZONE_INFORMATION (*getTzi)(HANDLE hTZ); + LPCTSTR (*getTzName)(HANDLE hTZ); #ifdef __cplusplus int printDateTimeByContact (HANDLE hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags) diff --git a/include/m_userinfo.h b/include/m_userinfo.h index bb11722b1c..0456fb70e8 100644 --- a/include/m_userinfo.h +++ b/include/m_userinfo.h @@ -70,7 +70,12 @@ All PSN_ WM_NOTIFY messages have PSHNOTIFY.lParam=(LPARAM)hContact #define PSN_INFOCHANGED 1 #define PSN_PARAMCHANGED 2 #define PSM_FORCECHANGED (WM_USER+100) //force-send a PSN_INFOCHANGED to all pages -#define MS_USERINFO_ADDPAGE "UserInfo/AddPage" -#endif // M_USERINFO_H__ +extern int hLangpack; + +__inline static INT_PTR UserInfo_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE* odp) +{ odp->hLangpack = hLangpack; + return CallService("UserInfo/AddPage", wParam, (LPARAM)odp); +} +#endif // M_USERINFO_H__ diff --git a/include/m_utils.h b/include/m_utils.h index 4d5ee302a7..34d82594e8 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -448,10 +448,10 @@ struct MD5_INTERFACE #define MS_SYSTEM_GET_MD5I "Miranda/System/GetMD5I" -static __inline INT_PTR mir_getMD5I( struct MD5_INTERFACE* dest ) +static __inline INT_PTR mir_getMD5I(struct MD5_INTERFACE* dest) { dest->cbSize = sizeof(*dest); - return CallService( MS_SYSTEM_GET_MD5I, 0, (LPARAM)dest ); + return CallService(MS_SYSTEM_GET_MD5I, 0, (LPARAM)dest); } extern struct MD5_INTERFACE md5i; @@ -488,10 +488,10 @@ struct SHA1_INTERFACE #define MS_SYSTEM_GET_SHA1I "Miranda/System/GetSHA1I" -static __inline INT_PTR mir_getSHA1I( struct SHA1_INTERFACE* dest ) +static __inline INT_PTR mir_getSHA1I(struct SHA1_INTERFACE* dest) { dest->cbSize = sizeof(*dest); - return CallService( MS_SYSTEM_GET_SHA1I, 0, (LPARAM)dest ); + return CallService(MS_SYSTEM_GET_SHA1I, 0, (LPARAM)dest); } extern struct SHA1_INTERFACE sha1i; @@ -502,7 +502,7 @@ extern struct SHA1_INTERFACE sha1i; #define mir_sha1_hash(A,B,C) sha1i.sha1_hash(A,B,C) // allows to include TCHAR* strings into mir_snprintf and NetLib_Logf calls -#if defined( _UNICODE ) +#if defined(_UNICODE) #define TCHAR_STR_PARAM "%S" #else #define TCHAR_STR_PARAM "%s" @@ -530,14 +530,14 @@ extern struct SHA1_INTERFACE sha1i; #define mir_u2t_cp(s,c) mir_u2a_cp(s,c) #endif -#if defined( __cplusplus ) +#if defined(__cplusplus) #ifdef _STATIC - void mir_free( void* ); + void mir_free(void*); WCHAR* mir_a2u_cp(const char* src, int codepage); WCHAR* mir_a2u(const char* src); char* mir_u2a_cp(const wchar_t* src, int codepage); - char* mir_u2a( const wchar_t* src); + char* mir_u2a(const wchar_t* src); #endif class _A2T @@ -545,8 +545,8 @@ class _A2T TCHAR* buf; public: - __forceinline _A2T( const char* s ) : buf( mir_a2t( s )) {} - __forceinline _A2T( const char* s, int cp ) : buf( mir_a2t_cp( s, cp )) {} + __forceinline _A2T(const char* s) : buf(mir_a2t(s)) {} + __forceinline _A2T(const char* s, int cp) : buf(mir_a2t_cp(s, cp)) {} ~_A2T() { mir_free(buf); } __forceinline operator TCHAR*() const @@ -559,8 +559,8 @@ class _T2A char* buf; public: - __forceinline _T2A( const TCHAR* s ) : buf( mir_t2a( s )) {} - __forceinline _T2A( const TCHAR* s, int cp ) : buf( mir_t2a_cp( s, cp )) {} + __forceinline _T2A(const TCHAR* s) : buf(mir_t2a(s)) {} + __forceinline _T2A(const TCHAR* s, int cp) : buf(mir_t2a_cp(s, cp)) {} __forceinline ~_T2A() { mir_free(buf); } __forceinline operator char*() const diff --git a/include/m_xml.h b/include/m_xml.h index 0ad119d326..fe6932a41c 100644 --- a/include/m_xml.h +++ b/include/m_xml.h @@ -43,55 +43,55 @@ typedef struct { size_t cbSize; - HXML ( *createNode )( LPCTSTR name, LPCTSTR text, char isDeclaration ); - void ( *destroyNode )( HXML node ); - - HXML ( *parseString )( LPCTSTR string, int* datalen, LPCTSTR tag ); - LPTSTR ( *toString )( HXML node, int* datalen ); - - HXML ( *addChild )( HXML parent, LPCTSTR name, LPCTSTR text ); - void ( *addChild2 )( HXML child, HXML parent ); - HXML ( *copyNode )( HXML parent ); - HXML ( *getChild )( HXML parent, int number ); - int ( *getChildCount )( HXML ); - HXML ( *getChildByAttrValue )( HXML parent, LPCTSTR name, LPCTSTR attrName, LPCTSTR attrValue ); - HXML ( *getFirstChild )( HXML parent ); - HXML ( *getNthChild )( HXML parent, LPCTSTR name, int i ); - HXML ( *getNextChild )( HXML parent, LPCTSTR name, int *i ); - HXML ( *getChildByPath )( HXML parent, LPCTSTR path, char createNodeIfMissing ); - HXML ( *getNextNode )( HXML node ); - LPCTSTR ( *getName )( HXML ); - HXML ( *getParent )( HXML ); - LPCTSTR ( *getText )( HXML ); // = getTextByIndex(HXML, 0) - void ( *setText )( HXML, LPCTSTR ); // = setTextByIndex(HXML, LPCTSTR, 0) - - LPCTSTR ( *getAttr )( HXML, int i ); - LPCTSTR ( *getAttrName )( HXML, int i ); - LPCTSTR ( *getAttrValue )( HXML, LPCTSTR attrName ); - int ( *getAttrCount )( HXML ); - void ( *addAttr )( HXML, LPCTSTR attrName, LPCTSTR attrValue ); - void ( *addAttrInt )( HXML, LPCTSTR attrName, int attrValue ); - - void ( *freeMem )( void* ); + HXML (*createNode)(LPCTSTR name, LPCTSTR text, char isDeclaration); + void (*destroyNode)(HXML node); + + HXML (*parseString)(LPCTSTR string, int* datalen, LPCTSTR tag); + LPTSTR (*toString)(HXML node, int* datalen); + + HXML (*addChild)(HXML parent, LPCTSTR name, LPCTSTR text); + void (*addChild2)(HXML child, HXML parent); + HXML (*copyNode)(HXML parent); + HXML (*getChild)(HXML parent, int number); + int (*getChildCount)(HXML); + HXML (*getChildByAttrValue)(HXML parent, LPCTSTR name, LPCTSTR attrName, LPCTSTR attrValue); + HXML (*getFirstChild)(HXML parent); + HXML (*getNthChild)(HXML parent, LPCTSTR name, int i); + HXML (*getNextChild)(HXML parent, LPCTSTR name, int *i); + HXML (*getChildByPath)(HXML parent, LPCTSTR path, char createNodeIfMissing); + HXML (*getNextNode)(HXML node); + LPCTSTR (*getName)(HXML); + HXML (*getParent)(HXML); + LPCTSTR (*getText)(HXML); // = getTextByIndex(HXML, 0) + void (*setText)(HXML, LPCTSTR); // = setTextByIndex(HXML, LPCTSTR, 0) + + LPCTSTR (*getAttr)(HXML, int i); + LPCTSTR (*getAttrName)(HXML, int i); + LPCTSTR (*getAttrValue)(HXML, LPCTSTR attrName); + int (*getAttrCount)(HXML); + void (*addAttr)(HXML, LPCTSTR attrName, LPCTSTR attrValue); + void (*addAttrInt)(HXML, LPCTSTR attrName, int attrValue); + + void (*freeMem)(void*); // methods added in XML API v2 - char ( *isDeclaration )( HXML ); - LPTSTR ( *toStringWithFormatting )( HXML node, int* datalen ); - HXML ( *deepCopy )( HXML ); - void ( *setAttrByIndex )( HXML, int i, LPCTSTR value ); - void ( *setAttrByName )( HXML, LPCTSTR name, LPCTSTR value ); - HXML ( *addChildEx )( HXML parent, LPCTSTR name, char isDeclaration, XML_ELEMENT_POS n ); - void ( *addChildEx2 )( HXML child, HXML parent, XML_ELEMENT_POS n ); - int ( *getTextCount )( HXML ); - LPCTSTR ( *getTextByIndex )( HXML, int i ); - void ( *addText )( HXML, LPCTSTR, XML_ELEMENT_POS n ); - void ( *setTextByIndex )( HXML, int i, LPCTSTR ); - int ( *getClearCount )( HXML ); - LPCTSTR ( *getClear )( HXML, int i, LPCTSTR *openTag, LPCTSTR *closeTag ); - void ( *addClear )( HXML, LPCTSTR lpszValue, LPCTSTR openTag, LPCTSTR closeTag, XML_ELEMENT_POS n ); - void ( *setClear )( HXML, int i, LPCTSTR lpszValue ); - int ( *getElementCount )( HXML ); - int ( *getElement )( HXML, XML_ELEMENT_POS n, XML_ELEMENT_TYPE *type, HXML *child, LPCTSTR *value, LPCTSTR *name, LPCTSTR *openTag, LPCTSTR *closeTag ); + char (*isDeclaration)(HXML); + LPTSTR (*toStringWithFormatting)(HXML node, int* datalen); + HXML (*deepCopy)(HXML); + void (*setAttrByIndex)(HXML, int i, LPCTSTR value); + void (*setAttrByName)(HXML, LPCTSTR name, LPCTSTR value); + HXML (*addChildEx)(HXML parent, LPCTSTR name, char isDeclaration, XML_ELEMENT_POS n); + void (*addChildEx2)(HXML child, HXML parent, XML_ELEMENT_POS n); + int (*getTextCount)(HXML); + LPCTSTR (*getTextByIndex)(HXML, int i); + void (*addText)(HXML, LPCTSTR, XML_ELEMENT_POS n); + void (*setTextByIndex)(HXML, int i, LPCTSTR); + int (*getClearCount)(HXML); + LPCTSTR (*getClear)(HXML, int i, LPCTSTR *openTag, LPCTSTR *closeTag); + void (*addClear)(HXML, LPCTSTR lpszValue, LPCTSTR openTag, LPCTSTR closeTag, XML_ELEMENT_POS n); + void (*setClear)(HXML, int i, LPCTSTR lpszValue); + int (*getElementCount)(HXML); + int (*getElement)(HXML, XML_ELEMENT_POS n, XML_ELEMENT_TYPE *type, HXML *child, LPCTSTR *value, LPCTSTR *name, LPCTSTR *openTag, LPCTSTR *closeTag); // With getElement() it's possible to enumerate all the different contents (attribute, child, text, clear) of the current node. The order is reflecting the order of the original file/string. NOTE: 0 <= i < getElementCount(). // type, child, value, name, openTag, closeTag will be filled on return, depending on type: // for XML_ELEM_TYPE_CHILD, child is valid; @@ -99,17 +99,17 @@ typedef struct // for XML_ELEM_TYPE_TEXT, value is valid; // for XML_ELEM_TYPE_CLEAR, value, openTag and closeTag are valid. - void ( *deleteNodeContent )( HXML ); // forces the deletion of the content of this node and the subtree - void ( *deleteAttrByIndex )( HXML, int i ); - void ( *deleteAttrByName )( HXML, LPCTSTR name ); - void ( *deleteText )( HXML, int i ); - void ( *deleteClear )( HXML, int i ); - - XML_ELEMENT_POS ( *positionOfChildByIndex )( HXML, int i ); - XML_ELEMENT_POS ( *positionOfChildByNode )( HXML, HXML ); - XML_ELEMENT_POS ( *positionOfChildByName )( HXML, LPCTSTR name, int i ); - XML_ELEMENT_POS ( *positionOfText )( HXML, int i ); - XML_ELEMENT_POS ( *positionOfClear )( HXML, int i ); + void (*deleteNodeContent)(HXML); // forces the deletion of the content of this node and the subtree + void (*deleteAttrByIndex)(HXML, int i); + void (*deleteAttrByName)(HXML, LPCTSTR name); + void (*deleteText)(HXML, int i); + void (*deleteClear)(HXML, int i); + + XML_ELEMENT_POS (*positionOfChildByIndex)(HXML, int i); + XML_ELEMENT_POS (*positionOfChildByNode)(HXML, HXML); + XML_ELEMENT_POS (*positionOfChildByName)(HXML, LPCTSTR name, int i); + XML_ELEMENT_POS (*positionOfText)(HXML, int i); + XML_ELEMENT_POS (*positionOfClear)(HXML, int i); } XML_API; @@ -129,10 +129,10 @@ returns TRUE if all is Ok, and FALSE otherwise #define MS_SYSTEM_GET_XI "Miranda/System/GetXmlApi" -__forceinline int mir_getXI( XML_API* dest ) +__forceinline int mir_getXI(XML_API* dest) { dest->cbSize = sizeof(*dest); - return CallService( MS_SYSTEM_GET_XI, 0, (LPARAM)dest ); + return CallService(MS_SYSTEM_GET_XI, 0, (LPARAM)dest); } #endif // M_XML_H__ diff --git a/include/newpluginapi.h b/include/newpluginapi.h index a8a5c619c7..0f2a6aa8d7 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -29,30 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PLUGIN_MAKE_VERSION(a, b, c, d) (((((DWORD)(a))&0xFF)<<24)|((((DWORD)(b))&0xFF)<<16)|((((DWORD)(c))&0xFF)<<8)|(((DWORD)(d))&0xFF)) #define MAXMODULELABELLENGTH 64 -#if defined( _UNICODE ) +#if defined(_UNICODE) #define UNICODE_AWARE 1 #else #define UNICODE_AWARE 0 #endif -typedef struct { - int cbSize; - char *shortName; - DWORD version; - char *description; // [TRANSLATED-BY-CORE] - char *author; - char *authorEmail; - char *copyright; - char *homepage; - BYTE flags; // right now the only flag, UNICODE_AWARE, is recognized here - int replacesDefaultModule; //one of the DEFMOD_ constants in m_plugins.h or zero - //if non-zero, this will supress the loading of the specified built-in module - //with the implication that this plugin provides back-end-compatible features -} PLUGININFO; - -/* 0.7+ - New plugin loader implementation -*/ /* The UUID structure below is used to for plugin UUID's and module type definitions */ typedef struct _MUUID { unsigned long a; @@ -67,30 +49,30 @@ typedef struct _MUUID { /* Replaceable internal modules interface ids */ #define MIID_HISTORY {0x5ca0cbc1, 0x999a, 0x4ea2, {0x8b, 0x44, 0xf8, 0xf6, 0x7d, 0x7f, 0x8e, 0xbe}} -#define MIID_UIFINDADD {0xb22c528d, 0x6852, 0x48eb, {0xa2, 0x94, 0xe, 0x26, 0xa9, 0x16, 0x12, 0x13}} +#define MIID_UIFINDADD {0xb22c528d, 0x6852, 0x48eb, {0xa2, 0x94, 0x0e, 0x26, 0xa9, 0x16, 0x12, 0x13}} #define MIID_UIUSERINFO {0x570b931c, 0x9af8, 0x48f1, {0xad, 0x9f, 0xc4, 0x49, 0x8c, 0x61, 0x8a, 0x77}} #define MIID_SRURL {0x5192445c, 0xf5e8, 0x46c0, {0x8f, 0x9e, 0x2b, 0x6d, 0x43, 0xe5, 0xc7, 0x53}} #define MIID_SRAUTH {0x377780b9, 0x2b3b, 0x405b, {0x9f, 0x36, 0xb3, 0xc4, 0x87, 0x8e, 0x6f, 0x33}} -#define MIID_SRAWAY {0x5ab54c76, 0x1b4c, 0x4a00, {0xb4, 0x4, 0x48, 0xcb, 0xea, 0x5f, 0xef, 0xe7}} -#define MIID_SREMAIL {0xd005b5a6, 0x1b66, 0x445a, {0xb6, 0x3, 0x74, 0xd4, 0xd4, 0x55, 0x2d, 0xe2}} +#define MIID_SRAWAY {0x5ab54c76, 0x1b4c, 0x4a00, {0xb4, 0x04, 0x48, 0xcb, 0xea, 0x5f, 0xef, 0xe7}} +#define MIID_SREMAIL {0xd005b5a6, 0x1b66, 0x445a, {0xb6, 0x03, 0x74, 0xd4, 0xd4, 0x55, 0x2d, 0xe2}} #define MIID_SRFILE {0x989d104d, 0xacb7, 0x4ee0, {0xb9, 0x6d, 0x67, 0xce, 0x46, 0x53, 0xb6, 0x95}} -#define MIID_UIHELP {0xf2d35c3c, 0x861a, 0x4cc3, {0xa7, 0x8f, 0xd1, 0xf7, 0x85, 0x4, 0x41, 0xcb}} +#define MIID_UIHELP {0xf2d35c3c, 0x861a, 0x4cc3, {0xa7, 0x8f, 0xd1, 0xf7, 0x85, 0x04, 0x41, 0xcb}} #define MIID_UIHISTORY {0x7f7e3d98, 0xce1f, 0x4962, {0x82, 0x84, 0x96, 0x85, 0x50, 0xf1, 0xd3, 0xd9}} #define MIID_AUTOAWAY {0x9c87f7dc, 0x3bd7, 0x4983, {0xb7, 0xfb, 0xb8, 0x48, 0xfd, 0xbc, 0x91, 0xf0}} #define MIID_USERONLINE {0x130829e0, 0x2463, 0x4ff8, {0xbb, 0xc8, 0xce, 0x73, 0xc0, 0x18, 0x84, 0x42}} -#define MIID_IDLE {0x296f9f3b, 0x5b6f, 0x40e5, {0x8f, 0xb0, 0xa6, 0x49, 0x6c, 0x18, 0xbf, 0xa}} +#define MIID_IDLE {0x296f9f3b, 0x5b6f, 0x40e5, {0x8f, 0xb0, 0xa6, 0x49, 0x6c, 0x18, 0xbf, 0x0a}} #define MIID_FONTSERVICE {0x56f39112, 0xe37f, 0x4234, {0xa9, 0xe6, 0x7a, 0x81, 0x17, 0x45, 0xc1, 0x75}} -#define MIID_UPDATENOTIFY {0x4e68b12a, 0x6b54, 0x44de, {0x86, 0x37, 0xf1, 0x12, 0xd, 0xb6, 0x81, 0x40}} +#define MIID_UPDATENOTIFY {0x4e68b12a, 0x6b54, 0x44de, {0x86, 0x37, 0xf1, 0x12, 0x0d, 0xb6, 0x81, 0x40}} #define MIID_CRYPTO {0x415ca6e1, 0x895f, 0x40e6, {0x87, 0xbd, 0x9b, 0x39, 0x60, 0x16, 0xd0, 0xe5}} /* Common plugin interfaces (core plugins) */ -#define MIID_DATABASE {0xae77fd33, 0xe484, 0x4dc7, {0x8c, 0xbc, 0x9, 0x9f, 0xed, 0xcc, 0xcf, 0xdd}} -#define MIID_CLIST {0x9d8da8bf, 0x665b, 0x4908, {0x9e, 0x61, 0x9f, 0x75, 0x98, 0xae, 0x33, 0xe}} +#define MIID_DATABASE {0xae77fd33, 0xe484, 0x4dc7, {0x8c, 0xbc, 0x09, 0x9f, 0xed, 0xcc, 0xcf, 0xdd}} +#define MIID_CLIST {0x9d8da8bf, 0x665b, 0x4908, {0x9e, 0x61, 0x9f, 0x75, 0x98, 0xae, 0x33, 0x0e}} #define MIID_CHAT {0x23576a43, 0x3a26, 0x4357, {0x9b, 0x1b, 0x4a, 0x71, 0x9e, 0x42, 0x5d, 0x48}} #define MIID_SRMM {0x58c7eea6, 0xf9db, 0x4dd9, {0x80, 0x36, 0xae, 0x80, 0x2b, 0xc0, 0x41, 0x4c}} -#define MIID_IMPORT {0x5f3bcad4, 0x75f8, 0x476e, {0xb3, 0x6b, 0x2b, 0x30, 0x70, 0x32, 0x49, 0xc}} +#define MIID_IMPORT {0x5f3bcad4, 0x75f8, 0x476e, {0xb3, 0x6b, 0x2b, 0x30, 0x70, 0x32, 0x49, 0x0c}} #define MIID_IMGSERVICES {0xf3974915, 0xc9d5, 0x4c87, {0x85, 0x64, 0xa0, 0xeb, 0xf9, 0xd2, 0x5a, 0xa0}} -#define MIID_TESTPLUGIN {0x53b974f4, 0x3c74, 0x4dba, {0x8f, 0xc2, 0x6f, 0x92, 0xfe, 0x1, 0x3b, 0x8c}} +#define MIID_TESTPLUGIN {0x53b974f4, 0x3c74, 0x4dba, {0x8f, 0xc2, 0x6f, 0x92, 0xfe, 0x01, 0x3b, 0x8c}} /* Common plugin interfaces (non-core plugins) */ #define MIID_VERSIONINFO {0xcfeb6325, 0x334e, 0x4052, {0xa6, 0x45, 0x56, 0x21, 0x93, 0xdf, 0xcc, 0x77}} @@ -101,12 +83,12 @@ typedef struct _MUUID { #define MIID_MIRPY {0xcff91a5c, 0x1786, 0x41c1, {0x88, 0x86, 0x09, 0x4b, 0x14, 0x28, 0x1f, 0x15}} #define MIID_SERVICESLIST {0xcf4bdf02, 0x5d27, 0x4241, {0x99, 0xe5, 0x19, 0x51, 0xaa, 0xb0, 0xc4, 0x54}} #define MIID_TRANSLATOR {0xcfb637b0, 0x7217, 0x4c1e, {0xb2, 0x2a, 0xd9, 0x22, 0x32, 0x3a, 0x5d, 0x0b}} -#define MIID_TOOLTIPS {0xbcbda043, 0x2716, 0x4404, {0xb0, 0xfa, 0x3d, 0x2d, 0x93, 0x81, 0x9e, 0x3}} -#define MIID_POPUPS {0x33299069, 0x1919, 0x4ff8, {0xb1, 0x31, 0x1d, 0x7, 0x21, 0x78, 0xa7, 0x66}} -#define MIID_LOGWINDOW {0xc53afb90, 0xfa44, 0x4304, {0xbc, 0x9d, 0x6a, 0x84, 0x1c, 0x39, 0x05, 0xf5}} +#define MIID_TOOLTIPS {0xbcbda043, 0x2716, 0x4404, {0xb0, 0xfa, 0x3d, 0x2d, 0x93, 0x81, 0x9e, 0x03}} +#define MIID_POPUPS {0x33299069, 0x1919, 0x4ff8, {0xb1, 0x31, 0x1d, 0x07, 0x21, 0x78, 0xa7, 0x66}} +#define MIID_LOGWINDOW {0xc53afb90, 0xfa44, 0x4304, {0xbc, 0x9d, 0x6a, 0x84, 0x1c, 0x39, 0x05, 0xf5}} #define MIID_EVENTNOTIFY {0xF3D7EC5A, 0xF7EF, 0x45DD, {0x8C, 0xA5, 0xB0, 0xF6, 0xBA, 0x18, 0x64, 0x7B}} #define MIID_SRCONTACTS {0x7CA6050E, 0xBAF7, 0x42D2, {0xB9, 0x36, 0x0D, 0xB9, 0xDF, 0x57, 0x2B, 0x95}} -#define MIID_HISTORYEXPORT {0x18fa2ade, 0xe31b, 0x4b5d, {0x95, 0x3d, 0xa, 0xb2, 0x57, 0x81, 0xc6, 0x4}} +#define MIID_HISTORYEXPORT {0x18fa2ade, 0xe31b, 0x4b5d, {0x95, 0x3d, 0x0a, 0xb2, 0x57, 0x81, 0xc6, 0x04}} /* Special exception interface for protocols. This interface allows more than one plugin to implement it at the same time @@ -184,10 +166,10 @@ typedef struct tagPLUGINLINK { int (*SetHookDefaultForHookableEvent) (HANDLE, MIRANDAHOOK); // v0.3.4 (2004/09/15) HANDLE (*CreateServiceFunctionParam)(const char *, MIRANDASERVICEPARAM, LPARAM); // v0.7+ (2007/04/24) int (*NotifyEventHooksDirect)(HANDLE, WPARAM, LPARAM); // v0.7+ - INT_PTR (*CallProtoService)(const char *, const char *, WPARAM, LPARAM ); - INT_PTR (*CallContactService)( HANDLE, const char *, WPARAM, LPARAM ); + INT_PTR (*CallProtoService)(const char *, const char *, WPARAM, LPARAM); + INT_PTR (*CallContactService)(HANDLE, const char *, WPARAM, LPARAM); HANDLE (*HookEventParam)(const char *, MIRANDAHOOKPARAM, LPARAM); - HANDLE (*HookEventObj)(const char *, MIRANDAHOOKOBJ, void* ); + HANDLE (*HookEventObj)(const char *, MIRANDAHOOKOBJ, void*); HANDLE (*HookEventObjParam)(const char *, MIRANDAHOOKOBJPARAM, void*, LPARAM); HANDLE (*CreateServiceFunctionObj)(const char *, MIRANDASERVICEOBJ, void*); HANDLE (*CreateServiceFunctionObjParam)(const char *, MIRANDASERVICEOBJPARAM, void*, LPARAM); @@ -247,7 +229,7 @@ typedef struct { /* returns what the driver can do given the flag */ - int (*getCapability) ( int flag ); + int (*getCapability) (int flag); /* buf: pointer to a string buffer @@ -257,7 +239,7 @@ typedef struct { e.g. "Database driver for 3.xx profiles" Returns: 0 on success, non zero on failure */ - int (*getFriendlyName) ( char * buf, size_t cch, int shortName ); + int (*getFriendlyName) (char * buf, size_t cch, int shortName); /* profile: pointer to a string which contains full path + name @@ -267,7 +249,7 @@ typedef struct { Note: Do not initialise internal data structures at this point! Returns: 0 on success, non zero on failure - error contains extended error information, see EMKPRF_* */ - int (*makeDatabase) ( char * profile, int * error ); + int (*makeDatabase) (char * profile, int * error); /* profile: [in] a null terminated string to file path of selected profile @@ -279,21 +261,21 @@ typedef struct { etc. Returns: 0 on success, non zero on failure */ - int (*grokHeader) ( char * profile, int * error ); + int (*grokHeader) (char * profile, int * error); /* Affect: Tell the database to create all services/hooks that a 3.xx legecy database might support into link, which is a PLUGINLINK structure Returns: 0 on success, nonzero on failure */ - int (*Load) ( char * profile, void * link ); + int (*Load) (char * profile, void * link); /* Affect: The database plugin should shutdown, unloading things from the core and freeing internal structures Returns: 0 on success, nonzero on failure Note: Unload() might be called even if Load() was never called, wasLoaded is set to 1 if Load() was ever called. */ - int (*Unload) ( int wasLoaded ); + int (*Unload) (int wasLoaded); } DATABASELINK; diff --git a/include/win2k.h b/include/win2k.h index d71504dc2b..9ff57530b0 100644 --- a/include/win2k.h +++ b/include/win2k.h @@ -107,7 +107,7 @@ File created by Christian K RECT rcClip; // clipping rectangle } DTBGOPTS, *PDTBGOPTS; #endif - #if !defined( DTT_COMPOSITED ) + #if !defined(DTT_COMPOSITED) #define DTT_TEXTCOLOR (1UL << 0) // crText has been specified #define DTT_BORDERCOLOR (1UL << 1) // crBorder has been specified #define DTT_SHADOWCOLOR (1UL << 2) // crShadow has been specified @@ -313,7 +313,7 @@ File created by Christian K #define NIN_BALLOONTIMEOUT (WM_USER + 4) #define NIN_BALLOONUSERCLICK (WM_USER + 5) // SDK isn't present or some older VC compiler was used, include missing things. -#elif !defined(NOWIN2K) && (!defined WS_EX_LAYERED || !defined IDC_HAND) +#elif !defined(NOWIN2K) && ( !defined WS_EX_LAYERED || !defined IDC_HAND) #pragma message("win2k.h") @@ -427,12 +427,12 @@ File created by Christian K #ifndef IDropTargetHelper DEFINE_GUID(CLSID_DragDropHelper, 0x4657278a, 0x411b, 0x11d2, 0x83, 0x9a, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0); #define INTERFACE IDropTargetHelper - DECLARE_INTERFACE_( IDropTargetHelper, IUnknown ) + DECLARE_INTERFACE_(IDropTargetHelper, IUnknown) { // IUnknown methods STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE; - STDMETHOD_(ULONG, AddRef) ( THIS ) PURE; - STDMETHOD_(ULONG, Release) ( THIS ) PURE; + STDMETHOD_(ULONG, AddRef) (THIS) PURE; + STDMETHOD_(ULONG, Release) (THIS) PURE; // IDropTargetHelper STDMETHOD (DragEnter)(THIS_ HWND hwndTarget, IDataObject* pDataObject, @@ -515,15 +515,15 @@ File created by Christian K #undef INTERFACE #endif #define INTERFACE ITaskbarList3 - DECLARE_INTERFACE_( ITaskbarList3, ITaskbarList2 ) + DECLARE_INTERFACE_(ITaskbarList3, ITaskbarList2) { // IUnknown methods STDMETHOD (QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; - STDMETHOD_(ULONG, AddRef) (THIS ) PURE; - STDMETHOD_(ULONG, Release) (THIS ) PURE; + STDMETHOD_(ULONG, AddRef) (THIS) PURE; + STDMETHOD_(ULONG, Release) (THIS) PURE; // overloaded ITaskbarList2 members - STDMETHOD (HrInit) (THIS ) PURE; + STDMETHOD (HrInit) (THIS) PURE; STDMETHOD (AddTab) (THIS_ HWND hwnd) PURE; STDMETHOD (DeleteTab) (THIS_ HWND hwnd) PURE; STDMETHOD (ActivateTab) (THIS_ HWND hwnd) PURE; -- cgit v1.2.3