1c041511dScube#ifndef __glutf90_h__
2c041511dScube#define __glutf90_h__
3c041511dScube
4c041511dScube/* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */
5c041511dScube
6c041511dScube/* This program is freely distributable without licensing fees
7c041511dScube   and is provided without guarantee or warrantee expressed or
8c041511dScube   implied. This program is -not- in the public domain. */
9c041511dScube
10c041511dScube/* This header provides the binding interface for William Mitchell's
11c041511dScube   f90gl Fortran 90 GLUT binding.  Other GLUT language bindings
12c041511dScube   can and should use this interace. */
13c041511dScube
14c041511dScube/* I appreciate the guidance from William Mitchell
15c041511dScube   (mitchell@cam.nist.gov) in developing this friend interface
16c041511dScube   for use by the f90gl package.  See ../../README.fortran */
17c041511dScube
18c041511dScube#include <GL/glut.h>
19c041511dScube
20c041511dScube/* Which callback enumerants for the __glutSetFCB/__glutGetFCB routines. */
21c041511dScube/* NOTE These values are part of a binary interface for the f90gl Fortran
22c041511dScube   90 binding and so must NOT changes (additions are allowed). */
23c041511dScube
24c041511dScube/* GLUTwindow callbacks. */
25c041511dScube#define GLUT_FCB_DISPLAY         0    /* GLUTdisplayFCB */
26c041511dScube#define GLUT_FCB_RESHAPE         1    /* GLUTreshapeFCB */
27c041511dScube#define GLUT_FCB_MOUSE           2    /* GLUTmouseFCB */
28c041511dScube#define GLUT_FCB_MOTION          3    /* GLUTmotionFCB */
29c041511dScube#define GLUT_FCB_PASSIVE         4    /* GLUTpassiveFCB */
30c041511dScube#define GLUT_FCB_ENTRY           5    /* GLUTentryFCB */
31c041511dScube#define GLUT_FCB_KEYBOARD        6    /* GLUTkeyboardFCB */
32c041511dScube#define GLUT_FCB_KEYBOARD_UP     7    /* GLUTkeyboardFCB */
33c041511dScube#define GLUT_FCB_WINDOW_STATUS   8    /* GLUTwindowStatusFCB */
34c041511dScube#define GLUT_FCB_VISIBILITY      9    /* GLUTvisibilityFCB */
35c041511dScube#define GLUT_FCB_SPECIAL         10   /* GLUTspecialFCB */
36c041511dScube#define GLUT_FCB_SPECIAL_UP      11   /* GLUTspecialFCB */
37c041511dScube#define GLUT_FCB_BUTTON_BOX      12   /* GLUTbuttonBoxFCB */
38c041511dScube#define GLUT_FCB_DIALS           13   /* GLUTdialsFCB */
39c041511dScube#define GLUT_FCB_SPACE_MOTION    14   /* GLUTspaceMotionFCB */
40c041511dScube#define GLUT_FCB_SPACE_ROTATE    15   /* GLUTspaceRotateFCB */
41c041511dScube#define GLUT_FCB_SPACE_BUTTON    16   /* GLUTspaceButtonFCB */
42c041511dScube#define GLUT_FCB_TABLET_MOTION   17   /* GLUTtabletMotionFCB */
43c041511dScube#define GLUT_FCB_TABLET_BUTTON   18   /* GLUTtabletButtonFCB */
44c041511dScube#define GLUT_FCB_JOYSTICK        19   /* GLUTjoystickFCB */
45c041511dScube/* Non-GLUTwindow callbacks. */
46c041511dScube#define GLUT_FCB_OVERLAY_DISPLAY 100  /* GLUTdisplayFCB */
47c041511dScube#define GLUT_FCB_SELECT          101  /* GLUTselectFCB */
48c041511dScube#define GLUT_FCB_TIMER           102  /* GLUTtimerFCB */
49c041511dScube
50c041511dScube/* GLUT Fortran callback function types. */
51c041511dScubetypedef void (GLUTCALLBACK *GLUTdisplayFCB) (void);
52c041511dScubetypedef void (GLUTCALLBACK *GLUTreshapeFCB) (int *, int *);
53c041511dScube/* NOTE the pressed key is int, not unsigned char for Fortran! */
54c041511dScubetypedef void (GLUTCALLBACK *GLUTkeyboardFCB) (int *, int *, int *);
55c041511dScubetypedef void (GLUTCALLBACK *GLUTmouseFCB) (int *, int *, int *, int *);
56c041511dScubetypedef void (GLUTCALLBACK *GLUTmotionFCB) (int *, int *);
57c041511dScubetypedef void (GLUTCALLBACK *GLUTpassiveFCB) (int *, int *);
58c041511dScubetypedef void (GLUTCALLBACK *GLUTentryFCB) (int *);
59c041511dScubetypedef void (GLUTCALLBACK *GLUTwindowStatusFCB) (int *);
60c041511dScubetypedef void (GLUTCALLBACK *GLUTvisibilityFCB) (int *);
61c041511dScubetypedef void (GLUTCALLBACK *GLUTspecialFCB) (int *, int *, int *);
62c041511dScubetypedef void (GLUTCALLBACK *GLUTbuttonBoxFCB) (int *, int *);
63c041511dScubetypedef void (GLUTCALLBACK *GLUTdialsFCB) (int *, int *);
64c041511dScubetypedef void (GLUTCALLBACK *GLUTspaceMotionFCB) (int *, int *, int *);
65c041511dScubetypedef void (GLUTCALLBACK *GLUTspaceRotateFCB) (int *, int *, int *);
66c041511dScubetypedef void (GLUTCALLBACK *GLUTspaceButtonFCB) (int *, int *);
67c041511dScubetypedef void (GLUTCALLBACK *GLUTtabletMotionFCB) (int *, int *);
68c041511dScubetypedef void (GLUTCALLBACK *GLUTtabletButtonFCB) (int *, int *, int *, int *);
69c041511dScubetypedef void (GLUTCALLBACK *GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z);
70c041511dScube
71c041511dScubetypedef void (GLUTCALLBACK *GLUTselectFCB) (int *);
72c041511dScubetypedef void (GLUTCALLBACK *GLUTtimerFCB) (int *);
73c041511dScubetypedef void (GLUTCALLBACK *GLUTmenuStateFCB) (int *);  /* DEPRICATED. */
74c041511dScubetypedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *);
75c041511dScubetypedef void (GLUTCALLBACK *GLUTidleFCB) (void);
76c041511dScube
77c041511dScube/* Functions that set and return Fortran callback functions. */
78c041511dScubeGLUTAPI GLUTproc APIENTRY __glutGetFCB(int which);
79c041511dScubeGLUTAPI void APIENTRY __glutSetFCB(int which, GLUTproc func);
80c041511dScube
81c041511dScube#endif  /* __glutf90_h__ */
82