summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@ACER-SUSE.SUSE>2007-11-30 16:00:41 +0900
committerSam Spilsbury <Sam@ACER-SUSE.SUSE>2007-11-30 16:00:41 +0900
commitb1789fa6bd70148068a71354092f28deb01505b2 (patch)
treebe262077af959b4f37d2b8838140bd4e90befc34
parent7a20fbce709bec43e46e7d6b459fae01c2617350 (diff)
downloadflash-0.6.0.tar.gz
flash-0.6.0.tar.bz2
* 0.6 port0.6.0
-rw-r--r--flash.c56
-rw-r--r--flash.xml7
2 files changed, 36 insertions, 27 deletions
diff --git a/flash.c b/flash.c
index 741514d..2f6a397 100644
--- a/flash.c
+++ b/flash.c
@@ -37,16 +37,15 @@
#define OPTION_DISTANCE_MAX 1024
-#define FLASH_DISPLAY_OPTION_INITIATE_BUTTON 0
-#define FLASH_DISPLAY_OPTION_INITIATE_KEY 1
-#define FLASH_DISPLAY_OPTION_DISTANCE_MAX 2
-#define FLASH_DISPLAY_OPTION_ECART_MAX 3
-#define FLASH_DISPLAY_OPTION_INTERVAL 4
-#define FLASH_DISPLAY_OPTION_TIME 5
-#define FLASH_DISPLAY_OPTION_COLOR_UP_LEFT 6
-#define FLASH_DISPLAY_OPTION_COLOR_CENTER 7
-#define FLASH_DISPLAY_OPTION_COLOR_DOWN_RIGHT 8
-#define FLASH_DISPLAY_OPTION_NUM 9
+#define FLASH_DISPLAY_OPTION_INITIATE 0
+#define FLASH_DISPLAY_OPTION_DISTANCE_MAX 1
+#define FLASH_DISPLAY_OPTION_ECART_MAX 2
+#define FLASH_DISPLAY_OPTION_INTERVAL 3
+#define FLASH_DISPLAY_OPTION_TIME 4
+#define FLASH_DISPLAY_OPTION_COLOR_UP_LEFT 5
+#define FLASH_DISPLAY_OPTION_COLOR_CENTER 6
+#define FLASH_DISPLAY_OPTION_COLOR_DOWN_RIGHT 7
+#define FLASH_DISPLAY_OPTION_NUM 8
#define FLASH_SCREEN_OPTION_WINDOW_TYPE 0
#define FLASH_SCREEN_OPTION_NUM 1
@@ -55,11 +54,11 @@
* Helpers
*
*/
-#define GET_FLASH_DISPLAY(d) ((FlashDisplay *) (d)->base.privates[displayPrivateIndex].ptr)
+#define GET_FLASH_DISPLAY(d) ((FlashDisplay *) (d)->privates[displayPrivateIndex].ptr)
#define FLASH_DISPLAY(d) FlashDisplay *fd = GET_FLASH_DISPLAY (d)
-#define GET_FLASH_SCREEN(s, fd) ((FlashScreen *) (s)->base.privates[(fd)->screenPrivateIndex].ptr)
+#define GET_FLASH_SCREEN(s, fd) ((FlashScreen *) (s)->privates[(fd)->screenPrivateIndex].ptr)
#define FLASH_SCREEN(s) FlashScreen *fs = GET_FLASH_SCREEN (s, GET_FLASH_DISPLAY (s->display))
-#define GET_FLASH_WINDOW(w, fs) ((FlashWindow *) (w)->base.privates[(fs)->windowPrivateIndex].ptr)
+#define GET_FLASH_WINDOW(w, fs) ((FlashWindow *) (w)->privates[(fs)->windowPrivateIndex].ptr)
#define FLASH_WINDOW(w) FlashWindow *fw = GET_FLASH_WINDOW (w, GET_FLASH_SCREEN (w->screen, GET_FLASH_DISPLAY (w->screen->display)))
#define NUM_OPTIONS(s) (sizeof ((s)->opt) / sizeof (CompOption))
@@ -721,8 +720,7 @@ flashGetDisplayOptions (CompPlugin *p, CompDisplay *d, int *count)
}
static const CompMetadataOptionInfo flashDisplayOptionInfo[] = {
- { "initiate_button", "button", 0, flashInitiate, 0 },
- { "initiate_key", "key", 0, flashInitiate, 0 },
+ { "initiate", "action", 0, flashInitiate, 0 },
{ "distance_max", "int", 0, 0, 0 },
{ "ecart_max", "int", 0, 0, 0 },
{ "interval", "int", 0, 0, 0 },
@@ -764,7 +762,7 @@ flashInitDisplay (CompPlugin *p, CompDisplay *d)
return FALSE;
}
- d->base.privates[displayPrivateIndex].ptr = fd;
+ d->privates[displayPrivateIndex].ptr = fd;
return TRUE;
}
@@ -855,7 +853,7 @@ flashInitScreen (CompPlugin *p, CompScreen *s)
WRAP (fs, s, paintOutput, flashPaintOutput);
WRAP (fs, s, preparePaintScreen, flashPreparePaintOutput);
- s->base.privates[fd->screenPrivateIndex].ptr = fs;
+ s->privates[fd->screenPrivateIndex].ptr = fs;
return TRUE;
}
@@ -982,6 +980,13 @@ flashGetMetadata (CompPlugin *plugin)
return &flashMetadata;
}
+static int
+freewinsGetVersion (CompPlugin *plugin,
+ int version)
+{
+ return ABIVERSION;
+}
+
/*
* flashVTable
*
@@ -989,12 +994,19 @@ flashGetMetadata (CompPlugin *plugin)
CompPluginVTable flashVTable = {
"flash",
flashGetMetadata,
+ flashGetVersion,
flashInit,
flashFini,
- flashInitObject,
- flashFiniObject,
- flashGetObjectOptions,
- flashSetObjectOption
+ flashInitDisplay,
+ flashFiniDisplay,
+ flashInitScreen,
+ flashFiniScreen,
+ 0,
+ 0,
+ flashGetDisplayOptions,
+ flashSetDisplayOption,
+ flashGetScreenOptions,
+ flashSetScreenOption,
};
/*
@@ -1002,7 +1014,7 @@ CompPluginVTable flashVTable = {
*
*/
CompPluginVTable *
-getCompPluginInfo20070830 (void)
+getCompPluginInfo (void)
{
return &flashVTable;
}
diff --git a/flash.xml b/flash.xml
index 9abec47..de33a3d 100644
--- a/flash.xml
+++ b/flash.xml
@@ -4,16 +4,13 @@
<short>Lightning Bolts</short>
<long>Lightning bolts between your cursor and the nearest window</long>
<display>
- <option type="key" name="initiate_key">
+ <option type="key" name="initiate">
<short>Initiate</short>
<long>Start flash</long>
<default>
<key>&lt;Super&gt;F5</key>
</default>
- </option>
- <option type="button" name="initiate_button">
- <short>Initiate</short>
- <long>Start flash</long>
+ <allowed key='true' button='true'>
</option>
<option type="int" name="distance_max">
<short>Distance max</short>