<<<<<<<<<<<<<<<<

xloop(x) Xlib Interface xloop(x)

NAME

xloop - provide simple access to X event mechanism

DESCRIPTION

Xloop is similar to motif_scene and ui_scene in that it provides access to the X event mechanism. However, use of a widget set is not needed.

SUPERCLASS

object

INSTANCE VARIABLES

event is an object to be sent event: messages when events are received.

display is the name of an xdisplay object.

MESSAGES

start! enables the event loop. All it does is loop infitely calling XNextEvent, and sending the resulting events to the object named by the last event= message.

NOTES

This class is very rudimentary. If people really want to write complex X applications, they should be using one of the widget-based class libraries instead.

EXAMPLE

<xinit

xset_window_attributes new: att enable_event:(`ExposureMask', `KeyPressMask') ;

xwindow new: win xset_window_attributes=att change_window_attributes! input_mask+ (ExposureMask, KeyPressMask) map! ;

event new: exp type=`X_Expose' window=[win id?] ;

event new: key type=`X_KeyPress' window=[win id?] ;

xeventcontroller new: xev transition:(`start', `exp', `start', `draw') transition:(`start', `key', `start', `echo') ignore_unknown_events! state=`start'

start! ;

actions new: echo tick_actions=` xev print:key; ' ;

actions new: draw tick_actions=` win draw_line:(0,0,100,100); ' ;

xloop new: xl display=`xdisplay' event=`xev' start! ;

SEE ALSO

motif_scene, ui_scene, xeventcontroller


Last Updated On: Fri Mar 10 15:38:47 1995

Please send comments and suggestions to

its-documentation@rpi.edu

Keyword Search of RPInfo Consulting Pages and NewsCache