summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-08-24 13:42:53 +0200
committerDennis kasprzyk <onestone@compiz-fusion.org>2008-08-24 13:42:53 +0200
commit06aa2b6c31a4cf4aed2ba4fd8d8f05cb6e944082 (patch)
tree354bd4c08a57e4a996878939fd20cc22b15d37f2 /src
parent60829d3db9ed9272c0baeae78a18cd3dd142b142 (diff)
downloadcompiz-with-glib-mainloop-06aa2b6c31a4cf4aed2ba4fd8d8f05cb6e944082.tar.gz
compiz-with-glib-mainloop-06aa2b6c31a4cf4aed2ba4fd8d8f05cb6e944082.tar.bz2
Save ABI in global map.
Diffstat (limited to 'src')
-rw-r--r--src/core.cpp4
-rw-r--r--src/display.cpp5
-rw-r--r--src/plugin.cpp35
-rw-r--r--src/privatedisplay.h133
4 files changed, 77 insertions, 100 deletions
diff --git a/src/core.cpp b/src/core.cpp
index 8f3cf40..961bc7f 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -96,6 +96,10 @@ CompCore::init ()
return false;
}
+ CompPrivate p;
+ p.uval = CORE_ABIVERSION;
+ storeValue ("core_ABI", p);
+
return true;
}
diff --git a/src/display.cpp b/src/display.cpp
index f19b75e..fcff9ba 100644
--- a/src/display.cpp
+++ b/src/display.cpp
@@ -530,7 +530,6 @@ CompWindow::shade (CompDisplay *d,
}
const CompMetadata::OptionInfo coreDisplayOptionInfo[COMP_DISPLAY_OPTION_NUM] = {
- { "abi", "int", 0, 0, 0 },
{ "active_plugins", "list", "<type>string</type>", 0, 0 },
{ "texture_filter", "int", RESTOSTRING (0, 2), 0, 0 },
{ "click_to_focus", "bool", 0, 0, 0 },
@@ -771,8 +770,6 @@ CompDisplay::init (const char *name)
COMP_DISPLAY_OPTION_NUM, priv->opt))
return true;
- priv->opt[COMP_DISPLAY_OPTION_ABI].value ().set ((int) CORE_ABIVERSION);
-
snprintf (priv->displayString, 255, "DISPLAY=%s",
DisplayString (priv->dpy));
@@ -1165,8 +1162,6 @@ CompDisplay::setOption (const char *name,
return false;
switch (index) {
- case COMP_DISPLAY_OPTION_ABI:
- break;
case COMP_DISPLAY_OPTION_ACTIVE_PLUGINS:
if (o->set (value))
{
diff --git a/src/plugin.cpp b/src/plugin.cpp
index c47ec80..d1e2e4a 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -107,7 +107,7 @@ CorePluginVTable::setObjectOption (CompObject *object,
RETURN_DISPATCH (object, dispTab, ARRAY_SIZE (dispTab), false,
(object, name, value));
}
-//
+
CorePluginVTable coreVTable;
static bool
@@ -615,15 +615,17 @@ int
CompPlugin::getPluginABI (const char *name)
{
CompPlugin *p = find (name);
+ CompString s = name;
if (!p)
return 0;
- /* MULTIDPYERROR: ABI options should be moved into core */
- CompOption::Vector &options =
- p->vTable->getObjectOptions (core->displays().front ());
+ s += "_ABI";
+
+ if (!core->hasValue (s))
+ return 0;
- return CompOption::getIntOptionNamed (options, "abi");
+ return core->getValue (s).uval;
}
bool
@@ -651,29 +653,6 @@ CompPlugin::checkPluginABI (const char *name,
return true;
}
-bool
-CompPlugin::getPluginDisplayIndex (CompDisplay *d,
- const char *name,
- int *index)
-{
- CompPlugin *p = find (name);
- int value;
-
- if (!p)
- return false;
-
- CompOption::Vector &options = p->vTable->getObjectOptions (d);
-
- value = CompOption::getIntOptionNamed (options, "index", -1);
- if (value < 0)
- return false;
-
- *index = value;
-
- return true;
-}
-
-
CompPlugin::VTable::~VTable ()
{
}
diff --git a/src/privatedisplay.h b/src/privatedisplay.h
index b783b41..aaf3f3c 100644
--- a/src/privatedisplay.h
+++ b/src/privatedisplay.h
@@ -7,73 +7,72 @@
#include <compdisplay.h>
#include <compmetadata.h>
-#define COMP_DISPLAY_OPTION_ABI 0
-#define COMP_DISPLAY_OPTION_ACTIVE_PLUGINS 1
-#define COMP_DISPLAY_OPTION_TEXTURE_FILTER 2
-#define COMP_DISPLAY_OPTION_CLICK_TO_FOCUS 3
-#define COMP_DISPLAY_OPTION_AUTORAISE 4
-#define COMP_DISPLAY_OPTION_AUTORAISE_DELAY 5
-#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_KEY 6
-#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_BUTTON 7
-#define COMP_DISPLAY_OPTION_MAIN_MENU_KEY 8
-#define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 9
-#define COMP_DISPLAY_OPTION_COMMAND0 10
-#define COMP_DISPLAY_OPTION_COMMAND1 11
-#define COMP_DISPLAY_OPTION_COMMAND2 12
-#define COMP_DISPLAY_OPTION_COMMAND3 13
-#define COMP_DISPLAY_OPTION_COMMAND4 14
-#define COMP_DISPLAY_OPTION_COMMAND5 15
-#define COMP_DISPLAY_OPTION_COMMAND6 16
-#define COMP_DISPLAY_OPTION_COMMAND7 17
-#define COMP_DISPLAY_OPTION_COMMAND8 18
-#define COMP_DISPLAY_OPTION_COMMAND9 19
-#define COMP_DISPLAY_OPTION_COMMAND10 20
-#define COMP_DISPLAY_OPTION_COMMAND11 21
-#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 22
-#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 23
-#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 24
-#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 25
-#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 26
-#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 27
-#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 28
-#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 29
-#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 30
-#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 31
-#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 32
-#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 33
-#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 34
-#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 35
-#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 36
-#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 37
-#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 38
-#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 39
-#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 40
-#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 41
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 42
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 43
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 44
-#define COMP_DISPLAY_OPTION_SCREENSHOT 45
-#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 46
-#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 47
-#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 48
-#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 49
-#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 50
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 51
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 52
-#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 53
-#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 54
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 55
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 56
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 57
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 58
-#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 59
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 60
-#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 61
-#define COMP_DISPLAY_OPTION_TERMINAL 62
-#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 63
-#define COMP_DISPLAY_OPTION_PING_DELAY 64
-#define COMP_DISPLAY_OPTION_EDGE_DELAY 65
-#define COMP_DISPLAY_OPTION_NUM 66
+#define COMP_DISPLAY_OPTION_ACTIVE_PLUGINS 0
+#define COMP_DISPLAY_OPTION_TEXTURE_FILTER 1
+#define COMP_DISPLAY_OPTION_CLICK_TO_FOCUS 2
+#define COMP_DISPLAY_OPTION_AUTORAISE 3
+#define COMP_DISPLAY_OPTION_AUTORAISE_DELAY 4
+#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_KEY 5
+#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_BUTTON 6
+#define COMP_DISPLAY_OPTION_MAIN_MENU_KEY 7
+#define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 8
+#define COMP_DISPLAY_OPTION_COMMAND0 9
+#define COMP_DISPLAY_OPTION_COMMAND1 10
+#define COMP_DISPLAY_OPTION_COMMAND2 11
+#define COMP_DISPLAY_OPTION_COMMAND3 12
+#define COMP_DISPLAY_OPTION_COMMAND4 13
+#define COMP_DISPLAY_OPTION_COMMAND5 14
+#define COMP_DISPLAY_OPTION_COMMAND6 15
+#define COMP_DISPLAY_OPTION_COMMAND7 16
+#define COMP_DISPLAY_OPTION_COMMAND8 17
+#define COMP_DISPLAY_OPTION_COMMAND9 18
+#define COMP_DISPLAY_OPTION_COMMAND10 19
+#define COMP_DISPLAY_OPTION_COMMAND11 20
+#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 21
+#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 22
+#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 23
+#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 24
+#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 25
+#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 26
+#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 27
+#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 28
+#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 29
+#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 30
+#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 31
+#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 32
+#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 33
+#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 34
+#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 35
+#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 36
+#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 37
+#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 38
+#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 39
+#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 40
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 41
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 42
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 43
+#define COMP_DISPLAY_OPTION_SCREENSHOT 44
+#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 45
+#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 46
+#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 47
+#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 48
+#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 49
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 50
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 51
+#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 52
+#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 53
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 54
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 55
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 56
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 57
+#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 58
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 59
+#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 60
+#define COMP_DISPLAY_OPTION_TERMINAL 61
+#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 62
+#define COMP_DISPLAY_OPTION_PING_DELAY 63
+#define COMP_DISPLAY_OPTION_EDGE_DELAY 64
+#define COMP_DISPLAY_OPTION_NUM 65
extern const CompMetadata::OptionInfo
coreDisplayOptionInfo[COMP_DISPLAY_OPTION_NUM];