summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2007-08-20 16:28:28 +0200
committerDennis Kasprzyk <onestone@opencompositing.org>2007-08-20 16:28:28 +0200
commite194d5e6755704704820a5e05fb31ce3208e98c5 (patch)
tree0834d84cf7c06c69598c269601f4bfbc6616e2dc
parentc0c99902e71485e9e0c3e2169c15d31ed4683113 (diff)
downloadput-e194d5e6755704704820a5e05fb31ce3208e98c5.tar.gz
put-e194d5e6755704704820a5e05fb31ce3208e98c5.tar.bz2
New action system
-rw-r--r--put.c71
-rw-r--r--put.xml.in218
2 files changed, 124 insertions, 165 deletions
diff --git a/put.c b/put.c
index a1f922a..3fea87a 100644
--- a/put.c
+++ b/put.c
@@ -647,14 +647,14 @@ putToViewport (CompDisplay *d,
PutDisplayOptions i;
CompOption *opt;
- i = PutDisplayOptionPutViewport1;
+ i = PutDisplayOptionPutViewport1Key;
- while (i <= PutDisplayOptionPutViewport12)
+ while (i <= PutDisplayOptionPutViewport12Key)
{
opt = putGetDisplayOption (d, i);
if (&opt->value.action == action)
{
- face = i - PutDisplayOptionPutViewport1;
+ face = i - PutDisplayOptionPutViewport1Key;
break;
}
i++;
@@ -1274,34 +1274,45 @@ putInitDisplay (CompPlugin *p,
"_COMPIZ_PUT_WINDOW", 0);
putSetPutViewportInitiate (d, putToViewport);
- putSetPutViewport1Initiate (d, putToViewport);
- putSetPutViewport2Initiate (d, putToViewport);
- putSetPutViewport3Initiate (d, putToViewport);
- putSetPutViewport4Initiate (d, putToViewport);
- putSetPutViewport5Initiate (d, putToViewport);
- putSetPutViewport6Initiate (d, putToViewport);
- putSetPutViewport7Initiate (d, putToViewport);
- putSetPutViewport8Initiate (d, putToViewport);
- putSetPutViewport9Initiate (d, putToViewport);
- putSetPutViewport10Initiate (d, putToViewport);
- putSetPutViewport11Initiate (d, putToViewport);
- putSetPutViewport12Initiate (d, putToViewport);
- putSetPutViewportLeftInitiate (d, putViewportLeft);
- putSetPutViewportRightInitiate (d, putViewportRight);
- putSetPutViewportUpInitiate (d, putViewportUp);
- putSetPutViewportDownInitiate (d, putViewportDown);
- putSetPutRestoreInitiate (d, restore);
- putSetPutPointerInitiate (d, putPointer);
+ putSetPutViewport1KeyInitiate (d, putToViewport);
+ putSetPutViewport2KeyInitiate (d, putToViewport);
+ putSetPutViewport3KeyInitiate (d, putToViewport);
+ putSetPutViewport4KeyInitiate (d, putToViewport);
+ putSetPutViewport5KeyInitiate (d, putToViewport);
+ putSetPutViewport6KeyInitiate (d, putToViewport);
+ putSetPutViewport7KeyInitiate (d, putToViewport);
+ putSetPutViewport8KeyInitiate (d, putToViewport);
+ putSetPutViewport9KeyInitiate (d, putToViewport);
+ putSetPutViewport10KeyInitiate (d, putToViewport);
+ putSetPutViewport11KeyInitiate (d, putToViewport);
+ putSetPutViewport12KeyInitiate (d, putToViewport);
+ putSetPutViewportLeftKeyInitiate (d, putViewportLeft);
+ putSetPutViewportRightKeyInitiate (d, putViewportRight);
+ putSetPutViewportUpKeyInitiate (d, putViewportUp);
+ putSetPutViewportDownKeyInitiate (d, putViewportDown);
+ putSetPutRestoreKeyInitiate (d, restore);
+ putSetPutPointerKeyInitiate (d, putPointer);
+ putSetPutRestoreButtonInitiate (d, restore);
+ putSetPutPointerButtonInitiate (d, putPointer);
putSetPutExactInitiate (d, putExact);
- putSetPutCenterInitiate (d, putCenter);
- putSetPutLeftInitiate (d, putLeft);
- putSetPutRightInitiate (d, putRight);
- putSetPutTopInitiate (d, putTop);
- putSetPutBottomInitiate (d, putBottom);
- putSetPutTopleftInitiate (d, putTopLeft);
- putSetPutToprightInitiate (d, putTopRight);
- putSetPutBottomleftInitiate (d, putBottomLeft);
- putSetPutBottomrightInitiate (d, putBottomRight);
+ putSetPutCenterKeyInitiate (d, putCenter);
+ putSetPutLeftKeyInitiate (d, putLeft);
+ putSetPutRightKeyInitiate (d, putRight);
+ putSetPutTopKeyInitiate (d, putTop);
+ putSetPutBottomKeyInitiate (d, putBottom);
+ putSetPutTopleftKeyInitiate (d, putTopLeft);
+ putSetPutToprightKeyInitiate (d, putTopRight);
+ putSetPutBottomleftKeyInitiate (d, putBottomLeft);
+ putSetPutBottomrightKeyInitiate (d, putBottomRight);
+ putSetPutCenterButtonInitiate (d, putCenter);
+ putSetPutLeftButtonInitiate (d, putLeft);
+ putSetPutRightButtonInitiate (d, putRight);
+ putSetPutTopButtonInitiate (d, putTop);
+ putSetPutBottomButtonInitiate (d, putBottom);
+ putSetPutTopleftButtonInitiate (d, putTopLeft);
+ putSetPutToprightButtonInitiate (d, putTopRight);
+ putSetPutBottomleftButtonInitiate (d, putBottomLeft);
+ putSetPutBottomrightButtonInitiate (d, putBottomRight);
WRAP (pd, d, handleEvent, putHandleEvent);
d->privates[displayPrivateIndex].ptr = pd;
diff --git a/put.xml.in b/put.xml.in
index 5887224..8ff8306 100644
--- a/put.xml.in
+++ b/put.xml.in
@@ -15,228 +15,176 @@
<_short>Bindings</_short>
<subgroup>
<_short>Put to arbitrary viewport</_short>
- <option name="put_viewport_1" type="action">
+ <option name="put_viewport_1_key" type="key">
<_short>Put On Viewport 1</_short>
<_long>Move window to viewport 1</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_2" type="action">
+ <option name="put_viewport_2_key" type="key">
<_short>Put On Viewport 2</_short>
<_long>Move window to viewport 2</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_3" type="action">
+ <option name="put_viewport_3_key" type="key">
<_short>Put On Viewport 3</_short>
<_long>Move window to viewport 3</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_4" type="action">
+ <option name="put_viewport_4_key" type="key">
<_short>Put On Viewport 4</_short>
<_long>Move window to viewport 4</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_5" type="action">
+ <option name="put_viewport_5_key" type="key">
<_short>Put On Viewport 5</_short>
<_long>Move window to viewport 5</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_6" type="action">
+ <option name="put_viewport_6_key" type="key">
<_short>Put On Viewport 6</_short>
<_long>Move window to viewport 6</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_7" type="action">
+ <option name="put_viewport_7_key" type="key">
<_short>Put On Viewport 7</_short>
<_long>Move window to viewport 7</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_8" type="action">
+ <option name="put_viewport_8_key" type="key">
<_short>Put On Viewport 8</_short>
<_long>Move window to viewport 8</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_9" type="action">
+ <option name="put_viewport_9_key" type="key">
<_short>Put On Viewport 9</_short>
<_long>Move window to viewport 9</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_10" type="action">
+ <option name="put_viewport_10_key" type="key">
<_short>Put On Viewport 10</_short>
<_long>Move window to viewport 10</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_11" type="action">
+ <option name="put_viewport_11_key" type="key">
<_short>Put On Viewport 11</_short>
<_long>Move window to viewport 11</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_12" type="action">
+ <option name="put_viewport_12_key" type="key">
<_short>Put On Viewport 12</_short>
<_long>Move window to viewport 12</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
</subgroup>
<subgroup>
<_short>Put to adjacent viewport</_short>
- <option name="put_viewport_left" type="action">
+ <option name="put_viewport_left_key" type="key">
<_short>Viewport Left</_short>
<_long>Move window to the viewport on the left</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_right" type="action">
+ <option name="put_viewport_right_key" type="key">
<_short>Viewport Right</_short>
<_long>Move window to the viewport on the right</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_up" type="action">
+ <option name="put_viewport_up_key" type="key">
<_short>Viewport Top</_short>
<_long>Move window to the viewport on the top</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
- <option name="put_viewport_down" type="action">
+ <option name="put_viewport_down_key" type="key">
<_short>Viewport Bottom</_short>
<_long>Move window to the viewport on the bottom</_long>
- <allowed key="true"/>
- <default>
- <key/>
- </default>
</option>
</subgroup>
<subgroup>
<_short>Put within viewport</_short>
- <option name="put_center" type="action">
+ <option name="put_center_key" type="key">
<_short>Put Center</_short>
<_long>Move window to the center</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Begin</key>
- </default>
+ <default>&lt;Super&gt;KP_Begin</default>
</option>
- <option name="put_left" type="action">
+ <option name="put_center_button" type="button">
+ <_short>Put Center</_short>
+ <_long>Move window to the center</_long>
+ </option>
+ <option name="put_left_key" type="key">
<_short>Put Left</_short>
<_long>Move window to the left edge</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Left</key>
- </default>
+ <default>&lt;Super&gt;KP_Left</default>
+ </option>
+ <option name="put_left_button" type="button">
+ <_short>Put Left</_short>
+ <_long>Move window to the left edge</_long>
+ </option>
+ <option name="put_right_key" type="key">
+ <_short>Put Right</_short>
+ <_long>Move window to the right edge</_long>
+ <default>&lt;Super&gt;KP_Right</default>
</option>
- <option name="put_right" type="action">
+ <option name="put_right_button" type="button">
<_short>Put Right</_short>
<_long>Move window to the right edge</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Right</key>
- </default>
</option>
- <option name="put_top" type="action">
+ <option name="put_top_key" type="key">
<_short>Put Top</_short>
<_long>Move window to the top edge</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Up</key>
- </default>
+ <default>&lt;Super&gt;KP_Up</default>
</option>
- <option name="put_bottom" type="action">
+ <option name="put_top_button" type="button">
+ <_short>Put Top</_short>
+ <_long>Move window to the top edge</_long>
+ </option>
+ <option name="put_bottom_key" type="key">
+ <_short>Put Bottom</_short>
+ <_long>Move window to the bottom edge</_long>
+ <default>&lt;Super&gt;KP_Down</default>
+ </option>
+ <option name="put_bottom_button" type="button">
<_short>Put Bottom</_short>
<_long>Move window to the bottom edge</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Down</key>
- </default>
+ <default>&lt;Super&gt;KP_Down</default>
</option>
- <option name="put_topleft" type="action">
+ <option name="put_topleft_key" type="key">
<_short>Put Top Left</_short>
<_long>Move window to the top left corner</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Home</key>
- </default>
+ <default>&lt;Super&gt;KP_Home</default>
</option>
- <option name="put_topright" type="action">
+ <option name="put_topleft_button" type="button">
+ <_short>Put Top Left</_short>
+ <_long>Move window to the top left corner</_long>
+ </option>
+ <option name="put_topright_key" type="key">
+ <_short>Put Top Right</_short>
+ <_long>Move window to the top right corner</_long>
+ <default>&lt;Super&gt;KP_Prior</default>
+ </option>
+ <option name="put_topright_button" type="button">
<_short>Put Top Right</_short>
<_long>Move window to the top right corner</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Prior</key>
- </default>
</option>
- <option name="put_bottomleft" type="action">
+ <option name="put_bottomleft_key" type="key">
<_short>Put Bottom Left</_short>
<_long>Move window to the bottom left corner</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_End</key>
- </default>
+ <default>&lt;Super&gt;KP_End</default>
+ </option>
+ <option name="put_bottomleft_button" type="button">
+ <_short>Put Bottom Left</_short>
+ <_long>Move window to the bottom left corner</_long>
+ </option>
+ <option name="put_bottomright_key" type="key">
+ <_short>Put Bottom Right</_short>
+ <_long>Move window to the bottom right corner</_long>
+ <default>&lt;Super&gt;KP_Next</default>
</option>
- <option name="put_bottomright" type="action">
+ <option name="put_bottomright_button" type="button">
<_short>Put Bottom Right</_short>
<_long>Move window to the bottom right corner</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Next</key>
- </default>
</option>
</subgroup>
- <option name="put_restore" type="action">
+ <option name="put_restore_key" type="key">
+ <_short>Restore Position</_short>
+ <_long>Move window to the last position</_long>
+ <default>&lt;Super&gt;KP_Insert</default>
+ </option>
+ <option name="put_restore_button" type="button">
<_short>Restore Position</_short>
<_long>Move window to the last position</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;KP_Insert</key>
- </default>
</option>
- <option name="put_pointer" type="action">
+ <option name="put_pointer_key" type="key">
+ <_short>Put Pointer</_short>
+ <_long>Move window to the pointer position</_long>
+ <default>&lt;Super&gt;z</default>
+ </option>
+ <option name="put_pointer_button" type="button">
<_short>Put Pointer</_short>
<_long>Move window to the pointer position</_long>
- <allowed key="true" button="true"/>
- <default>
- <key>&lt;Super&gt;z</key>
- </default>
</option>
<option name="put_exact" type="action">
<_short>Put Exact</_short>