comparison mupdf-source/thirdparty/freeglut/src/mswin/fg_internal_mswin.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 /*
2 * fg_internal_mswin.h
3 *
4 * The freeglut library private include file.
5 *
6 * Copyright (c) 2012 Stephen J. Baker. All Rights Reserved.
7 * Written by John F. Fay, <fayjf@sourceforge.net>
8 * Creation date: Thu Jan 19, 2012
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 */
27
28 #ifndef FREEGLUT_INTERNAL_MSWIN_H
29 #define FREEGLUT_INTERNAL_MSWIN_H
30
31
32 /* All Win32 headers depend on the huge windows.h recursive include.
33 * Note: Lower-case header names are used, for best cross-platform
34 * compatibility.
35 */
36 #if !defined(_WIN32_WCE)
37 # include <windows.h>
38 # include <windowsx.h>
39 # include <mmsystem.h>
40 /* CYGWIN does not have tchar.h, but has TEXT(x), defined in winnt.h. */
41 # ifndef __CYGWIN__
42 # include <tchar.h>
43 # else
44 # define _TEXT(x) TEXT(x)
45 # define _T(x) TEXT(x)
46 # endif
47
48 #endif
49
50 /* Define some constants that aren't in Visual Studio 2005 */
51 #ifndef WM_MOUSEWHEEL
52 #define WM_MOUSEWHEEL 0x020A
53 #endif
54 #ifndef WHEEL_DELTA
55 #define WHEEL_DELTA 120
56 #endif
57
58 /* MinGW may lack a prototype for ChangeDisplaySettingsEx() (depending on the version?) */
59 #if !defined(ChangeDisplaySettingsEx)
60 LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
61 LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
62 # ifdef UNICODE
63 # define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
64 # else
65 # define ChangeDisplaySettingsEx ChangeDisplaySettingsExA
66 # endif
67 #endif
68
69
70 /* Structure Definitions */
71
72 typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;
73 struct tagSFG_PlatformDisplay
74 {
75 HINSTANCE Instance; /* The application's instance */
76 DEVMODE DisplayMode; /* Desktop's display settings */
77 char *DisplayName; /* Display name for multi display support*/
78 };
79
80 /*
81 * Make "freeglut" window handle and context types so that we don't need so
82 * much conditionally-compiled code later in the library.
83 */
84 typedef HWND SFG_WindowHandleType;
85 typedef HGLRC SFG_WindowContextType;
86 typedef struct tagSFG_PlatformContext SFG_PlatformContext;
87 struct tagSFG_PlatformContext
88 {
89 HDC Device; /* The window's device context */
90 };
91
92
93 /* Window's state description. This structure should be kept portable. */
94 typedef struct tagSFG_PlatformWindowState SFG_PlatformWindowState;
95 struct tagSFG_PlatformWindowState
96 {
97 RECT OldRect; /* window rect - stored before the window is made fullscreen */
98 DWORD OldStyle; /* window style - stored before the window is made fullscreen */
99 DWORD OldStyleEx; /* window Ex style - stored before the window is made fullscreen */
100 BOOL OldMaximized; /* window maximized state - stored before the window is made fullscreen */
101
102 BOOL MouseTracking; /* Needed for generating GLUT_ENTERED and GLUT_LEFT entry func callbacks on windows */
103
104 /* Need to store window titles to emulate
105 * glutSetIconTitle/glutSetWindowTitle as Windows has only
106 * one title associated with a window and we need to swap
107 * them out based on the window's iconic state
108 */
109 char* WindowTitle;
110 char* IconTitle;
111 };
112
113
114
115 /* Joystick-Specific Definitions */
116 #if !defined(_WIN32_WCE)
117 # define _JS_MAX_AXES 8
118 typedef struct tagSFG_PlatformJoystick SFG_PlatformJoystick;
119 struct tagSFG_PlatformJoystick
120 {
121 JOYCAPS jsCaps;
122 JOYINFOEX js;
123 UINT js_id;
124 };
125 #endif
126
127
128 /* Menu font and color definitions */
129 #define FREEGLUT_MENU_FONT GLUT_BITMAP_8_BY_13
130
131 #define FREEGLUT_MENU_PEN_FORE_COLORS {0.0f, 0.0f, 0.0f, 1.0f}
132 #define FREEGLUT_MENU_PEN_BACK_COLORS {0.85f, 0.85f, 0.85f, 1.0f}
133 #define FREEGLUT_MENU_PEN_HFORE_COLORS {1.0f, 1.0f, 1.0f, 1.0f}
134 #define FREEGLUT_MENU_PEN_HBACK_COLORS {0.15f, 0.15f, 0.45f, 1.0f}
135
136
137 /* Function to be called on exit */
138 extern void (__cdecl *__glutExitFunc)( int return_value );
139
140
141 #endif /* FREEGLUT_INTERNAL_MSWIN_H */