glutwin32.h revision c041511d
1#ifndef __glutwin32_h__
2#define __glutwin32_h__
3
4/* Copyright (c) Nate Robins, 1997. */
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#include "win32_x11.h"
11#include "win32_glx.h"
12
13/* We have to undef some things because Microsoft likes to pollute the
14   global namespace. */
15#undef TRANSPARENT
16
17/* Win32 "equivalent" cursors - eventually, the X glyphs should be
18   converted to Win32 cursors -- then they will look the same */
19#define XC_arrow               IDC_ARROW
20#define XC_top_left_arrow      IDC_ARROW
21#define XC_hand1               IDC_SIZEALL
22#define XC_pirate              IDC_NO
23#define XC_question_arrow      IDC_HELP
24#define XC_exchange            IDC_NO
25#define XC_spraycan            IDC_SIZEALL
26#define XC_watch               IDC_WAIT
27#define XC_xterm               IDC_IBEAM
28#define XC_crosshair           IDC_CROSS
29#define XC_sb_v_double_arrow   IDC_SIZENS
30#define XC_sb_h_double_arrow   IDC_SIZEWE
31#define XC_top_side            IDC_UPARROW
32#define XC_bottom_side         IDC_SIZENS
33#define XC_left_side           IDC_SIZEWE
34#define XC_right_side          IDC_SIZEWE
35#define XC_top_left_corner     IDC_SIZENWSE
36#define XC_top_right_corner    IDC_SIZENESW
37#define XC_bottom_right_corner IDC_SIZENWSE
38#define XC_bottom_left_corner  IDC_SIZENESW
39
40#define XA_STRING 0
41
42/* Private routines from win32_util.c */
43#ifndef __CYGWIN32__
44extern int gettimeofday(struct timeval* tp, void* tzp);
45#endif
46extern void *__glutFont(void *font);
47extern int __glutGetTransparentPixel(Display *dpy, XVisualInfo *vinfo);
48extern void __glutAdjustCoords(Window parent, int *x, int *y, int *width, int *height);
49
50
51/* Cygwin B20.1 misses the following definitions */
52#ifdef __CYGWIN32__
53
54/* from winuser.h */
55#define CDS_FULLSCREEN 4
56
57/* from mmsystem.h */
58#define WINMMAPI __declspec(dllimport)
59typedef UINT MMRESULT;
60
61#define MM_JOY1MOVE 0x3A0
62#define MM_JOY1ZMOVE 0x3A2
63#define MM_JOY1BUTTONDOWN 0x3B5
64#define MM_JOY1BUTTONUP 0x3B7
65
66#define JOYERR_NOERROR 0
67#define JOYERR_PARMS 165
68
69#define JOY_RETURNALL 0x000000ffl
70
71#define JOYSTICKID1 0
72
73typedef struct joyinfoex_tag {
74    DWORD dwSize;                /* size of structure */
75    DWORD dwFlags;               /* flags to indicate what to return */
76    DWORD dwXpos;                /* x position */
77    DWORD dwYpos;                /* y position */
78    DWORD dwZpos;                /* z position */
79    DWORD dwRpos;                /* rudder/4th axis position */
80    DWORD dwUpos;                /* 5th axis position */
81    DWORD dwVpos;                /* 6th axis position */
82    DWORD dwButtons;             /* button states */
83    DWORD dwButtonNumber;        /* current button number pressed */
84    DWORD dwPOV;                 /* point of view state */
85    DWORD dwReserved1;           /* reserved for communication between winmm & driver */
86    DWORD dwReserved2;           /* reserved for future expansion */
87} JOYINFOEX, *PJOYINFOEX, /* NEAR */ *NPJOYINFOEX, /* FAR */ *LPJOYINFOEX;
88
89WINMMAPI MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji);
90WINMMAPI MMRESULT WINAPI joyReleaseCapture( UINT uJoyID);
91WINMMAPI MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged);
92WINMMAPI MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold);
93
94#endif
95
96#endif /* __glutwin32_h__ */
97