JWM Source Documentation
Typedefs | Functions | Variables
event.h File Reference

Header for the event functions. More...

Go to the source code of this file.

Typedefs

typedef void(* SignalCallback )(const struct TimeType *now, int x, int y, Window w, void *data)
 

Functions

char WaitForEvent (XEvent *event)
 Wait for an event and process it.
 
void ProcessEvent (XEvent *event)
 Process an event.
 
void DiscardButtonEvents (void)
 Descard excess button events.
 
void DiscardMotionEvents (XEvent *event, Window w)
 Discard excess motion events.
 
void DiscardKeyEvents (XEvent *event, Window w)
 Discard excess key events.
 
void UpdateTime (const XEvent *event)
 Update the last event time.
 
void RegisterCallback (int freq, SignalCallback callback, void *data)
 Register a callback.
 
void UnregisterCallback (SignalCallback callback, void *data)
 Unregister a callback.
 
void RequireRestack ()
 Restack clients before waiting for an event.
 
void RequireTaskUpdate ()
 Update the task bar before waiting for an event.
 
void RequirePagerUpdate ()
 Update the pager before waiting for an event.
 

Variables

Time eventTime
 Last event time.
 

Detailed Description

Header for the event functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file event.h.

Typedef Documentation

typedef void(* SignalCallback)(const struct TimeType *now, int x, int y, Window w, void *data)

Definition at line 15 of file event.h.

Function Documentation

void DiscardButtonEvents ( void  )

Descard excess button events.

Definition at line 308 of file event.c.

References display, JXCheckMaskEvent, JXSync, and UpdateTime().

Referenced by HandleTrayButtonPress().

void DiscardKeyEvents ( XEvent *  event,
Window  w 
)

Discard excess key events.

Parameters
eventThe event to return.
wThe window whose events to discard.

Definition at line 334 of file event.c.

References display, JXCheckTypedWindowEvent, JXSync, and UpdateTime().

Referenced by MoveClientKeyboard(), and ResizeClientKeyboard().

void DiscardMotionEvents ( XEvent *  event,
Window  w 
)

Discard excess motion events.

Parameters
eventThe event to return.
wThe window whose events to discard.

Definition at line 319 of file event.c.

References display, JXCheckTypedEvent, JXSync, SetMousePosition(), and UpdateTime().

Referenced by MoveClient(), MoveClientKeyboard(), ResizeClient(), ResizeClientKeyboard(), and UpdateMotion().

void ProcessEvent ( XEvent *  event)

Process an event.

Parameters
eventThe event to process.

Definition at line 275 of file event.c.

References Debug(), display, HandleButtonEvent(), HandleEnterNotify(), HandleKeyPress(), HandleKeyRelease(), HandleMotionNotify(), JXCheckTypedEvent, and UpdateTime().

Referenced by EventLoop().

void RegisterCallback ( int  freq,
SignalCallback  callback,
void *  data 
)

Register a callback.

Parameters
freqThe frequency in milliseconds.
callbackThe callback function.
dataData to pass to the callback.

Definition at line 1743 of file event.c.

References Allocate, CallbackNode::callback, callbacks, CallbackNode::data, CallbackNode::freq, CallbackNode::last, TimeType::ms, CallbackNode::next, and TimeType::seconds.

Referenced by AddClientWindow(), CreateClock(), CreatePager(), CreateTaskBar(), CreateTray(), CreateTrayButton(), HandlePropertyNotify(), MoveClient(), MoveClientKeyboard(), ShowMenu(), StartupPopup(), and UpdateState().

void RequirePagerUpdate ( )
void RequireRestack ( )
void RequireTaskUpdate ( )
void UnregisterCallback ( SignalCallback  callback,
void *  data 
)

Unregister a callback.

Parameters
callbackThe callback to remove.
dataThe data passed to the register function.

Definition at line 1757 of file event.c.

References Assert, CallbackNode::next, and Release.

Referenced by DestroyClock(), DestroyPager(), DestroyTaskBar(), DestroyTray(), DestroyTrayButtons(), HandlePropertyNotify(), MoveClient(), MoveClientKeyboard(), RemoveClient(), ShowMenu(), ShutdownPopup(), StopMove(), and UpdateState().

void UpdateTime ( const XEvent *  event)

Update the last event time.

Parameters
eventThe event containing the time to use.

Definition at line 1700 of file event.c.

References Assert, and eventTime.

Referenced by DiscardButtonEvents(), DiscardEnterEvents(), DiscardKeyEvents(), DiscardMotionEvents(), HandleUnmapNotify(), ProcessEvent(), and WaitForEvent().

char WaitForEvent ( XEvent *  event)

Variable Documentation

Time eventTime

Last event time.

Definition at line 37 of file event.c.

Referenced by FocusClient(), FocusNextStacked(), HandleButtonEvent(), RemoveClient(), SendClientMessage(), and UpdateTime().

joewing.net / Projects / JWM