s3d_mainloop(3)

s3d_mainloop3

Set mainloop of program

Usage

#include <s3d.h>

int s3d_mainloop(void(*)(void) f);

Overview

Takes a function as argument. It will loop this function until a quit-event is received. You can pass NULL if you have no function to be looped, but its better to sleep some time if you have nothing to do anyway to save cpu-time.

 void mainloop(void)
 {
         usleep(1000); // sleep 1 ms in every cycle
 }
 ...
 s3d_mainloop(mainloop());

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7–13

Author

Simon Wunderlich

Author of s3d

From s3d-doc 0.2.2.1-7 in Debian 13 (Trixie). Parsed by carta from the page's man source.