ClanLib  2.3.7
List of all members
CL_InputContext Class Reference

CL_InputContext. More...

#include <input_context.h>

Public Member Functions

Construction
 CL_InputContext ()
 Constructs an input context. More...
 
 ~CL_InputContext ()
 
Attributes
int get_keyboard_count () const
 Returns the number of keyboards available. More...
 
int get_mouse_count () const
 Returns the number of mice available. More...
 
int get_joystick_count () const
 Returns the number of joysticks available. More...
 
int get_tablet_count () const
 Returns the number of tablets available. More...
 
CL_InputDeviceget_keyboard (int keyboard=0)
 Returns the input device for the specified keyboard. More...
 
CL_InputDeviceget_mouse (int mouse=0)
 Returns the input device for the specified mouse. More...
 
CL_InputDeviceget_joystick (int joystick=0)
 Returns the input device for the specified joystick. More...
 
CL_InputDeviceget_tablet (int tablet=0)
 Returns the input device for the specified tablet. More...
 
CL_InputDeviceget_device (const CL_StringRef &device_name)
 Returns the input device with the given devicename. More...
 
Operations
CL_InputContextoperator= (CL_InputContext &copy)
 Copy assignment operator. More...
 
void clear ()
 Removes all devices from this input context. More...
 
void add_keyboard (const CL_InputDevice keyboard)
 Adds a new keyboard to the input context. More...
 
void add_mouse (const CL_InputDevice mouse)
 Adds a new mouse to the input context. More...
 
void add_joystick (const CL_InputDevice joystick)
 Adds a new joystick to the input context. More...
 
void add_tablet (const CL_InputDevice tablet)
 Adds a new tablet to the input context. More...
 
void process_messages ()
 Process and dispatch messages to signals. More...
 
bool poll (bool peek_only)
 Update device. More...
 
void dispose ()
 Stop anyone accessing this input context. More...
 
bool is_disposed () const
 Has dispose() been called on this input context. More...
 

Implementation

class CL_Win32Window
 
class CL_X11Window
 

Detailed Description

CL_InputContext.

Constructor & Destructor Documentation

CL_InputContext::CL_InputContext ( )

Constructs an input context.

CL_InputContext::~CL_InputContext ( )

Member Function Documentation

void CL_InputContext::add_joystick ( const CL_InputDevice  joystick)

Adds a new joystick to the input context.

void CL_InputContext::add_keyboard ( const CL_InputDevice  keyboard)

Adds a new keyboard to the input context.

void CL_InputContext::add_mouse ( const CL_InputDevice  mouse)

Adds a new mouse to the input context.

void CL_InputContext::add_tablet ( const CL_InputDevice  tablet)

Adds a new tablet to the input context.

void CL_InputContext::clear ( )

Removes all devices from this input context.

void CL_InputContext::dispose ( )

Stop anyone accessing this input context.

This should is only called internally by the display window destructor

CL_InputDevice& CL_InputContext::get_device ( const CL_StringRef device_name)

Returns the input device with the given devicename.

CL_InputDevice& CL_InputContext::get_joystick ( int  joystick = 0)

Returns the input device for the specified joystick.

int CL_InputContext::get_joystick_count ( ) const

Returns the number of joysticks available.

CL_InputDevice& CL_InputContext::get_keyboard ( int  keyboard = 0)

Returns the input device for the specified keyboard.

int CL_InputContext::get_keyboard_count ( ) const

Returns the number of keyboards available.

CL_InputDevice& CL_InputContext::get_mouse ( int  mouse = 0)

Returns the input device for the specified mouse.

int CL_InputContext::get_mouse_count ( ) const

Returns the number of mice available.

CL_InputDevice& CL_InputContext::get_tablet ( int  tablet = 0)

Returns the input device for the specified tablet.

int CL_InputContext::get_tablet_count ( ) const

Returns the number of tablets available.

bool CL_InputContext::is_disposed ( ) const

Has dispose() been called on this input context.

Returns
true = Has been disposed
CL_InputContext& CL_InputContext::operator= ( CL_InputContext copy)

Copy assignment operator.

bool CL_InputContext::poll ( bool  peek_only)

Update device.

Parameters
peek_onlyTreat as a request to see if an event would occur
Returns
true when the device event has occurred
void CL_InputContext::process_messages ( )

Process and dispatch messages to signals.

Friends And Related Function Documentation

friend class CL_Win32Window
friend
friend class CL_X11Window
friend

The documentation for this class was generated from the following file: