Subversion Repositories shark

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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