X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_internal_x11.h;h=09a238a76925a40ebde87714d6e2def77326fb48;hb=207c3128bf025b5e025bace5c0425d380dd72aa9;hp=8a8e197431c096fab5b63b2eb389d55b97cae1f2;hpb=5b3d339481bac6dbaeb599bffc1325f716585bfe;p=freeglut diff --git a/src/x11/fg_internal_x11.h b/src/x11/fg_internal_x11.h index 8a8e197..09a238a 100644 --- a/src/x11/fg_internal_x11.h +++ b/src/x11/fg_internal_x11.h @@ -1,5 +1,5 @@ /* - * freeglut_internal_x11.h + * fg_internal_x11.h * * The freeglut library private include file. * @@ -30,7 +30,12 @@ /* -- PLATFORM-SPECIFIC INCLUDES ------------------------------------------- */ +#ifdef EGL_VERSION_1_0 +#include "egl/fg_internal_egl.h" +#else #include +#include "x11/fg_internal_x11_glx.h" +#endif #include #include #include @@ -41,19 +46,10 @@ #ifdef HAVE_X11_EXTENSIONS_XRANDR_H # include #endif -/* If GLX is too old, we will fail during runtime when multisampling - is requested, but at least freeglut compiles. */ -#ifndef GLX_SAMPLE_BUFFERS -# define GLX_SAMPLE_BUFFERS 0x80A8 -#endif -#ifndef GLX_SAMPLES -# define GLX_SAMPLES 0x80A9 -#endif - /* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */ -/* The structure used by display initialization in freeglut_init.c */ +/* The structure used by display initialization in fg_init.c */ typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; struct tagSFG_PlatformDisplay { @@ -64,6 +60,9 @@ struct tagSFG_PlatformDisplay Atom DeleteWindow; /* The window deletion atom */ Atom State; /* The state atom */ Atom StateFullScreen; /* The full screen atom */ + int NetWMSupported; /* Flag for EWMH Window Managers */ + Atom NetWMPid; /* The _NET_WM_PID atom */ + Atom ClientMachine; /* The client machine name atom */ #ifdef HAVE_X11_EXTENSIONS_XRANDR_H int prev_xsz, prev_ysz; @@ -83,6 +82,10 @@ struct tagSFG_PlatformDisplay int DisplayViewPortY; /* saved Y location of the viewport */ #endif /* HAVE_X11_EXTENSIONS_XF86VMODE_H */ +#ifdef EGL_VERSION_1_0 + struct tagSFG_PlatformDisplayEGL egl; +#endif + int DisplayPointerX; /* saved X location of the pointer */ int DisplayPointerY; /* saved Y location of the pointer */ }; @@ -92,12 +95,18 @@ struct tagSFG_PlatformDisplay * Make "freeglut" window handle and context types so that we don't need so * much conditionally-compiled code later in the library. */ +#ifndef EGL_VERSION_1_0 typedef Window SFG_WindowHandleType ; typedef GLXContext SFG_WindowContextType ; +#endif typedef struct tagSFG_PlatformContext SFG_PlatformContext; struct tagSFG_PlatformContext { - GLXFBConfig* FBConfig; /* The window's FBConfig */ +#ifdef EGL_VERSION_1_0 + struct tagSFG_PlatformContextEGL egl; +#else + GLXFBConfig FBConfig; /* The window's FBConfig */ +#endif }; @@ -107,12 +116,13 @@ struct tagSFG_PlatformWindowState { int OldWidth; /* Window width from before a resize */ int OldHeight; /* " height " " " " */ + GLboolean KeyRepeating; /* Currently in repeat mode? */ }; /* -- JOYSTICK-SPECIFIC STRUCTURES AND TYPES ------------------------------- */ /* - * Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c" + * Initial defines from "js.h" starting around line 33 with the existing "fg_joystick.c" * interspersed */ # ifdef HAVE_SYS_IOCTL_H @@ -121,10 +131,10 @@ struct tagSFG_PlatformWindowState # ifdef HAVE_FCNTL_H # include # endif -# ifdef HAVE_ERRNO_H -# include -# include -# endif + +#include +#include + # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) /* XXX The below hack is done until freeglut's autoconf is updated. */ # define HAVE_USB_JS 1 @@ -210,12 +220,12 @@ struct tagSFG_PlatformJoystick /* -- PRIVATE FUNCTION DECLARATIONS ---------------------------------------- */ -/* spaceball device functions, defined in freeglut_spaceball.c */ +/* spaceball device functions, defined in fg_spaceball.c */ int fgIsSpaceballXEvent( const XEvent *ev ); void fgSpaceballHandleXEvent( const XEvent *ev ); /* - * Check if "hint" is present in "property" for "window". See freeglut_init.c + * Check if "hint" is present in "property" for "window". See fg_init.c */ int fgHintPresent(Window window, Atom property, Atom hint);