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