imerkeyb.c

Go to the documentation of this file.
00001 /*
00002  * File Name: imerkeyb.c
00003  */
00004 
00005 /*
00006  * This file is part of erkeyb.
00007  *
00008  * erkeyb is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * erkeyb is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 /**
00023  * Copyright (C) 2009 iRex Technologies B.V.
00024  * All rights reserved.
00025  */
00026 
00027 
00028 //----------------------------------------------------------------------------
00029 // Include Files
00030 //----------------------------------------------------------------------------
00031 
00032 // system include files, between < >
00033 #include <string.h>
00034 #include <gtk/gtkimmodule.h>
00035 
00036 // local include files, between " "
00037 #include "ergtk-im-context-erkeyb.h"
00038 
00039 // logging
00040 #include "logging.h"
00041 
00042 
00043 //----------------------------------------------------------------------------
00044 // Type Declarations
00045 //----------------------------------------------------------------------------
00046 
00047 #define IM_CONTEXT "ergtk-im-erkeyb"
00048 
00049 //----------------------------------------------------------------------------
00050 // Static Variables
00051 //----------------------------------------------------------------------------
00052 
00053 static const GtkIMContextInfo im_info = { 
00054     IM_CONTEXT, "Virtual Keyboard",  "", "", "*" 
00055 };
00056 
00057 static const GtkIMContextInfo *info_list[] = { &im_info };
00058 
00059 //============================================================================
00060 // Functions Implementation
00061 //============================================================================
00062 
00063 void im_module_list(const GtkIMContextInfo ***contexts, guint *n_contexts )
00064 {
00065   *contexts = info_list;
00066   *n_contexts = G_N_ELEMENTS (info_list);
00067 }
00068 
00069 void im_module_init(GTypeModule *module)
00070 {
00071     DBG_ENTRY;
00072     ergtk_im_context_erkeyb_register_type (module);
00073     DBG_EXIT;
00074 }
00075 
00076 void im_module_exit(void)
00077 {
00078     DBG_ENTRY;
00079     DBG_EXIT;
00080 }
00081 
00082 GtkIMContext* im_module_create(const gchar *context_id)
00083 {
00084     DBG_ENTRY;
00085     if (strcmp (context_id, IM_CONTEXT) == 0) {
00086         DBG_EXIT;
00087         return ergtk_im_context_erkeyb_new();
00088     } else {
00089         ERR("No new im context created!\n");
00090         DBG_EXIT;
00091         return NULL;
00092     }
00093 }
Generated by  doxygen 1.6.2-20100208