Constantin Kaplinsky | 729598c | 2006-05-25 05:12:25 +0000 | [diff] [blame] | 1 | /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. |
| 2 | * |
| 3 | * 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> |
Pierre Ossman | 338e73a | 2016-07-07 15:35:13 +0200 | [diff] [blame^] | 25 | |
| 26 | namespace os { |
| 27 | class Mutex; |
| 28 | class Thread; |
| 29 | } |
Constantin Kaplinsky | 729598c | 2006-05-25 05:12:25 +0000 | [diff] [blame] | 30 | |
| 31 | namespace winvnc { |
| 32 | |
Pierre Ossman | 338e73a | 2016-07-07 15:35:13 +0200 | [diff] [blame^] | 33 | class STrayIconThread : os::Thread { |
Constantin Kaplinsky | 729598c | 2006-05-25 05:12:25 +0000 | [diff] [blame] | 34 | public: |
| 35 | STrayIconThread(VNCServerWin32& sm, UINT inactiveIcon, |
| 36 | UINT activeIcon, UINT dis_inactiveIcon, UINT dis_activeIcon, UINT menu); |
Pierre Ossman | 338e73a | 2016-07-07 15:35:13 +0200 | [diff] [blame^] | 37 | virtual ~STrayIconThread(); |
Constantin Kaplinsky | 729598c | 2006-05-25 05:12:25 +0000 | [diff] [blame] | 38 | |
| 39 | void setToolTip(const TCHAR* text); |
| 40 | |
| 41 | static rfb::BoolParameter disableOptions; |
| 42 | static rfb::BoolParameter disableClose; |
| 43 | |
| 44 | friend class STrayIcon; |
| 45 | protected: |
Pierre Ossman | 338e73a | 2016-07-07 15:35:13 +0200 | [diff] [blame^] | 46 | virtual void worker(); |
| 47 | |
| 48 | os::Mutex* lock; |
| 49 | DWORD thread_id; |
Constantin Kaplinsky | 729598c | 2006-05-25 05:12:25 +0000 | [diff] [blame] | 50 | HWND windowHandle; |
| 51 | rfb::TCharArray toolTip; |
| 52 | VNCServerWin32& server; |
| 53 | UINT inactiveIcon; |
| 54 | UINT activeIcon; |
| 55 | UINT dis_inactiveIcon; |
| 56 | UINT dis_activeIcon; |
| 57 | UINT menu; |
| 58 | bool runTrayIcon; |
| 59 | }; |
| 60 | |
| 61 | }; |
| 62 | |
| 63 | #endif |