blob: 79930c2cc2336912bc415bb3d35dd093375cdfc7 [file] [log] [blame]
george825e7af742005-03-10 14:26:00 +00001/* Copyright (C) 2004 TightVNC Team. 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// -=- PlayerOptions.h
20
21// Definition of the PlayerOptions class, responsible for
22// storing & retrieving the RfbPlayer's options.
23
24#include <windows.h>
25
26#include <rfb_win32/registry.h>
27
28// Supported pixel formats
29#define PF_AUTO 0
30#define PF_D8_RGB332 1
31#define PF_D16_RGB655 2
32#define PF_D24_RGB888 3
33#define PF_MODES 3
34
35// Default options values
36#define DEFAULT_PF PF_AUTO
37#define DEFAULT_INIT_TIME -1
38#define DEFAULT_SPEED 1.0
39#define DEFAULT_FRAME_SCALE 100
40#define DEFAULT_ACCEPT_BELL FALSE
41#define DEFAULT_ACCEPT_CUT_TEXT FALSE
42#define DEFAULT_LOOP_PLAYBACK FALSE
43#define DEFAULT_ASK_PF FALSE
44#define DEFAULT_AUTOPLAY FALSE
45#define DEFAULT_FULL_SCREEN FALSE
46#define DEFAULT_STORE_SETTINGS FALSE
47
48class PlayerOptions {
49public:
50 PlayerOptions();
51 void readFromRegistry();
52 void writeToRegistry();
53 void writeDefaults();
54 long initTime;
55 double playbackSpeed;
56 bool autoPlay;
57 bool fullScreen;
58 long pixelFormat;
59 bool acceptBell;
60 bool acceptCutText;
61 bool loopPlayback;
62 bool askPixelFormat;
63 long frameScale;
64 bool autoStoreSettings;
65};