diff options
author | Eduardo Lima (Etrunko) <eduardo.lima@intel.com> | 2013-09-20 16:34:14 -0300 |
---|---|---|
committer | Eduardo Lima (Etrunko) <eduardo.lima@intel.com> | 2013-09-20 17:22:51 -0300 |
commit | 3e62d1a0f28f70fa05397de49dbec4cd62275895 (patch) | |
tree | 716bb8cff170bac91848ed1b4401991644ee5feb /src | |
parent | 0645bdf03cf77a7ada3ce50eb2f6fd7d5031d964 (diff) | |
download | weekeyboard-3e62d1a0f28f70fa05397de49dbec4cd62275895.tar.gz weekeyboard-3e62d1a0f28f70fa05397de49dbec4cd62275895.tar.bz2 weekeyboard-3e62d1a0f28f70fa05397de49dbec4cd62275895.zip |
Move IBus definitions to a dedicated header file
Change-Id: Iddfe3bc5cccd46087d0d78834b3320b0d49c8df2
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/wkb-ibus-config.c | 1 | ||||
-rw-r--r-- | src/wkb-ibus-defs.h | 47 | ||||
-rw-r--r-- | src/wkb-ibus-panel.c | 1 | ||||
-rw-r--r-- | src/wkb-ibus.c | 1 | ||||
-rw-r--r-- | src/wkb-ibus.h | 15 |
6 files changed, 51 insertions, 15 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 2d30b50..7fd9c02 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,6 +37,7 @@ noinst_PROGRAMS += \ weekeyboard_ibus_test_SOURCES = \ wkb-ibus.h \ wkb-ibus.c \ + wkb-ibus-defs.h \ wkb-ibus-panel.c \ wkb-ibus-config.c \ wkb-ibus-config-key.c \ diff --git a/src/wkb-ibus-config.c b/src/wkb-ibus-config.c index 0c6e3bc..5ed7535 100644 --- a/src/wkb-ibus-config.c +++ b/src/wkb-ibus-config.c @@ -21,6 +21,7 @@ #include <Eldbus.h> #include "wkb-ibus.h" +#include "wkb-ibus-defs.h" #include "wkb-ibus-config-eet.h" static struct wkb_ibus_config_eet *_conf_eet = NULL; diff --git a/src/wkb-ibus-defs.h b/src/wkb-ibus-defs.h new file mode 100644 index 0000000..e45d4c6 --- /dev/null +++ b/src/wkb-ibus-defs.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2013 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WKB_IBUS_DEFS_H_ +#define _WKB_IBUS_DEFS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* from ibusshare.h */ +#define IBUS_SERVICE_IBUS "org.freedesktop.IBus" +#define IBUS_SERVICE_PANEL "org.freedesktop.IBus.Panel" +#define IBUS_SERVICE_CONFIG "org.freedesktop.IBus.Config" + +#define IBUS_PATH_IBUS "/org/freedesktop/IBus" +#define IBUS_PATH_PANEL "/org/freedesktop/IBus/Panel" +#define IBUS_PATH_CONFIG "/org/freedesktop/IBus/Config" + +#define IBUS_INTERFACE_IBUS "org.freedesktop.IBus" +#define IBUS_INTERFACE_PANEL "org.freedesktop.IBus.Panel" +#define IBUS_INTERFACE_CONFIG "org.freedesktop.IBus.Config" + +/* from ibustypes.h/ibuserror.c */ +#define IBUS_ERROR_NO_ENGINE "org.freedesktop.IBus.Error.NoEngine" +#define IBUS_ERROR_NO_CONFIG "org.freedesktop.IBus.Error.NoConfig" +#define IBUS_ERROR_FAILED "org.freedesktop.IBus.Error.Failed" + + +#ifdef __cplusplus +} +#endif + +#endif /* _WKB_IBUS_DEFS_H_ */ diff --git a/src/wkb-ibus-panel.c b/src/wkb-ibus-panel.c index 62e437f..9832c06 100644 --- a/src/wkb-ibus-panel.c +++ b/src/wkb-ibus-panel.c @@ -21,6 +21,7 @@ #include <Eldbus.h> #include "wkb-ibus.h" +#include "wkb-ibus-defs.h" #define PANEL_CHECK_MESSAGE_ERRORS(_msg) \ do \ diff --git a/src/wkb-ibus.c b/src/wkb-ibus.c index ee52c69..882a9dd 100644 --- a/src/wkb-ibus.c +++ b/src/wkb-ibus.c @@ -23,6 +23,7 @@ #include <Eldbus.h> #include "wkb-ibus.h" +#include "wkb-ibus-defs.h" int _wkb_ibus_log_dom = -1; diff --git a/src/wkb-ibus.h b/src/wkb-ibus.h index 1b92b99..bddf357 100644 --- a/src/wkb-ibus.h +++ b/src/wkb-ibus.h @@ -31,21 +31,6 @@ extern int _wkb_ibus_log_dom; #define ERR(...) EINA_LOG_DOM_ERR(_wkb_ibus_log_dom, __VA_ARGS__) #define CRITICAL(...) EINA_LOG_DOM_CRIT(_wkb_ibus_log_dom, __VA_ARGS__) - -/* from ibusshare.h */ -#define IBUS_SERVICE_IBUS "org.freedesktop.IBus" -#define IBUS_SERVICE_PANEL "org.freedesktop.IBus.Panel" -#define IBUS_SERVICE_CONFIG "org.freedesktop.IBus.Config" - -#define IBUS_PATH_IBUS "/org/freedesktop/IBus" -#define IBUS_PATH_PANEL "/org/freedesktop/IBus/Panel" -#define IBUS_PATH_CONFIG "/org/freedesktop/IBus/Config" - -#define IBUS_INTERFACE_IBUS "org.freedesktop.IBus" -#define IBUS_INTERFACE_PANEL "org.freedesktop.IBus.Panel" -#define IBUS_INTERFACE_CONFIG "org.freedesktop.IBus.Config" - - int wkb_ibus_init(void); void wkb_ibus_shutdown(void); |