blob: 83618a75546332e1fac492456ba39590e4674765 [file] [log] [blame]
Constantin Kaplinsky729598c2006-05-25 05:12:25 +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 <rfb/PixelFormat.h>
25
26#include <rfb_win32/registry.h>
27
28#define PF_MODES 3
29
30// The R, G and B values order in the pixel
31#define RGB_ORDER 0
32#define RBG_ORDER 1
33#define GRB_ORDER 2
34#define GBR_ORDER 3
35#define BGR_ORDER 4
36#define BRG_ORDER 5
37
38// Default options values
39//#define DEFAULT_PF 0
40#define DEFAULT_PF_INDEX -1
41#define DEFAULT_AUTOPF TRUE
42#define DEFAULT_INIT_TIME -1
43#define DEFAULT_SPEED 1.0
44#define DEFAULT_FRAME_SCALE 100
45#define DEFAULT_ACCEPT_BELL FALSE
46#define DEFAULT_ACCEPT_CUT_TEXT FALSE
47#define DEFAULT_BIG_ENDIAN FALSE
48#define DEFAULT_LOOP_PLAYBACK FALSE
49#define DEFAULT_ASK_PF FALSE
50#define DEFAULT_AUTOPLAY FALSE
51#define DEFAULT_FULL_SCREEN FALSE
52
53using namespace rfb;
54
55class PlayerOptions {
56public:
57 PlayerOptions();
58 void readFromRegistry();
59 void writeToRegistry();
60 void writeDefaults();
61 void setPF(PixelFormat *pf);
62 bool setPF(int rgb_order, int rm, int gm, int bm, bool big_endian=false);
63 long initTime;
64 double playbackSpeed;
65 bool autoPlay;
66 bool fullScreen;
67 bool autoDetectPF;
68 bool bigEndianFlag;
69 long pixelFormatIndex;
70 PixelFormat pixelFormat;
71 bool acceptBell;
72 bool acceptCutText;
73 bool loopPlayback;
74 bool askPixelFormat;
75 long frameScale;
76 bool commandLineParam;
77};