diff -urN gtk+-2.24.0.orig/configure gtk+-2.24.0/configure
--- gtk+-2.24.0.orig/configure	2011-02-07 14:32:04.000000000 +0900
+++ gtk+-2.24.0/configure	2011-03-23 14:19:10.000000000 +0900
@@ -850,6 +850,8 @@
 INCLUDE_IM_TI_ER_TRUE
 INCLUDE_IM_THAI_FALSE
 INCLUDE_IM_THAI_TRUE
+INCLUDE_IM_QUARTZ_FALSE
+INCLUDE_IM_QUARTZ_TRUE
 INCLUDE_IM_MULTIPRESS_FALSE
 INCLUDE_IM_MULTIPRESS_TRUE
 INCLUDE_IM_IPA_FALSE
@@ -5979,13 +5981,13 @@
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5982: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5984: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5985: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5987: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5988: output\"" >&5)
+  (eval echo "\"\$as_me:5990: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -7188,7 +7190,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7191 "configure"' > conftest.$ac_ext
+  echo '#line 7193 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -9212,11 +9214,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9215: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9217: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9219: \$? = $ac_status" >&5
+   echo "$as_me:9221: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9551,11 +9553,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9554: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9556: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9558: \$? = $ac_status" >&5
+   echo "$as_me:9560: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -9656,11 +9658,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9659: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9661: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9663: \$? = $ac_status" >&5
+   echo "$as_me:9665: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9711,11 +9713,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9714: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:9716: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:9718: \$? = $ac_status" >&5
+   echo "$as_me:9720: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12078,7 +12080,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12081 "configure"
+#line 12083 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12174,7 +12176,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12177 "configure"
+#line 12179 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14130,11 +14132,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14133: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14135: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14137: \$? = $ac_status" >&5
+   echo "$as_me:14139: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14229,11 +14231,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14232: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14234: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14236: \$? = $ac_status" >&5
+   echo "$as_me:14238: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14281,11 +14283,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14284: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14286: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14288: \$? = $ac_status" >&5
+   echo "$as_me:14290: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21355,6 +21357,9 @@
 if test "$gdktarget" = "win32"; then
    all_immodules="${all_immodules},ime"
 fi
+if test "$gdktarget" = "quartz"; then
+   all_immodules="${all_immodules},quartz"
+fi
 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
 if test "$gdktarget" = "x11"; then
    all_immodules="${all_immodules},xim"
@@ -21455,6 +21460,14 @@
   INCLUDE_IM_MULTIPRESS_FALSE=
 fi
 
+ if test x"$INCLUDE_quartz" = xyes; then
+  INCLUDE_IM_QUARTZ_TRUE=
+  INCLUDE_IM_QUARTZ_FALSE='#'
+else
+  INCLUDE_IM_QUARTZ_TRUE='#'
+  INCLUDE_IM_QUARTZ_FALSE=
+fi
+
  if test x"$INCLUDE_thai" = xyes; then
   INCLUDE_IM_THAI_TRUE=
   INCLUDE_IM_THAI_FALSE='#'
@@ -24737,6 +24750,10 @@
   as_fn_error "conditional \"INCLUDE_IM_MULTIPRESS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${INCLUDE_IM_QUARTZ_TRUE}" && test -z "${INCLUDE_IM_QUARTZ_FALSE}"; then
+  as_fn_error "conditional \"INCLUDE_IM_QUARTZ\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${INCLUDE_IM_THAI_TRUE}" && test -z "${INCLUDE_IM_THAI_FALSE}"; then
   as_fn_error "conditional \"INCLUDE_IM_THAI\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff -urN gtk+-2.24.0.orig/configure.in gtk+-2.24.0/configure.in
--- gtk+-2.24.0.orig/configure.in	2011-01-29 13:19:00.000000000 +0900
+++ gtk+-2.24.0/configure.in	2011-03-23 14:17:55.000000000 +0900
@@ -821,6 +821,9 @@
 if test "$gdktarget" = "win32"; then
    all_immodules="${all_immodules},ime"
 fi
+if test "$gdktarget" = "quartz"; then
+   all_immodules="${all_immodules},quartz"
+fi
 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
 if test "$gdktarget" = "x11"; then
    all_immodules="${all_immodules},xim"
@@ -864,6 +867,7 @@
 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_QUARTZ, [test x"$INCLUDE_quartz" = xyes])
 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
diff -urN gtk+-2.24.0.orig/gdk/quartz/GdkQuartzView.c gtk+-2.24.0/gdk/quartz/GdkQuartzView.c
--- gtk+-2.24.0.orig/gdk/quartz/GdkQuartzView.c	2011-01-06 00:51:20.000000000 +0900
+++ gtk+-2.24.0/gdk/quartz/GdkQuartzView.c	2011-03-25 16:37:01.000000000 +0900
@@ -25,8 +25,113 @@
 #include "gdkprivate-quartz.h"
 #include "gdkquartz.h"
 
+#define TIC_MARKED_TEXT "tic-marked-text"
+#define TIC_INSERT_TEXT "tic-insert-text"
+
 @implementation GdkQuartzView
 
+- (BOOL)acceptsFirstResponder {
+  g_message("acceptsFirstResponder");
+  return YES;
+}
+
+- (BOOL)becomeFirstResponder {
+  g_message("becomeFirstResponder");
+  return YES;
+}
+
+- (BOOL)resignFirstResponder {
+  g_message("resignFirstResponder");
+  return YES;
+}
+
+- (void) keyDown: (NSEvent *) theEvent {
+  g_message("keyDown");
+  [[self inputContext] handleEvent:theEvent];
+}
+
+- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint {
+  g_message("characterIndexForPoint");
+  return 0;
+}
+
+- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {
+  g_message("firstRectForCharacterRange");
+  return NSMakeRect(0, 0, 0, 0);
+}
+
+- (NSArray *)validAttributesForMarkedText {
+  g_message("validAttributesForMarkedText");
+  return NULL;
+}
+
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {
+  g_message("attributedSubstringForProposedRange");
+  return NULL;
+}
+
+- (BOOL)hasMarkedText {
+  g_message("hasMarkedText");
+  return NO;
+}
+
+- (NSRange)markedRange {
+  g_message("markedRange");
+  return NSMakeRange(0, 0);
+}
+
+- (NSRange)selectedRange {
+  g_message("selectedRange");
+  return NSMakeRange(0, 0);
+}
+
+- (void)unmarkText {
+  g_message("unmarkText");
+}
+
+- (void)setMarkedText:(id)aString selectedRange:(NSRange)newSelection replacementRange:(NSRange)replacementRange {
+  const char *str;
+  char *prev_str;
+
+  if ([aString isKindOfClass:[NSAttributedString class]]) {
+    str = [[aString string] UTF8String];
+  } else {
+    str = [aString UTF8String];
+  }
+
+  prev_str = g_object_get_data(G_OBJECT(gdk_window), TIC_MARKED_TEXT);
+  if (prev_str)
+    g_free(prev_str);
+  g_object_set_data(G_OBJECT(gdk_window), TIC_MARKED_TEXT, g_strdup(str));
+  str = g_object_get_data(G_OBJECT(gdk_window), TIC_MARKED_TEXT);
+  g_print("setMarkedText: set %s (%p, nsview %p): %s\n", TIC_MARKED_TEXT, gdk_window, self, str ? str : "(empty)");
+}
+
+- (void)doCommandBySelector:(SEL)aSelector {
+  g_message("doCommandBySelector");
+  [super doCommandBySelector:aSelector];
+}
+
+- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange {
+  const char *str;
+  char *prev_str;
+
+  if ([aString isKindOfClass:[NSAttributedString class]]) {
+    str = [[aString string] UTF8String];
+  } else {
+    str = [aString UTF8String];
+  }
+
+  prev_str = g_object_get_data(G_OBJECT(gdk_window), TIC_INSERT_TEXT);
+  if (prev_str)
+    g_free(prev_str);
+  g_object_set_data(G_OBJECT(gdk_window), TIC_INSERT_TEXT, g_strdup(str));
+  str = g_object_get_data(G_OBJECT(gdk_window), TIC_INSERT_TEXT);
+  g_print("insertText: set %s (%p, nsview %p): %s\n", TIC_INSERT_TEXT, gdk_window, self, str ? str : "(empty)");
+}
+
+/* --------------------------------------------------------------- */
+
 -(void)dealloc
 {
   if (trackingRect)
diff -urN gtk+-2.24.0.orig/gdk/quartz/GdkQuartzView.h gtk+-2.24.0/gdk/quartz/GdkQuartzView.h
--- gtk+-2.24.0.orig/gdk/quartz/GdkQuartzView.h	2010-09-28 04:53:12.000000000 +0900
+++ gtk+-2.24.0/gdk/quartz/GdkQuartzView.h	2011-03-22 15:59:24.000000000 +0900
@@ -21,7 +21,7 @@
 #import <AppKit/AppKit.h>
 #include "gdkwindow.h"
 
-@interface GdkQuartzView : NSView {
+@interface GdkQuartzView : NSView <NSTextInputClient> {
   GdkWindow *gdk_window;
   NSTrackingRectTag trackingRect;
   BOOL needsInvalidateShadow;
diff -urN gtk+-2.24.0.orig/gdk/quartz/gdkevents-quartz.c gtk+-2.24.0/gdk/quartz/gdkevents-quartz.c
--- gtk+-2.24.0.orig/gdk/quartz/gdkevents-quartz.c	2011-01-06 00:51:20.000000000 +0900
+++ gtk+-2.24.0/gdk/quartz/gdkevents-quartz.c	2011-03-22 18:04:21.000000000 +0900
@@ -1004,6 +1004,7 @@
 	  event->key.window,
 	  event->key.keyval ? gdk_keyval_name (event->key.keyval) : "(none)",
 	  event->key.keyval));
+  g_message("hardware_keycode: %d", event->key.hardware_keycode);
 }
 
 static gboolean
diff -urN gtk+-2.24.0.orig/modules/input/Makefile.am gtk+-2.24.0/modules/input/Makefile.am
--- gtk+-2.24.0.orig/modules/input/Makefile.am	2011-01-06 00:51:22.000000000 +0900
+++ gtk+-2.24.0/modules/input/Makefile.am	2011-03-24 12:29:16.000000000 +0900
@@ -154,6 +154,17 @@
 endif
 endif
 
+im_quartz_la_CPPFLAGS = -xobjective-c
+im_quartz_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
+im_quartz_la_SOURCES = imquartz.c
+libstatic_im_quartz_la_SOURCES = $(im_quartz_la_SOURCES)
+im_quartz_la_LIBADD = $(LDADDS)
+if INCLUDE_IM_QUARTZ
+STATIC_QUARTZ_MODULE = libstatic-im-quartz.la
+else
+QUARTZ_MODULE = im-quartz.la
+endif
+
 multipress_defs = -DMULTIPRESS_LOCALEDIR=\""$(mplocaledir)"\" -DMULTIPRESS_CONFDIR=\""$(sysconfdir)/gtk-2.0"\"
 im_multipress_la_CPPFLAGS = $(multipress_defs)
 libstatic_im_multipress_la_CPPFLAGS = $(im_multipress_la_CPPFLAGS)
@@ -213,6 +224,7 @@
 	$(INUKTITUT_MODULE)		\
 	$(IPA_MODULE)			\
 	$(MULTIPRESS_MODULE)		\
+	$(QUARTZ_MODULE)		\
 	$(THAI_MODULE)			\
 	$(TI_ER_MODULE)			\
 	$(TI_ET_MODULE)			\
@@ -229,6 +241,7 @@
 	$(STATIC_INUKTITUT_MODULE)		\
 	$(STATIC_IPA_MODULE)			\
 	$(STATIC_MULTIPRESS_MODULE)		\
+	$(STATIC_QUARTZ_MODULE)			\
 	$(STATIC_THAI_MODULE)			\
 	$(STATIC_TI_ER_MODULE)			\
 	$(STATIC_TI_ET_MODULE)			\
diff -urN gtk+-2.24.0.orig/modules/input/Makefile.in gtk+-2.24.0/modules/input/Makefile.in
--- gtk+-2.24.0.orig/modules/input/Makefile.in	2011-02-07 14:32:15.000000000 +0900
+++ gtk+-2.24.0/modules/input/Makefile.in	2011-03-28 13:29:35.000000000 +0900
@@ -147,6 +147,15 @@
 	-o $@
 @BUILD_DYNAMIC_MODULES_TRUE@@INCLUDE_IM_MULTIPRESS_FALSE@am_im_multipress_la_rpath = -rpath \
 @BUILD_DYNAMIC_MODULES_TRUE@@INCLUDE_IM_MULTIPRESS_FALSE@	$(moduledir)
+im_quartz_la_DEPENDENCIES = $(am__DEPENDENCIES_2)
+am_im_quartz_la_OBJECTS = im_quartz_la-imquartz.lo
+im_quartz_la_OBJECTS = $(am_im_quartz_la_OBJECTS)
+im_quartz_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(im_quartz_la_LDFLAGS) $(LDFLAGS) -o $@
+@BUILD_DYNAMIC_MODULES_TRUE@@INCLUDE_IM_QUARTZ_FALSE@am_im_quartz_la_rpath =  \
+@BUILD_DYNAMIC_MODULES_TRUE@@INCLUDE_IM_QUARTZ_FALSE@	-rpath \
+@BUILD_DYNAMIC_MODULES_TRUE@@INCLUDE_IM_QUARTZ_FALSE@	$(moduledir)
 im_thai_la_DEPENDENCIES = $(am__DEPENDENCIES_2)
 am_im_thai_la_OBJECTS = thai-charprop.lo gtkimcontextthai.lo imthai.lo
 im_thai_la_OBJECTS = $(am_im_thai_la_OBJECTS)
@@ -231,29 +240,34 @@
 libstatic_im_multipress_la_OBJECTS =  \
 	$(am_libstatic_im_multipress_la_OBJECTS)
 @INCLUDE_IM_MULTIPRESS_TRUE@am_libstatic_im_multipress_la_rpath =
+libstatic_im_quartz_la_LIBADD =
+am__objects_8 = imquartz.lo
+am_libstatic_im_quartz_la_OBJECTS = $(am__objects_8)
+libstatic_im_quartz_la_OBJECTS = $(am_libstatic_im_quartz_la_OBJECTS)
+@INCLUDE_IM_QUARTZ_TRUE@am_libstatic_im_quartz_la_rpath =
 libstatic_im_thai_la_LIBADD =
-am__objects_8 = thai-charprop.lo gtkimcontextthai.lo imthai.lo
-am_libstatic_im_thai_la_OBJECTS = $(am__objects_8)
+am__objects_9 = thai-charprop.lo gtkimcontextthai.lo imthai.lo
+am_libstatic_im_thai_la_OBJECTS = $(am__objects_9)
 libstatic_im_thai_la_OBJECTS = $(am_libstatic_im_thai_la_OBJECTS)
 @INCLUDE_IM_THAI_TRUE@am_libstatic_im_thai_la_rpath =
 libstatic_im_ti_er_la_LIBADD =
-am__objects_9 = imti-er.lo
-am_libstatic_im_ti_er_la_OBJECTS = $(am__objects_9)
+am__objects_10 = imti-er.lo
+am_libstatic_im_ti_er_la_OBJECTS = $(am__objects_10)
 libstatic_im_ti_er_la_OBJECTS = $(am_libstatic_im_ti_er_la_OBJECTS)
 @INCLUDE_IM_TI_ER_TRUE@am_libstatic_im_ti_er_la_rpath =
 libstatic_im_ti_et_la_LIBADD =
-am__objects_10 = imti-et.lo
-am_libstatic_im_ti_et_la_OBJECTS = $(am__objects_10)
+am__objects_11 = imti-et.lo
+am_libstatic_im_ti_et_la_OBJECTS = $(am__objects_11)
 libstatic_im_ti_et_la_OBJECTS = $(am_libstatic_im_ti_et_la_OBJECTS)
 @INCLUDE_IM_TI_ET_TRUE@am_libstatic_im_ti_et_la_rpath =
 libstatic_im_viqr_la_LIBADD =
-am__objects_11 = imviqr.lo
-am_libstatic_im_viqr_la_OBJECTS = $(am__objects_11)
+am__objects_12 = imviqr.lo
+am_libstatic_im_viqr_la_OBJECTS = $(am__objects_12)
 libstatic_im_viqr_la_OBJECTS = $(am_libstatic_im_viqr_la_OBJECTS)
 @INCLUDE_IM_VIQR_TRUE@am_libstatic_im_viqr_la_rpath =
 libstatic_im_xim_la_LIBADD =
-am__objects_12 = gtkimcontextxim.lo imxim.lo
-am_libstatic_im_xim_la_OBJECTS = $(am__objects_12)
+am__objects_13 = gtkimcontextxim.lo imxim.lo
+am_libstatic_im_xim_la_OBJECTS = $(am__objects_13)
 libstatic_im_xim_la_OBJECTS = $(am_libstatic_im_xim_la_OBJECTS)
 @HAVE_X11R6_TRUE@@INCLUDE_IM_XIM_TRUE@am_libstatic_im_xim_la_rpath =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
@@ -285,16 +299,17 @@
 SOURCES = $(im_am_et_la_SOURCES) $(im_cedilla_la_SOURCES) \
 	$(im_cyrillic_translit_la_SOURCES) $(im_ime_la_SOURCES) \
 	$(im_inuktitut_la_SOURCES) $(im_ipa_la_SOURCES) \
-	$(im_multipress_la_SOURCES) $(im_thai_la_SOURCES) \
-	$(im_ti_er_la_SOURCES) $(im_ti_et_la_SOURCES) \
-	$(im_viqr_la_SOURCES) $(im_xim_la_SOURCES) \
-	$(libstatic_im_am_et_la_SOURCES) \
+	$(im_multipress_la_SOURCES) $(im_quartz_la_SOURCES) \
+	$(im_thai_la_SOURCES) $(im_ti_er_la_SOURCES) \
+	$(im_ti_et_la_SOURCES) $(im_viqr_la_SOURCES) \
+	$(im_xim_la_SOURCES) $(libstatic_im_am_et_la_SOURCES) \
 	$(libstatic_im_cedilla_la_SOURCES) \
 	$(libstatic_im_cyrillic_translit_la_SOURCES) \
 	$(libstatic_im_ime_la_SOURCES) \
 	$(libstatic_im_inuktitut_la_SOURCES) \
 	$(libstatic_im_ipa_la_SOURCES) \
 	$(libstatic_im_multipress_la_SOURCES) \
+	$(libstatic_im_quartz_la_SOURCES) \
 	$(libstatic_im_thai_la_SOURCES) \
 	$(libstatic_im_ti_er_la_SOURCES) \
 	$(libstatic_im_ti_et_la_SOURCES) \
@@ -302,16 +317,17 @@
 DIST_SOURCES = $(im_am_et_la_SOURCES) $(im_cedilla_la_SOURCES) \
 	$(im_cyrillic_translit_la_SOURCES) $(im_ime_la_SOURCES) \
 	$(im_inuktitut_la_SOURCES) $(im_ipa_la_SOURCES) \
-	$(im_multipress_la_SOURCES) $(im_thai_la_SOURCES) \
-	$(im_ti_er_la_SOURCES) $(im_ti_et_la_SOURCES) \
-	$(im_viqr_la_SOURCES) $(im_xim_la_SOURCES) \
-	$(libstatic_im_am_et_la_SOURCES) \
+	$(im_multipress_la_SOURCES) $(im_quartz_la_SOURCES) \
+	$(im_thai_la_SOURCES) $(im_ti_er_la_SOURCES) \
+	$(im_ti_et_la_SOURCES) $(im_viqr_la_SOURCES) \
+	$(im_xim_la_SOURCES) $(libstatic_im_am_et_la_SOURCES) \
 	$(libstatic_im_cedilla_la_SOURCES) \
 	$(libstatic_im_cyrillic_translit_la_SOURCES) \
 	$(libstatic_im_ime_la_SOURCES) \
 	$(libstatic_im_inuktitut_la_SOURCES) \
 	$(libstatic_im_ipa_la_SOURCES) \
 	$(libstatic_im_multipress_la_SOURCES) \
+	$(libstatic_im_quartz_la_SOURCES) \
 	$(libstatic_im_thai_la_SOURCES) \
 	$(libstatic_im_ti_er_la_SOURCES) \
 	$(libstatic_im_ti_et_la_SOURCES) \
@@ -682,6 +698,13 @@
 libstatic_im_ime_la_LIBADD = -limm32
 @INCLUDE_IM_IME_TRUE@@USE_WIN32_TRUE@STATIC_IME_MODULE = libstatic-im-ime.la
 @INCLUDE_IM_IME_FALSE@@USE_WIN32_TRUE@IME_MODULE = im-ime.la 
+im_quartz_la_CPPFLAGS = -xobjective-c
+im_quartz_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
+im_quartz_la_SOURCES = imquartz.c
+libstatic_im_quartz_la_SOURCES = $(im_quartz_la_SOURCES)
+im_quartz_la_LIBADD = $(LDADDS)
+@INCLUDE_IM_QUARTZ_TRUE@STATIC_QUARTZ_MODULE = libstatic-im-quartz.la
+@INCLUDE_IM_QUARTZ_FALSE@QUARTZ_MODULE = im-quartz.la
 multipress_defs = -DMULTIPRESS_LOCALEDIR=\""$(mplocaledir)"\" -DMULTIPRESS_CONFDIR=\""$(sysconfdir)/gtk-2.0"\"
 im_multipress_la_CPPFLAGS = $(multipress_defs)
 libstatic_im_multipress_la_CPPFLAGS = $(im_multipress_la_CPPFLAGS)
@@ -707,6 +730,7 @@
 @BUILD_DYNAMIC_MODULES_TRUE@	$(INUKTITUT_MODULE)		\
 @BUILD_DYNAMIC_MODULES_TRUE@	$(IPA_MODULE)			\
 @BUILD_DYNAMIC_MODULES_TRUE@	$(MULTIPRESS_MODULE)		\
+@BUILD_DYNAMIC_MODULES_TRUE@	$(QUARTZ_MODULE)		\
 @BUILD_DYNAMIC_MODULES_TRUE@	$(THAI_MODULE)			\
 @BUILD_DYNAMIC_MODULES_TRUE@	$(TI_ER_MODULE)			\
 @BUILD_DYNAMIC_MODULES_TRUE@	$(TI_ET_MODULE)			\
@@ -721,6 +745,7 @@
 	$(STATIC_INUKTITUT_MODULE)		\
 	$(STATIC_IPA_MODULE)			\
 	$(STATIC_MULTIPRESS_MODULE)		\
+	$(STATIC_QUARTZ_MODULE)			\
 	$(STATIC_THAI_MODULE)			\
 	$(STATIC_TI_ER_MODULE)			\
 	$(STATIC_TI_ET_MODULE)			\
@@ -816,6 +841,8 @@
 	$(AM_V_CCLD)$(im_ipa_la_LINK) $(am_im_ipa_la_rpath) $(im_ipa_la_OBJECTS) $(im_ipa_la_LIBADD) $(LIBS)
 im-multipress.la: $(im_multipress_la_OBJECTS) $(im_multipress_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(im_multipress_la_LINK) $(am_im_multipress_la_rpath) $(im_multipress_la_OBJECTS) $(im_multipress_la_LIBADD) $(LIBS)
+im-quartz.la: $(im_quartz_la_OBJECTS) $(im_quartz_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(im_quartz_la_LINK) $(am_im_quartz_la_rpath) $(im_quartz_la_OBJECTS) $(im_quartz_la_LIBADD) $(LIBS)
 im-thai.la: $(im_thai_la_OBJECTS) $(im_thai_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(im_thai_la_LINK) $(am_im_thai_la_rpath) $(im_thai_la_OBJECTS) $(im_thai_la_LIBADD) $(LIBS)
 im-ti-er.la: $(im_ti_er_la_OBJECTS) $(im_ti_er_la_DEPENDENCIES) 
@@ -840,6 +867,8 @@
 	$(AM_V_CCLD)$(LINK) $(am_libstatic_im_ipa_la_rpath) $(libstatic_im_ipa_la_OBJECTS) $(libstatic_im_ipa_la_LIBADD) $(LIBS)
 libstatic-im-multipress.la: $(libstatic_im_multipress_la_OBJECTS) $(libstatic_im_multipress_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(LINK) $(am_libstatic_im_multipress_la_rpath) $(libstatic_im_multipress_la_OBJECTS) $(libstatic_im_multipress_la_LIBADD) $(LIBS)
+libstatic-im-quartz.la: $(libstatic_im_quartz_la_OBJECTS) $(libstatic_im_quartz_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(LINK) $(am_libstatic_im_quartz_la_rpath) $(libstatic_im_quartz_la_OBJECTS) $(libstatic_im_quartz_la_LIBADD) $(LIBS)
 libstatic-im-thai.la: $(libstatic_im_thai_la_OBJECTS) $(libstatic_im_thai_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(LINK) $(am_libstatic_im_thai_la_rpath) $(libstatic_im_thai_la_OBJECTS) $(libstatic_im_thai_la_LIBADD) $(LIBS)
 libstatic-im-ti-er.la: $(libstatic_im_ti_er_la_OBJECTS) $(libstatic_im_ti_er_la_DEPENDENCIES) 
@@ -862,12 +891,14 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtkimcontextxim.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_multipress_la-gtkimcontextmultipress.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_multipress_la-immultipress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/im_quartz_la-imquartz.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imam-et.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imcedilla.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imcyrillic-translit.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imime.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iminuktitut.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imipa.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imquartz.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imthai.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imti-er.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imti-et.Plo@am__quote@
@@ -917,6 +948,14 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(im_multipress_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o im_multipress_la-immultipress.lo `test -f 'immultipress.c' || echo '$(srcdir)/'`immultipress.c
 
+im_quartz_la-imquartz.lo: imquartz.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(im_quartz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT im_quartz_la-imquartz.lo -MD -MP -MF $(DEPDIR)/im_quartz_la-imquartz.Tpo -c -o im_quartz_la-imquartz.lo `test -f 'imquartz.c' || echo '$(srcdir)/'`imquartz.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/im_quartz_la-imquartz.Tpo $(DEPDIR)/im_quartz_la-imquartz.Plo
+@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='imquartz.c' object='im_quartz_la-imquartz.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(im_quartz_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o im_quartz_la-imquartz.lo `test -f 'imquartz.c' || echo '$(srcdir)/'`imquartz.c
+
 libstatic_im_multipress_la-gtkimcontextmultipress.lo: gtkimcontextmultipress.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstatic_im_multipress_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libstatic_im_multipress_la-gtkimcontextmultipress.lo -MD -MP -MF $(DEPDIR)/libstatic_im_multipress_la-gtkimcontextmultipress.Tpo -c -o libstatic_im_multipress_la-gtkimcontextmultipress.lo `test -f 'gtkimcontextmultipress.c' || echo '$(srcdir)/'`gtkimcontextmultipress.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libstatic_im_multipress_la-gtkimcontextmultipress.Tpo $(DEPDIR)/libstatic_im_multipress_la-gtkimcontextmultipress.Plo
diff -urN gtk+-2.24.0.orig/modules/input/imquartz.c gtk+-2.24.0/modules/input/imquartz.c
--- gtk+-2.24.0.orig/modules/input/imquartz.c	1970-01-01 09:00:00.000000000 +0900
+++ gtk+-2.24.0/modules/input/imquartz.c	2011-03-25 16:54:43.000000000 +0900
@@ -0,0 +1,279 @@
+/*
+ * gtkimmodulequartz
+ * Copyright (C) 2011 Hiroyuki Yamamoto
+ *
+ * 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.
+ *
+ * $Id:$
+ */
+
+#include "config.h"
+#include <string.h>
+
+//#import <Cocoa/Cocoa.h>
+
+#include <gtk/gtk.h>
+#include "gtk/gtkintl.h"
+#include "gtk/gtkimmodule.h"
+
+#include "gdk/quartz/gdkquartz.h"
+
+#define GTK_IM_CONTEXT_TYPE_QUARTZ (type_quartz)
+#define GTK_IM_CONTEXT_QUARTZ(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_IM_CONTEXT_TYPE_QUARTZ, GtkIMContextQuartz))
+#define GTK_IM_CONTEXT_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_IM_CONTEXT_TYPE_QUARTZ, GtkIMContextQuartzClass))
+
+typedef struct _GtkIMContextQuartz {
+  GtkIMContext parent;
+  GdkWindow *client_window;
+  gchar *preedit_str;
+} GtkIMContextQuartz;
+
+typedef struct _GtkIMContextQuartzClass {
+  GtkIMContextClass parent_class;
+} GtkIMContextQuartzClass;
+
+GType type_quartz = 0;
+static GObjectClass *parent_class;
+
+static const GtkIMContextInfo imquartz_info = {
+  "quartz",
+  "Mac OS X Quartz",
+  GETTEXT_PACKAGE,
+  GTK_LOCALEDIR,
+  "ja",
+};
+
+static const GtkIMContextInfo *info_list[] = {
+  &imquartz_info,
+};
+
+#ifndef INCLUDE_IM_quartz
+#define MODULE_ENTRY(type,function) G_MODULE_EXPORT type im_module_ ## function
+#else
+#define MODULE_ENTRY(type, function) type _gtk_immodule_quartz_ ## function
+#endif
+
+static void
+quartz_get_preedit_string (GtkIMContext *context,
+			   gchar **str,
+			   PangoAttrList **attrs,
+			   gint *cursor_pos)
+{
+  GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ(context);
+
+  g_message("quartz_get_preedit_string");
+
+  if (str)
+    *str = qc->preedit_str ? g_strdup (qc->preedit_str) : g_strdup ("");
+  if (attrs)
+    *attrs = pango_attr_list_new ();
+  if (cursor_pos)
+    *cursor_pos = 0;
+}
+
+static gboolean
+quartz_filter_keypress (GtkIMContext *context,
+			GdkEventKey *event)
+{
+  GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ(context);
+  gboolean retval = FALSE;
+  guint32 c;
+  NSView *nsview;
+  GdkWindow *win;
+  gchar *str;
+
+  g_message("quartz_filter_keypress");
+
+  if (event->type == GDK_KEY_RELEASE)
+    return FALSE;
+
+  if (event->state & (GDK_CONTROL_MASK|GDK_MOD1_MASK))
+    return FALSE;
+
+  if (!qc->client_window)
+    return FALSE;
+
+  nsview = gdk_quartz_window_get_nsview(qc->client_window);
+  win = (GdkWindow *)[nsview gdkWindow];
+  g_message("client_window: %p, win: %p, nsview: %p", qc->client_window, win, nsview);
+
+  if (event->hardware_keycode == 55)
+    return FALSE;
+
+  [nsview keyDown: gdk_quartz_event_get_nsevent((GdkEvent *)event)];
+
+  if (event->hardware_keycode == 102 || event->hardware_keycode == 104)
+    return FALSE;
+
+  g_message("quartz_filter_keypress: getting tic-insert-text");
+  str = g_object_get_data(G_OBJECT(win), "tic-insert-text");
+  if (str)
+    {
+      g_message("tic-insert-text: %s", str);
+      g_free(qc->preedit_str);
+      qc->preedit_str = NULL;
+      g_object_set_data(G_OBJECT(win), "tic-insert-text", NULL);
+      g_object_set_data(G_OBJECT(win), "tic-marked-text", NULL);
+      g_signal_emit_by_name (context, "commit", str);
+      g_signal_emit_by_name (context, "preedit_changed");
+      g_free(str);
+      retval = TRUE;
+    }
+  else
+    {
+      str = g_object_get_data(G_OBJECT(win), "tic-marked-text");
+      if (str)
+        {
+          g_message("tic-marked-text: %s", str);
+          g_free(qc->preedit_str);
+          qc->preedit_str = g_strdup(str);
+          g_object_set_data(G_OBJECT(win), "tic-marked-text", NULL);
+          g_signal_emit_by_name (context, "preedit_changed");
+          retval = TRUE;
+        }
+    }
+
+#if 0
+  c = gdk_keyval_to_unicode (event->keyval);
+  if (c)
+    {
+      gchar utf8[10];
+      int len = g_unichar_to_utf8 (c, utf8);
+      utf8[len] = 0;
+
+      g_signal_emit_by_name (context, "commit", utf8);
+      g_signal_emit_by_name (context, "preedit_changed");
+      retval = TRUE;
+    }
+#endif
+
+  g_message("quartz_filter_keypress done");
+  return retval;
+}
+
+static void
+quartz_reset (GtkIMContext *context)
+{
+  g_message("quartz_reset");
+}
+
+static void
+quartz_set_client_window (GtkIMContext *context, GdkWindow *window)
+{
+  GtkIMContextQuartz *qc = GTK_IM_CONTEXT_QUARTZ(context);
+
+  g_message("quartz_set_client_window: %p", window);
+
+  qc->client_window = window;
+}
+
+static void
+quartz_focus_in (GtkIMContext *context)
+{
+  g_message("quartz_focus_in");
+}
+
+static void
+quartz_focus_out (GtkIMContext *context)
+{
+  g_message("quartz_focus_out");
+}
+
+static void
+quartz_set_cursor_location (GtkIMContext *context, GdkRectangle *area)
+{
+  g_message("quartz_set_cursor_location");
+}
+
+static void
+quartz_set_use_preedit (GtkIMContext *context, gboolean use_preedit)
+{
+  g_message("quartz_set_use_preedit: %d", use_preedit);
+}
+
+static void
+gtk_im_context_quartz_class_init (GtkIMContextClass *klass)
+{
+  g_message("gtk_im_context_quartz_class_init");
+
+  parent_class = g_type_class_peek_parent (klass);
+
+  klass->get_preedit_string = quartz_get_preedit_string;
+  klass->filter_keypress = quartz_filter_keypress;
+  klass->reset = quartz_reset;
+  klass->set_client_window = quartz_set_client_window;
+  klass->focus_in = quartz_focus_in;
+  klass->focus_out = quartz_focus_out;
+  klass->set_cursor_location = quartz_set_cursor_location;
+  klass->set_use_preedit = quartz_set_use_preedit;
+}
+
+static void
+gtk_im_context_quartz_init (GtkIMContext *im_context)
+{
+  g_message("gtk_im_context_quartz_init");
+}
+
+static void
+gtk_im_context_quartz_register_type (GTypeModule *module)
+{
+  const GTypeInfo object_info =
+  {
+    sizeof (GtkIMContextClass),
+    (GBaseInitFunc) NULL,
+    (GBaseFinalizeFunc) NULL,
+    (GClassInitFunc) gtk_im_context_quartz_class_init,
+    NULL,           /* class_finalize */
+    NULL,           /* class_data */
+    sizeof (GtkIMContext),
+    0,
+    (GInstanceInitFunc) gtk_im_context_quartz_init,
+  };
+
+  type_quartz =
+    g_type_module_register_type (module,
+                                 GTK_TYPE_IM_CONTEXT,
+                                 "GtkIMContextQuartz",
+                                 &object_info, 0);
+}
+
+MODULE_ENTRY (void, init) (GTypeModule * module)
+{
+  gtk_im_context_quartz_register_type (module);
+}
+
+MODULE_ENTRY (void, exit) (void)
+{
+}
+
+MODULE_ENTRY (void, list) (const GtkIMContextInfo *** contexts, int *n_contexts)
+{
+  *contexts = info_list;
+  *n_contexts = G_N_ELEMENTS (info_list);
+}
+
+MODULE_ENTRY (GtkIMContext *, create) (const gchar * context_id)
+{
+  g_return_val_if_fail (context_id, NULL);
+
+  if (!strcmp (context_id, "quartz"))
+  {
+    g_message("immodule_quartz create");
+    return g_object_new (type_quartz, NULL);
+  }
+  else
+    return NULL;
+}
