blob: 309d3f4a4492e26bdb60bc37b959890dcdc4bdec [file] [log] [blame]
Constantin Kaplinsky9eede292006-05-11 10:30:11 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
2 *
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +00003 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18
19#ifndef WINVNC_TRAYICON_H
20#define WINVNC_TRAYICON_H
21
22#include <winvnc/VNCServerWin32.h>
23#include <rfb_win32/TCharArray.h>
24#include <rfb/Configuration.h>
25#include <rfb/Threading.h>
26
27namespace winvnc {
28
29 class STrayIconThread : rfb::Thread {
30 public:
31 STrayIconThread(VNCServerWin32& sm, UINT inactiveIcon,
Oleg Sheikin5c642e92005-12-22 20:57:58 +000032 UINT activeIcon, UINT dis_inactiveIcon, UINT dis_activeIcon, UINT menu);
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000033 virtual ~STrayIconThread() {
34 runTrayIcon = false;
35 PostThreadMessage(getThreadId(), WM_QUIT, 0, 0);
36 }
37
38 virtual void run();
39
40 void setToolTip(const TCHAR* text);
41
42 static rfb::BoolParameter disableOptions;
Constantin Kaplinsky9eede292006-05-11 10:30:11 +000043 static rfb::BoolParameter disableClose;
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000044
45 friend class STrayIcon;
46 protected:
47 rfb::Mutex lock;
48 HWND windowHandle;
49 rfb::TCharArray toolTip;
50 VNCServerWin32& server;
51 UINT inactiveIcon;
52 UINT activeIcon;
Oleg Sheikin5c642e92005-12-22 20:57:58 +000053 UINT dis_inactiveIcon;
54 UINT dis_activeIcon;
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000055 UINT menu;
56 bool runTrayIcon;
57 };
58
59};
60
Constantin Kaplinsky9eede292006-05-11 10:30:11 +000061#endif