Mercurial > sdl-ios-xcode
view src/video/Xext/extensions/panoramiXproto.h @ 1133:609c060fd2a2
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 08 Sep 2005 06:16:14 +0000 |
parents | eadc0746dfaf |
children | 782fd950bd46 |
line wrap: on
line source
/* $Xorg: panoramiXproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ /***************************************************************** Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Digital Equipment Corporation shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ /* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ #ifndef _PANORAMIXPROTO_H_ #define _PANORAMIXPROTO_H_ #define PANORAMIX_PROTOCOL_NAME "XINERAMA" #define X_PanoramiXQueryVersion 0 #define X_PanoramiXGetState 1 #define X_PanoramiXGetScreenCount 2 #define X_PanoramiXGetScreenSize 3 #define X_XineramaIsActive 4 #define X_XineramaQueryScreens 5 typedef struct _PanoramiXQueryVersion { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXQueryVersion */ CARD16 length B16; CARD8 clientMajor; CARD8 clientMinor; CARD16 unused B16; } xPanoramiXQueryVersionReq; #define sz_xPanoramiXQueryVersionReq 8 typedef struct { CARD8 type; /* must be X_Reply */ CARD8 pad1; /* unused */ CARD16 sequenceNumber B16; /* last sequence number */ CARD32 length B32; /* 0 */ CARD16 majorVersion B16; CARD16 minorVersion B16; CARD32 pad2 B32; /* unused */ CARD32 pad3 B32; /* unused */ CARD32 pad4 B32; /* unused */ CARD32 pad5 B32; /* unused */ CARD32 pad6 B32; /* unused */ } xPanoramiXQueryVersionReply; #define sz_xPanoramiXQueryVersionReply 32 typedef struct _PanoramiXGetState { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXGetState */ CARD16 length B16; CARD32 window B32; } xPanoramiXGetStateReq; #define sz_xPanoramiXGetStateReq 8 typedef struct { BYTE type; BYTE state; CARD16 sequenceNumber B16; CARD32 length B32; CARD32 window B32; CARD32 pad1 B32; /* unused */ CARD32 pad2 B32; /* unused */ CARD32 pad3 B32; /* unused */ CARD32 pad4 B32; /* unused */ CARD32 pad5 B32; /* unused */ } xPanoramiXGetStateReply; #define sz_panoramiXGetStateReply 32 typedef struct _PanoramiXGetScreenCount { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXGetScreenCount */ CARD16 length B16; CARD32 window B32; } xPanoramiXGetScreenCountReq; #define sz_xPanoramiXGetScreenCountReq 8 typedef struct { BYTE type; BYTE ScreenCount; CARD16 sequenceNumber B16; CARD32 length B32; CARD32 window B32; CARD32 pad1 B32; /* unused */ CARD32 pad2 B32; /* unused */ CARD32 pad3 B32; /* unused */ CARD32 pad4 B32; /* unused */ CARD32 pad5 B32; /* unused */ } xPanoramiXGetScreenCountReply; #define sz_panoramiXGetScreenCountReply 32 typedef struct _PanoramiXGetScreenSize { CARD8 reqType; /* always PanoramiXReqCode */ CARD8 panoramiXReqType; /* always X_PanoramiXGetState */ CARD16 length B16; CARD32 window B32; CARD32 screen B32; } xPanoramiXGetScreenSizeReq; #define sz_xPanoramiXGetScreenSizeReq 12 typedef struct { BYTE type; CARD8 pad1; CARD16 sequenceNumber B16; CARD32 length B32; CARD32 width B32; CARD32 height B32; CARD32 window B32; CARD32 screen B32; CARD32 pad2 B32; /* unused */ CARD32 pad3 B32; /* unused */ } xPanoramiXGetScreenSizeReply; #define sz_panoramiXGetScreenSizeReply 32 /************ Alternate protocol ******************/ typedef struct { CARD8 reqType; CARD8 panoramiXReqType; CARD16 length B16; } xXineramaIsActiveReq; #define sz_xXineramaIsActiveReq 4 typedef struct { BYTE type; CARD8 pad1; CARD16 sequenceNumber B16; CARD32 length B32; CARD32 state B32; CARD32 pad2 B32; CARD32 pad3 B32; CARD32 pad4 B32; CARD32 pad5 B32; CARD32 pad6 B32; } xXineramaIsActiveReply; #define sz_XineramaIsActiveReply 32 typedef struct { CARD8 reqType; CARD8 panoramiXReqType; CARD16 length B16; } xXineramaQueryScreensReq; #define sz_xXineramaQueryScreensReq 4 typedef struct { BYTE type; CARD8 pad1; CARD16 sequenceNumber B16; CARD32 length B32; CARD32 number B32; CARD32 pad2 B32; CARD32 pad3 B32; CARD32 pad4 B32; CARD32 pad5 B32; CARD32 pad6 B32; } xXineramaQueryScreensReply; #define sz_XineramaQueryScreensReply 32 typedef struct { INT16 x_org B16; INT16 y_org B16; CARD16 width B16; CARD16 height B16; } xXineramaScreenInfo; #define sz_XineramaScreenInfo 8 #endif