Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

OptionTypes.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef OPTIONTYPES_H
00016 #define OPTIONTYPES_H
00017 
00018 #include "BasicTypes.h"
00019 #include "stdvector.h"
00020 
00022 
00025 typedef UInt32          OptionID;
00026 
00028 
00031 typedef SInt32          OptionValue;
00032 
00033 // for now, options are just pairs of integers
00034 typedef std::vector<UInt32> COptionsList;
00035 
00036 // macro for packing 4 character strings into 4 byte integers
00037 #define OPTION_CODE(_s)                                             \
00038     (static_cast<UInt32>(static_cast<unsigned char>(_s[0]) << 24) | \
00039      static_cast<UInt32>(static_cast<unsigned char>(_s[1]) << 16) | \
00040      static_cast<UInt32>(static_cast<unsigned char>(_s[2]) <<  8) | \
00041      static_cast<UInt32>(static_cast<unsigned char>(_s[3])      ))
00042 
00044 
00045 static const OptionID   kOptionHalfDuplexCapsLock     = OPTION_CODE("HDCL");
00046 static const OptionID   kOptionHalfDuplexNumLock      = OPTION_CODE("HDNL");
00047 static const OptionID   kOptionHalfDuplexScrollLock   = OPTION_CODE("HDSL");
00048 static const OptionID   kOptionModifierMapForShift    = OPTION_CODE("MMFS");
00049 static const OptionID   kOptionModifierMapForControl  = OPTION_CODE("MMFC");
00050 static const OptionID   kOptionModifierMapForAlt      = OPTION_CODE("MMFA");
00051 static const OptionID   kOptionModifierMapForMeta     = OPTION_CODE("MMFM");
00052 static const OptionID   kOptionModifierMapForSuper    = OPTION_CODE("MMFR");
00053 static const OptionID   kOptionHeartbeat              = OPTION_CODE("HART");
00054 static const OptionID   kOptionScreenSwitchCorners    = OPTION_CODE("SSCM");
00055 static const OptionID   kOptionScreenSwitchCornerSize = OPTION_CODE("SSCS");
00056 static const OptionID   kOptionScreenSwitchDelay      = OPTION_CODE("SSWT");
00057 static const OptionID   kOptionScreenSwitchTwoTap     = OPTION_CODE("SSTT");
00058 static const OptionID   kOptionScreenSaverSync        = OPTION_CODE("SSVR");
00059 static const OptionID   kOptionXTestXineramaUnaware   = OPTION_CODE("XTXU");
00060 static const OptionID   kOptionScreenPreserveFocus    = OPTION_CODE("SFOC");
00061 static const OptionID   kOptionRelativeMouseMoves     = OPTION_CODE("MDLT");
00062 static const OptionID   kOptionWin32KeepForeground    = OPTION_CODE("_KFW");
00064 
00066 
00067 enum EScreenSwitchCorners {
00068     kNoCorner,
00069     kTopLeft,
00070     kTopRight,
00071     kBottomLeft,
00072     kBottomRight,
00073     kFirstCorner = kTopLeft,
00074     kLastCorner  = kBottomRight
00075 };
00077 
00079 
00080 enum EScreenSwitchCornerMasks {
00081     kNoCornerMask    = 0,
00082     kTopLeftMask     = 1 << (kTopLeft - kFirstCorner),
00083     kTopRightMask    = 1 << (kTopRight - kFirstCorner),
00084     kBottomLeftMask  = 1 << (kBottomLeft - kFirstCorner),
00085     kBottomRightMask = 1 << (kBottomRight - kFirstCorner),
00086     kAllCornersMask  = kTopLeftMask | kTopRightMask |
00087                         kBottomLeftMask | kBottomRightMask
00088 };
00090 
00091 #undef OPTION_CODE
00092 
00093 #endif

Generated on Fri Nov 6 00:21:15 2009 for synergy-plus by  doxygen 1.3.9.1