Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ev_pop(S) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     EV_POP(S)                 UNIX System V                 EV_POP(S)



     Name
          ev_pop - pop the next event off the queue

     Syntax
          #include  <types.h>
          #include  <param.h>
          #include  <sysmacros.h>
          #include  <page.h>
          #include  <event.h>
          #include  <mouse.h>

          int ev_pop()

     Description
          ev_pop clears the next event off the queue and returns the
          number of events lost due to queue overrun since the last
          ev_pop call. An event queue must have been opened with
          ev_init(S) and ev_open(S).

          After an application is done with an event, the event is
          pop'ed off the queue. The queue is of fixed size, so if
          events are not pop'ed fast enough some might be lost due to
          overrun. A counter maintains the number of lost events.
          When ev_pop is called, it clears the top event off of the
          queue, clears the counter and returns the number of lost
          events.  This should always be zero, unless a program stops
          reading its event queue.  If the queue is empty, ev_pop
          returns -1.

          When ev_pop is called, the most recent pointer returned by
          ev_read must be considered invalid, since that storage may
          be overwritten by the event driver.

     Diagnostics
          ev_pop returns -1 if there is not an open event queue. It
          returns -2 if there is nothing to pop because the queue is
          empty.

     See Also
          ev_block(S), ev_close(S), ev_count(S), ev_flush(S),
          ev_getdev(S), ev_getemask(S), ev_gindev(S), ev_init(S),
          ev_open(S), ev_read(S), ev_resume(S), ev_setemask(S),
          ev_suspend(S)

     Notes
          This routine must be linked in with the -levent linker
          option.


                                                (printed 6/20/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026