summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-03-15 06:09:18 +0100
committerDennis kasprzyk <onestone@compiz-fusion.org>2009-03-15 06:09:18 +0100
commit163f6b6f3c3b7764987cbdf8e03cc355edeaa499 (patch)
tree4278afde195343dcb8277b0bb0b6efc926ce8907 /include
parent28e45c55c11e20206d3bc9056aea8fc7f1b7a0e7 (diff)
downloadzcomp-163f6b6f3c3b7764987cbdf8e03cc355edeaa499.tar.gz
zcomp-163f6b6f3c3b7764987cbdf8e03cc355edeaa499.tar.bz2
New generalized build system.
Diffstat (limited to 'include')
-rw-r--r--include/CMakeLists.txt3
-rw-r--r--include/composite/CMakeLists.txt8
-rw-r--r--include/composite/composite.h264
-rw-r--r--include/opengl/CMakeLists.txt13
-rw-r--r--include/opengl/fragment.h114
-rw-r--r--include/opengl/matrix.h66
-rw-r--r--include/opengl/opengl.h418
-rw-r--r--include/opengl/texture.h130
-rw-r--r--include/opengl/vector.h76
-rw-r--r--include/scale/CMakeLists.txt8
-rw-r--r--include/scale/scale.h130
11 files changed, 0 insertions, 1230 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 0fdf767..6ff6fd0 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -9,6 +9,3 @@ install (
)
add_subdirectory (core)
-add_subdirectory (composite)
-add_subdirectory (opengl)
-add_subdirectory (scale) \ No newline at end of file
diff --git a/include/composite/CMakeLists.txt b/include/composite/CMakeLists.txt
deleted file mode 100644
index 200dd91..0000000
--- a/include/composite/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-set (_headers
- composite.h
-)
-
-install (
- FILES ${_headers}
- DESTINATION ${includedir}/compiz/composite
-) \ No newline at end of file
diff --git a/include/composite/composite.h b/include/composite/composite.h
deleted file mode 100644
index dc6a597..0000000
--- a/include/composite/composite.h
+++ /dev/null
@@ -1,264 +0,0 @@
-
-
-
-/*
- * Copyright © 2008 Dennis Kasprzyk
- * Copyright © 2007 Novell, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Dennis Kasprzyk not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Dennis Kasprzyk makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
- * David Reveman <davidr@novell.com>
- */
-
-#ifndef _COMPIZ_COMPOSITE_H
-#define _COMPIZ_COMPOSITE_H
-
-#include <X11/extensions/Xcomposite.h>
-
-#define COMPIZ_COMPOSITE_ABI 1
-
-#include <core/privatehandler.h>
-#include <core/timer.h>
-#include <core/core.h>
-
-#define COMPOSITE_SCREEN_DAMAGE_PENDING_MASK (1 << 0)
-#define COMPOSITE_SCREEN_DAMAGE_REGION_MASK (1 << 1)
-#define COMPOSITE_SCREEN_DAMAGE_ALL_MASK (1 << 2)
-
-#define OPAQUE 0xffff
-#define COLOR 0xffff
-#define BRIGHT 0xffff
-
-#define PAINT_SCREEN_REGION_MASK (1 << 0)
-#define PAINT_SCREEN_FULL_MASK (1 << 1)
-#define PAINT_SCREEN_TRANSFORMED_MASK (1 << 2)
-#define PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK (1 << 3)
-#define PAINT_SCREEN_CLEAR_MASK (1 << 4)
-#define PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK (1 << 5)
-#define PAINT_SCREEN_NO_BACKGROUND_MASK (1 << 6)
-
-
-
-class PrivateCompositeScreen;
-class PrivateCompositeWindow;
-class CompositeScreen;
-class CompositeWindow;
-
-class CompositeScreenInterface :
- public WrapableInterface<CompositeScreen, CompositeScreenInterface>
-{
- public:
-
- virtual void preparePaint (int);
- virtual void donePaint ();
- virtual void paint (CompOutput::ptrList &outputs, unsigned int);
-
- virtual CompWindowList getWindowPaintList ();
-};
-
-
-class CompositeScreen :
- public WrapableHandler<CompositeScreenInterface, 4>,
- public PrivateHandler<CompositeScreen, CompScreen, COMPIZ_COMPOSITE_ABI>
-{
- public:
-
- class PaintHandler {
- public:
- virtual ~PaintHandler () {};
-
- virtual void paintOutputs (CompOutput::ptrList &outputs,
- unsigned int mask,
- const CompRegion &region) = 0;
-
- virtual bool hasVSync () { return false; };
-
- virtual void prepareDrawing () {};
- };
-
- public:
- CompositeScreen (CompScreen *s);
- ~CompositeScreen ();
-
- CompOption::Vector & getOptions ();
- bool setOption (const char *name, CompOption::Value &value);
- CompOption * getOption (const char *name);
-
- bool registerPaintHandler (PaintHandler *pHnd);
- void unregisterPaintHandler ();
-
- bool compositingActive ();
-
- int damageEvent ();
-
- void damageScreen ();
- void damageRegion (const CompRegion &);
- void damagePending ();
- unsigned int damageMask ();
- const CompRegion & currentDamage () const;
-
- void showOutputWindow ();
- void hideOutputWindow ();
- void updateOutputWindow ();
-
- Window overlay ();
- Window output ();
-
- int & overlayWindowCount ();
-
- void setWindowPaintOffset (int x, int y);
- CompPoint windowPaintOffset ();
-
-
- void detectRefreshRate ();
- int getTimeToNextRedraw (struct timeval *tv);
-
- int redrawTime ();
-
- bool handlePaintTimeout ();
-
- WRAPABLE_HND (0, CompositeScreenInterface, void, preparePaint, int);
- WRAPABLE_HND (1, CompositeScreenInterface, void, donePaint);
- WRAPABLE_HND (2, CompositeScreenInterface, void, paint,
- CompOutput::ptrList &outputs, unsigned int);
-
- WRAPABLE_HND (3, CompositeScreenInterface, CompWindowList,
- getWindowPaintList);
-
- friend class PrivateCompositeDisplay;
-
- private:
- PrivateCompositeScreen *priv;
-
- public:
- static bool toggleSlowAnimations (CompAction *action,
- CompAction::State state,
- CompOption::Vector &options);
-};
-
-/*
- window paint flags
-
- bit 1-16 are used for read-only flags and they provide
- information that describe the screen rendering pass
- currently in process.
-
- bit 17-32 are writable flags and they provide information
- that is used to optimize rendering.
-*/
-
-/*
- this flag is present when window is being painted
- on a transformed screen.
-*/
-#define PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK (1 << 0)
-
-/*
- this flag is present when window is being tested
- for occlusion of other windows.
-*/
-#define PAINT_WINDOW_OCCLUSION_DETECTION_MASK (1 << 1)
-
-/*
- this flag indicates that the window ist painted with
- an offset
-*/
-#define PAINT_WINDOW_WITH_OFFSET_MASK (1 << 2)
-
-/*
- flag indicate that window is translucent.
-*/
-#define PAINT_WINDOW_TRANSLUCENT_MASK (1 << 16)
-
-/*
- flag indicate that window is transformed.
-*/
-#define PAINT_WINDOW_TRANSFORMED_MASK (1 << 17)
-
-/*
- flag indicate that core PaintWindow function should
- not draw this window.
-*/
-#define PAINT_WINDOW_NO_CORE_INSTANCE_MASK (1 << 18)
-
-/*
- flag indicate that blending is required.
-*/
-#define PAINT_WINDOW_BLEND_MASK (1 << 19)
-
-class CompositeWindowInterface :
- public WrapableInterface<CompositeWindow, CompositeWindowInterface>
-{
- public:
- virtual bool damageRect (bool, const CompRect &);
-};
-
-class CompositeWindow :
- public WrapableHandler<CompositeWindowInterface, 1>,
- public PrivateHandler<CompositeWindow, CompWindow, COMPIZ_COMPOSITE_ABI>
-{
- public:
-
- CompositeWindow (CompWindow *w);
- ~CompositeWindow ();
-
- bool bind ();
- void release ();
- Pixmap pixmap ();
-
- void redirect ();
- void unredirect ();
- bool redirected ();
- bool overlayWindow ();
-
- void damageTransformedRect (float xScale,
- float yScale,
- float xTranslate,
- float yTranslate,
- const CompRect &rect);
-
- void damageOutputExtents ();
- void addDamageRect (const CompRect &);
- void addDamage (bool force = false);
-
- bool damaged ();
-
- void processDamage (XDamageNotifyEvent *de);
-
- void updateOpacity ();
- void updateBrightness ();
- void updateSaturation ();
-
- unsigned short opacity ();
- unsigned short brightness ();
- unsigned short saturation ();
-
- WRAPABLE_HND (0, CompositeWindowInterface, bool, damageRect,
- bool, const CompRect &);
-
- friend class PrivateCompositeWindow;
- friend class CompositeScreen;
-
- private:
- PrivateCompositeWindow *priv;
-};
-
-#endif
diff --git a/include/opengl/CMakeLists.txt b/include/opengl/CMakeLists.txt
deleted file mode 100644
index 8527b9f..0000000
--- a/include/opengl/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-set (_headers
- opengl.h
- fragment.h
- matrix.h
- texture.h
- vector.h
-)
-
-install (
- FILES ${_headers}
- DESTINATION ${includedir}/compiz/opengl
-) \ No newline at end of file
diff --git a/include/opengl/fragment.h b/include/opengl/fragment.h
deleted file mode 100644
index e0bca16..0000000
--- a/include/opengl/fragment.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright © 2008 Dennis Kasprzyk
- * Copyright © 2007 Novell, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Dennis Kasprzyk not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Dennis Kasprzyk makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
- * David Reveman <davidr@novell.com>
- */
-
-#ifndef _GLFRAGMENT_H
-#define _GLFRAGMENT_H
-
-#define MAX_FRAGMENT_FUNCTIONS 16
-
-#define COMP_FETCH_TARGET_2D 0
-#define COMP_FETCH_TARGET_RECT 1
-#define COMP_FETCH_TARGET_NUM 2
-
-struct GLWindowPaintAttrib;
-class GLScreen;
-
-namespace GLFragment {
-
- class Storage;
-
- typedef unsigned int FunctionId;
-
- class PrivateFunctionData;
- class PrivateAttrib;
-
- class FunctionData {
- public:
- FunctionData ();
- ~FunctionData ();
-
- bool status ();
-
- void addTempHeaderOp (const char *name);
-
- void addParamHeaderOp (const char *name);
-
- void addAttribHeaderOp (const char *name);
-
-
- void addFetchOp (const char *dst, const char *offset, int target);
-
- void addColorOp (const char *dst, const char *src);
-
- void addDataOp (const char *str, ...);
-
- void addBlendOp (const char *str, ...);
-
- FunctionId createFragmentFunction (const char *name);
-
- private:
- PrivateFunctionData *priv;
- };
-
- class Attrib {
- public:
- Attrib (const GLWindowPaintAttrib &paint);
- Attrib (const Attrib&);
- ~Attrib ();
-
- unsigned int allocTextureUnits (unsigned int nTexture);
-
- unsigned int allocParameters (unsigned int nParam);
-
- void addFunction (FunctionId function);
-
- bool enable (bool *blending);
- void disable ();
-
- unsigned short getSaturation ();
- unsigned short getBrightness ();
- unsigned short getOpacity ();
-
- void setSaturation (unsigned short);
- void setBrightness (unsigned short);
- void setOpacity (unsigned short);
-
- bool hasFunctions ();
-
- private:
- PrivateAttrib *priv;
- };
-
- void destroyFragmentFunction (FunctionId id);
-
- FunctionId getSaturateFragmentFunction (GLTexture *texture,
- int param);
-};
-
-
-
-#endif
diff --git a/include/opengl/matrix.h b/include/opengl/matrix.h
deleted file mode 100644
index fabb60c..0000000
--- a/include/opengl/matrix.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright © 2008 Danny Baumann
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Dennis Kasprzyk not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Dennis Kasprzyk makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Danny Baumann <maniac@compiz-fusion.org>
- */
-
-#ifndef _GLMATRIX_H
-#define _GLMATRIX_H
-
-#include <opengl/vector.h>
-
-class CompOutput;
-
-class GLMatrix {
- public:
- GLMatrix ();
- GLMatrix (const float *);
-
- const float* getMatrix () const;
-
- GLMatrix& operator*= (const GLMatrix& rhs);
-
- float& operator[] (unsigned int pos);
-
- void reset ();
- void toScreenSpace (const CompOutput *output, float z);
-
- void rotate (const float angle, const float x,
- const float y, const float z);
- void rotate (const float angle, const GLVector& vector);
-
- void scale (const float x, const float y, const float z);
- void scale (const GLVector& vector);
-
- void translate (const float x, const float y, const float z);
- void translate (const GLVector& vector);
-
- private:
- friend GLMatrix operator* (const GLMatrix& lhs,
- const GLMatrix& rhs);
- friend GLVector operator* (const GLMatrix& lhs,
- const GLVector& rhs);
-
- float m[16];
-};
-
-#endif
diff --git a/include/opengl/opengl.h b/include/opengl/opengl.h
deleted file mode 100644
index 3cd5a77..0000000
--- a/include/opengl/opengl.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * Copyright © 2008 Dennis Kasprzyk
- * Copyright © 2007 Novell, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Dennis Kasprzyk not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Dennis Kasprzyk makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
- * David Reveman <davidr@novell.com>
- */
-
-#ifndef _COMPIZ_OPENGL_H
-#define _COMPIZ_OPENGL_H
-
-#include <GL/gl.h>
-#include <GL/glx.h>
-
-#include <opengl/matrix.h>
-#include <opengl/texture.h>
-#include <opengl/fragment.h>
-
-#define COMPIZ_OPENGL_ABI 1
-
-#include <core/privatehandler.h>
-
-/* camera distance from screen, 0.5 * tan (FOV) */
-#define DEFAULT_Z_CAMERA 0.866025404f
-
-#define RED_SATURATION_WEIGHT 0.30f
-#define GREEN_SATURATION_WEIGHT 0.59f
-#define BLUE_SATURATION_WEIGHT 0.11f
-
-class PrivateGLScreen;
-class PrivateGLWindow;
-
-extern GLushort defaultColor[4];
-
-#ifndef GLX_EXT_texture_from_pixmap
-#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
-#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
-#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
-#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
-#define GLX_Y_INVERTED_EXT 0x20D4
-#define GLX_TEXTURE_FORMAT_EXT 0x20D5
-#define GLX_TEXTURE_TARGET_EXT 0x20D6
-#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
-#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
-#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
-#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
-#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
-#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
-#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
-#define GLX_TEXTURE_1D_EXT 0x20DB
-#define GLX_TEXTURE_2D_EXT 0x20DC
-#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
-#define GLX_FRONT_LEFT_EXT 0x20DE
-#endif
-
-namespace GL {
-
- typedef void (*FuncPtr) (void);
- typedef FuncPtr (*GLXGetProcAddressProc) (const GLubyte *procName);
-
- typedef void (*GLXBindTexImageProc) (Display *display,
- GLXDrawable drawable,
- int buffer,
- int *attribList);
- typedef void (*GLXReleaseTexImageProc) (Display *display,
- GLXDrawable drawable,
- int buffer);
- typedef void (*GLXQueryDrawableProc) (Display *display,
- GLXDrawable drawable,
- int attribute,
- unsigned int *value);
-
- typedef void (*GLXCopySubBufferProc) (Display *display,
- GLXDrawable drawable,
- int x,
- int y,
- int width,
- int height);
-
- typedef int (*GLXGetVideoSyncProc) (unsigned int *count);
- typedef int (*GLXWaitVideoSyncProc) (int divisor,
- int remainder,
- unsigned int *count);
-
- #ifndef GLX_VERSION_1_3
- typedef struct __GLXFBConfigRec *GLXFBConfig;
- #endif
-
- typedef GLXFBConfig *(*GLXGetFBConfigsProc) (Display *display,
- int screen,
- int *nElements);
- typedef int (*GLXGetFBConfigAttribProc) (Display *display,
- GLXFBConfig config,
- int attribute,
- int *value);
- typedef GLXPixmap (*GLXCreatePixmapProc) (Display *display,
- GLXFBConfig config,
- Pixmap pixmap,
- const int *attribList);
-
- typedef void (*GLActiveTextureProc) (GLenum texture);
- typedef void (*GLClientActiveTextureProc) (GLenum texture);
- typedef void (*GLMultiTexCoord2fProc) (GLenum, GLfloat, GLfloat);
-
- typedef void (*GLGenProgramsProc) (GLsizei n,
- GLuint *programs);
- typedef void (*GLDeleteProgramsProc) (GLsizei n,
- GLuint *programs);
- typedef void (*GLBindProgramProc) (GLenum target,
- GLuint program);
- typedef void (*GLProgramStringProc) (GLenum target,
- GLenum format,
- GLsizei len,
- const GLvoid *string);
- typedef void (*GLProgramParameter4fProc) (GLenum target,
- GLuint index,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w);
- typedef void (*GLGetProgramivProc) (GLenum target,
- GLenum pname,
- int *params);
-
- typedef void (*GLGenFramebuffersProc) (GLsizei n,
- GLuint *framebuffers);
- typedef void (*GLDeleteFramebuffersProc) (GLsizei n,
- GLuint *framebuffers);
- typedef void (*GLBindFramebufferProc) (GLenum target,
- GLuint framebuffer);
- typedef GLenum (*GLCheckFramebufferStatusProc) (GLenum target);
- typedef void (*GLFramebufferTexture2DProc) (GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level);
- typedef void (*GLGenerateMipmapProc) (GLenum target);
-
- extern GLXBindTexImageProc bindTexImage;
- extern GLXReleaseTexImageProc releaseTexImage;
- extern GLXQueryDrawableProc queryDrawable;
- extern GLXCopySubBufferProc copySubBuffer;
- extern GLXGetVideoSyncProc getVideoSync;
- extern GLXWaitVideoSyncProc waitVideoSync;
- extern GLXGetFBConfigsProc getFBConfigs;
- extern GLXGetFBConfigAttribProc getFBConfigAttrib;
- extern GLXCreatePixmapProc createPixmap;
-
- extern GLActiveTextureProc activeTexture;
- extern GLClientActiveTextureProc clientActiveTexture;
- extern GLMultiTexCoord2fProc multiTexCoord2f;
-
- extern GLGenProgramsProc genPrograms;
- extern GLDeleteProgramsProc deletePrograms;
- extern GLBindProgramProc bindProgram;
- extern GLProgramStringProc programString;
- extern GLProgramParameter4fProc programEnvParameter4f;
- extern GLProgramParameter4fProc programLocalParameter4f;
- extern GLGetProgramivProc getProgramiv;
-
- extern GLGenFramebuffersProc genFramebuffers;
- extern GLDeleteFramebuffersProc deleteFramebuffers;
- extern GLBindFramebufferProc bindFramebuffer;
- extern GLCheckFramebufferStatusProc checkFramebufferStatus;
- extern GLFramebufferTexture2DProc framebufferTexture2D;
- extern GLGenerateMipmapProc generateMipmap;
-
- extern bool textureFromPixmap;
- extern bool textureRectangle;
- extern bool textureNonPowerOfTwo;
- extern bool textureEnvCombine;
- extern bool textureEnvCrossbar;
- extern bool textureBorderClamp;
- extern bool textureCompression;
- extern GLint maxTextureSize;
- extern bool fbo;
- extern bool fragmentProgram;
- extern GLint maxTextureUnits;
-
- extern bool canDoSaturated;
- extern bool canDoSlightlySaturated;
-};
-
-struct GLScreenPaintAttrib {
- GLfloat xRotate;
- GLfloat yRotate;
- GLfloat vRotate;
- GLfloat xTranslate;
- GLfloat yTranslate;
- GLfloat zTranslate;
- GLfloat zCamera;
-};
-
-#define MAX_DEPTH 32
-
-struct GLFBConfig {
- GLXFBConfig fbConfig;
- int yInverted;
- int mipmap;
- int textureFormat;
- int textureTargets;
-};
-
-#define NOTHING_TRANS_FILTER 0
-#define SCREEN_TRANS_FILTER 1
-#define WINDOW_TRANS_FILTER 2
-
-
-extern GLScreenPaintAttrib defaultScreenPaintAttrib;
-
-class GLScreen;
-
-class GLScreenInterface :
- public WrapableInterface<GLScreen, GLScreenInterface>
-{
- public:
- virtual bool glPaintOutput (const GLScreenPaintAttrib &,
- const GLMatrix &, const CompRegion &,
- CompOutput *, unsigned int);
- virtual void glPaintTransformedOutput (const GLScreenPaintAttrib &,
- const GLMatrix &,
- const CompRegion &,
- CompOutput *, unsigned int);
- virtual void glApplyTransform (const GLScreenPaintAttrib &,
- CompOutput *, GLMatrix *);
-
- virtual void glEnableOutputClipping (const GLMatrix &,
- const CompRegion &,
- CompOutput *);
- virtual void glDisableOutputClipping ();
-
-};
-
-
-class GLScreen :
- public WrapableHandler<GLScreenInterface, 5>,
- public PrivateHandler<GLScreen, CompScreen, COMPIZ_OPENGL_ABI>
-{
- public:
- GLScreen (CompScreen *s);
- ~GLScreen ();
-
- CompOption::Vector & getOptions ();
- bool setOption (const char *name, CompOption::Value &value);
- CompOption * getOption (const char *name);
-
- GLenum textureFilter ();
- void setTextureFilter (GLenum);
-
- void clearTargetOutput (unsigned int mask);
-
- GL::FuncPtr getProcAddress (const char *name);
-
- void updateBackground ();
-
- GLTexture::Filter filter (int);
- void setFilter (int, GLTexture::Filter);
-
- GLFragment::Storage * fragmentStorage ();
-
- void setTexEnvMode (GLenum mode);
- void setLighting (bool lighting);
- bool lighting ();
-
- void clearOutput (CompOutput *output, unsigned int mask);
-
- void setDefaultViewport ();
-
- GLTexture::BindPixmapHandle registerBindPixmap (GLTexture::BindPixmapProc);
- void unregisterBindPixmap (GLTexture::BindPixmapHandle);
-
- GLFBConfig * glxPixmapFBConfig (unsigned int depth);
-
- GLTexture *defaultIcon ();
-
- void resetRasterPos ();
-
- const float * projectionMatrix ();
-
- WRAPABLE_HND (0, GLScreenInterface, bool, glPaintOutput,
- const GLScreenPaintAttrib &, const GLMatrix &,
- const CompRegion &, CompOutput *, unsigned int);
- WRAPABLE_HND (1, GLScreenInterface, void, glPaintTransformedOutput,
- const GLScreenPaintAttrib &,
- const GLMatrix &, const CompRegion &, CompOutput *,
- unsigned int);
- WRAPABLE_HND (2, GLScreenInterface, void, glApplyTransform,
- const GLScreenPaintAttrib &, CompOutput *, GLMatrix *);
-
- WRAPABLE_HND (3, GLScreenInterface, void, glEnableOutputClipping,
- const GLMatrix &, const CompRegion &, CompOutput *);
- WRAPABLE_HND (4, GLScreenInterface, void, glDisableOutputClipping);
-
- friend class GLTexture;
-
- private:
- PrivateGLScreen *priv;
-};
-
-struct GLWindowPaintAttrib {
- GLushort opacity;
- GLushort brightness;
- GLushort saturation;
- GLfloat xScale;
- GLfloat yScale;
- GLfloat xTranslate;
- GLfloat yTranslate;
-};
-
-class GLWindow;
-
-class GLWindowInterface :
- public WrapableInterface<GLWindow, GLWindowInterface>
-{
- public:
- virtual bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,
- const CompRegion &, unsigned int);
- virtual bool glDraw (const GLMatrix &, GLFragment::Attrib &,
- const CompRegion &, unsigned int);
- virtual void glAddGeometry (const GLTexture::MatrixList &,
- const CompRegion &,const CompRegion &);
- virtual void glDrawTexture (GLTexture *texture, GLFragment::Attrib &,
- unsigned int);
- virtual void glDrawGeometry ();
-};
-
-class GLWindow :
- public WrapableHandler<GLWindowInterface, 5>,
- public PrivateHandler<GLWindow, CompWindow, COMPIZ_OPENGL_ABI>
-{
- public:
-
- class Geometry {
- public:
- Geometry ();
- ~Geometry ();
-
- void reset ();
-
- bool moreVertices (int newSize);
- bool moreIndices (int newSize);
-
- public:
- GLfloat *vertices;
- int vertexSize;
- int vertexStride;
- GLushort *indices;
- int indexSize;
- int vCount;
- int texUnits;
- int texCoordSize;
- int indexCount;
- };
-
- static GLWindowPaintAttrib defaultPaintAttrib;
- public:
-
- GLWindow (CompWindow *w);
- ~GLWindow ();
-
- const CompRegion & clip () const;
-
- GLWindowPaintAttrib & paintAttrib ();
- GLWindowPaintAttrib & lastPaintAttrib ();
-
- unsigned int lastMask () const;
-
- bool bind ();
- void release ();
-
- const GLTexture::List & textures () const;
- const GLTexture::MatrixList & matrices () const;
-
- void updatePaintAttribs ();
-
- Geometry & geometry ();
-
- GLTexture *getIcon (int width, int height);
-
- WRAPABLE_HND (0, GLWindowInterface, bool, glPaint,
- const GLWindowPaintAttrib &, const GLMatrix &,
- const CompRegion &, unsigned int);
- WRAPABLE_HND (1, GLWindowInterface, bool, glDraw, const GLMatrix &,
- GLFragment::Attrib &, const CompRegion &, unsigned int);
- WRAPABLE_HND (2, GLWindowInterface, void, glAddGeometry,
- const GLTexture::MatrixList &, const CompRegion &,
- const CompRegion &);
- WRAPABLE_HND (3, GLWindowInterface, void, glDrawTexture,
- GLTexture *texture, GLFragment::Attrib &, unsigned int);
- WRAPABLE_HND (4, GLWindowInterface, void, glDrawGeometry);
-
- friend class GLScreen;
- friend class PrivateGLScreen;
-
- private:
- PrivateGLWindow *priv;
-};
-
-#endif
diff --git a/include/opengl/texture.h b/include/opengl/texture.h
deleted file mode 100644
index 1a32757..0000000
--- a/include/opengl/texture.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright © 2008 Dennis Kasprzyk
- * Copyright © 2007 Novell, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Dennis Kasprzyk not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Dennis Kasprzyk makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Dennis Kasprzyk <onestone@compiz-fusion.org>
- * David Reveman <davidr@novell.com>
- */
-
-#ifndef _GLTEXTURE_H
-#define _GLTEXTURE_H
-
-#include <X11/Xlib-xcb.h>
-
-#include <GL/gl.h>
-
-#include <vector>
-
-#include <core/region.h>
-
-#define POWER_OF_TWO(v) ((v & (v - 1)) == 0)
-
-#define COMP_TEX_COORD_X(m, vx) ((m).xx * (vx) + (m).x0)
-#define COMP_TEX_COORD_Y(m, vy) ((m).yy * (vy) + (m).y0)
-
-#define COMP_TEX_COORD_XY(m, vx, vy) \
- ((m).xx * (vx) + (m).xy * (vy) + (m).x0)
-#define COMP_TEX_COORD_YX(m, vx, vy) \
- ((m).yx * (vx) + (m).yy * (vy) + (m).y0)
-
-class PrivateTexture;
-
-class GLTexture : public CompRect {
- public:
-
- typedef enum {
- Fast,
- Good
- } Filter;
-
- typedef struct {
- float xx; float yx;
- float xy; float yy;
- float x0; float y0;
- } Matrix;
-
- typedef std::vector<Matrix> MatrixList;
-
- class List : public std::vector <GLTexture *> {
-
- public:
- List ();
- List (unsigned int);
- List (const List &);
- ~List ();
-
- List & operator= (const List &);
-
- void clear ();
- };
-
- typedef boost::function<List (Pixmap, int, int, int)> BindPixmapProc;
- typedef unsigned int BindPixmapHandle;
-
- public:
-
- GLuint name () const;
- GLenum target () const;
- GLenum filter () const;
-
- const Matrix & matrix () const;
-
- virtual void enable (Filter filter);
- virtual void disable ();
-
- bool mipmap () const;
- void setMipmap (bool);
- void setFilter (GLenum);
- void setWrap (GLenum);
-
- static void incRef (GLTexture *);
- static void decRef (GLTexture *);
-
- static List bindPixmapToTexture (Pixmap pixmap,
- int width,
- int height,
- int depth);
-
- static List imageBufferToTexture (const char *image,
- CompSize size);
-
- static List imageDataToTexture (const char *image,
- CompSize size,
- GLenum format,
- GLenum type);
-
- static List readImageToTexture (CompString &imageFileName,
- CompSize &size);
-
- friend class PrivateTexture;
-
- protected:
- GLTexture ();
- virtual ~GLTexture ();
-
- void setData (GLenum target, Matrix &m, bool mipmap);
-
- private:
- PrivateTexture *priv;
-};
-
-#endif
diff --git a/include/opengl/vector.h b/include/opengl/vector.h
deleted file mode 100644
index 19e2178..0000000
--- a/include/opengl/vector.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright © 2008 Danny Baumann
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Dennis Kasprzyk not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Dennis Kasprzyk makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * DENNIS KASPRZYK DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL DENNIS KASPRZYK BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Authors: Danny Baumann <maniac@compiz-fusion.org>
- */
-
-#ifndef _GLVECTOR_H
-#define _GLVECTOR_H
-
-class GLVector {
- public:
- typedef enum {
- x,
- y,
- z,
- w
- } VectorCoordsEnum;
-
- GLVector ();
- GLVector (float x, float y, float z, float w);
-
- float& operator[] (int item);
- float& operator[] (VectorCoordsEnum coord);
-
- const float operator[] (int item) const;
- const float operator[] (VectorCoordsEnum coord) const;
-
- GLVector& operator+= (const GLVector& rhs);
- GLVector& operator-= (const GLVector& rhs);
- GLVector& operator*= (const float k);
- GLVector& operator/= (const float k);
- GLVector& operator^= (const GLVector& rhs);
-
- float norm ();
- GLVector& normalize ();
-
- private:
- friend GLVector operator+ (const GLVector& lhs,
- const GLVector& rhs);
- friend GLVector operator- (const GLVector& lhs,
- const GLVector& rhs);
- friend GLVector operator- (const GLVector& vector);
- friend float operator* (const GLVector& lhs,
- const GLVector& rhs);
- friend GLVector operator* (const float k,
- const GLVector& vector);
- friend GLVector operator* (const GLVector& vector,
- const float k);
- friend GLVector operator/ (const GLVector& lhs,
- const GLVector& rhs);
- friend GLVector operator^ (const GLVector& lhs,
- const GLVector& rhs);
-
- float v[4];
-};
-
-#endif
diff --git a/include/scale/CMakeLists.txt b/include/scale/CMakeLists.txt
deleted file mode 100644
index 7b519dc..0000000
--- a/include/scale/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-set (_headers
- scale.h
-)
-
-install (
- FILES ${_headers}
- DESTINATION ${includedir}/compiz/scale
-) \ No newline at end of file
diff --git a/include/scale/scale.h b/include/scale/scale.h
deleted file mode 100644
index c81b07d..0000000
--- a/include/scale/scale.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright © 2007 Novell, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Novell, Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Novell, Inc. makes no representations about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- *
- * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
- * NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
- * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
- * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: David Reveman <davidr@novell.com>
- */
-
-#ifndef _COMPIZ_SCALE_H
-#define _COMPIZ_SCALE_H
-
-#include <core/core.h>
-#include <core/privatehandler.h>
-
-#include <composite/composite.h>
-#include <opengl/opengl.h>
-
-#define COMPIZ_SCALE_ABI 1
-
-class ScaleScreen;
-class PrivateScaleScreen;
-class ScaleWindow;
-class PrivateScaleWindow;
-
-class ScaleScreenInterface :
- public WrapableInterface<ScaleScreen, ScaleScreenInterface>
-{
- public:
- virtual bool layoutSlotsAndAssignWindows ();
-
-};
-
-class ScaleScreen :
- public WrapableHandler<ScaleScreenInterface, 1>,
- public PrivateHandler<ScaleScreen, CompScreen, COMPIZ_SCALE_ABI>
-{
- public:
- typedef enum {
- Idle,
- Out,
- Wait,
- In
- } State;
-
- typedef std::list<ScaleWindow *> WindowList;
- ScaleScreen (CompScreen *s);
- ~ScaleScreen ();
-
- bool hasGrab () const;
- State getState () const;
- const CompMatch & getCustomMatch () const;
- const WindowList& getWindows () const;
-
- void relayoutSlots (const CompMatch& match);
-
- CompOption::Vector & getOptions ();
- bool setOption (const char *name, CompOption::Value &value);
- CompOption * getOption (const char *name);
-
- WRAPABLE_HND (0, ScaleScreenInterface, bool,
- layoutSlotsAndAssignWindows)
-
- friend class ScaleWindow;
- friend class PrivateScaleScreen;
- friend class PrivateScaleWindow;
-
- private:
- PrivateScaleScreen *priv;
-};
-
-class ScaleWindowInterface :
- public WrapableInterface<ScaleWindow, ScaleWindowInterface>
-{
- public:
- virtual void scalePaintDecoration (const GLWindowPaintAttrib &,
- const GLMatrix &,
- const CompRegion &, unsigned int);
- virtual bool setScaledPaintAttributes (GLWindowPaintAttrib &);
- virtual void scaleSelectWindow ();
-};
-
-class ScaleWindow :
- public WrapableHandler<ScaleWindowInterface, 3>,
- public PrivateHandler<ScaleWindow, CompWindow, COMPIZ_SCALE_ABI>
-{
- public:
- ScaleWindow (CompWindow *w);
- ~ScaleWindow ();
-
- bool hasSlot () const;
-
- WRAPABLE_HND (0, ScaleWindowInterface, void, scalePaintDecoration,
- const GLWindowPaintAttrib &, const GLMatrix &,
- const CompRegion &, unsigned int)
- WRAPABLE_HND (1, ScaleWindowInterface, bool, setScaledPaintAttributes,
- GLWindowPaintAttrib &)
- WRAPABLE_HND (2, ScaleWindowInterface, void, scaleSelectWindow)
-
- friend class ScaleScreen;
- friend class PrivateScaleScreen;
- friend class PrivateScaleWindow;
-
- private:
- PrivateScaleWindow *priv;
-};
-
-#define SCALE_SCREEN(s) \
- ScaleScreen *ss = ScaleScreen::get (s)
-
-#define SCALE_WINDOW(w) \
- ScaleWindow *sw = ScaleWindow::get (w)
-
-#endif