CXWindowsUtil Class Reference

X11 utility functions. More...

#include <CXWindowsUtil.h>

List of all members.

Public Types

typedef std::vector< KeySym > KeySyms

Static Public Member Functions

static bool getWindowProperty (Display *, Window window, Atom property, CString *data, Atom *type, SInt32 *format, bool deleteProperty)
 Get property.
static bool setWindowProperty (Display *, Window window, Atom property, const void *data, UInt32 size, Atom type, SInt32 format)
 Set property.
static Time getCurrentTime (Display *, Window)
 Get X server time.
static UInt32 mapKeySymToKeyID (KeySym)
 Convert KeySym to KeyID.
static UInt32 getModifierBitForKeySym (KeySym keysym)
 Convert KeySym to corresponding KeyModifierMask.
static CString atomToString (Display *, Atom atom)
 Convert Atom to its string.
static CString atomsToString (Display *display, const Atom *atom, UInt32 num)
 Convert several Atoms to a string.
static void convertAtomProperty (CString &data)
 Prepare a property of atoms for use.
static void appendAtomData (CString &data, Atom atom)
 Append an Atom to property data.
static void replaceAtomData (CString &data, UInt32 index, Atom atom)
 Replace an Atom in property data.
static void appendTimeData (CString &data, Time time)
 Append an Time to property data.

Classes

class  CErrorLock
 X11 error handler. More...
class  CPropertyNotifyPredicateInfo


Detailed Description

X11 utility functions.

Definition at line 29 of file CXWindowsUtil.h.


Member Function Documentation

void CXWindowsUtil::appendAtomData ( CString &  data,
Atom  atom 
) [static]

Append an Atom to property data.

Converts atom to a 32-bit on-the-wire format and appends it to data.

Definition at line 1655 of file CXWindowsUtil.cpp.

void CXWindowsUtil::appendTimeData ( CString &  data,
Time  time 
) [static]

Append an Time to property data.

Converts time to a 32-bit on-the-wire format and appends it to data.

Definition at line 1669 of file CXWindowsUtil.cpp.

CString CXWindowsUtil::atomsToString ( Display *  display,
const Atom *  atom,
UInt32  num 
) [static]

Convert several Atoms to a string.

Converts each atom in atoms to its string representation and concatenates the results.

Definition at line 1614 of file CXWindowsUtil.cpp.

References CStringUtil::print().

CString CXWindowsUtil::atomToString ( Display *  ,
Atom  atom 
) [static]

Convert Atom to its string.

Converts atom to its string representation.

Definition at line 1594 of file CXWindowsUtil.cpp.

References CStringUtil::print().

Referenced by CXWindowsClipboard::addRequest(), and CXWindowsClipboard::processRequest().

void CXWindowsUtil::convertAtomProperty ( CString &  data  )  [static]

Prepare a property of atoms for use.

64-bit systems may need to modify a property's data if it's a list of Atoms before using it.

Definition at line 1640 of file CXWindowsUtil.cpp.

Time CXWindowsUtil::getCurrentTime ( Display *  ,
Window   
) [static]

Get X server time.

Returns the current X server time.

Definition at line 1424 of file CXWindowsUtil.cpp.

Referenced by CXWindowsScreen::getClipboard(), and CXWindowsScreen::setClipboard().

UInt32 CXWindowsUtil::getModifierBitForKeySym ( KeySym  keysym  )  [static]

Convert KeySym to corresponding KeyModifierMask.

Converts a KeySym to the corresponding KeyModifierMask, or 0 if the KeySym is not a modifier.

Definition at line 1550 of file CXWindowsUtil.cpp.

bool CXWindowsUtil::getWindowProperty ( Display *  ,
Window  window,
Atom  property,
CString *  data,
Atom *  type,
SInt32 *  format,
bool  deleteProperty 
) [static]

Get property.

Gets property property on window. Appends the data to *data if data is not NULL, saves the property type in *type if type is not NULL, and saves the property format in *format if format is not NULL. If deleteProperty is true then the property is deleted after being read.

Definition at line 1290 of file CXWindowsUtil.cpp.

KeyID CXWindowsUtil::mapKeySymToKeyID ( KeySym   )  [static]

Convert KeySym to KeyID.

Converts a KeySym to the equivalent KeyID. Returns kKeyNone if the KeySym cannot be mapped.

Definition at line 1461 of file CXWindowsUtil.cpp.

void CXWindowsUtil::replaceAtomData ( CString &  data,
UInt32  index,
Atom  atom 
) [static]

Replace an Atom in property data.

Converts atom to a 32-bit on-the-wire format and replaces the atom at index index in data.

Definition at line 1661 of file CXWindowsUtil.cpp.

bool CXWindowsUtil::setWindowProperty ( Display *  ,
Window  window,
Atom  property,
const void *  data,
UInt32  size,
Atom  type,
SInt32  format 
) [static]

Set property.

Sets property property on window to size bytes of data from data.

Definition at line 1378 of file CXWindowsUtil.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Nov 6 00:19:17 2009 for synergy-plus by  doxygen 1.4.7