- Main Page
- Modules
- Classes
- Files
- Related Pages

- File List
- File Members

# src/drawstuff/x11.cpp File Reference

`#include <ode/config.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include <X11/Xlib.h>`
`#include <X11/Xatom.h>`
`#include <X11/keysym.h>`
`#include <GL/glx.h>`
`#include <sys/time.h>`
`#include <time.h>`
`#include "drawstuff.h"`
`#include "version.h"`
`#include "internal.h"`

## Defines
#define | HAVE_GETTIMEOFDAY 1
#define | HAVE_SYS_TIME_H 1
#define | SHIFTL(x, i) (((i) >= 0) ? ((x) << (i)) : ((x) >> (-i)))
## Functions
static void | printMessage (char *msg1, char *msg2, va_list ap)
void | dsError (char *msg,...)
| exit with error message. This function displays an error message then exit.
void | dsDebug (char *msg,...)
| exit with error message and core dump. this functions tries to dump core or start the debugger.
void | dsPrint (char *msg,...)
| print log message
static void | createMainWindow (int _width, int _height)
static void | destroyMainWindow ()
static void | handleEvent (XEvent &event, dsFunctions *fn)
static int | getHighBitIndex (unsigned int x)
static void | captureFrame (int num)
void | dsPlatformSimLoop (int window_width, int window_height, dsFunctions *fn, int initial_pause)
void | dsStop ()
| Stop the simulation loop. Calling this from within dsSimulationLoop() will cause it to exit and return to the caller. it is the same as if the user used the exit command. using this outside the loop will have no effect.
double | dsElapsedTime ()
| Get the elapsed time (on wall-clock) It returns the nr of seconds since the last call to this function.
double | dsGetTime ()
| Get the current system time.
void | dsSleep (int miliseconds)
| Sleep for given time (in miliseconds) It puts process to sleep for given time in miliseconds.
## Variables
static Display * | display = 0
static int | screen = 0
static XVisualInfo * | visual = 0
static Colormap | colormap = 0
static Atom | wm_protocols_atom = 0
static Atom | wm_delete_window_atom = 0
static Window | win = 0
static int | width = 0
static int | height = 0
static GLXContext | glx_context = 0
static int | last_key_pressed = 0
static int | run = 1
static int | pause = 0
static int | singlestep = 0
static int | writeframes = 0

## Define Documentation

#define HAVE_GETTIMEOFDAY 1

#define HAVE_SYS_TIME_H 1

#define SHIFTL | ( | x,
|  | i |  | ) | (((i) >= 0) ? ((x) << (i)) : ((x) >> (-i)))

## Function Documentation

static void captureFrame | ( | int | num | ) | `[static]`

static void createMainWindow | ( | int | _width,
|  | int | _height |
| ) |  |  | `[static]`

static void destroyMainWindow | ( |  | ) | `[static]`

void dsPlatformSimLoop | ( | int | window_width,
|  | int | window_height,
|  | dsFunctions * | fn,
|  | int | initial_pause |
| ) |  |  |

static int getHighBitIndex | ( | unsigned int | x | ) | `[static]`

static void handleEvent | ( | XEvent & | event,
|  | dsFunctions * | fn |
| ) |  |  | `[static]`

static void printMessage | ( | char * | msg1,
|  | char * | msg2,
|  | va_list | ap |
| ) |  |  | `[static]`

## Variable Documentation

Colormap colormap = 0`[static]`

Display* display = 0`[static]`

GLXContext glx_context = 0`[static]`

int height = 0`[static]`

int last_key_pressed = 0`[static]`

int pause = 0`[static]`

int run = 1`[static]`

int screen = 0`[static]`

int singlestep = 0`[static]`

XVisualInfo* visual = 0`[static]`

int width = 0`[static]`

Window win = 0`[static]`

Atom wm_delete_window_atom = 0`[static]`

Atom wm_protocols_atom = 0`[static]`

int writeframes = 0`[static]`