Glimmr Canvas Animation

version 1/111030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Glk events (for use without Glulx Input Loops by Erik Temple)
    [This section provides definitions and phrase wrappers that allow us to write I7 code for handling raw input. This code comes from the Glulx Input Loops extensions, so we include it only if that extension is not also present.]

    A g-event is a kind of value. The g-events are timer-event, char-event, line-event, mouse-event, arrange-event, redraw-event, sound-notify-event, and hyperlink-event.

    Definition: A g-event is window-dependent if the g-event is not timer-event or the g-event is not sound-notify-event or the g-event is not arrange-event or the g-event is not redraw-event.

    Definition: A g-event is glk-initiated if the g-event is timer-event or the g-event is sound-notify-event or the g-event is arrange-event or the g-event is not redraw-event.


    To decide which g-event is null-event: (- 0 -)

    To wait for glk input:
        (- glk_select(gg_event); -)
        
    To decide which g-event is the current glk event:
        (- gg_event-->0 -)
        
    To decide which number is the window of the current glk event:
        (- gg_event-->1 -)
        
    To decide what number is the character code returned:
        (- gg_event-->2 -)

    To decide what number is glk event handled in (ev - a g-event) context:
        (- HandleGlkEvent(gg_event, {ev}, gg_arguments) -)