summaryrefslogtreecommitdiff
path: root/glx/glxscreens.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-03-21 12:55:09 -0700
committerKeith Packard <keithp@keithp.com>2012-03-21 13:54:42 -0700
commit9838b7032ea9792bec21af424c53c07078636d21 (patch)
treeb72d0827dac50f0f3b8eab29b3b7639546d735d7 /glx/glxscreens.h
parent75199129c603fc8567185ac31866c9518193cb78 (diff)
Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'glx/glxscreens.h')
-rw-r--r--glx/glxscreens.h53
1 files changed, 25 insertions, 28 deletions
diff --git a/glx/glxscreens.h b/glx/glxscreens.h
index eb2926045..d5420ee8d 100644
--- a/glx/glxscreens.h
+++ b/glx/glxscreens.h
@@ -41,10 +41,10 @@ struct __GLXconfig {
GLuint doubleBufferMode;
GLuint stereoMode;
- GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
+ GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
GLuint redMask, greenMask, blueMask, alphaMask;
- GLint rgbBits; /* total bits for rgb */
- GLint indexBits; /* total bits for colorindex */
+ GLint rgbBits; /* total bits for rgb */
+ GLint indexBits; /* total bits for colorindex */
GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
GLint depthBits;
@@ -67,7 +67,7 @@ struct __GLXconfig {
/* EXT_visual_info / GLX 1.2 */
GLint transparentPixel;
- /* colors are floats scaled to ints */
+ /* colors are floats scaled to ints */
GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
GLint transparentIndex;
@@ -85,8 +85,8 @@ struct __GLXconfig {
GLint maxPbufferWidth;
GLint maxPbufferHeight;
GLint maxPbufferPixels;
- GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
- GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
+ GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
+ GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
/* SGIX_visual_select_group */
GLint visualSelectGroup;
@@ -113,21 +113,19 @@ GLint glxConvertToXVisualType(int visualType);
*/
typedef struct __GLXscreen __GLXscreen;
struct __GLXscreen {
- void (*destroy) (__GLXscreen *screen);
-
- __GLXcontext *(*createContext) (__GLXscreen *screen,
- __GLXconfig *modes,
- __GLXcontext *shareContext);
-
- __GLXdrawable *(*createDrawable)(ClientPtr client,
- __GLXscreen *context,
- DrawablePtr pDraw,
- XID drawId,
- int type,
- XID glxDrawId,
- __GLXconfig *modes);
- int (*swapInterval) (__GLXdrawable *drawable,
- int interval);
+ void (*destroy) (__GLXscreen * screen);
+
+ __GLXcontext *(*createContext) (__GLXscreen * screen,
+ __GLXconfig * modes,
+ __GLXcontext * shareContext);
+
+ __GLXdrawable *(*createDrawable) (ClientPtr client,
+ __GLXscreen * context,
+ DrawablePtr pDraw,
+ XID drawId,
+ int type,
+ XID glxDrawId, __GLXconfig * modes);
+ int (*swapInterval) (__GLXdrawable * drawable, int interval);
ScreenPtr pScreen;
@@ -150,16 +148,15 @@ struct __GLXscreen {
* Since the GLX version advertised by the server is for the whole server,
* the GLX protocol code uses the minimum version supported on all screens.
*/
- /*@{*/
+ /*@{ */
unsigned GLXmajor;
unsigned GLXminor;
- /*@}*/
+ /*@} */
- Bool (*CloseScreen)(int index, ScreenPtr pScreen);
+ Bool (*CloseScreen) (int index, ScreenPtr pScreen);
};
+void __glXScreenInit(__GLXscreen * screen, ScreenPtr pScreen);
+void __glXScreenDestroy(__GLXscreen * screen);
-void __glXScreenInit(__GLXscreen *screen, ScreenPtr pScreen);
-void __glXScreenDestroy(__GLXscreen *screen);
-
-#endif /* !__GLX_screens_h__ */
+#endif /* !__GLX_screens_h__ */