53 lines
1.5 KiB
C
53 lines
1.5 KiB
C
|
/*
|
||
|
* 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<UInt32> COptionsList;
|
||
|
|
||
|
// macro for packing 4 character strings into 4 byte integers
|
||
|
#define OPTION_CODE(_s) \
|
||
|
(static_cast<UInt32>(static_cast<unsigned char>(_s[0]) << 24) | \
|
||
|
static_cast<UInt32>(static_cast<unsigned char>(_s[1]) << 16) | \
|
||
|
static_cast<UInt32>(static_cast<unsigned char>(_s[2]) << 8) | \
|
||
|
static_cast<UInt32>(static_cast<unsigned char>(_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
|