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__
44struct timeval;
45extern int gettimeofday(struct timeval* tp, void* tzp);
46#endif
47extern void *__glutFont(void *font);
48extern int __glutGetTransparentPixel(Display *dpy, XVisualInfo *vinfo);
49extern void __glutAdjustCoords(Window parent, int *x, int *y, int *width, int *height);
50
51
52/* Cygwin B20.1 misses the following definitions */
53#ifdef __CYGWIN32__
54
55/* from winuser.h */
56#define CDS_FULLSCREEN 4
57
58/* from mmsystem.h */
59#define WINMMAPI __declspec(dllimport)
60typedef UINT MMRESULT;
61
62#define MM_JOY1MOVE 0x3A0
63#define MM_JOY1ZMOVE 0x3A2
64#define MM_JOY1BUTTONDOWN 0x3B5
65#define MM_JOY1BUTTONUP 0x3B7
66
67#define JOYERR_NOERROR 0
68#define JOYERR_PARMS 165
69
70#define JOY_RETURNALL 0x000000ffl
71
72#define JOYSTICKID1 0
73
74typedef struct joyinfoex_tag {
75    DWORD dwSize;                /* size of structure */
76    DWORD dwFlags;               /* flags to indicate what to return */
77    DWORD dwXpos;                /* x position */
78    DWORD dwYpos;                /* y position */
79    DWORD dwZpos;                /* z position */
80    DWORD dwRpos;                /* rudder/4th axis position */
81    DWORD dwUpos;                /* 5th axis position */
82    DWORD dwVpos;                /* 6th axis position */
83    DWORD dwButtons;             /* button states */
84    DWORD dwButtonNumber;        /* current button number pressed */
85    DWORD dwPOV;                 /* point of view state */
86    DWORD dwReserved1;           /* reserved for communication between winmm & driver */
87    DWORD dwReserved2;           /* reserved for future expansion */
88} JOYINFOEX, *PJOYINFOEX, /* NEAR */ *NPJOYINFOEX, /* FAR */ *LPJOYINFOEX;
89
90WINMMAPI MMRESULT WINAPI joyGetPosEx( UINT uJoyID, LPJOYINFOEX pji);
91WINMMAPI MMRESULT WINAPI joyReleaseCapture( UINT uJoyID);
92WINMMAPI MMRESULT WINAPI joySetCapture( HWND hwnd, UINT uJoyID, UINT uPeriod, BOOL fChanged);
93WINMMAPI MMRESULT WINAPI joySetThreshold( UINT uJoyID, UINT uThreshold);
94
95#endif
96
97#endif /* __glutwin32_h__ */
98