blob: a64e3e740aafa4c2bf3ab29b63b8fd47c75a1a3a [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
george827b1ebae2005-03-16 16:07:47 +000026#include <rfb/PixelFormat.h>
27
george825e7af742005-03-10 14:26:00 +000028#include <rfb_win32/registry.h>
29
george825e7af742005-03-10 14:26:00 +000030#define PF_MODES 3
31
george827b1ebae2005-03-16 16:07:47 +000032// The R, G and B values order in the pixel
33#define RGB_ORDER 0
34#define RBG_ORDER 1
35#define GRB_ORDER 2
36#define GBR_ORDER 3
37#define BGR_ORDER 4
38#define BRG_ORDER 5
39
george825e7af742005-03-10 14:26:00 +000040// Default options values
george8234be1fa2005-03-20 09:50:09 +000041//#define DEFAULT_PF 0
42#define DEFAULT_PF_INDEX 0
43#define DEFAULT_AUTOPF TRUE
george825e7af742005-03-10 14:26:00 +000044#define DEFAULT_INIT_TIME -1
45#define DEFAULT_SPEED 1.0
46#define DEFAULT_FRAME_SCALE 100
47#define DEFAULT_ACCEPT_BELL FALSE
48#define DEFAULT_ACCEPT_CUT_TEXT FALSE
49#define DEFAULT_LOOP_PLAYBACK FALSE
50#define DEFAULT_ASK_PF FALSE
51#define DEFAULT_AUTOPLAY FALSE
52#define DEFAULT_FULL_SCREEN FALSE
53#define DEFAULT_STORE_SETTINGS FALSE
54
george827b1ebae2005-03-16 16:07:47 +000055using namespace rfb;
56
george825e7af742005-03-10 14:26:00 +000057class PlayerOptions {
58public:
59 PlayerOptions();
60 void readFromRegistry();
61 void writeToRegistry();
62 void writeDefaults();
george827b1ebae2005-03-16 16:07:47 +000063 void setPF(PixelFormat *pf);
64 bool setPF(int rgb_order, int rm, int gm, int bm, bool big_endian=false);
george825e7af742005-03-10 14:26:00 +000065 long initTime;
66 double playbackSpeed;
67 bool autoPlay;
68 bool fullScreen;
george8234be1fa2005-03-20 09:50:09 +000069 bool autoDetectPF;
george820981b342005-03-19 11:19:00 +000070 long pixelFormatIndex;
71 PixelFormat pixelFormat;
george825e7af742005-03-10 14:26:00 +000072 bool acceptBell;
73 bool acceptCutText;
74 bool loopPlayback;
75 bool askPixelFormat;
76 long frameScale;
77 bool autoStoreSettings;
78};