Browse Source

* Fixed error in tutorial, updated caca_get_event() doc

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 18 years ago
parent
commit
6682ce2bd9
3 changed files with 4 additions and 3 deletions
  1. +2
    -1
      DotNet/test.cs
  2. +1
    -1
      caca/event.c
  3. +1
    -1
      doc/tutorial.dox

+ 2
- 1
DotNet/test.cs View File

@@ -50,10 +50,11 @@ class Test {
kk.setDisplayTitle("libcaca .NET Bindings test suite"); kk.setDisplayTitle("libcaca .NET Bindings test suite");


Event e = new Event(); Event e = new Event();
int startTime = kk.getRendertime();
while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0) while(kk.getEvent(Event.type.KEY_RELEASE, e, 10) == 0)
{ {
kk.Refresh(); kk.Refresh();
Console.WriteLine("Render time : {0}", kk.getRendertime());
Console.WriteLine("Render time : {0}", kk.getRendertime()-startTime);
} }






+ 1
- 1
caca/event.c View File

@@ -57,7 +57,7 @@ static int _lowlevel_event(caca_display_t *, caca_event_t *);
* *
* \param dp The libcaca graphical context. * \param dp The libcaca graphical context.
* \param event_mask Bitmask of requested events. * \param event_mask Bitmask of requested events.
* \param timeout A timeout value in microseconds
* \param timeout A timeout value in microseconds, -1 for blocking behaviour
* \param ev A pointer to a caca_event structure, or NULL. * \param ev A pointer to a caca_event structure, or NULL.
* \return 1 if a matching event was received, or 0 if the wait timeouted. * \return 1 if a matching event was received, or 0 if the wait timeouted.
*/ */


+ 1
- 1
doc/tutorial.dox View File

@@ -21,7 +21,7 @@ int main(void)
/* Draw a string at coordinates (0, 0) */ /* Draw a string at coordinates (0, 0) */
cucul_putstr(cv, 0, 0, "This is a message"); cucul_putstr(cv, 0, 0, "This is a message");
/* Refresh display */ /* Refresh display */
caca_refresh_display();
caca_refresh_display(dp);
/* Wait for a key press event */ /* Wait for a key press event */
caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, -1); caca_get_event(dp, CACA_EVENT_KEY_PRESS, &ev, -1);
/* Clean up library */ /* Clean up library */


Loading…
Cancel
Save