Commit 95024543 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Rename system-client to desktop-client.

parent 3f1abe83
......@@ -38,14 +38,14 @@ do that with:
$ eekboard-server &
** eekboard-system-client
** eekboard-desktop-client
eekboard-system-client is a client of eekboard-server. It listens
eekboard-desktop-client is a client of eekboard-server. It listens
desktop events (keyboard change, focus in/out, and keystroke) and
generates X key events when some keys are pressed on the on-screen
generates key events when some keys are pressed on the on-screen
keyboard. It can be started with:
$ eekboard-system-client
$ eekboard-desktop-client
** eekboard-xml
......
......@@ -18,12 +18,12 @@
if ENABLE_EEKBOARD
bin_PROGRAMS = \
eekboard-system-client \
eekboard-desktop-client \
eekboard-client \
eekboard-server \
eekboard-xml
eekboard_system_client_CFLAGS = \
eekboard_desktop_client_CFLAGS = \
-I$(top_srcdir) \
$(GIO2_CFLAGS) \
$(GTK_CFLAGS) \
......@@ -31,7 +31,7 @@ eekboard_system_client_CFLAGS = \
$(XKB_CFLAGS) \
$(LIBXKLAVIER_CFLAGS)
eekboard_system_client_LDADD = \
eekboard_desktop_client_LDADD = \
$(top_builddir)/eekboard/libeekboard.la \
$(top_builddir)/eek/libeek.la \
$(top_builddir)/eek/libeek-xkl.la \
......@@ -42,21 +42,21 @@ eekboard_system_client_LDADD = \
$(LIBXKLAVIER_LIBS)
if ENABLE_FAKEKEY
eekboard_system_client_CFLAGS += \
eekboard_desktop_client_CFLAGS += \
$(FAKEKEY_CFLAGS)
eekboard_system_client_LDADD += \
eekboard_desktop_client_LDADD += \
$(FAKEKEY_LIBS)
endif
if ENABLE_CSPI
eekboard_system_client_CFLAGS += \
eekboard_desktop_client_CFLAGS += \
$(CSPI_CFLAGS)
eekboard_system_client_LDADD += \
eekboard_desktop_client_LDADD += \
$(CSPI_LIBS)
endif
eekboard_system_client_headers = system-client.h
eekboard_system_client_SOURCES = system-client.c system-client-main.c
eekboard_desktop_client_headers = desktop-client.h
eekboard_desktop_client_SOURCES = desktop-client.c desktop-client-main.c
eekboard_server_CFLAGS = \
-I$(top_srcdir) \
......@@ -111,7 +111,7 @@ eekboard_HEADERS = \
$(libeekboard_headers)
noinst_HEADERS = \
$(eekboard_system_client_headers) \
$(eekboard_desktop_client_headers) \
$(eekboard_client_headers) \
$(eekboard_server_headers) \
$(eekboard_xml_headers)
......
......@@ -24,7 +24,7 @@
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include "eekboard/eekboard.h"
#include "system-client.h"
#include "desktop-client.h"
#ifdef HAVE_CSPI
gboolean opt_focus = FALSE;
......@@ -59,7 +59,7 @@ on_notify_keyboard_visible (GObject *object,
int
main (int argc, char **argv)
{
EekboardSystemClient *client;
EekboardDesktopClient *client;
EekboardContext *context;
GDBusConnection *connection;
GError *error;
......@@ -72,7 +72,7 @@ main (int argc, char **argv)
exit (1);
}
option_context = g_option_context_new ("eekboard-system-client");
option_context = g_option_context_new ("eekboard-desktop-client");
g_option_context_add_main_entries (option_context, options, NULL);
g_option_context_parse (option_context, &argc, &argv, NULL);
g_option_context_free (option_context);
......@@ -83,7 +83,7 @@ main (int argc, char **argv)
g_printerr ("%s\n", error->message);
exit (1);
}
client = eekboard_system_client_new (connection);
client = eekboard_desktop_client_new (connection);
gconfc = gconf_client_get_default ();
......@@ -102,37 +102,37 @@ main (int argc, char **argv)
}
if (opt_focus &&
!eekboard_system_client_enable_cspi_focus (client)) {
!eekboard_desktop_client_enable_cspi_focus (client)) {
g_printerr ("Can't register focus change event listeners\n");
exit (1);
}
if (opt_keystroke &&
!eekboard_system_client_enable_cspi_keystroke (client)) {
!eekboard_desktop_client_enable_cspi_keystroke (client)) {
g_printerr ("Can't register keystroke event listeners\n");
exit (1);
}
} else {
g_printerr ("System accessibility support is disabled");
g_printerr ("Desktop accessibility support is disabled");
exit (1);
}
}
#endif /* HAVE_CSPI */
if (!eekboard_system_client_enable_xkl (client)) {
if (!eekboard_desktop_client_enable_xkl (client)) {
g_printerr ("Can't register xklavier event listeners\n");
exit (1);
}
#ifdef HAVE_FAKEKEY
if (!eekboard_system_client_enable_fakekey (client)) {
if (!eekboard_desktop_client_enable_fakekey (client)) {
g_printerr ("Can't init fakekey\n");
exit (1);
}
#endif /* HAVE_FAKEKEY */
loop = g_main_loop_new (NULL, FALSE);
if (opt_focus) {
if (!opt_focus) {
g_object_get (client, "context", &context, NULL);
g_signal_connect (context, "notify::keyboard-visible",
G_CALLBACK(on_notify_keyboard_visible), loop);
......
......@@ -34,7 +34,7 @@
#include "eek/eek.h"
#include "eek/eek-xkl.h"
#include "eekboard/eekboard.h"
#include "system-client.h"
#include "desktop-client.h"
#define CSW 640
#define CSH 480
......@@ -46,9 +46,9 @@ enum {
PROP_LAST
};
typedef struct _EekboardSystemClientClass EekboardSystemClientClass;
typedef struct _EekboardDesktopClientClass EekboardDesktopClientClass;
struct _EekboardSystemClient {
struct _EekboardDesktopClient {
GObject parent;
EekboardServer *server;
......@@ -75,11 +75,11 @@ struct _EekboardSystemClient {
#endif /* HAVE_FAKEKEY */
};
struct _EekboardSystemClientClass {
struct _EekboardDesktopClientClass {
GObjectClass parent_class;
};
G_DEFINE_TYPE (EekboardSystemClient, eekboard_system_client, G_TYPE_OBJECT);
G_DEFINE_TYPE (EekboardDesktopClient, eekboard_desktop_client, G_TYPE_OBJECT);
static GdkFilterReturn filter_xkl_event (GdkXEvent *xev,
GdkEvent *event,
......@@ -103,16 +103,16 @@ static SPIBoolean keystroke_listener_cb
(const AccessibleKeystroke *stroke,
void *user_data);
#endif /* HAVE_CSPI */
static void set_keyboard (EekboardSystemClient *client,
static void set_keyboard (EekboardDesktopClient *client,
gboolean show);
static void
eekboard_system_client_set_property (GObject *object,
eekboard_desktop_client_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
EekboardSystemClient *client = EEKBOARD_SYSTEM_CLIENT(object);
EekboardDesktopClient *client = EEKBOARD_DESKTOP_CLIENT(object);
GDBusConnection *connection;
switch (prop_id) {
......@@ -124,7 +124,7 @@ eekboard_system_client_set_property (GObject *object,
client->context =
eekboard_server_create_context (client->server,
"eekboard-system-client",
"eekboard-desktop-client",
NULL);
g_assert (client->context);
......@@ -139,12 +139,12 @@ eekboard_system_client_set_property (GObject *object,
}
static void
eekboard_system_client_get_property (GObject *object,
eekboard_desktop_client_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
EekboardSystemClient *client = EEKBOARD_SYSTEM_CLIENT(object);
EekboardDesktopClient *client = EEKBOARD_DESKTOP_CLIENT(object);
switch (prop_id) {
case PROP_CONTEXT:
......@@ -159,19 +159,19 @@ eekboard_system_client_get_property (GObject *object,
}
static void
eekboard_system_client_dispose (GObject *object)
eekboard_desktop_client_dispose (GObject *object)
{
EekboardSystemClient *client = EEKBOARD_SYSTEM_CLIENT(object);
EekboardDesktopClient *client = EEKBOARD_DESKTOP_CLIENT(object);
eekboard_system_client_disable_xkl (client);
eekboard_desktop_client_disable_xkl (client);
#ifdef HAVE_CSPI
eekboard_system_client_disable_cspi_focus (client);
eekboard_system_client_disable_cspi_keystroke (client);
eekboard_desktop_client_disable_cspi_focus (client);
eekboard_desktop_client_disable_cspi_keystroke (client);
#endif /* HAVE_CSPI */
#ifdef HAVE_FAKEKEY
eekboard_system_client_disable_fakekey (client);
eekboard_desktop_client_disable_fakekey (client);
#endif /* HAVE_FAKEKEY */
if (client->context) {
......@@ -204,18 +204,18 @@ eekboard_system_client_dispose (GObject *object)
client->display = NULL;
}
G_OBJECT_CLASS (eekboard_system_client_parent_class)->dispose (object);
G_OBJECT_CLASS (eekboard_desktop_client_parent_class)->dispose (object);
}
static void
eekboard_system_client_class_init (EekboardSystemClientClass *klass)
eekboard_desktop_client_class_init (EekboardDesktopClientClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *pspec;
gobject_class->set_property = eekboard_system_client_set_property;
gobject_class->get_property = eekboard_system_client_get_property;
gobject_class->dispose = eekboard_system_client_dispose;
gobject_class->set_property = eekboard_desktop_client_set_property;
gobject_class->get_property = eekboard_desktop_client_get_property;
gobject_class->dispose = eekboard_desktop_client_dispose;
pspec = g_param_spec_object ("connection",
"Connection",
......@@ -237,7 +237,7 @@ eekboard_system_client_class_init (EekboardSystemClientClass *klass)
}
static void
eekboard_system_client_init (EekboardSystemClient *client)
eekboard_desktop_client_init (EekboardDesktopClient *client)
{
client->server = NULL;
client->context = NULL;
......@@ -259,7 +259,7 @@ eekboard_system_client_init (EekboardSystemClient *client)
}
gboolean
eekboard_system_client_enable_xkl (EekboardSystemClient *client)
eekboard_desktop_client_enable_xkl (EekboardDesktopClient *client)
{
if (!client->display) {
client->display = gdk_display_get_default ();
......@@ -304,7 +304,7 @@ eekboard_system_client_enable_xkl (EekboardSystemClient *client)
}
void
eekboard_system_client_disable_xkl (EekboardSystemClient *client)
eekboard_desktop_client_disable_xkl (EekboardDesktopClient *client)
{
if (client->xkl_engine)
xkl_engine_stop_listen (client->xkl_engine, XKLL_TRACK_KEYBOARD_STATE);
......@@ -320,7 +320,7 @@ eekboard_system_client_disable_xkl (EekboardSystemClient *client)
#ifdef HAVE_CSPI
gboolean
eekboard_system_client_enable_cspi_focus (EekboardSystemClient *client)
eekboard_desktop_client_enable_cspi_focus (EekboardDesktopClient *client)
{
client->focus_listener = SPI_createAccessibleEventListener
((AccessibleEventListenerCB)focus_listener_cb,
......@@ -338,7 +338,7 @@ eekboard_system_client_enable_cspi_focus (EekboardSystemClient *client)
}
void
eekboard_system_client_disable_cspi_focus (EekboardSystemClient *client)
eekboard_desktop_client_disable_cspi_focus (EekboardDesktopClient *client)
{
if (client->focus_listener) {
SPI_deregisterGlobalEventListenerAll (client->focus_listener);
......@@ -348,7 +348,7 @@ eekboard_system_client_disable_cspi_focus (EekboardSystemClient *client)
}
gboolean
eekboard_system_client_enable_cspi_keystroke (EekboardSystemClient *client)
eekboard_desktop_client_enable_cspi_keystroke (EekboardDesktopClient *client)
{
client->keystroke_listener =
SPI_createAccessibleKeystrokeListener (keystroke_listener_cb,
......@@ -366,7 +366,7 @@ eekboard_system_client_enable_cspi_keystroke (EekboardSystemClient *client)
}
void
eekboard_system_client_disable_cspi_keystroke (EekboardSystemClient *client)
eekboard_desktop_client_disable_cspi_keystroke (EekboardDesktopClient *client)
{
if (client->keystroke_listener) {
SPI_deregisterAccessibleKeystrokeListener (client->keystroke_listener,
......@@ -380,7 +380,7 @@ static SPIBoolean
focus_listener_cb (const AccessibleEvent *event,
void *user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
Accessible *accessible = event->source;
AccessibleStateSet *state_set = Accessible_getStateSet (accessible);
AccessibleRole role = Accessible_getRole (accessible);
......@@ -410,7 +410,7 @@ static SPIBoolean
keystroke_listener_cb (const AccessibleKeystroke *stroke,
void *user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
EekKey *key;
/* Ignore modifiers since the keystroke listener does not called
......@@ -433,10 +433,10 @@ keystroke_listener_cb (const AccessibleKeystroke *stroke,
}
#endif /* HAVE_CSPI */
EekboardSystemClient *
eekboard_system_client_new (GDBusConnection *connection)
EekboardDesktopClient *
eekboard_desktop_client_new (GDBusConnection *connection)
{
return g_object_new (EEKBOARD_TYPE_SYSTEM_CLIENT,
return g_object_new (EEKBOARD_TYPE_DESKTOP_CLIENT,
"connection", connection,
NULL);
}
......@@ -446,7 +446,7 @@ filter_xkl_event (GdkXEvent *xev,
GdkEvent *event,
gpointer user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
XEvent *xevent = (XEvent *)xev;
xkl_engine_filter_events (client->xkl_engine, xevent);
......@@ -457,7 +457,7 @@ static void
on_xkl_config_changed (XklEngine *xklengine,
gpointer user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
set_keyboard (client, FALSE);
......@@ -468,7 +468,7 @@ on_xkl_config_changed (XklEngine *xklengine,
}
static void
set_keyboard (EekboardSystemClient *client,
set_keyboard (EekboardDesktopClient *client,
gboolean show)
{
EekLayout *layout;
......@@ -497,7 +497,7 @@ on_xkl_state_changed (XklEngine *xklengine,
gboolean restore,
gpointer user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
if (type == GROUP_CHANGED && client->keyboard) {
gint group = eek_keyboard_get_group (client->keyboard);
......@@ -530,7 +530,7 @@ on_key_pressed (EekKeyboard *keyboard,
EekKey *key,
gpointer user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
EekSymbol *symbol;
EekModifierType modifiers;
FakeKeyModifier fakekey_modifiers;
......@@ -553,14 +553,14 @@ on_key_released (EekKeyboard *keyboard,
EekKey *key,
gpointer user_data)
{
EekboardSystemClient *client = user_data;
EekboardDesktopClient *client = user_data;
g_assert (client->fakekey);
fakekey_release (client->fakekey);
}
gboolean
eekboard_system_client_enable_fakekey (EekboardSystemClient *client)
eekboard_desktop_client_enable_fakekey (EekboardDesktopClient *client)
{
if (!client->display) {
client->display = gdk_display_get_default ();
......@@ -583,7 +583,7 @@ eekboard_system_client_enable_fakekey (EekboardSystemClient *client)
}
void
eekboard_system_client_disable_fakekey (EekboardSystemClient *client)
eekboard_desktop_client_disable_fakekey (EekboardDesktopClient *client)
{
if (client->fakekey)
fakekey_release (client->fakekey);
......
......@@ -15,44 +15,44 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EEKBOARD_SYSTEM_CLIENT_H
#define EEKBOARD_SYSTEM_CLIENT_H 1
#ifndef EEKBOARD_DESKTOP_CLIENT_H
#define EEKBOARD_DESKTOP_CLIENT_H 1
#include <gio/gio.h>
G_BEGIN_DECLS
#define EEKBOARD_TYPE_SYSTEM_CLIENT (eekboard_system_client_get_type())
#define EEKBOARD_SYSTEM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_SYSTEM_CLIENT, EekboardSystemClient))
#define EEKBOARD_SYSTEM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_SYSTEM_CLIENT, EekboardSystemClientClass))
#define EEKBOARD_IS_SYSTEM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_SYSTEM_CLIENT))
#define EEKBOARD_IS_SYSTEM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_SYSTEM_CLIENT))
#define EEKBOARD_SYSTEM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_SYSTEM_CLIENT, EekboardSystemClientClass))
#define EEKBOARD_TYPE_DESKTOP_CLIENT (eekboard_desktop_client_get_type())
#define EEKBOARD_DESKTOP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EEKBOARD_TYPE_DESKTOP_CLIENT, EekboardDesktopClient))
#define EEKBOARD_DESKTOP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EEKBOARD_TYPE_DESKTOP_CLIENT, EekboardDesktopClientClass))
#define EEKBOARD_IS_DESKTOP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EEKBOARD_TYPE_DESKTOP_CLIENT))
#define EEKBOARD_IS_DESKTOP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EEKBOARD_TYPE_DESKTOP_CLIENT))
#define EEKBOARD_DESKTOP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EEKBOARD_TYPE_DESKTOP_CLIENT, EekboardDesktopClientClass))
typedef struct _EekboardSystemClient EekboardSystemClient;
typedef struct _EekboardDesktopClient EekboardDesktopClient;
EekboardSystemClient * eekboard_system_client_new
EekboardDesktopClient * eekboard_desktop_client_new
(GDBusConnection *connection);
gboolean eekboard_system_client_enable_xkl
(EekboardSystemClient *client);
void eekboard_system_client_disable_xkl
(EekboardSystemClient *client);
gboolean eekboard_desktop_client_enable_xkl
(EekboardDesktopClient *client);
void eekboard_desktop_client_disable_xkl
(EekboardDesktopClient *client);
gboolean eekboard_system_client_enable_cspi_focus
(EekboardSystemClient *client);
void eekboard_system_client_disable_cspi_focus
(EekboardSystemClient *client);
gboolean eekboard_desktop_client_enable_cspi_focus
(EekboardDesktopClient *client);
void eekboard_desktop_client_disable_cspi_focus
(EekboardDesktopClient *client);
gboolean eekboard_system_client_enable_cspi_keystroke
(EekboardSystemClient *client);
void eekboard_system_client_disable_cspi_keystroke
(EekboardSystemClient *client);
gboolean eekboard_desktop_client_enable_cspi_keystroke
(EekboardDesktopClient *client);
void eekboard_desktop_client_disable_cspi_keystroke
(EekboardDesktopClient *client);
gboolean eekboard_system_client_enable_fakekey
(EekboardSystemClient *client);
void eekboard_system_client_disable_fakekey
(EekboardSystemClient *client);
gboolean eekboard_desktop_client_enable_fakekey
(EekboardDesktopClient *client);
void eekboard_desktop_client_disable_fakekey
(EekboardDesktopClient *client);
G_END_DECLS
#endif /* EEKBOARD_SYSTEM_CLIENT_H */
#endif /* EEKBOARD_DESKTOP_CLIENT_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment