Provided by: liby-dev_2.14.5-7ubuntu1_amd64 bug

NAME

       YPutBackEvent - event management

SYNTAX

       #include <Y2/Y.h>
       #include <Y2/Ylib.h>

       void YPutBackEvent(
               YConnection *connection,
               YEvent *event
       )

ARGUMENTS

       connection
              Specifies the connection to the Y server, obtained by a call to YOpenConnection.

       event  Specifies  the  event  buffer that contains the values to be `put back'. See YEvent
              for more information about this structure.

DESCRIPTION

       The YPutBackEvent function `puts back' the event values in the event buffer.

       This `put back' event will be placed at the end (newest) of the event  queue.  That  means
       that  if  there  were  already  events  queued  when  YPutBackEvent  was  called,  calling
       YGetNextEvent will not produce the event you just `put back'.

EXAMPLE

       #include <stdio.h>
       #include <Y2/Y.h>
       #include <Y2/Ylib.h>

       int main(int argc, char *argv[])
       {
               YEvent event;
               YConnection *con = YOpenConnection(
                       "/usr/sbin/starty",
                       "127.0.0.1:9433"
               );
               if(con == NULL)
                       return(1);

               printf("Waiting for event...\n");

               if(YGetNextEvent(
                       con, &event, True
               ) > 0)
                       printf(
                               "Got event type %i\n",
                               event.type
                       );

               YPutBackEvent(con, &event);
               printf("Event put back.\n");

               YCloseConnection(con, False);

               return(0);
       }

SEE ALSO

       YEvent(3) YGetNextEvent(3)