Build imime.la on Windows.

2004-08-26  Matthias Clasen  <mclasen@redhat.com>

	* modules/input/Makefile.am: Build imime.la on Windows.

	* modules/input/gtkimcontextime.h:
	* modules/input/gtkimcontextime.c:
	* modules/input/imime.c:
	* modules/input/imm-extra.h: Add the IME input method for Win32
	written by Takuro Ashie and Kazuko IWAMOTO. The code was previously
	hosted at http://sourceforge.jp/projects/imime.  (#135195)
This commit is contained in:
Matthias Clasen 2004-08-26 14:29:25 +00:00 committed by Matthias Clasen
parent 3124567f18
commit 24dd1030f0
9 changed files with 1338 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2004-08-26 Matthias Clasen <mclasen@redhat.com>
* modules/input/Makefile.am: Build imime.la on Windows.
* modules/input/gtkimcontextime.h:
* modules/input/gtkimcontextime.c:
* modules/input/imime.c:
* modules/input/imm-extra.h: Add the IME input method for Win32
written by Takuro Ashie and Kazuko IWAMOTO. The code was previously
hosted at http://sourceforge.jp/projects/imime. (#135195)
2004-08-26 Bill Haneman <billh@gnome.org>
* gtk/gtktreeview:

View File

@ -1,3 +1,14 @@
2004-08-26 Matthias Clasen <mclasen@redhat.com>
* modules/input/Makefile.am: Build imime.la on Windows.
* modules/input/gtkimcontextime.h:
* modules/input/gtkimcontextime.c:
* modules/input/imime.c:
* modules/input/imm-extra.h: Add the IME input method for Win32
written by Takuro Ashie and Kazuko IWAMOTO. The code was previously
hosted at http://sourceforge.jp/projects/imime. (#135195)
2004-08-26 Bill Haneman <billh@gnome.org>
* gtk/gtktreeview:

View File

@ -1,3 +1,14 @@
2004-08-26 Matthias Clasen <mclasen@redhat.com>
* modules/input/Makefile.am: Build imime.la on Windows.
* modules/input/gtkimcontextime.h:
* modules/input/gtkimcontextime.c:
* modules/input/imime.c:
* modules/input/imm-extra.h: Add the IME input method for Win32
written by Takuro Ashie and Kazuko IWAMOTO. The code was previously
hosted at http://sourceforge.jp/projects/imime. (#135195)
2004-08-26 Bill Haneman <billh@gnome.org>
* gtk/gtktreeview:

View File

@ -1,3 +1,14 @@
2004-08-26 Matthias Clasen <mclasen@redhat.com>
* modules/input/Makefile.am: Build imime.la on Windows.
* modules/input/gtkimcontextime.h:
* modules/input/gtkimcontextime.c:
* modules/input/imime.c:
* modules/input/imm-extra.h: Add the IME input method for Win32
written by Takuro Ashie and Kazuko IWAMOTO. The code was previously
hosted at http://sourceforge.jp/projects/imime. (#135195)
2004-08-26 Bill Haneman <billh@gnome.org>
* gtk/gtktreeview:

View File

@ -75,6 +75,18 @@ im_ipa_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_ipa_la_SOURCES = imipa.c
im_ipa_la_LIBADD = $(LDADDS)
im_ime_la_LDFLAGS = -rpath $(moduledir) -avoid-version -module $(no_undefined)
im_ime_la_SOURCES = \
gtkimcontextime.c \
gtkimcontextime.h \
imime.c \
imm-extra.h
im_ime_la_LIBADD = $(LDADDS)
if PLATFORM_WIN32
IM_IME_MODULE=im-ime.la
endif
if CROSS_COMPILING
RUN_QUERY_IMMODULES_TEST=false
else
@ -115,7 +127,8 @@ module_LTLIBRARIES = \
im-thai-broken.la \
im-ti-er.la \
im-ti-et.la \
im-viqr.la
im-viqr.la \
$(IM_IME_MODULE)
gtk.immodules: Makefile.am $(module_LTLIBRARIES)
$(top_builddir)/gtk/gtk-query-immodules-2.0 $(module_LTLIBRARIES) > gtk.immodules

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
/*
* gtkimmoduleime
* Copyright (C) 2003 Takuro Ashie
* Copyright (C) 2003 Kazuki IWAMOTO
*
* 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 <gtk/gtkimcontext.h>
extern GType gtk_type_im_context_ime;
#define GTK_TYPE_IM_CONTEXT_IME gtk_type_im_context_ime
#define GTK_IM_CONTEXT_IME(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_IM_CONTEXT_IME, GtkIMContextIME))
#define GTK_IM_CONTEXT_IME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT_IME, GtkIMContextIMEClass))
#define GTK_IS_IM_CONTEXT_IME(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_IM_CONTEXT_IME))
#define GTK_IS_IM_CONTEXT_IME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT_IME))
#define GTK_IM_CONTEXT_IME_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT_IME, GtkIMContextIMEClass))
typedef struct _GtkIMContextIME GtkIMContextIME;
typedef struct _GtkIMContextIMEPrivate GtkIMContextIMEPrivate;
typedef struct _GtkIMContextIMEClass GtkIMContextIMEClass;
struct _GtkIMContextIME
{
GtkIMContext object;
GdkWindow *client_window;
GdkWindow *toplevel;
guint use_preedit : 1;
guint preediting : 1;
guint opened : 1;
guint focus : 1;
GdkRectangle cursor_location;
GtkIMContextIMEPrivate *priv;
};
struct _GtkIMContextIMEClass
{
GtkIMContextClass parent_class;
};
void gtk_im_context_ime_register_type (GTypeModule * type_module);
GtkIMContext *gtk_im_context_ime_new (void);

67
modules/input/imime.c Normal file
View File

@ -0,0 +1,67 @@
/*
* gtkimmoduleime
* Copyright (C) 2003 Takuro Ashie
*
* 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 <gtk/gtkimmodule.h>
#include "gtkimcontextime.h"
#include <string.h>
static const GtkIMContextInfo ime_info = {
"win32ime",
"Windows IME",
"gtk+",
"",
"*",
};
static const GtkIMContextInfo *info_list[] = {
&ime_info,
};
void
im_module_init (GTypeModule * module)
{
gtk_im_context_ime_register_type (module);
}
void
im_module_exit (void)
{
}
void
im_module_list (const GtkIMContextInfo *** contexts, int *n_contexts)
{
*contexts = info_list;
*n_contexts = G_N_ELEMENTS (info_list);
}
GtkIMContext *
im_module_create (const gchar * context_id)
{
g_return_val_if_fail (context_id, NULL);
if (!strcmp (context_id, "win32ime"))
return g_object_new (GTK_TYPE_IM_CONTEXT_IME, NULL);
else
return NULL;
}

49
modules/input/imm-extra.h Normal file
View File

@ -0,0 +1,49 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* $Id$ */
#include <windows.h>
#include <imm.h>
/* these aren't defined in Cygwin's imm.h */
#ifndef WM_IME_REQUEST
# define WM_IME_REQUEST 0x0288
#endif /* WM_IME_REQUEST */
#ifndef IMR_COMPOSITIONWINDOW
# define IMR_COMPOSITIONWINDOW 0x0001
#endif /* IMR_COMPOSITIONWINDOW */
#ifndef IMR_CANDIDATEWINDOW
# define IMR_CANDIDATEWINDOW 0x0002
#endif /* IMR_CANDIDATEWINDOW */
#ifndef IMR_COMPOSITIONFONT
# define IMR_COMPOSITIONFONT 0x0003
#endif /* IMR_COMPOSITIONFONT */
#ifndef IMR_RECONVERTSTRING
# define IMR_RECONVERTSTRING 0x0004
#endif /* IMR_RECONVERTSTRING */
#ifndef IMR_CONFIRMRECONVERTSTRING
# define IMR_CONFIRMRECONVERTSTRING 0x0005
#endif /* IMR_CONFIRMRECONVERTSTRING */
#ifndef IMR_QUERYCHARPOSITION
# define IMR_QUERYCHARPOSITION 0x0006
typedef struct tagIMECHARPOSITION {
DWORD dwSize;
DWORD dwCharPos;
POINT pt;
UINT cLineHeight;
RECT rcDocument;
} IMECHARPOSITION, *PIMECHARPOSITION;
#endif /* IMR_QUERYCHARPOSITION */
#ifndef IMR_DOCUMENTFEED
# define IMR_DOCUMENTFEED 0x0007
#endif /* IMR_DOCUMENTFEED */