/* * synergy -- mouse and keyboard sharing utility * Copyright (C) 2002 Chris Schoeneman * * This package is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * found in the file COPYING that should have accompanied this file. * * This package is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef OPTIONTYPES_H #define OPTIONTYPES_H #include "BasicTypes.h" #include "stdvector.h" //! Option ID /*! Type to hold an option identifier. */ typedef UInt32 OptionID; //! Option Value /*! Type to hold an option value. */ typedef SInt32 OptionValue; // for now, options are just pairs of integers typedef std::vector COptionsList; // macro for packing 4 character strings into 4 byte integers #define OPTION_CODE(_s) \ (static_cast(static_cast(_s[0]) << 24) | \ static_cast(static_cast(_s[1]) << 16) | \ static_cast(static_cast(_s[2]) << 8) | \ static_cast(static_cast(_s[3]) )) //! @name Option identifiers //@{ static const OptionID kOptionHalfDuplexCapsLock = OPTION_CODE("HDCL"); static const OptionID kOptionHalfDuplexNumLock = OPTION_CODE("HDNL"); static const OptionID kOptionHalfDuplexScrollLock = OPTION_CODE("HDSL"); //@} #undef OPTION_CODE #endif