ergtk-im-context-erkeyb.c File Reference

#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gtk/gtkimmodule.h>
#include <gtk/gtkimcontextsimple.h>
#include "config.h"
#include "ergtk-im-context-erkeyb.h"
#include "erkeyb-client.h"
#include "logging.h"
Include dependency graph for ergtk-im-context-erkeyb.c:

Go to the source code of this file.

Functions

static void ergtk_im_context_erkeyb_class_init (ErGtkIMContextErkeybClass *klass)
static void ergtk_im_context_erkeyb_init (ErGtkIMContextErkeyb *self)
static void ergtk_im_context_erkeyb_set_client_window (GtkIMContext *context, GdkWindow *window)
static void ergtk_im_context_erkeyb_focus_in (GtkIMContext *context)
static void ergtk_im_context_erkeyb_focus_out (GtkIMContext *context)
static void ergtk_im_context_erkeyb_finalize (GObject *obj)
void ergtk_im_context_erkeyb_register_type (GTypeModule *type_module)
GtkIMContext * ergtk_im_context_erkeyb_new (void)

Variables

static GObjectClass * parent_class
GType ergtk_type_im_context_erkeyb = 0

Function Documentation

static void ergtk_im_context_erkeyb_class_init ( ErGtkIMContextErkeybClass klass  )  [static]

Definition at line 110 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, ergtk_im_context_erkeyb_finalize(), ergtk_im_context_erkeyb_focus_in(), ergtk_im_context_erkeyb_focus_out(), ergtk_im_context_erkeyb_set_client_window(), and parent_class.

Referenced by ergtk_im_context_erkeyb_register_type().

00111 {
00112     DBG_ENTRY;
00113     GtkIMContextClass*  context_class = GTK_IM_CONTEXT_CLASS (klass);
00114     GObjectClass*       object_class = G_OBJECT_CLASS(klass);
00115 
00116     parent_class = g_type_class_peek_parent (klass);
00117 
00118     context_class->set_client_window = ergtk_im_context_erkeyb_set_client_window;
00119     context_class->focus_in = ergtk_im_context_erkeyb_focus_in;
00120     context_class->focus_out = ergtk_im_context_erkeyb_focus_out;
00121     object_class->finalize = ergtk_im_context_erkeyb_finalize;
00122     DBG_EXIT;
00123 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ergtk_im_context_erkeyb_finalize ( GObject *  obj  )  [static]

Definition at line 139 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, ERGTK_IM_CONTEXT_ERKEYB, erkeyb_client_term(), _ErGtkIMContextErkeyb::finalizing, and parent_class.

Referenced by ergtk_im_context_erkeyb_class_init().

00140 {
00141     DBG_ENTRY;
00142 
00143     ErGtkIMContextErkeyb* context_erkeyb = ERGTK_IM_CONTEXT_ERKEYB(obj);
00144     context_erkeyb->finalizing = TRUE;
00145 
00146     erkeyb_client_term();
00147 
00148     G_OBJECT_CLASS(parent_class)->finalize(obj);
00149 
00150     DBG_EXIT;
00151 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ergtk_im_context_erkeyb_focus_in ( GtkIMContext *  context  )  [static]

Definition at line 164 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, erkeyb_client_show(), and parent_class.

Referenced by ergtk_im_context_erkeyb_class_init().

00165 {
00166     DBG_ENTRY;
00167 
00168     erkeyb_client_show();
00169 
00170     if (GTK_IM_CONTEXT_CLASS (parent_class)->focus_in)
00171         GTK_IM_CONTEXT_CLASS (parent_class)->focus_in (context);
00172     DBG_EXIT;
00173 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ergtk_im_context_erkeyb_focus_out ( GtkIMContext *  context  )  [static]

Definition at line 175 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, erkeyb_client_hide(), and parent_class.

Referenced by ergtk_im_context_erkeyb_class_init().

00176 {   DBG_ENTRY;
00177 
00178     erkeyb_client_hide();
00179 
00180     if (GTK_IM_CONTEXT_CLASS (parent_class)->focus_out)
00181         GTK_IM_CONTEXT_CLASS (parent_class)->focus_out (context);
00182     DBG_EXIT;
00183 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ergtk_im_context_erkeyb_init ( ErGtkIMContextErkeyb self  )  [static]

Definition at line 125 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, erkeyb_client_init(), and ERR.

Referenced by ergtk_im_context_erkeyb_register_type().

00126 {
00127     DBG_ENTRY;
00128 
00129     self->finalizing = FALSE ;  
00130    
00131     if ( 0 != erkeyb_client_init() )
00132     {
00133         ERR("Could not initialize keyboard!\n");
00134     }
00135 
00136     DBG_EXIT;
00137 }

Here is the call graph for this function:

Here is the caller graph for this function:

GtkIMContext* ergtk_im_context_erkeyb_new ( void   ) 

Definition at line 153 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, ERGTK_IM_CONTEXT_ERKEYB, and ERGTK_TYPE_IM_CONTEXT_ERKEYB.

Referenced by im_module_create().

00154 {
00155     DBG_ENTRY;
00156 
00157     ErGtkIMContextErkeyb* result = NULL ;
00158     result = ERGTK_IM_CONTEXT_ERKEYB( g_object_new(ERGTK_TYPE_IM_CONTEXT_ERKEYB, NULL ));
00159 
00160     DBG_EXIT;
00161     return GTK_IM_CONTEXT( result) ; 
00162 }

Here is the caller graph for this function:

void ergtk_im_context_erkeyb_register_type ( GTypeModule *  type_module  ) 

Definition at line 78 of file ergtk-im-context-erkeyb.c.

References DBG, DBG_ENTRY, DBG_EXIT, ergtk_im_context_erkeyb_class_init(), ergtk_im_context_erkeyb_init(), and ergtk_type_im_context_erkeyb.

Referenced by im_module_init().

00079 { 
00080     DBG_ENTRY;
00081 
00082     if (! ergtk_type_im_context_erkeyb )
00083     {
00084         static const GTypeInfo im_context_erkeyb_info =
00085         { 
00086             sizeof (ErGtkIMContextErkeybClass),
00087             (GBaseInitFunc) NULL,
00088             (GBaseFinalizeFunc) NULL,
00089             (GClassInitFunc) ergtk_im_context_erkeyb_class_init,
00090             NULL,           /* class_finalize */
00091             NULL,           /* class_data */
00092             sizeof (ErGtkIMContextErkeyb),
00093             0,
00094             (GInstanceInitFunc) ergtk_im_context_erkeyb_init,
00095             NULL
00096         };
00097 
00098         ergtk_type_im_context_erkeyb =
00099             g_type_module_register_type (type_module,
00100                     GTK_TYPE_IM_CONTEXT_SIMPLE,
00101                     "ErGtkIMContextErkeyb",
00102                     &im_context_erkeyb_info, 0);
00103     }
00104     else {
00105         DBG("ErGtkIMContextErkeyb was already registered. This is not an error.\n");
00106     }
00107     DBG_EXIT;
00108 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ergtk_im_context_erkeyb_set_client_window ( GtkIMContext *  context,
GdkWindow *  window 
) [static]

Definition at line 185 of file ergtk-im-context-erkeyb.c.

References DBG_ENTRY, DBG_EXIT, erkeyb_client_hide(), and parent_class.

Referenced by ergtk_im_context_erkeyb_class_init().

00186 {
00187     DBG_ENTRY;
00188 
00189     if ( window == NULL )
00190     {
00191         erkeyb_client_hide();
00192     }
00193 
00194     if (GTK_IM_CONTEXT_CLASS (parent_class)->set_client_window)
00195         GTK_IM_CONTEXT_CLASS (parent_class)->set_client_window (context, window);
00196 
00197     DBG_EXIT;
00198 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Copyright (C) 2009 iRex Technologies B.V. All rights reserved.

Definition at line 60 of file ergtk-im-context-erkeyb.c.

Referenced by ergtk_im_context_erkeyb_register_type().

GObjectClass* parent_class [static]
Generated by  doxygen 1.6.2-20100208