libvisual  0.5.0
Namespaces | Classes | Typedefs | Enumerations | Functions
VisEvent
Collaboration diagram for VisEvent:

Namespaces

namespace  LV
 Libvisual namespace.
 

Classes

struct  VisEventKeyboard
 Keyboard event. More...
 
struct  VisEventMouseMotion
 Mouse movement event. More...
 
struct  VisEventMouseButton
 Mouse button event. More...
 
struct  VisEventResize
 Resize event. More...
 
struct  VisEventNewSong
 Song change event. More...
 
struct  VisEventQuit
 Application quit event. More...
 
struct  VisEventVisibility
 Visibility event. More...
 
struct  VisEventParam
 Parameter change event. More...
 
struct  VisEventCustom
 Custom event. More...
 
struct  VisEvent
 Generic event. More...
 

Typedefs

typedef LV::EventQueue VisEventQueue
 

Enumerations

enum  VisEventType {
  VISUAL_EVENT_NOEVENT, VISUAL_EVENT_KEYDOWN, VISUAL_EVENT_KEYUP, VISUAL_EVENT_MOUSEMOTION,
  VISUAL_EVENT_MOUSEBUTTONDOWN, VISUAL_EVENT_MOUSEBUTTONUP, VISUAL_EVENT_NEWSONG, VISUAL_EVENT_RESIZE,
  VISUAL_EVENT_PARAM, VISUAL_EVENT_QUIT, VISUAL_EVENT_CUSTOM, VISUAL_EVENT_VISIBILITY
}
 Types of events supported by LV. More...
 
enum  VisKeyState { VISUAL_KEY_DOWN, VISUAL_KEY_UP }
 Indicates the state of a key. More...
 
enum  VisMouseState { VISUAL_MOUSE_DOWN, VISUAL_MOUSE_UP }
 Indicates the state of a mouse button. More...
 

Functions

VisEvent * visual_event_new_keyboard (VisKey keysym, VisKeyMod keymod, VisKeyState state)
 Creates a new keyboard event. More...
 
VisEvent * visual_event_new_mousemotion (int dx, int dy)
 Creates a new mouse movement event. More...
 
VisEvent * visual_event_new_mousebutton (int button, VisMouseState state, int x, int y)
 Creates a new mouse button event. More...
 
VisEvent * visual_event_new_resize (int width, int height)
 Creates a resize event. More...
 
VisEvent * visual_event_new_newsong (VisSongInfo *songinfo)
 Creates a new song change event. More...
 
VisEvent * visual_event_new_param (void *param)
 Creates a new parameter change event. More...
 
VisEvent * visual_event_new_quit (void)
 Creates a quit event. More...
 
VisEvent * visual_event_new_visibility (int is_visible)
 Creates a new visibility event. More...
 
void visual_event_copy (VisEvent *dest, VisEvent *src)
 Copies a VisEvent. More...
 
void visual_event_free (VisEvent *event)
 Frees a VisEvent. More...
 
VisEvent * visual_event_new_custom (int eid, int param_int, void *param_ptr)
 Creates a new custom event. More...
 
VisEventQueuevisual_event_queue_new (void)
 
void visual_event_queue_free (VisEventQueue *eventqueue)
 
void visual_event_queue_add (VisEventQueue *eventqueue, VisEvent *event)
 
int visual_event_queue_poll (VisEventQueue *eventqueue, VisEvent *event)
 

Detailed Description

Enumeration Type Documentation

Types of events supported by LV.

Enumerator
VISUAL_EVENT_NOEVENT 

No event.

VISUAL_EVENT_KEYDOWN 

Key press event.

VISUAL_EVENT_KEYUP 

Key release event.

VISUAL_EVENT_MOUSEMOTION 

Mouse movement event.

VISUAL_EVENT_MOUSEBUTTONDOWN 

Mouse button press event.

VISUAL_EVENT_MOUSEBUTTONUP 

Mouse button release event.

VISUAL_EVENT_NEWSONG 

Song change event.

VISUAL_EVENT_RESIZE 

Video resize event.

VISUAL_EVENT_PARAM 

Parameter change event.

VISUAL_EVENT_QUIT 

Quit event.

VISUAL_EVENT_CUSTOM 

Custom event.

VISUAL_EVENT_VISIBILITY 

Visibility event.

Definition at line 15 of file lv_event.h.

Indicates the state of a key.

Enumerator
VISUAL_KEY_DOWN 

Key is pressed.

VISUAL_KEY_UP 

Key is released.

Definition at line 33 of file lv_event.h.

Indicates the state of a mouse button.

Enumerator
VISUAL_MOUSE_DOWN 

Mouse button is pressed.

VISUAL_MOUSE_UP 

Mouse button is released.

Definition at line 41 of file lv_event.h.

Function Documentation

void visual_event_copy ( VisEvent *  dest,
VisEvent *  src 
)

Copies a VisEvent.

Parameters
destEvent to copy to
srcEvent to copy

Definition at line 147 of file lv_event_c.cpp.

void visual_event_free ( VisEvent *  event)

Frees a VisEvent.

Parameters
eventEvent to free

Definition at line 155 of file lv_event_c.cpp.

VisEvent* visual_event_new_custom ( int  eid,
int  param_int,
void *  param_ptr 
)

Creates a new custom event.

Parameters
eidUnique ID for type identification
param_intOptional integer value
param_ptrOptional data pointer
Returns
New event object

Definition at line 134 of file lv_event_c.cpp.

VisEvent* visual_event_new_keyboard ( VisKey  keysym,
VisKeyMod  keymod,
VisKeyState  state 
)

Creates a new keyboard event.

Parameters
keysymKey used
keymodKey modifier used
stateState of key i.e. pressed or released

Definition at line 33 of file lv_event_c.cpp.

VisEvent* visual_event_new_mousebutton ( int  button,
VisMouseState  state,
int  x,
int  y 
)

Creates a new mouse button event.

Parameters
buttonMouse button that was used
stateState of mouse button i.e. pressed or released
xX-coordinate of the mouse pointer
yY-coordinate of the mouse pointer
Returns
New event object

Definition at line 61 of file lv_event_c.cpp.

VisEvent* visual_event_new_mousemotion ( int  dx,
int  dy 
)

Creates a new mouse movement event.

Parameters
dxX displacement
dyY displacement
Returns
New event object

Definition at line 48 of file lv_event_c.cpp.

VisEvent* visual_event_new_newsong ( VisSongInfo songinfo)

Creates a new song change event.

Parameters
songinfoSong information
Returns
New event object

Definition at line 91 of file lv_event_c.cpp.

Referenced by LV::Actor::run().

VisEvent* visual_event_new_param ( void *  param)

Creates a new parameter change event.

Parameters
paramParam that has changed
Returns
New event object

Definition at line 103 of file lv_event_c.cpp.

VisEvent* visual_event_new_quit ( void  )

Creates a quit event.

Returns
New event object

Definition at line 115 of file lv_event_c.cpp.

VisEvent* visual_event_new_resize ( int  width,
int  height 
)

Creates a resize event.

Parameters
widthNew width
heightNew height
Returns
New event object

Definition at line 79 of file lv_event_c.cpp.

Referenced by LV::Actor::video_negotiate().

VisEvent* visual_event_new_visibility ( int  is_visible)

Creates a new visibility event.

Parameters
is_visibleTRUE when visible, FALSE when not visible.
Returns
New event object

Definition at line 124 of file lv_event_c.cpp.