ReactOS 0.4.15-dev-7897-g78dc504
CUserNotification.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Hermes Belusca-Maito
3 *
4 * Pass on icon notification messages to the systray implementation
5 * in the currently running shell.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef _USERNOTIFICATION_H_
23#define _USERNOTIFICATION_H_
24
25#undef PlaySound
26
28 public CComCoClass<CUserNotification, &CLSID_UserNotification>,
29 public CComObjectRootEx<CComMultiThreadModelNoCS>,
30 public IUserNotification
31// public IUserNotification2 // On Vista+
32{
33private:
43 IQueryContinue* m_pqc;
44 CStringW m_szTip;
45 CStringW m_szInfo;
46 CStringW m_szInfoTitle;
47
48private:
52
56
57 static LRESULT CALLBACK
59 IN HWND hWnd,
60 IN UINT uMsg,
63
64public:
67
68 // IUserNotification
70 IN LPCWSTR pszTitle,
71 IN LPCWSTR pszText,
72 IN DWORD dwInfoFlags) override;
73
75 IN DWORD dwShowTime, // Time intervals in milliseconds
76 IN DWORD dwInterval,
77 IN UINT cRetryCount) override;
78
81 IN LPCWSTR pszToolTip) override;
82
83 // Blocks until the notification times out.
85 IN IQueryContinue* pqc,
86 IN DWORD dwContinuePollInterval) override;
87
89 IN LPCWSTR pszSoundName) override;
90
91#if 0
92 // IUserNotification2
93 // Blocks until the notification times out.
95 IN IQueryContinue* pqc,
96 IN DWORD dwContinuePollInterval,
97 IN IUserNotificationCallback* pSink) override;
98#endif
99
102
104
106 COM_INTERFACE_ENTRY_IID(IID_IUserNotification , IUserNotification )
107 // COM_INTERFACE_ENTRY_IID(IID_IUserNotification2, IUserNotification2)
109};
110
111#endif /* _USERNOTIFICATION_H_ */
HWND hWnd
Definition: settings.c:17
#define STDMETHOD(m)
Definition: basetyps.h:62
static LRESULT CALLBACK WorkerWndProc(IN HWND hWnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
IQueryContinue * m_pqc
STDMETHOD() SetBalloonInfo(IN LPCWSTR pszTitle, IN LPCWSTR pszText, IN DWORD dwInfoFlags) override
VOID DelayRemoveIcon(IN HRESULT hRes)
VOID SetUpNotifyData(IN UINT uFlags, IN OUT PNOTIFYICONDATAW pnid)
STDMETHOD() SetBalloonRetry(IN DWORD dwShowTime, IN DWORD dwInterval, IN UINT cRetryCount) override
STDMETHOD() SetIconInfo(IN HICON hIcon, IN LPCWSTR pszToolTip) override
STDMETHOD() Show(IN IQueryContinue *pqc, IN DWORD dwContinuePollInterval) override
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT uFlags
Definition: api.c:59
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
#define PlaySound
Definition: mmsystem.h:2842
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define IDR_USERNOTIFICATION
Definition: shresdef.h:907
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185