2 * Smart Common Input Method
4 * Copyright (c) 2002-2005 James Su <suzhe@tsinghua.org.cn>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this program; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307 USA
22 * $Id: scim_frontend_module.cpp,v 1.13 2005/01/10 08:30:54 suzhe Exp $
26 #define Uses_SCIM_FRONTEND_MODULE
27 #include "scim_private.h"
32 FrontEndModule::FrontEndModule ()
33 : m_frontend_init (0),
38 FrontEndModule::FrontEndModule (const String &name,
39 const BackEndPointer &backend,
40 const ConfigPointer &config,
43 : m_frontend_init (0),
46 load (name, backend, config, argc, argv);
50 FrontEndModule::load (const String &name,
51 const BackEndPointer &backend,
52 const ConfigPointer &config,
57 if (!m_module.load (name, "FrontEnd"))
60 m_frontend_init = (FrontEndModuleInitFunc) m_module.symbol ("scim_frontend_module_init");
61 m_frontend_run = (FrontEndModuleRunFunc) m_module.symbol ("scim_frontend_module_run");
63 if (!m_frontend_init || !m_frontend_run) {
70 m_frontend_init (backend, config, argc, argv);
82 FrontEndModule::valid () const
84 return (m_module.valid () && m_frontend_init && m_frontend_run);
88 FrontEndModule::run () const
94 int scim_get_frontend_module_list (std::vector <String>& mod_list)
96 return scim_get_module_list (mod_list, "FrontEnd");
102 vi:ts=4:nowrap:ai:expandtab