From ab6b68c2d273336ead3492954844ce244e15480a Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Wed, 11 Jan 2012 20:41:16 -0500 Subject: [PATCH] ibus-daemon: Move global variables into separated files. --- bus/global.c | 35 +++++++++++++++++++++++++++++++++++ bus/global.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 bus/global.c create mode 100644 bus/global.h diff --git a/bus/global.c b/bus/global.c new file mode 100644 index 00000000..bcab4421 --- /dev/null +++ b/bus/global.c @@ -0,0 +1,35 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "global.h" + +gchar **g_argv = NULL; +gchar *g_address = "unix:tmpdir=/tmp"; +gchar *g_cache = "auto"; +gboolean g_mempro = FALSE; +gboolean g_verbose = FALSE; +gint g_gdbus_timeout = 5000; +#ifdef G_THREADS_ENABLED +gint g_monitor_timeout = 0; +#endif + + diff --git a/bus/global.h b/bus/global.h new file mode 100644 index 00000000..6ae6841f --- /dev/null +++ b/bus/global.h @@ -0,0 +1,42 @@ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (c) 2010 Google, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __BUS_GLOBAL_H_ +#define __BUS_GLOBAL_H_ + +#include + +G_BEGIN_DECLS + +extern gchar **g_argv; +extern gchar *g_address; +extern gchar *g_cache; +extern gboolean g_mempro; +extern gboolean g_verbose; +extern gint g_gdbus_timeout; +#ifdef G_THREADS_ENABLED +extern gint g_monitor_timeout; +#endif + +G_END_DECLS + +#endif +