summaryrefslogtreecommitdiff
path: root/plugins/ShellExt/src/shlcom.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ShellExt/src/shlcom.h')
-rw-r--r--plugins/ShellExt/src/shlcom.h99
1 files changed, 53 insertions, 46 deletions
diff --git a/plugins/ShellExt/src/shlcom.h b/plugins/ShellExt/src/shlcom.h
index 21f0a87927..f96465db96 100644
--- a/plugins/ShellExt/src/shlcom.h
+++ b/plugins/ShellExt/src/shlcom.h
@@ -48,24 +48,24 @@
struct TGroupNode
{
- TGroupNode *Left, *Right, *_prev, *_next;
+ TGroupNode* Left, * Right, * _prev, * _next;
int Depth;
- UINT Hash; // hash of the group name alone
- char *szGroup;
- int cchGroup;
- HMENU hMenu;
- int hMenuGroupID;
- DWORD dwItems;
+ UINT Hash; // hash of the group name alone
+ char* szGroup;
+ int cchGroup;
+ HMENU hMenu;
+ int hMenuGroupID;
+ DWORD dwItems;
};
struct TGroupNodeList
{
- TGroupNode *First, *Last;
+ TGroupNode* First, * Last;
};
struct TStrTokRec
{
- char *szStr, *szSet;
+ char* szStr, * szSet;
// need a delimiter after the token too?, e.g. FOO^BAR^ if FOO^BAR
// is the string then only FOO^ is returned, could cause infinite loops
// if the condition isn't accounted for thou.
@@ -86,21 +86,21 @@ struct TSlotIPC
{
BYTE cbSize;
int fType; // a REQUEST_* type
- TSlotIPC *Next;
+ TSlotIPC* Next;
MCONTACT hContact;
UINT hProto; // hash of the protocol the user is on
UINT hGroup; // hash of the entire path (not defined for REQUEST_GROUPS slots)
WORD Status;
// only used for contacts -- can be STATUS_PROFILENAME -- but that is because returning the profile name is optional
- BYTE MRU; // if set, contact has been recently used
- int cbStrSection;
+ BYTE MRU; // if set, contact has been recently used
+ int cbStrSection;
};
struct THeaderIPC
{
int cbSize;
DWORD dwVersion;
- void *pServerBaseAddress, *pClientBaseAddress;
+ void* pServerBaseAddress, * pClientBaseAddress;
int fRequests;
DWORD dwFlags;
int Slots;
@@ -109,11 +109,11 @@ struct THeaderIPC
char MirandaName[64];
char MRUMenuName[64];
char ClearEntries[64];
- TSlotIPC *IconsBegin, *ContactsBegin, *GroupsBegin, *NewIconsBegin;
+ TSlotIPC* IconsBegin, * ContactsBegin, * GroupsBegin, * NewIconsBegin;
// start of an flat memory stack, which is referenced as a linked list
int DataSize;
- TSlotIPC *DataPtr, *DataPtrEnd;
- void *DataFramePtr;
+ TSlotIPC* DataPtr, * DataPtrEnd;
+ void* DataFramePtr;
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -138,40 +138,40 @@ struct TShellExt : public IShellExtInit, public IContextMenu3, public MZeroedObj
HMENU hRecentMenu;
UINT RecentCount; // number of added items
// array of all the protocol icons, for every running instance!
- TSlotProtoIcons *ProtoIcons;
+ TSlotProtoIcons* ProtoIcons;
UINT ProtoIconsCount;
// maybe null, taken from IShellExtInit_Initalise() and AddRef()'d
// only used if a Miranda instance is actually running and a user
// is selected
- IDataObject *pDataObject;
+ IDataObject* pDataObject;
// DC is used for font metrics and saves on creating and destroying lots of DC handles
// during WM_MEASUREITEM
HDC hMemDC;
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
ULONG STDMETHODCALLTYPE AddRef(void);
ULONG STDMETHODCALLTYPE Release(void);
- HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
+ HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject* pdtobj, HKEY hkeyProgID);
HRESULT STDMETHODCALLTYPE QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
- HRESULT STDMETHODCALLTYPE InvokeCommand(CMINVOKECOMMANDINFO *pici);
- HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pReserved, LPSTR pszName, UINT cchMax);
+ HRESULT STDMETHODCALLTYPE InvokeCommand(CMINVOKECOMMANDINFO* pici);
+ HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT* pReserved, LPSTR pszName, UINT cchMax);
HRESULT STDMETHODCALLTYPE HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
- HRESULT STDMETHODCALLTYPE HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult);
+ HRESULT STDMETHODCALLTYPE HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* plResult);
};
struct TEnumData
{
- TShellExt *Self;
+ TShellExt* Self;
- // autodetected, don't hard code since shells that don't support it
- // won't send WM_MEASUREITETM/WM_DRAWITEM at all.
+ // autodetected, don't hard code since shells that don't support it
+ // won't send WM_MEASUREITETM/WM_DRAWITEM at all.
BOOL bOwnerDrawSupported;
// as per user setting (maybe of multiple Mirandas)
BOOL bShouldOwnerDraw;
int idCmdFirst;
- THeaderIPC *ipch;
+ THeaderIPC* ipch;
// OpenEvent()'d handle to give each IPC server an object to set signalled
HANDLE hWaitFor;
DWORD pid; // sub-unique value used to make work object name
@@ -183,45 +183,52 @@ struct TClassFactoryRec : public IClassFactory
LONG RefCount;
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
ULONG STDMETHODCALLTYPE AddRef(void);
ULONG STDMETHODCALLTYPE Release(void);
- HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObject);
+ HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter, REFIID riid, void** ppvObject);
HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
};
/////////////////////////////////////////////////////////////////////////////////////////
-enum TSlotDrawType {dtEntry = 0x01, dtGroup = 0x02, dtContact = 0x04, dtCommand = 0x08 };
+enum TSlotDrawType
+{
+ dtEntry = 0x01,
+ dtGroup = 0x02,
+ dtContact = 0x04,
+ dtCommand = 0x08
+};
+
typedef int TSlotDrawTypes;
-typedef int (__stdcall TMenuCommandCallback)(
- THeaderIPC *pipch, // IPC header info, already mapped
- HANDLE hWorkThreadEvent, // event object being waited on on miranda thread
- HANDLE hAckEvent); // ack event object that has been created
+typedef int(__stdcall TMenuCommandCallback)(
+ THeaderIPC* pipch, // IPC header info, already mapped
+ HANDLE hWorkThreadEvent, // event object being waited on on miranda thread
+ HANDLE hAckEvent); // ack event object that has been created
struct TMenuDrawInfo
{
- char *szText, *szProfile;
+ char* szText, * szProfile;
int cch;
UINT wID;
- TSlotDrawTypes fTypes;
- MCONTACT hContact;
+ TSlotDrawTypes fTypes;
+ MCONTACT hContact;
HICON hStatusIcon; // HICON from Self->ProtoIcons[index].hIcons[status]; Do not DestroyIcon()
- HBITMAP hStatusBitmap; // HBITMAP, don't free.
- int pid;
- TMenuCommandCallback *MenuCommandCallback; // dtCommand must be set also.
+ HBITMAP hStatusBitmap; // HBITMAP, don't free.
+ int pid;
+ TMenuCommandCallback* MenuCommandCallback; // dtCommand must be set also.
};
/////////////////////////////////////////////////////////////////////////////////////////
-void ipcPrepareRequests(int ipcPacketSize, THeaderIPC *pipch, DWORD fRequests);
-DWORD ipcSendRequest(HANDLE hSignal, HANDLE hWaitFor, THeaderIPC *pipch, DWORD dwTimeoutMsecs);
-TSlotIPC* ipcAlloc(THeaderIPC *pipch, int nSize);
-void ipcFixupAddresses(THeaderIPC *pipch);
+void ipcPrepareRequests(int ipcPacketSize, THeaderIPC* pipch, DWORD fRequests);
+DWORD ipcSendRequest(HANDLE hSignal, HANDLE hWaitFor, THeaderIPC* pipch, DWORD dwTimeoutMsecs);
+TSlotIPC* ipcAlloc(THeaderIPC* pipch, int nSize);
+void ipcFixupAddresses(THeaderIPC* pipch);
-TGroupNode* AllocGroupNode(TGroupNodeList *list, TGroupNode *Root, int Depth);
+TGroupNode* AllocGroupNode(TGroupNodeList* list, TGroupNode* Root, int Depth);
TGroupNode* FindGroupNode(TGroupNode* p, const DWORD Hash, int Depth);
-char* CreateProcessUID(int pid, char *buf, size_t bufLen);
+char* CreateProcessUID(int pid, char* buf, size_t bufLen);