blob: 83618a75546332e1fac492456ba39590e4674765 [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
george827b1ebae2005-03-16 16:07:47 +000024#include <rfb/PixelFormat.h>
25
george825e7af742005-03-10 14:26:00 +000026#include <rfb_win32/registry.h>
27
george825e7af742005-03-10 14:26:00 +000028#define PF_MODES 3
29
george827b1ebae2005-03-16 16:07:47 +000030// 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
george825e7af742005-03-10 14:26:00 +000038// Default options values
george8234be1fa2005-03-20 09:50:09 +000039//#define DEFAULT_PF 0
george82e827a0a2005-03-20 10:14:50 +000040#define DEFAULT_PF_INDEX -1
george8234be1fa2005-03-20 09:50:09 +000041#define DEFAULT_AUTOPF TRUE
george825e7af742005-03-10 14:26:00 +000042#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
george828c37e422005-03-20 11:38:12 +000047#define DEFAULT_BIG_ENDIAN FALSE
george825e7af742005-03-10 14:26:00 +000048#define DEFAULT_LOOP_PLAYBACK FALSE
49#define DEFAULT_ASK_PF FALSE
50#define DEFAULT_AUTOPLAY FALSE
51#define DEFAULT_FULL_SCREEN FALSE
george825e7af742005-03-10 14:26:00 +000052
george827b1ebae2005-03-16 16:07:47 +000053using namespace rfb;
54
george825e7af742005-03-10 14:26:00 +000055class PlayerOptions {
56public:
57 PlayerOptions();
58 void readFromRegistry();
59 void writeToRegistry();
60 void writeDefaults();
george827b1ebae2005-03-16 16:07:47 +000061 void setPF(PixelFormat *pf);
62 bool setPF(int rgb_order, int rm, int gm, int bm, bool big_endian=false);
george825e7af742005-03-10 14:26:00 +000063 long initTime;
64 double playbackSpeed;
65 bool autoPlay;
66 bool fullScreen;
george8234be1fa2005-03-20 09:50:09 +000067 bool autoDetectPF;
george828c37e422005-03-20 11:38:12 +000068 bool bigEndianFlag;
george820981b342005-03-19 11:19:00 +000069 long pixelFormatIndex;
70 PixelFormat pixelFormat;
george825e7af742005-03-10 14:26:00 +000071 bool acceptBell;
72 bool acceptCutText;
73 bool loopPlayback;
74 bool askPixelFormat;
75 long frameScale;
george82dfb557b2005-03-21 18:26:50 +000076 bool commandLineParam;
george825e7af742005-03-10 14:26:00 +000077};