summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-05-16 17:17:12 +0200
committerDanny Baumann <dannybaumann@web.de>2007-05-16 17:17:12 +0200
commit50e79e1a2f0a6af08cce4a49146f29c2b1e775bf (patch)
treeb1ef0d9e557f3494e194bcac56d5084e9aa6a871
parent78104ba4d7b379165995c5aa0997933f39b7905b (diff)
downloadberyl-premerge-50e79e1a2f0a6af08cce4a49146f29c2b1e775bf.tar.gz
beryl-premerge-50e79e1a2f0a6af08cce4a49146f29c2b1e775bf.tar.bz2
Use int descriptions.
-rw-r--r--metadata/group.xml51
-rw-r--r--metadata/mblur.xml18
-rw-r--r--metadata/ring.xml46
-rw-r--r--metadata/showdesktop.xml43
-rw-r--r--metadata/snap.xml70
-rw-r--r--metadata/snow.xml28
-rw-r--r--metadata/tile.xml71
-rw-r--r--src/group/init.c6
-rw-r--r--src/group/paint.c4
-rw-r--r--src/mblur.c4
-rw-r--r--src/showdesktop.c2
-rw-r--r--src/snow.c2
-rw-r--r--src/tile.c16
13 files changed, 248 insertions, 113 deletions
diff --git a/metadata/group.xml b/metadata/group.xml
index 0594610..9c76e40 100644
--- a/metadata/group.xml
+++ b/metadata/group.xml
@@ -370,17 +370,32 @@
<alpha>0x9999</alpha>
</default>
</option>
- <option name="tab_style" type="string">
+ <option name="tab_style" type="int">
<short>Tab Style</short>
<long>The style of the tab bar</long>
- <default>Simple</default>
- <allowed>
- <value>Simple</value>
- <value>Gradient</value>
- <value>Glass</value>
- <value>Metal</value>
- <value>Murrina</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>4</max>
+ <desc>
+ <value>0</value>
+ <name>Simple</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Gradient</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Glass</name>
+ </desc>
+ <desc>
+ <value>3</value>
+ <name>Metal</name>
+ </desc>
+ <desc>
+ <value>4</value>
+ <name>Murrina</name>
+ </desc>
</option>
</subgroup>
<subgroup>
@@ -469,14 +484,20 @@
<min>1</min>
<max>300</max>
</option>
- <option name="glow_type" type="string">
+ <option name="glow_type" type="int">
<short>Glow Type</short>
<long>The type of the glow</long>
- <default>Rectangular glow</default>
- <allowed>
- <value>Rectangular glow</value>
- <value>Glow ring</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>1</max>
+ <desc>
+ <value>0</value>
+ <name>Rectangular glow</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Glow ring</name>
+ </desc>
</option>
</group>
</screen>
diff --git a/metadata/mblur.xml b/metadata/mblur.xml
index 51817ad..0afdb51 100644
--- a/metadata/mblur.xml
+++ b/metadata/mblur.xml
@@ -25,14 +25,20 @@
<short>Main</short>
<subgroup>
<short>Visibility/Performance</short>
- <option name="mode" type="string">
+ <option name="mode" type="int">
<short>Toggle Motion Blur</short>
<long>Toggle motion Blur effect.</long>
- <default>Texture Copy</default>
- <allowed>
- <value>Texture Copy</value>
- <value>Accumulation buffer</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>1</max>
+ <desc>
+ <value>0</value>
+ <name>Texture Copy</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Accumulation buffer</name>
+ </desc>
</option>
<option name="strength" type="float">
<short>Motion Blur Strength</short>
diff --git a/metadata/ring.xml b/metadata/ring.xml
index b7c82ed..0681783 100644
--- a/metadata/ring.xml
+++ b/metadata/ring.xml
@@ -89,15 +89,24 @@
<min>1</min>
<max>100</max>
</option>
- <option name="overlay_icon" type="string">
+ <option name="overlay_icon" type="int">
<short>Overlay Icon</short>
<long>Overlay an icon on windows in the ring</long>
- <default>Emblem</default>
- <allowed>
- <value>None</value>
- <value>Emblem</value>
- <value>Big</value>
- </allowed>
+ <default>1</default>
+ <min>0</min>
+ <max>2</max>
+ <desc>
+ <value>0</value>
+ <name>None</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Emblem</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Big</name>
+ </desc>
</option>
<option name="minimized" type="bool">
<short>Show Minimized</short>
@@ -196,15 +205,24 @@
<alpha>0xffff</alpha>
</default>
</option>
- <option name="title_text_placement" type="string">
+ <option name="title_text_placement" type="int">
<short>Text Placement</short>
<long>Selects where to place the window title.</long>
- <default>Centered on screen</default>
- <allowed>
- <value>Centered on screen</value>
- <value>Above ring</value>
- <value>Below ring</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>2</max>
+ <desc>
+ <value>0</value>
+ <name>Centered on screen</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Above ring</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Below ring</name>
+ </desc>
</option>
</group>
</screen>
diff --git a/metadata/showdesktop.xml b/metadata/showdesktop.xml
index 9df8621..846b456 100644
--- a/metadata/showdesktop.xml
+++ b/metadata/showdesktop.xml
@@ -24,19 +24,40 @@
<max>50.0</max>
<precision>0.1</precision>
</option>
- <option name="direction" type="string">
+ <option name="direction" type="int">
<short>Movement Direction</short>
<long>Direction of window movement</long>
- <default>To Corners</default>
- <allowed>
- <value>Up</value>
- <value>Down</value>
- <value>Left</value>
- <value>Right</value>
- <value>Up/Down</value>
- <value>Left/Right</value>
- <value>To Corners</value>
- </allowed>
+ <default>6</default>
+ <min>0</min>
+ <max>6</max>
+ <desc>
+ <value>0</value>
+ <name>Up</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Down</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Left</name>
+ </desc>
+ <desc>
+ <value>3</value>
+ <name>Right</name>
+ </desc>
+ <desc>
+ <value>4</value>
+ <name>Up/Down</name>
+ </desc>
+ <desc>
+ <value>5</value>
+ <name>Left/Right</name>
+ </desc>
+ <desc>
+ <value>6</value>
+ <name>To Corners</name>
+ </desc>
</option>
<option name="window_match" type="match">
<short>Window Types</short>
diff --git a/metadata/snap.xml b/metadata/snap.xml
index 59d52f7..e741282 100644
--- a/metadata/snap.xml
+++ b/metadata/snap.xml
@@ -16,16 +16,28 @@
<option name="avoid_snap" type="list">
<short>Avoid Snap Modifier</short>
<long>Use this bindings to avoid snapping.</long>
- <type>string</type>
+ <type>int</type>
+ <min>0</min>
+ <max>3</max>
<default>
- <value>Shift</value>
- </default>
- <allowed>
- <value>Shift</value>
- <value>Alt</value>
- <value>Control</value>
- <value>Meta</value>
- </allowed>
+ <value>0</value>
+ </default>
+ <desc>
+ <value>0</value>
+ <name>Shift</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Alt</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Control</name>
+ </desc>
+ <desc>
+ <value>3</value>
+ <name>Meta</name>
+ </desc>
</option>
</group>
</display>
@@ -35,26 +47,38 @@
<option name="snap_type" type="list">
<short>Snap Type</short>
<long>Choose 'Resistance', 'Attraction' or 'Full Mode'.</long>
- <type>string</type>
+ <type>int</type>
+ <min>0</min>
+ <max>1</max>
<default>
- <value>Edge resistance</value>
- </default>
- <allowed>
- <value>Edge resistance</value>
- <value>Edge attraction</value>
- </allowed>
+ <value>0</value>
+ </default>
+ <desc>
+ <value>0</value>
+ <name>Edge resistance</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Edge attraction</name>
+ </desc>
</option>
<option name="edges_categories" type="list">
<short>Edges</short>
<long>Snap to 'Screen Edges', 'Windows Edges' or 'Both'.</long>
- <type>string</type>
+ <type>int</type>
+ <min>0</min>
+ <max>1</max>
<default>
- <value>Screen edges</value>
- </default>
- <allowed>
- <value>Screen edges</value>
- <value>Window edges</value>
- </allowed>
+ <value>0</value>
+ </default>
+ <desc>
+ <value>0</value>
+ <name>Screen edges</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Window edges</name>
+ </desc>
</option>
<option name="resistance_distance" type="int">
<short>Edge Resistance Distance</short>
diff --git a/metadata/snow.xml b/metadata/snow.xml
index 600ba2b..d60e072 100644
--- a/metadata/snow.xml
+++ b/metadata/snow.xml
@@ -60,16 +60,28 @@
<long>Flakes rotate if checked.</long>
<default>true</default>
</option>
- <option name="snow_direction" type="string">
+ <option name="snow_direction" type="int">
<short>Snow Direction</short>
<long>Select snow flake movement direction</long>
- <default>Top to Bottom</default>
- <allowed>
- <value>Top to Bottom</value>
- <value>Bottom to Top</value>
- <value>Right to Left</value>
- <value>Left to Right</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>3</max>
+ <desc>
+ <value>0</value>
+ <name>Top to Bottom</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Bottom to Top</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Right to Left</name>
+ </desc>
+ <desc>
+ <value>3</value>
+ <name>Left to Right</name>
+ </desc>
</option>
</group>
<group>
diff --git a/metadata/tile.xml b/metadata/tile.xml
index 85989e6..bbea880 100644
--- a/metadata/tile.xml
+++ b/metadata/tile.xml
@@ -7,18 +7,36 @@
<display>
<group>
<short>Options</short>
- <option name="animate_type" type="string">
+ <option name="animate_type" type="int">
<short>Tiling Animation Type</short>
<long>Selects the animation used while tiling</long>
- <default>None</default>
- <allowed>
- <value>None</value>
- <value>Filled Outline</value>
- <value>Slide</value>
- <value>Zoom</value>
- <value>Drop From Top</value>
- <value>Fade</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>5</max>
+ <desc>
+ <value>0</value>
+ <name>None</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Filled Outline</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Slide</name>
+ </desc>
+ <desc>
+ <value>3</value>
+ <name>Zoom</name>
+ </desc>
+ <desc>
+ <value>4</value>
+ <name>Drop From Top</name>
+ </desc>
+ <desc>
+ <value>5</value>
+ <name>Fade</name>
+ </desc>
</option>
<option name="animation_duration" type="int">
<short>Animation Duration</short>
@@ -27,17 +45,32 @@
<min>100</min>
<max>2000</max>
</option>
- <option name="tile_toggle_type" type="string">
+ <option name="tile_toggle_type" type="int">
<short>Tiling Method For Toggle</short>
<long>Choose the tiling type you want when using toggle.</long>
- <default>Tile</default>
- <allowed>
- <value>Tile</value>
- <value>Left</value>
- <value>Tile Vertically</value>
- <value>Tile Horizontally</value>
- <value>Cascade</value>
- </allowed>
+ <default>0</default>
+ <min>0</min>
+ <max>4</max>
+ <desc>
+ <value>0</value>
+ <name>Tile</name>
+ </desc>
+ <desc>
+ <value>1</value>
+ <name>Left</name>
+ </desc>
+ <desc>
+ <value>2</value>
+ <name>Tile Vertically</name>
+ </desc>
+ <desc>
+ <value>3</value>
+ <name>Tile Horizontally</name>
+ </desc>
+ <desc>
+ <value>4</value>
+ <name>Cascade</name>
+ </desc>
</option>
<option name="tile_join" type="bool">
<short>Join Windows (EXPERIMENTAL)</short>
diff --git a/src/group/init.c b/src/group/init.c
index 883d728..1553f82 100644
--- a/src/group/init.c
+++ b/src/group/init.c
@@ -27,7 +27,7 @@
#include "group.h"
#include "group_glow.h"
-static const GlowTextureProperties glowTextureProperties[GlowTypeNum] = {
+static const GlowTextureProperties glowTextureProperties[2] = {
// GlowTextureRectangular
{glowTexRect, 32, 21},
// GlowTextureRing
@@ -87,7 +87,7 @@ static void groupScreenOptionChanged(CompScreen *s, CompOption *opt, GroupScreen
{
GROUP_DISPLAY(s->display);
GroupGlowTypeEnum glowType;
- glowType = groupGetGlowTypeIndex(s);
+ glowType = groupGetGlowType(s);
finiTexture(s, &gs->glowTexture);
initTexture(s, &gs->glowTexture);
@@ -249,7 +249,7 @@ Bool groupInitScreen(CompPlugin * p, CompScreen * s)
initTexture (s, &gs->glowTexture);
- GroupGlowTypeEnum glowType = groupGetGlowTypeIndex(s);
+ GroupGlowTypeEnum glowType = groupGetGlowType(s);
imageDataToTexture (s, &gs->glowTexture,
glowTextureProperties[glowType].textureData,
glowTextureProperties[glowType].textureSize,
diff --git a/src/group/paint.c b/src/group/paint.c
index 6ba2490..9c29054 100644
--- a/src/group/paint.c
+++ b/src/group/paint.c
@@ -205,7 +205,7 @@ void groupRenderTabBarBackground(GroupSelection *group)
cairo_close_path (cr);
- switch (groupGetTabStyleIndex(group->screen))
+ switch (groupGetTabStyle(group->screen))
{
case TabStyleSimple:
{
@@ -1015,7 +1015,7 @@ groupComputeGlowQuads (CompWindow *w, CompMatrix *matrix)
GROUP_DISPLAY(w->screen->display);
int glowSize = groupGetGlowSize(w->screen);
- GroupGlowTypeEnum glowType = groupGetGlowTypeIndex(w->screen);
+ GroupGlowTypeEnum glowType = groupGetGlowType(w->screen);
int glowOffset = (glowSize * gd->glowTextureProperties[glowType].glowOffset /
gd->glowTextureProperties[glowType].textureSize) + 1;
diff --git a/src/mblur.c b/src/mblur.c
index b421a09..85ff460 100644
--- a/src/mblur.c
+++ b/src/mblur.c
@@ -153,7 +153,7 @@ mblurPaintScreen (CompScreen * s, const ScreenPaintAttrib * sa,
enable_scissor = TRUE;
}
- if (ms->active && mblurGetModeIndex (s) == ModeTextureCopy
+ if (ms->active && mblurGetMode (s) == ModeTextureCopy
&& output + 1 == s->nOutputDev)
{
@@ -249,7 +249,7 @@ mblurPaintScreen (CompScreen * s, const ScreenPaintAttrib * sa,
damageScreen (s);
}
- if (ms->active && mblurGetModeIndex (s) == ModeAccumulationBuffer
+ if (ms->active && mblurGetMode (s) == ModeAccumulationBuffer
&& output + 1 == s->nOutputDev)
{
diff --git a/src/showdesktop.c b/src/showdesktop.c
index b25d9c5..5387251 100644
--- a/src/showdesktop.c
+++ b/src/showdesktop.c
@@ -172,7 +172,7 @@ static void repositionSDPlacer(CompWindow * w, int oldState)
sw->placer->origViewportY = w->screen->y;
}
- switch (showdesktopGetDirectionIndex(w->screen))
+ switch (showdesktopGetDirection(w->screen))
{
case DirectionUp:
sw->placer->offScreenX = w->attrib.x;
diff --git a/src/snow.c b/src/snow.c
index 96f2790..c5a6939 100644
--- a/src/snow.c
+++ b/src/snow.c
@@ -369,7 +369,7 @@ static void InitiateSnowFlake(SnowScreen * ss, SnowFlake * sf)
//TODO: possibly place snowflakes based on FOV, instead of a cube.
int boxing = snowGetScreenBoxing(ss->s->display);
- switch(snowGetSnowDirectionIndex(ss->s->display))
+ switch(snowGetSnowDirection(ss->s->display))
{
case SnowDirectionTopToBottom:
sf->x = mmrand(-boxing, ss->s->width + boxing, 1);
diff --git a/src/tile.c b/src/tile.c
index 4e317c6..77d49cd 100644
--- a/src/tile.c
+++ b/src/tile.c
@@ -113,7 +113,7 @@ static Bool tilePaintWindow(CompWindow * w,
CompTransform wTransform = *transform;
float animationDuration = tileGetAnimationDuration(s->display);
- switch (tileGetAnimateTypeIndex(s->display))
+ switch (tileGetAnimateType(s->display))
{
/*
Drop animation
@@ -286,7 +286,7 @@ static Bool tilePaintScreen(CompScreen * s,
// Check if animation is enabled, there is resizing on screen and only outline should be drawn
if (ts->grabIndex &&
- (tileGetAnimateTypeIndex(s->display) == AnimateTypeFilledOutline))
+ (tileGetAnimateType(s->display) == AnimateTypeFilledOutline))
{
CompWindow *w;
float animationDuration = tileGetAnimationDuration(s->display);
@@ -600,7 +600,7 @@ static Bool placeWin(CompWindow *w, int x, int y, int width, int height)
tw->alreadyResized = FALSE; // window is not resized now
- switch (tileGetAnimateTypeIndex(w->screen->display))
+ switch (tileGetAnimateType(w->screen->display))
{
case AnimateTypeNone:
tileSetNewWindowSize(w);
@@ -632,7 +632,7 @@ static Bool tileSetNewWindowSize(CompWindow *w)
xwc.width = tw->newCoords.width;
xwc.height = tw->newCoords.height;
- if (ts->tileType == TileToggleTypeNum)
+ if (ts->tileType == -1)
{
if (tw->savedValid)
maximizeWindow(w, tw->savedMaxState);
@@ -837,7 +837,7 @@ static Bool applyTiling(CompScreen *s)
winHeight - (border.top + border.bottom));
tw->isTiled = TRUE;
break;
- case TileToggleTypeNum:
+ case -1:
if (tw->isTiled)
{
placeWin(w, tw->savedCoords.x, tw->savedCoords.y,
@@ -944,7 +944,7 @@ static Bool tileRestore(CompDisplay * d, CompAction * ac, CompActionState state,
if (s) {
TILE_SCREEN(s);
- ts->tileType = TileToggleTypeNum;
+ ts->tileType = -1;
applyTiling(s);
}
@@ -969,12 +969,12 @@ static Bool tileToggle(CompDisplay * d, CompAction * ac, CompActionState state,
if (w)
{
- ts->tileType = TileToggleTypeNum;
+ ts->tileType = -1;
applyTiling(s);
}
else
{
- ts->tileType = tileGetTileToggleTypeIndex(d);
+ ts->tileType = tileGetTileToggleType(d);
applyTiling(s);
}
}