summaryrefslogtreecommitdiff
path: root/src/glut
diff options
context:
space:
mode:
Diffstat (limited to 'src/glut')
-rw-r--r--src/glut/glx/Makefile.win200
-rw-r--r--src/glut/glx/glut.def10
-rw-r--r--src/glut/glx/win32_x11.h652
3 files changed, 431 insertions, 431 deletions
diff --git a/src/glut/glx/Makefile.win b/src/glut/glx/Makefile.win
index c3f9614099..2823a00900 100644
--- a/src/glut/glx/Makefile.win
+++ b/src/glut/glx/Makefile.win
@@ -1,100 +1,100 @@
-# Makefile for Win32
-
-!include <win32.mak>
-
-TOP = ..
-
-# NOTE: glut_menu.c and glut_glxext.c are NOT compiled into Win32 GLUT
-
-SRCS = glut_8x13.c glut_9x15.c glut_bitmap.c glut_bwidth.c glut_cindex.c glut_cmap.c glut_cursor.c glut_dials.c glut_dstr.c glut_event.c glut_ext.c glut_fbc.c glut_fullscrn.c glut_gamemode.c glut_get.c glut_hel10.c glut_hel12.c glut_hel18.c glut_init.c glut_input.c glut_joy.c glut_key.c glut_keyctrl.c glut_keyup.c glut_mesa.c glut_modifier.c glut_mroman.c glut_overlay.c glut_roman.c glut_shapes.c glut_space.c glut_stroke.c glut_swap.c glut_swidth.c glut_tablet.c glut_teapot.c glut_tr10.c glut_tr24.c glut_util.c glut_vidresize.c glut_warp.c glut_win.c glut_winmisc.c win32_glx.c win32_menu.c win32_util.c win32_winproc.c win32_x11.c
-
-all : glutdll
-
-!include "$(TOP)/mesawin32.mak"
-
-glutdll : $(GLUTDLL)
-
-!IFDEF NODEBUG
-OPTIMIZE_CFLAGS = -DNDEBUG
-!ENDIF
-
-CFLAGS = $(cvarsdll) $(CFLAGS) $(OPTIMIZE_CFLAGS) -DMESA -DBUILD_GL32
-LFLAGS = $(dlllflags) $(LFLAGS)
-
-OBJS = $(SRCS:.c=.obj)
-MS_LIBS = $(MS_OPENGL) $(MS_GLU) winmm.lib $(guilibsdll)
-MS_LIBS = ../lib/opengl32.lib ../lib/glu32.lib winmm.lib $(guilibsdll)
-SGI_LIBS = $(SGI_OPENGL) $(SGI_GLU) winmm.lib $(guilibsdll)
-
-glut32.dll : $(OBJS) glut.def
- $(link) $(LFLAGS) -out:glut32.dll -def:glut.def $(OBJS) $(MS_LIBS)
- @echo "copying GLUT dynamic link library to lib directory..."
- -copy $(GLUTDLL) ..\lib
- @echo "copying GLUT import library to lib directory..."
- -copy $(GLUTLIB) ..\lib
-
-glut.dll : $(OBJS) glut.def
- $(link) $(LFLAGS) -out:glut.dll -def:glut.def $(OBJS) $(SGI_LIBS)
-
-install : $(GLUTDLL)
- @echo "copying GLUT dynamic link library to system directory..."
- -copy $(GLUTDLL) $(DLLINSTALL)
- @echo "copying GLUT header file to include directory..."
- -copy ..\include\GL\glut.h $(INCLUDEINSTALL)
- @echo "copying GLUT import library to library directory..."
- -copy $(GLUTLIB) $(LIBINSTALL)
-
-.c.obj :
- $(cc) $(CFLAGS) -I . $*.c
-
-# explicit object dependencies for all source files
-
-win32_glx.obj: win32_glx.c win32_glx.h
-win32_x11.obj: win32_x11.c win32_x11.h
-win32_menu.obj: win32_menu.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h
-win32_util.obj: win32_util.c glutint.h ..\include\GL\glutf90.h
-win32_winproc.obj: win32_winproc.c glutint.h ..\include\GL\glutf90.h
-
-glut_mroman.obj: glut_mroman.c glutstroke.h glutint.h ..\include\GL\glutf90.h
-glut_roman.obj: glut_roman.c glutstroke.h glutint.h ..\include\GL\glutf90.h
-glut_hel12.obj: glut_hel12.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-glut_8x13.obj: glut_8x13.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-glut_hel18.obj: glut_hel18.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-glut_9x15.obj: glut_9x15.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-glut_tr10.obj: glut_tr10.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-glut_hel10.obj: glut_hel10.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-glut_tr24.obj: glut_tr24.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
-
-glut_bitmap.obj: glut_bitmap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_bwidth.obj: glut_bwidth.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_cindex.obj: glut_cindex.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_cmap.obj: glut_cmap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_cursor.obj: glut_cursor.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_dials.obj: glut_dials.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_dstr.obj: glut_dstr.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_event.obj: glut_event.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_ext.obj: glut_ext.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_fullscrn.obj: glut_fullscrn.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_gamemode.obj: glut_gamemode.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_get.obj: glut_get.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_init.obj: glut_init.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_input.obj: glut_input.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_joy.obj: glut_joy.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_key.obj: glut_key.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_keyctrl.obj: glut_keyctrl.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_keyup.obj: glut_keyup.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_mesa.obj: glut_mesa.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_modifier.obj: glut_modifier.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_overlay.obj: glut_overlay.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_shapes.obj: glut_shapes.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_space.obj: glut_space.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_swap.obj: glut_swap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_swidth.obj: glut_swidth.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_tablet.obj: glut_tablet.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_teapot.obj: glut_teapot.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_util.obj: glut_util.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_vidresize.obj: glut_vidresize.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_warp.obj: glut_warp.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-glut_win.obj: glut_win.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h
-glut_winmisc.obj: glut_winmisc.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
-
+# Makefile for Win32
+
+!include <win32.mak>
+
+TOP = ..
+
+# NOTE: glut_menu.c and glut_glxext.c are NOT compiled into Win32 GLUT
+
+SRCS = glut_8x13.c glut_9x15.c glut_bitmap.c glut_bwidth.c glut_cindex.c glut_cmap.c glut_cursor.c glut_dials.c glut_dstr.c glut_event.c glut_ext.c glut_fbc.c glut_fullscrn.c glut_gamemode.c glut_get.c glut_hel10.c glut_hel12.c glut_hel18.c glut_init.c glut_input.c glut_joy.c glut_key.c glut_keyctrl.c glut_keyup.c glut_mesa.c glut_modifier.c glut_mroman.c glut_overlay.c glut_roman.c glut_shapes.c glut_space.c glut_stroke.c glut_swap.c glut_swidth.c glut_tablet.c glut_teapot.c glut_tr10.c glut_tr24.c glut_util.c glut_vidresize.c glut_warp.c glut_win.c glut_winmisc.c win32_glx.c win32_menu.c win32_util.c win32_winproc.c win32_x11.c
+
+all : glutdll
+
+!include "$(TOP)/mesawin32.mak"
+
+glutdll : $(GLUTDLL)
+
+!IFDEF NODEBUG
+OPTIMIZE_CFLAGS = -DNDEBUG
+!ENDIF
+
+CFLAGS = $(cvarsdll) $(CFLAGS) $(OPTIMIZE_CFLAGS) -DMESA -DBUILD_GL32
+LFLAGS = $(dlllflags) $(LFLAGS)
+
+OBJS = $(SRCS:.c=.obj)
+MS_LIBS = $(MS_OPENGL) $(MS_GLU) winmm.lib $(guilibsdll)
+MS_LIBS = ../lib/opengl32.lib ../lib/glu32.lib winmm.lib $(guilibsdll)
+SGI_LIBS = $(SGI_OPENGL) $(SGI_GLU) winmm.lib $(guilibsdll)
+
+glut32.dll : $(OBJS) glut.def
+ $(link) $(LFLAGS) -out:glut32.dll -def:glut.def $(OBJS) $(MS_LIBS)
+ @echo "copying GLUT dynamic link library to lib directory..."
+ -copy $(GLUTDLL) ..\lib
+ @echo "copying GLUT import library to lib directory..."
+ -copy $(GLUTLIB) ..\lib
+
+glut.dll : $(OBJS) glut.def
+ $(link) $(LFLAGS) -out:glut.dll -def:glut.def $(OBJS) $(SGI_LIBS)
+
+install : $(GLUTDLL)
+ @echo "copying GLUT dynamic link library to system directory..."
+ -copy $(GLUTDLL) $(DLLINSTALL)
+ @echo "copying GLUT header file to include directory..."
+ -copy ..\include\GL\glut.h $(INCLUDEINSTALL)
+ @echo "copying GLUT import library to library directory..."
+ -copy $(GLUTLIB) $(LIBINSTALL)
+
+.c.obj :
+ $(cc) $(CFLAGS) -I . $*.c
+
+# explicit object dependencies for all source files
+
+win32_glx.obj: win32_glx.c win32_glx.h
+win32_x11.obj: win32_x11.c win32_x11.h
+win32_menu.obj: win32_menu.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h
+win32_util.obj: win32_util.c glutint.h ..\include\GL\glutf90.h
+win32_winproc.obj: win32_winproc.c glutint.h ..\include\GL\glutf90.h
+
+glut_mroman.obj: glut_mroman.c glutstroke.h glutint.h ..\include\GL\glutf90.h
+glut_roman.obj: glut_roman.c glutstroke.h glutint.h ..\include\GL\glutf90.h
+glut_hel12.obj: glut_hel12.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+glut_8x13.obj: glut_8x13.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+glut_hel18.obj: glut_hel18.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+glut_9x15.obj: glut_9x15.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+glut_tr10.obj: glut_tr10.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+glut_hel10.obj: glut_hel10.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+glut_tr24.obj: glut_tr24.c glutbitmap.h glutint.h ..\include\GL\glutf90.h
+
+glut_bitmap.obj: glut_bitmap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_bwidth.obj: glut_bwidth.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_cindex.obj: glut_cindex.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_cmap.obj: glut_cmap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_cursor.obj: glut_cursor.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_dials.obj: glut_dials.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_dstr.obj: glut_dstr.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_event.obj: glut_event.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_ext.obj: glut_ext.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_fullscrn.obj: glut_fullscrn.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_gamemode.obj: glut_gamemode.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_get.obj: glut_get.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_init.obj: glut_init.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_input.obj: glut_input.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_joy.obj: glut_joy.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_key.obj: glut_key.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_keyctrl.obj: glut_keyctrl.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_keyup.obj: glut_keyup.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_mesa.obj: glut_mesa.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_modifier.obj: glut_modifier.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_overlay.obj: glut_overlay.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_shapes.obj: glut_shapes.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_space.obj: glut_space.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_swap.obj: glut_swap.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_swidth.obj: glut_swidth.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_tablet.obj: glut_tablet.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_teapot.obj: glut_teapot.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_util.obj: glut_util.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_vidresize.obj: glut_vidresize.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_warp.obj: glut_warp.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+glut_win.obj: glut_win.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h
+glut_winmisc.obj: glut_winmisc.c glutint.h ..\include\GL\glutf90.h ..\include\GL\glut.h glutwin32.h win32_glx.h win32_x11.h
+
diff --git a/src/glut/glx/glut.def b/src/glut/glx/glut.def
index 94da6ab852..d7d0240fca 100644
--- a/src/glut/glx/glut.def
+++ b/src/glut/glx/glut.def
@@ -1,9 +1,9 @@
DESCRIPTION 'OpenGL Utility Toolkit for Win32'
-
-VERSION 3.7
-
+
+VERSION 3.7
+
EXPORTS
-
+
glutAddMenuEntry
glutAddSubMenu
glutAttachMenu
@@ -123,4 +123,4 @@ EXPORTS
glutWireTorus
; __glutSetFCB
; __glutGetFCB
-
+
diff --git a/src/glut/glx/win32_x11.h b/src/glut/glx/win32_x11.h
index 70de906091..1d8d048b2e 100644
--- a/src/glut/glx/win32_x11.h
+++ b/src/glut/glx/win32_x11.h
@@ -1,326 +1,326 @@
-#ifndef __win32_x11_h__
-#define __win32_x11_h__
-
-/* Copyright (c) Nate Robins, 1997. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-#include <stdlib.h>
-#include <windows.h>
-
-/* These definitions are missing from windows.h */
-WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, PIXELFORMATDESCRIPTOR *);
-WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
-WINGDIAPI int WINAPI wglGetPixelFormat(HDC);
-WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, PIXELFORMATDESCRIPTOR *);
-WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC);
-
-/* Type definitions (conversions) */
-typedef int Visual; /* Win32 equivalent of X11 type */
-typedef HWND Window;
-typedef HPALETTE Colormap;
-typedef PIXELFORMATDESCRIPTOR XVisualInfo;
-typedef BOOL Bool;
-typedef MSG XEvent;
-typedef HDC Display;
-typedef HCURSOR Cursor;
-
-typedef int Atom; /* dummies */
-typedef int XDevice;
-typedef int Status;
-
-#define True TRUE /* Win32 equivalents of X11 booleans */
-#define False FALSE
-
-#define None 0L /* universal null resource or null atom */
-
-/* Input Event Masks. Used as event-mask window attribute and as arguments
- to Grab requests. Not to be confused with event names. */
-
-#define NoEventMask 0L
-#define KeyPressMask (1L<<0)
-#define KeyReleaseMask (1L<<1)
-#define ButtonPressMask (1L<<2)
-#define ButtonReleaseMask (1L<<3)
-#define EnterWindowMask (1L<<4)
-#define LeaveWindowMask (1L<<5)
-#define PointerMotionMask (1L<<6)
-#define PointerMotionHintMask (1L<<7)
-#define Button1MotionMask (1L<<8)
-#define Button2MotionMask (1L<<9)
-#define Button3MotionMask (1L<<10)
-#define Button4MotionMask (1L<<11)
-#define Button5MotionMask (1L<<12)
-#define ButtonMotionMask (1L<<13)
-#define KeymapStateMask (1L<<14)
-#define ExposureMask (1L<<15)
-#define VisibilityChangeMask (1L<<16)
-#define StructureNotifyMask (1L<<17)
-#define ResizeRedirectMask (1L<<18)
-#define SubstructureNotifyMask (1L<<19)
-#define SubstructureRedirectMask (1L<<20)
-#define FocusChangeMask (1L<<21)
-#define PropertyChangeMask (1L<<22)
-#define ColormapChangeMask (1L<<23)
-#define OwnerGrabButtonMask (1L<<24)
-
-/* Key masks. Used as modifiers to GrabButton and GrabKey, results of
- QueryPointer, state in various key-, mouse-, and button-related
- events. */
-
-#define ShiftMask (1<<0)
-#define LockMask (1<<1)
-#define ControlMask (1<<2)
-#define Mod1Mask (1<<3)
-#define Mod2Mask (1<<4)
-#define Mod3Mask (1<<5)
-#define Mod4Mask (1<<6)
-#define Mod5Mask (1<<7)
-
-/* Window classes used by CreateWindow */
-/* Note that CopyFromParent is already defined as 0 above */
-
-#define InputOutput 1
-#define InputOnly 2
-
-/* Window attributes for CreateWindow and ChangeWindowAttributes */
-
-#define CWBackPixmap (1L<<0)
-#define CWBackPixel (1L<<1)
-#define CWBorderPixmap (1L<<2)
-#define CWBorderPixel (1L<<3)
-#define CWBitGravity (1L<<4)
-#define CWWinGravity (1L<<5)
-#define CWBackingStore (1L<<6)
-#define CWBackingPlanes (1L<<7)
-#define CWBackingPixel (1L<<8)
-#define CWOverrideRedirect (1L<<9)
-#define CWSaveUnder (1L<<10)
-#define CWEventMask (1L<<11)
-#define CWDontPropagate (1L<<12)
-#define CWColormap (1L<<13)
-#define CWCursor (1L<<14)
-
-/* ConfigureWindow structure */
-
-#define CWX (1<<0)
-#define CWY (1<<1)
-#define CWWidth (1<<2)
-#define CWHeight (1<<3)
-#define CWBorderWidth (1<<4)
-#define CWSibling (1<<5)
-#define CWStackMode (1<<6)
-
-
-/* Used in GetWindowAttributes reply */
-
-#define IsUnmapped 0
-#define IsUnviewable 1
-#define IsViewable 2
-
-/* Window stacking method (in configureWindow) */
-
-#define Above 0
-#define Below 1
-#define TopIf 2
-#define BottomIf 3
-#define Opposite 4
-
-/* For CreateColormap */
-
-#define AllocNone 0 /* create map with no entries */
-#define AllocAll 1 /* allocate entire map writeable */
-
-
-/* Flags used in StoreNamedColor, StoreColors */
-
-#define DoRed (1<<0)
-#define DoGreen (1<<1)
-#define DoBlue (1<<2)
-
-/*
- * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
- * value (x, y, width, height) was found in the parsed string.
- */
-#define NoValue 0x0000
-#define XValue 0x0001
-#define YValue 0x0002
-#define WidthValue 0x0004
-#define HeightValue 0x0008
-#define AllValues 0x000F
-#define XNegative 0x0010
-#define YNegative 0x0020
-
-/* flags argument in size hints */
-#define USPosition (1L << 0) /* user specified x, y */
-#define USSize (1L << 1) /* user specified width, height */
-
-/* definitions for initial window state */
-#define WithdrawnState 0 /* for windows that are not mapped */
-#define NormalState 1 /* most applications want to start this way */
-#define IconicState 3 /* application wants to start as an icon */
-#define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */
-
-/* Type definitions */
-
-typedef struct {
- unsigned int background_pixmap; /* background pixmap */
- unsigned long background_pixel; /* background pixel */
- unsigned long border_pixel; /* border pixel value */
- long event_mask; /* set of events that should be saved */
- long do_not_propagate_mask; /* set of events that should not propagate */
- Bool override_redirect; /* boolean value for override-redirect */
- Colormap colormap; /* color map to be associated with window */
-} XSetWindowAttributes;
-
-typedef struct {
- unsigned long pixel;
- unsigned short red, green, blue;
- char flags; /* do_red, do_green, do_blue */
-} XColor;
-
-typedef struct {
- unsigned char *value; /* same as Property routines */
- Atom encoding; /* prop type */
- int format; /* prop data format: 8, 16, or 32 */
- unsigned long nitems; /* number of data items in value */
-} XTextProperty;
-
-typedef struct {
- long flags; /* marks which fields in this structure are defined */
- int x, y; /* obsolete for new window mgrs, but clients */
- int width, height; /* should set so old wm's don't mess up */
-} XSizeHints;
-
-/* Functions emulated by macros. */
-
-#define XFreeColormap(display, colormap) \
- DeleteObject(colormap)
-
-#define XCreateFontCursor(display, shape) \
- LoadCursor(NULL, shape)
-
-#define XDefineCursor(display, window, cursor) \
- SetCursor(cursor)
-
-#define XFlush(display) \
- /* Nothing. */
-
-#define DisplayWidth(display, screen) \
- GetSystemMetrics(SM_CXSCREEN)
-
-#define DisplayHeight(display, screen) \
- GetSystemMetrics(SM_CYSCREEN)
-
-#define XMapWindow(display, window) \
- ShowWindow(window, SW_SHOWNORMAL)
-
-#define XUnmapWindow(display, window) \
- ShowWindow(window, SW_HIDE)
-
-#define XIconifyWindow(display, window, screen) \
- ShowWindow(window, SW_MINIMIZE)
-
-#define XWithdrawWindow(display, window, screen) \
- ShowWindow(window, SW_HIDE)
-
-#define XLowerWindow(display, window) \
- SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
-
-#define XSetWMName(display, window, tp) \
- SetWindowText(window, (tp)->value)
-
-/* There really isn't a way to set the icon name separate from the
- windows name in Win32, so, just set the windows name. */
-#define XSetWMIconName(display, window, tp) \
- XSetWMName(display, window, tp)
-
-#define XDestroyWindow(display, window) \
- DestroyWindow(window)
-
-/* Anything that needs to be freed was allocated with malloc in our
- fake X windows library for Win32, so free it with plain old
- free(). */
-#define XFree(data) \
- free(data)
-
-/* Nothing to be done for this...the pointer is always 'ungrabbed'
- in Win32. */
-#define XUngrabPointer(display, time) \
- /* Nothing. */
-
-/* Function prototypes. */
-
-extern XVisualInfo* XGetVisualInfo(
- Display* display,
- long mask,
- XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */
- int*nitems);
-
-extern Colormap XCreateColormap(
- Display* display,
- Window root,
- Visual* visual,
- int alloc);
-
-extern void XAllocColorCells(
- Display* display,
- Colormap colormap,
- Bool contig,
- unsigned long plane_masks_return[],
- unsigned int nplanes,
- unsigned long pixels_return[],
- unsigned int npixels);
-
-extern void XStoreColor(
- Display* display,
- Colormap colormap,
- XColor* color);
-
-extern void XSetWindowColormap(
- Display* display,
- Window window,
- Colormap colormap);
-
-extern Bool XTranslateCoordinates(
- Display *display,
- Window src, Window dst,
- int src_x, int src_y,
- int* dest_x_return, int* dest_y_return,
- Window* child_return);
-
-extern Status XGetGeometry(
- Display* display,
- Window window,
- Window* root_return,
- int* x_return, int* y_return,
- unsigned int* width_return, unsigned int* height_return,
- unsigned int *border_width_return,
- unsigned int* depth_return);
-
-extern int DisplayWidthMM(
- Display* display,
- int screen);
-
-extern int DisplayHeightMM(
- Display* display,
- int screen);
-
-extern void XWarpPointer(
- Display* display,
- Window src, Window dst,
- int src_x, int src_y,
- int src_width, int src_height,
- int dst_x, int dst_y);
-
-extern int XParseGeometry(
- char* string,
- int* x, int* y,
- unsigned int* width, unsigned int* height);
-
-extern int XPending(
- Display* display);
-
-#endif /* __win32_x11_h__ */
+#ifndef __win32_x11_h__
+#define __win32_x11_h__
+
+/* Copyright (c) Nate Robins, 1997. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+#include <stdlib.h>
+#include <windows.h>
+
+/* These definitions are missing from windows.h */
+WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, PIXELFORMATDESCRIPTOR *);
+WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
+WINGDIAPI int WINAPI wglGetPixelFormat(HDC);
+WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, PIXELFORMATDESCRIPTOR *);
+WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC);
+
+/* Type definitions (conversions) */
+typedef int Visual; /* Win32 equivalent of X11 type */
+typedef HWND Window;
+typedef HPALETTE Colormap;
+typedef PIXELFORMATDESCRIPTOR XVisualInfo;
+typedef BOOL Bool;
+typedef MSG XEvent;
+typedef HDC Display;
+typedef HCURSOR Cursor;
+
+typedef int Atom; /* dummies */
+typedef int XDevice;
+typedef int Status;
+
+#define True TRUE /* Win32 equivalents of X11 booleans */
+#define False FALSE
+
+#define None 0L /* universal null resource or null atom */
+
+/* Input Event Masks. Used as event-mask window attribute and as arguments
+ to Grab requests. Not to be confused with event names. */
+
+#define NoEventMask 0L
+#define KeyPressMask (1L<<0)
+#define KeyReleaseMask (1L<<1)
+#define ButtonPressMask (1L<<2)
+#define ButtonReleaseMask (1L<<3)
+#define EnterWindowMask (1L<<4)
+#define LeaveWindowMask (1L<<5)
+#define PointerMotionMask (1L<<6)
+#define PointerMotionHintMask (1L<<7)
+#define Button1MotionMask (1L<<8)
+#define Button2MotionMask (1L<<9)
+#define Button3MotionMask (1L<<10)
+#define Button4MotionMask (1L<<11)
+#define Button5MotionMask (1L<<12)
+#define ButtonMotionMask (1L<<13)
+#define KeymapStateMask (1L<<14)
+#define ExposureMask (1L<<15)
+#define VisibilityChangeMask (1L<<16)
+#define StructureNotifyMask (1L<<17)
+#define ResizeRedirectMask (1L<<18)
+#define SubstructureNotifyMask (1L<<19)
+#define SubstructureRedirectMask (1L<<20)
+#define FocusChangeMask (1L<<21)
+#define PropertyChangeMask (1L<<22)
+#define ColormapChangeMask (1L<<23)
+#define OwnerGrabButtonMask (1L<<24)
+
+/* Key masks. Used as modifiers to GrabButton and GrabKey, results of
+ QueryPointer, state in various key-, mouse-, and button-related
+ events. */
+
+#define ShiftMask (1<<0)
+#define LockMask (1<<1)
+#define ControlMask (1<<2)
+#define Mod1Mask (1<<3)
+#define Mod2Mask (1<<4)
+#define Mod3Mask (1<<5)
+#define Mod4Mask (1<<6)
+#define Mod5Mask (1<<7)
+
+/* Window classes used by CreateWindow */
+/* Note that CopyFromParent is already defined as 0 above */
+
+#define InputOutput 1
+#define InputOnly 2
+
+/* Window attributes for CreateWindow and ChangeWindowAttributes */
+
+#define CWBackPixmap (1L<<0)
+#define CWBackPixel (1L<<1)
+#define CWBorderPixmap (1L<<2)
+#define CWBorderPixel (1L<<3)
+#define CWBitGravity (1L<<4)
+#define CWWinGravity (1L<<5)
+#define CWBackingStore (1L<<6)
+#define CWBackingPlanes (1L<<7)
+#define CWBackingPixel (1L<<8)
+#define CWOverrideRedirect (1L<<9)
+#define CWSaveUnder (1L<<10)
+#define CWEventMask (1L<<11)
+#define CWDontPropagate (1L<<12)
+#define CWColormap (1L<<13)
+#define CWCursor (1L<<14)
+
+/* ConfigureWindow structure */
+
+#define CWX (1<<0)
+#define CWY (1<<1)
+#define CWWidth (1<<2)
+#define CWHeight (1<<3)
+#define CWBorderWidth (1<<4)
+#define CWSibling (1<<5)
+#define CWStackMode (1<<6)
+
+
+/* Used in GetWindowAttributes reply */
+
+#define IsUnmapped 0
+#define IsUnviewable 1
+#define IsViewable 2
+
+/* Window stacking method (in configureWindow) */
+
+#define Above 0
+#define Below 1
+#define TopIf 2
+#define BottomIf 3
+#define Opposite 4
+
+/* For CreateColormap */
+
+#define AllocNone 0 /* create map with no entries */
+#define AllocAll 1 /* allocate entire map writeable */
+
+
+/* Flags used in StoreNamedColor, StoreColors */
+
+#define DoRed (1<<0)
+#define DoGreen (1<<1)
+#define DoBlue (1<<2)
+
+/*
+ * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
+ * value (x, y, width, height) was found in the parsed string.
+ */
+#define NoValue 0x0000
+#define XValue 0x0001
+#define YValue 0x0002
+#define WidthValue 0x0004
+#define HeightValue 0x0008
+#define AllValues 0x000F
+#define XNegative 0x0010
+#define YNegative 0x0020
+
+/* flags argument in size hints */
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
+
+/* definitions for initial window state */
+#define WithdrawnState 0 /* for windows that are not mapped */
+#define NormalState 1 /* most applications want to start this way */
+#define IconicState 3 /* application wants to start as an icon */
+#define GameModeState 4 /* Win32 GLUT only (not in Xlib!). */
+
+/* Type definitions */
+
+typedef struct {
+ unsigned int background_pixmap; /* background pixmap */
+ unsigned long background_pixel; /* background pixel */
+ unsigned long border_pixel; /* border pixel value */
+ long event_mask; /* set of events that should be saved */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Colormap colormap; /* color map to be associated with window */
+} XSetWindowAttributes;
+
+typedef struct {
+ unsigned long pixel;
+ unsigned short red, green, blue;
+ char flags; /* do_red, do_green, do_blue */
+} XColor;
+
+typedef struct {
+ unsigned char *value; /* same as Property routines */
+ Atom encoding; /* prop type */
+ int format; /* prop data format: 8, 16, or 32 */
+ unsigned long nitems; /* number of data items in value */
+} XTextProperty;
+
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ int x, y; /* obsolete for new window mgrs, but clients */
+ int width, height; /* should set so old wm's don't mess up */
+} XSizeHints;
+
+/* Functions emulated by macros. */
+
+#define XFreeColormap(display, colormap) \
+ DeleteObject(colormap)
+
+#define XCreateFontCursor(display, shape) \
+ LoadCursor(NULL, shape)
+
+#define XDefineCursor(display, window, cursor) \
+ SetCursor(cursor)
+
+#define XFlush(display) \
+ /* Nothing. */
+
+#define DisplayWidth(display, screen) \
+ GetSystemMetrics(SM_CXSCREEN)
+
+#define DisplayHeight(display, screen) \
+ GetSystemMetrics(SM_CYSCREEN)
+
+#define XMapWindow(display, window) \
+ ShowWindow(window, SW_SHOWNORMAL)
+
+#define XUnmapWindow(display, window) \
+ ShowWindow(window, SW_HIDE)
+
+#define XIconifyWindow(display, window, screen) \
+ ShowWindow(window, SW_MINIMIZE)
+
+#define XWithdrawWindow(display, window, screen) \
+ ShowWindow(window, SW_HIDE)
+
+#define XLowerWindow(display, window) \
+ SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
+
+#define XSetWMName(display, window, tp) \
+ SetWindowText(window, (tp)->value)
+
+/* There really isn't a way to set the icon name separate from the
+ windows name in Win32, so, just set the windows name. */
+#define XSetWMIconName(display, window, tp) \
+ XSetWMName(display, window, tp)
+
+#define XDestroyWindow(display, window) \
+ DestroyWindow(window)
+
+/* Anything that needs to be freed was allocated with malloc in our
+ fake X windows library for Win32, so free it with plain old
+ free(). */
+#define XFree(data) \
+ free(data)
+
+/* Nothing to be done for this...the pointer is always 'ungrabbed'
+ in Win32. */
+#define XUngrabPointer(display, time) \
+ /* Nothing. */
+
+/* Function prototypes. */
+
+extern XVisualInfo* XGetVisualInfo(
+ Display* display,
+ long mask,
+ XVisualInfo* ttemplate, /* Avoid class with C++ keyword. */
+ int*nitems);
+
+extern Colormap XCreateColormap(
+ Display* display,
+ Window root,
+ Visual* visual,
+ int alloc);
+
+extern void XAllocColorCells(
+ Display* display,
+ Colormap colormap,
+ Bool contig,
+ unsigned long plane_masks_return[],
+ unsigned int nplanes,
+ unsigned long pixels_return[],
+ unsigned int npixels);
+
+extern void XStoreColor(
+ Display* display,
+ Colormap colormap,
+ XColor* color);
+
+extern void XSetWindowColormap(
+ Display* display,
+ Window window,
+ Colormap colormap);
+
+extern Bool XTranslateCoordinates(
+ Display *display,
+ Window src, Window dst,
+ int src_x, int src_y,
+ int* dest_x_return, int* dest_y_return,
+ Window* child_return);
+
+extern Status XGetGeometry(
+ Display* display,
+ Window window,
+ Window* root_return,
+ int* x_return, int* y_return,
+ unsigned int* width_return, unsigned int* height_return,
+ unsigned int *border_width_return,
+ unsigned int* depth_return);
+
+extern int DisplayWidthMM(
+ Display* display,
+ int screen);
+
+extern int DisplayHeightMM(
+ Display* display,
+ int screen);
+
+extern void XWarpPointer(
+ Display* display,
+ Window src, Window dst,
+ int src_x, int src_y,
+ int src_width, int src_height,
+ int dst_x, int dst_y);
+
+extern int XParseGeometry(
+ char* string,
+ int* x, int* y,
+ unsigned int* width, unsigned int* height);
+
+extern int XPending(
+ Display* display);
+
+#endif /* __win32_x11_h__ */