The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

SDL_PollEvent (3)
  • >> SDL_PollEvent (3) ( Разные man: Библиотечные вызовы )
  •  

    NAME

    SDL_PollEvent- Polls for currently pending events.
     
    

    SYNOPSIS

    #include "SDL.h"

    int SDL_PollEvent(SDL_Event *event);  

    DESCRIPTION

    Polls for currently pending events, and returns 1 if there are any pending events, or 0 if there are none available.

    If event is not NULL, the next event is removed from the queue and stored in that area.  

    EXAMPLES

    SDL_Event event; /* Event structure */
    
    .
    .
    .
    /* Check for events */
    while(SDL_PollEvent(&event)){  /* Loop until there are no events left on the queue */
      switch(event.type){  /* Process the appropiate event type */
        case SDL_KEYDOWN:  /* Handle a KEYDOWN event */         
          printf("Oh! Key press
    ");
          break;
        case SDL_MOUSEMOTION:
          .
          .
          .
        default: /* Report an unhandled event */
          printf("I don't know what this event is!
    ");
      }
    }
    

     

    SEE ALSO

    SDL_Event, SDL_WaitEvent, SDL_PeepEvents


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    EXAMPLES
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру