summaryrefslogtreecommitdiff
path: root/src/privatescreen.h
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-08-27 15:08:10 +0200
committerDennis Kasprzyk <onestone@compiz-fusion.org>2008-08-27 15:08:10 +0200
commitac82488c022665492713d633d832480063f67067 (patch)
treeab9e230bc8ad1055fe080506dfc784fc088c43cb /src/privatescreen.h
parentb92393878f81ec008ac7f383f63afe648bc5f80f (diff)
downloadunity-window-decorator-ac82488c022665492713d633d832480063f67067.tar.gz
unity-window-decorator-ac82488c022665492713d633d832480063f67067.tar.bz2
Moved composite handling and opengl painting into separate plugins.
Diffstat (limited to 'src/privatescreen.h')
-rw-r--r--src/privatescreen.h125
1 files changed, 17 insertions, 108 deletions
diff --git a/src/privatescreen.h b/src/privatescreen.h
index d2c1660..028af17 100644
--- a/src/privatescreen.h
+++ b/src/privatescreen.h
@@ -5,49 +5,25 @@
#include <compscreen.h>
#include <compsize.h>
#include <comppoint.h>
-#include <comptexture.h>
-#include <compfragment.h>
-#include "privatefragment.h"
-
-extern char *backgroundImage;
-
-extern Window currentRoot;
extern CompWindow *lastFoundWindow;
extern CompWindow *lastDamagedWindow;
-extern bool replaceCurrentWm;
-extern bool indirectRendering;
-extern bool strictBinding;
-extern bool useCow;
-extern bool noDetection;
extern bool useDesktopHints;
extern bool onlyCurrentScreen;
extern int defaultRefreshRate;
extern const char *defaultTextureFilter;
-#define RED_SATURATION_WEIGHT 0.30f
-#define GREEN_SATURATION_WEIGHT 0.59f
-#define BLUE_SATURATION_WEIGHT 0.11f
-
-#define COMP_SCREEN_OPTION_DETECT_REFRESH_RATE 0
-#define COMP_SCREEN_OPTION_LIGHTING 1
-#define COMP_SCREEN_OPTION_REFRESH_RATE 2
-#define COMP_SCREEN_OPTION_HSIZE 3
-#define COMP_SCREEN_OPTION_VSIZE 4
-#define COMP_SCREEN_OPTION_OPACITY_STEP 5
-#define COMP_SCREEN_OPTION_UNREDIRECT_FS 6
-#define COMP_SCREEN_OPTION_DEFAULT_ICON 7
-#define COMP_SCREEN_OPTION_SYNC_TO_VBLANK 8
-#define COMP_SCREEN_OPTION_NUMBER_OF_DESKTOPS 9
-#define COMP_SCREEN_OPTION_DETECT_OUTPUTS 10
-#define COMP_SCREEN_OPTION_OUTPUTS 11
-#define COMP_SCREEN_OPTION_OVERLAPPING_OUTPUTS 12
-#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_LEVEL 13
-#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_MATCH 14
-#define COMP_SCREEN_OPTION_TEXTURE_COMPRESSION 15
-#define COMP_SCREEN_OPTION_FORCE_INDEPENDENT 16
-#define COMP_SCREEN_OPTION_NUM 17
+#define COMP_SCREEN_OPTION_HSIZE 0
+#define COMP_SCREEN_OPTION_VSIZE 1
+#define COMP_SCREEN_OPTION_DEFAULT_ICON 2
+#define COMP_SCREEN_OPTION_NUMBER_OF_DESKTOPS 3
+#define COMP_SCREEN_OPTION_DETECT_OUTPUTS 4
+#define COMP_SCREEN_OPTION_OUTPUTS 5
+#define COMP_SCREEN_OPTION_OVERLAPPING_OUTPUTS 6
+#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_LEVEL 7
+#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_MATCH 8
+#define COMP_SCREEN_OPTION_NUM 9
#define OUTPUT_OVERLAP_MODE_SMART 0
#define OUTPUT_OVERLAP_MODE_PREFER_LARGER 1
@@ -60,10 +36,6 @@ extern const char *defaultTextureFilter;
#define FOCUS_PREVENTION_LEVEL_VERYHIGH 3
#define FOCUS_PREVENTION_LEVEL_LAST FOCUS_PREVENTION_LEVEL_VERYHIGH
-#define COMP_SCREEN_DAMAGE_PENDING_MASK (1 << 0)
-#define COMP_SCREEN_DAMAGE_REGION_MASK (1 << 1)
-#define COMP_SCREEN_DAMAGE_ALL_MASK (1 << 2)
-
extern const CompMetadata::OptionInfo
coreScreenOptionInfo[COMP_SCREEN_OPTION_NUM];
@@ -124,9 +96,6 @@ class PrivateScreen {
void
reshape (int w, int h);
- void
- updateScreenBackground (CompTexture *texture);
-
bool
handleStartupSequenceTimeout();
@@ -146,9 +115,6 @@ class PrivateScreen {
getDesktopHints ();
void
- makeOutputWindow ();
-
- void
grabUngrabOneKey (unsigned int modifiers,
int keycode,
bool grab);
@@ -177,15 +143,7 @@ class PrivateScreen {
void
computeWorkareaForBox (BoxPtr pBox, XRectangle *area);
- void
- paintBackground (Region region,
- bool transformed);
- void
- paintOutputRegion (const CompTransform *transform,
- Region region,
- CompOutput *output,
- unsigned int mask);
public:
@@ -202,29 +160,14 @@ class PrivateScreen {
unsigned int nDesktop;
unsigned int currentDesktop;
REGION region;
- Region damage;
- unsigned long damageMask;
+
Window root;
- Window overlay;
- Window output;
+
XWindowAttributes attrib;
Window grabWindow;
- CompFBConfig glxPixmapFBConfigs[MAX_DEPTH + 1];
- int textureRectangle;
- int textureNonPowerOfTwo;
- int textureEnvCombine;
- int textureEnvCrossbar;
- int textureBorderClamp;
- int textureCompression;
- GLint maxTextureSize;
- int fbo;
- int fragmentProgram;
- int maxTextureUnits;
+
Cursor invisibleCursor;
- std::list <CompRect> exposeRects;
- CompTexture backgroundTexture;
- Bool backgroundLoaded;
- unsigned int pendingDestroys;
+
int desktopWindowCount;
unsigned int mapNum;
unsigned int activeNum;
@@ -234,31 +177,21 @@ class PrivateScreen {
CompOutput fullscreenOutput;
bool hasOverlappingOutputs;
-
- CompPoint windowPaintOffset;
-
XRectangle lastViewport;
CompActiveWindowHistory history[ACTIVE_WINDOW_HISTORY_NUM];
int currentHistory;
- int overlayWindowCount;
-
CompScreenEdge screenEdge[SCREEN_EDGE_NUM];
SnMonitorContext *snContext;
std::list<CompStartupSequence *> startupSequences;
CompCore::Timer startupSequenceTimer;
- CompTexture::Filter filter[3];
-
std::list<CompGroup *> groups;
CompIcon *defaultIcon;
- Bool canDoSaturated;
- Bool canDoSlightlySaturated;
-
Window wmSnSelectionWindow;
Atom wmSnAtom;
Time wmSnTimestamp;
@@ -274,25 +207,8 @@ class PrivateScreen {
std::list<Grab *> grabs;
- CompPoint rasterPos;
- struct timeval lastRedraw;
- int nextRedraw;
- int redrawTime;
- int optimalRedrawTime;
- int frameStatus;
- int timeMult;
- Bool idle;
- int timeLeft;
- Bool pendingCommands;
-
- CompFragment::Storage fragmentStorage;
-
- GLfloat projection[16];
-
- Bool clearBuffers;
-
- Bool lighting;
- Bool slowAnimations;
+ unsigned int pendingDestroys;
+
XRectangle workArea;
@@ -301,17 +217,10 @@ class PrivateScreen {
unsigned long *desktopHintData;
int desktopHintSize;
- GLXContext ctx;
-
- CompOption::Vector opt;
-
- CompCore::Timer paintTimer;
- GLXGetProcAddressProc getProcAddress;
+ CompOption::Vector opt;
- Region tmpRegion;
- Region outputRegion;
};
#endif