Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

glut_event.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/keysym.h>
#include "glutint.h"

Include dependency graph for glut_event.c:

Go to the source code of this file.

Defines

#define XK_KP_Home   0xFF95
#define XK_KP_Left   0xFF96
#define XK_KP_Up   0xFF97
#define XK_KP_Right   0xFF98
#define XK_KP_Down   0xFF99
#define XK_KP_Prior   0xFF9A
#define XK_KP_Next   0xFF9B
#define XK_KP_End   0xFF9C
#define XK_KP_Insert   0xFF9E
#define XK_KP_Delete   0xFF9F

Functions

void APIENTRY glutIdleFunc (GLUTidleCB idleFunc)
void APIENTRY glutTimerFunc (unsigned int interval, GLUTtimerCB timerFunc, int value)
void handleTimeouts (void)
void __glutPutOnWorkList (GLUTwindow *window, int workMask)
void __glutPostRedisplay (GLUTwindow *window, int layerMask)
void APIENTRY glutPostRedisplay (void)
void APIENTRY glutPostWindowRedisplay (int win)
void __glutRegisterEventParser (GLUTeventParser *parser)
static void markWindowHidden (GLUTwindow *window)
static void purgeStaleWindow (Window win)
static int interruptibleXNextEvent (Display *dpy, XEvent *event)
static void processEventsAndTimeouts (void)
static void waitForSomething (void)
static void idleWait (void)
static GLUTwindowprocessWindowWorkList (GLUTwindow *window)
void APIENTRY glutMainLoop (void)

Variables

static GLUTtimerfreeTimerList = NULL
GLUTidleCB __glutIdleFunc = NULL
GLUTtimer__glutTimerList = NULL
GLUTwindow__glutWindowWorkList = NULL
GLUTmenu__glutMappedMenu
GLUTmenu__glutCurrentMenu = NULL
void(* __glutUpdateInputDeviceMaskFunc )(GLUTwindow *)
void(* __glutMenuItemEnterOrLeave )(GLUTmenuItem *item, int num, int type) = NULL
void(* __glutFinishMenu )(Window win, int x, int y)
void(* __glutPaintMenu )(GLUTmenu *menu)
void(* __glutStartMenu )(GLUTmenu *menu, GLUTwindow *window, int x, int y, int x_win, int y_win)
GLUTmenu *(* __glutGetMenuByNum )(int menunum)
GLUTmenuItem *(* __glutGetMenuItem )(GLUTmenu *menu, Window win, int *which)
GLUTmenu *(* __glutGetMenu )(Window win)
Atom __glutMotifHints = None
unsigned int __glutModifierMask = (unsigned int) ~0
int __glutWindowDamaged = 0
static GLUTeventParsereventParserList = NULL
static GLUTwindow ** beforeEnd


Define Documentation

#define XK_KP_Delete   0xFF9F
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Down   0xFF99
 

Referenced by processEventsAndTimeouts().

#define XK_KP_End   0xFF9C
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Home   0xFF95
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Insert   0xFF9E
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Left   0xFF96
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Next   0xFF9B
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Prior   0xFF9A
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Right   0xFF98
 

Referenced by processEventsAndTimeouts().

#define XK_KP_Up   0xFF97
 

Referenced by processEventsAndTimeouts().


Function Documentation

void __glutPostRedisplay GLUTwindow window,
int  layerMask
 

Definition at line 191 of file glut_event.c.

References __glutPutOnWorkList(), GLUT_REDISPLAY_WORK, GLUT_REPAIR_WORK, _GLUTwindow::overlay, _GLUTwindow::shownState, _GLUToverlay::shownState, and _GLUTwindow::visState.

Referenced by glutPostOverlayRedisplay(), glutPostRedisplay(), glutPostWindowOverlayRedisplay(), glutPostWindowRedisplay(), and processEventsAndTimeouts().

void __glutPutOnWorkList GLUTwindow window,
int  workMask
 

Definition at line 173 of file glut_event.c.

References _GLUTwindow::prevWorkWin, and _GLUTwindow::workMask.

Referenced by __glutChangeWindowEventMask(), __glutPostRedisplay(), __glutSetWindow(), glutCreateSubWindow(), glutDestroyWindow(), glutEstablishOverlay(), glutRemoveOverlay(), glutTabletButtonFunc(), glutTabletMotionFunc(), glutWacomButtonFunc(), and glutWacomMotionFunc().

void __glutRegisterEventParser GLUTeventParser parser  ) 
 

Definition at line 232 of file glut_event.c.

References _GLUTeventParser::next.

Referenced by addDeviceEventParser().

void APIENTRY glutIdleFunc GLUTidleCB  idleFunc  ) 
 

Definition at line 103 of file glut_event.c.

References __glutIdleFunc.

void APIENTRY glutMainLoop void   ) 
 

Definition at line 1350 of file glut_event.c.

References __glutDisplay, __glutFatalUsage(), __glutIdleFunc, __glutWindowListSize, idleWait(), processEventsAndTimeouts(), processWindowWorkList(), and waitForSomething().

Referenced by GLUT_MANAGER::loop().

void APIENTRY glutPostRedisplay void   ) 
 

Definition at line 207 of file glut_event.c.

References __glutCurrentWindow, __glutPostRedisplay(), and GLUT_REDISPLAY_WORK.

Referenced by GLUT_MANAGER::do_idle().

void APIENTRY glutPostWindowRedisplay int  win  ) 
 

Definition at line 217 of file glut_event.c.

References __glutPostRedisplay(), __glutWindowList, and GLUT_REDISPLAY_WORK.

void APIENTRY glutTimerFunc unsigned int  interval,
GLUTtimerCB  timerFunc,
int  value
 

Definition at line 109 of file glut_event.c.

References __glutFatalError(), ADD_TIME, _GLUTtimer::func, GETTIMEOFDAY, int(), IS_AFTER, _GLUTtimer::next, _GLUTtimer::timeout, and _GLUTtimer::value.

void handleTimeouts void   ) 
 

Definition at line 153 of file glut_event.c.

References _GLUTtimer::func, GETTIMEOFDAY, IS_AT_OR_AFTER, _GLUTtimer::next, and _GLUTtimer::timeout.

Referenced by idleWait(), processEventsAndTimeouts(), and waitForSomething().

static void idleWait void   )  [static]
 

Definition at line 967 of file glut_event.c.

References __glutDisplay, __glutIdleFunc, handleTimeouts(), and processEventsAndTimeouts().

Referenced by glutMainLoop().

static int interruptibleXNextEvent Display *  dpy,
XEvent *  event
[static]
 

Definition at line 291 of file glut_event.c.

References __glutConnectionFD, __glutDisplay, and __glutFatalError().

Referenced by processEventsAndTimeouts().

static void markWindowHidden GLUTwindow window  )  [static]
 

Definition at line 239 of file glut_event.c.

References __glutSetWindow(), _GLUTwindow::children, _GLUTwindow::visState, and _GLUTwindow::windowStatus.

Referenced by processEventsAndTimeouts().

static void processEventsAndTimeouts void   )  [static]
 

Definition at line 321 of file glut_event.c.

References __glutDisplay, __glutFinishMenu, __glutGetMenu, __glutGetMenuByNum, __glutGetMenuItem, __glutGetWindow(), __glutMenuItemEnterOrLeave, __glutModifierMask, __glutPaintMenu, __glutPostRedisplay(), __glutSetWindow(), __glutStartMenu, __glutWacomSetOffset(), __glutWindowList, __glutWMDeleteWindow, _GLUTwindow::entry, _GLUTwindow::entryState, _GLUTwindow::forceReshape, _GLUTeventParser::func, GLUT_OVERLAY_REPAIR_WORK, GLUT_REPAIR_WORK, glXWaitX(), handleTimeouts(), _GLUTwindow::height, _GLUTwindow::ignoreKeyRepeat, interruptibleXNextEvent(), _GLUTwindow::keyboard, _GLUTwindow::keyboardUp, markWindowHidden(), _GLUTwindow::menu, _GLUTwindow::motion, _GLUTwindow::mouse, _GLUTwindow::move, _GLUTeventParser::next, _GLUTwindow::num, _GLUTwindow::overlay, _GLUTwindow::passive, purgeStaleWindow(), _GLUTwindow::reshape, _GLUTwindow::special, _GLUTwindow::specialUp, _GLUTwindow::visState, _GLUTwindow::width, _GLUToverlay::win, _GLUTwindow::win, _GLUTwindow::windowStatus, _GLUTwindow::x, XK_KP_Delete, XK_KP_Down, XK_KP_End, XK_KP_Home, XK_KP_Insert, XK_KP_Left, XK_KP_Next, XK_KP_Prior, XK_KP_Right, XK_KP_Up, and _GLUTwindow::y.

Referenced by glutMainLoop(), idleWait(), and waitForSomething().

static GLUTwindow* processWindowWorkList GLUTwindow window  )  [static]
 

Definition at line 985 of file glut_event.c.

References __glutDisplay, __glutEstablishColormapsProperty(), __glutGameModeWindow, __glutMesaSwapHackSupport, __glutMotifHints, __glutScreen, __glutSetWindow(), __glutUpdateInputDeviceMaskFunc, __glutWindowDamaged, __glutWindowList, _GLUTwindow::children, _GLUToverlay::ctx, _GLUTwindow::ctx, MotifWmHints::decorations, _GLUTwindow::desiredConfMask, _GLUTwindow::desiredHeight, _GLUTwindow::desiredMapState, _GLUTwindow::desiredStack, _GLUTwindow::desiredWidth, _GLUTwindow::desiredX, _GLUTwindow::desiredY, _GLUTwindow::display, _GLUToverlay::display, _GLUTwindow::eventMask, MotifWmHints::flags, _GLUTwindow::forceReshape, glFinish(), GLUT_COLORMAP_WORK, GLUT_CONFIGURE_WORK, GLUT_DEBUG_WORK, GLUT_DEVICE_MASK_WORK, GLUT_DONT_PROPAGATE_FILTER_MASK, GLUT_DUMMY_WORK, GLUT_EVENT_MASK_WORK, GLUT_FINISH_WORK, GLUT_FULL_SCREEN_WORK, GLUT_HACK_STOP_PROPAGATE_MASK, GLUT_MAP_WORK, GLUT_OVERLAY_EVENT_FILTER_MASK, GLUT_OVERLAY_REDISPLAY_WORK, GLUT_OVERLAY_REPAIR_WORK, GLUT_REDISPLAY_WORK, GLUT_REPAIR_WORK, MWM_HINTS_DECORATIONS, _GLUTwindow::num, _GLUTwindow::overlay, _GLUTwindow::parent, _GLUTwindow::prevWorkWin, _GLUTwindow::renderCtx, _GLUTwindow::renderWin, _GLUTwindow::shownState, _GLUTwindow::siblings, SWAP_BUFFERS_WINDOW, _GLUTwindow::usedSwapBuffers, _GLUToverlay::win, _GLUTwindow::win, and _GLUTwindow::workMask.

Referenced by glutMainLoop().

static void purgeStaleWindow Window  win  )  [static]
 

Definition at line 262 of file glut_event.c.

References __glutStaleWindowList, _GLUTstale::next, and _GLUTstale::win.

Referenced by processEventsAndTimeouts().

static void waitForSomething void   )  [static]
 

Definition at line 861 of file glut_event.c.

References __glutConnectionFD, __glutDisplay, __glutFatalError(), GETTIMEOFDAY, handleTimeouts(), IS_AFTER, processEventsAndTimeouts(), TIMEDELTA, and _GLUTtimer::timeout.

Referenced by glutMainLoop().


Variable Documentation

GLUTmenu* __glutCurrentMenu = NULL
 

Definition at line 84 of file glut_event.c.

void(* __glutFinishMenu)(Window win, int x, int y)
 

Definition at line 89 of file glut_event.c.

Referenced by processEventsAndTimeouts().

GLUTmenu*(* __glutGetMenu)(Window win)
 

Definition at line 94 of file glut_event.c.

Referenced by processEventsAndTimeouts().

GLUTmenu*(* __glutGetMenuByNum)(int menunum)
 

Definition at line 92 of file glut_event.c.

Referenced by processEventsAndTimeouts().

GLUTmenuItem*(* __glutGetMenuItem)(GLUTmenu *menu, Window win, int *which)
 

Definition at line 93 of file glut_event.c.

Referenced by processEventsAndTimeouts().

GLUTidleCB __glutIdleFunc = NULL
 

Definition at line 77 of file glut_event.c.

Referenced by glutIdleFunc(), glutMainLoop(), and idleWait().

GLUTmenu* __glutMappedMenu
 

Definition at line 83 of file glut_event.c.

Referenced by glutDestroyWindow().

void(* __glutMenuItemEnterOrLeave)(GLUTmenuItem *item, int num, int type) = NULL
 

Definition at line 88 of file glut_event.c.

Referenced by processEventsAndTimeouts().

unsigned int __glutModifierMask = (unsigned int) ~0
 

Definition at line 99 of file glut_event.c.

Referenced by __glutProcessDeviceEvents(), and processEventsAndTimeouts().

Atom __glutMotifHints = None
 

Definition at line 97 of file glut_event.c.

Referenced by processWindowWorkList().

void(* __glutPaintMenu)(GLUTmenu *menu)
 

Definition at line 90 of file glut_event.c.

Referenced by processEventsAndTimeouts().

void(* __glutStartMenu)(GLUTmenu *menu, GLUTwindow *window, int x, int y, int x_win, int y_win)
 

Definition at line 91 of file glut_event.c.

Referenced by processEventsAndTimeouts().

GLUTtimer* __glutTimerList = NULL
 

Definition at line 78 of file glut_event.c.

void(* __glutUpdateInputDeviceMaskFunc)(GLUTwindow *)
 

Definition at line 86 of file glut_event.c.

Referenced by glutTabletButtonFunc(), glutTabletMotionFunc(), glutWacomButtonFunc(), glutWacomMotionFunc(), and processWindowWorkList().

int __glutWindowDamaged = 0
 

Definition at line 100 of file glut_event.c.

Referenced by glutLayerGet(), and processWindowWorkList().

GLUTwindow* __glutWindowWorkList = NULL
 

Definition at line 82 of file glut_event.c.

Referenced by __glutCreateWindow(), and cleanWindowWorkList().

GLUTwindow** beforeEnd [static]
 

Definition at line 982 of file glut_event.c.

GLUTeventParser* eventParserList = NULL [static]
 

Definition at line 223 of file glut_event.c.

GLUTtimer* freeTimerList = NULL [static]
 

Definition at line 75 of file glut_event.c.


Generated on Mon Sep 18 11:41:20 2006 for jot by  doxygen 1.4.4