Commit 207757e7 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Destroy widgets _after_ propagating unrealize signals through the widget

Mon Dec  7 10:27:09 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
	signals through the widget heirarchy. This is unpleasant, as it
	causes more X traffic, but is necessary, because we have to clean
	up our Input Contexts before destroying the X windows.
	(from matsu-981109-0.patch)

Mon Dec  7 10:18:18 1998  Owen Taylor  <otaylor@redhat.com>

	Applied gtk-a-higuti-981202-0 :
	[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]

	* gdk/gdk.h gdk/gdk.c
		(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
			implemented by a combination of Xlib functions, so
			it works even with X_LOCALE.
		(gdk_wcstombs): New function.
		(g_mbtowc): Removed. No longer needed.

	* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
	        Added _wc() variants to gdk_text_width(),
		gdk_char_width(), gdk_draw_text(),

	* gdk/gdki18n.h
		(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
		 wcslen, wcscpy, wcsncpy):
			Removed. No longer needed.
		(iswalnum): Removed.
		(gdk_iswalnum): New macro.
		(gdk_iswspace): New macro.
	* gdk/gdktype.h
		(GdkWChar): New typedef.

	* gtk/gtkentry.h, gtk/gtkentry.c
		There are many changes according to the change of the
		internal representation of text, from multibyte string
		to wide characters.
	* gtk/gtkprivate.h, gtk/gtkmain.c
		Removed the variable gtk_use_mb and related codes.
	* gtk/gtkspinbutton.c
		Some changes according to the change of type of entry->text.
	* gtk/gtktext.h, gtk/gtktext.c
		Changed the internal representation of text. We use GdkWchar
		if a fontset is supplied. If not, we use guchar to save
		memory.
parent af842271
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
Tue Dec 1 15:20:39 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_new): When creating
a window with a specified non-system visual, use
a matching colormap.
Mon Nov 30 11:50:13 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdkim.c gdk/gdkprivate.h gdk/gdk.h
gdk/gdktypes.h gtk/gtkeditable.c gtk/gtkmain.c
gtk/gtkentry.c gtk/gtktext.c:
Applied matsu-981109-0
[ matsu@arch.comp.kyutech.ac.jp (Takashi Matsuda) ]
- Change system of setting input method values
from varargs to a structure, similar to GC's
or window attributes.
- Various fixes to event handling.
Also:
* gdk/gdkim.c: Split of input method stuff into
a separate source file.
* Remove GdkIM typedef, change everything from
GdkIC to GdkIC * to be consistent with the
rest of GTK.
Wed Dec 9 00:41:41 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Allocate
......
......@@ -24,6 +24,7 @@ libgdk_la_SOURCES = \
gdkfont.c \
gdkgc.c \
gdkglobals.c \
gdkim.c \
gdkimage.c \
gdkinput.c \
gdkinput.h \
......@@ -53,7 +54,7 @@ gdkinclude_HEADERS = \
gdk.h \
gdkcursors.h \
gdkrgb.h \
gdki18n.h \
gdki18n.h \
gdkkeysyms.h \
gdkprivate.h \
gdktypes.h \
......
This diff is collapsed.
......@@ -22,7 +22,6 @@
#include <gdk/gdktypes.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
......@@ -571,8 +570,13 @@ gint gdk_string_width (GdkFont *font,
gint gdk_text_width (GdkFont *font,
const gchar *text,
gint text_length);
gint gdk_text_width_wc (GdkFont *font,
const GdkWChar *text,
gint text_length);
gint gdk_char_width (GdkFont *font,
gchar character);
gint gdk_char_width_wc (GdkFont *font,
GdkWChar character);
gint gdk_string_measure (GdkFont *font,
const gchar *string);
gint gdk_text_measure (GdkFont *font,
......@@ -642,14 +646,21 @@ void gdk_draw_string (GdkDrawable *drawable,
GdkGC *gc,
gint x,
gint y,
const gchar *string);
const gchar *string);
void gdk_draw_text (GdkDrawable *drawable,
GdkFont *font,
GdkGC *gc,
gint x,
gint y,
const gchar *text,
const gchar *text,
gint text_length);
void gdk_draw_text_wc (GdkDrawable *drawable,
GdkFont *font,
GdkGC *gc,
gint x,
gint y,
const GdkWChar *text,
gint text_length);
void gdk_draw_pixmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
......@@ -798,25 +809,35 @@ GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
gint gdk_im_ready (void);
void gdk_im_begin (GdkIC ic,
GdkWindow* window);
void gdk_im_begin (GdkIC *ic,
GdkWindow *window);
void gdk_im_end (void);
GdkIMStyle gdk_im_decide_style (GdkIMStyle supported_style);
GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style);
GdkIC gdk_ic_new (GdkWindow* client_window,
GdkWindow* focus_window,
GdkIMStyle style, ...);
void gdk_ic_destroy (GdkIC ic);
GdkIMStyle gdk_ic_get_style (GdkIC ic);
void gdk_ic_set_values (GdkIC ic,
...);
void gdk_ic_get_values (GdkIC ic,
...);
void gdk_ic_set_attr (GdkIC ic,
const char *target, ...);
void gdk_ic_get_attr (GdkIC ic,
const char *target, ...);
GdkEventMask gdk_ic_get_events (GdkIC ic);
GdkIMStyle gdk_im_decide_style (GdkIMStyle supported_style);
GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style);
GdkIC* gdk_ic_new (GdkICAttr *attr,
GdkICAttributesType mask);
void gdk_ic_destroy (GdkIC *ic);
GdkIMStyle gdk_ic_get_style (GdkIC *ic);
GdkEventMask gdk_ic_get_events (GdkIC *ic);
GdkICAttr* gdk_ic_attr_new (void);
void gdk_ic_attr_destroy (GdkICAttr *attr);
GdkICAttributesType gdk_ic_set_attr (GdkIC *ic,
GdkICAttr *attr,
GdkICAttributesType mask);
GdkICAttributesType gdk_ic_get_attr (GdkIC *ic,
GdkICAttr *attr,
GdkICAttributesType mask);
/* Conversion functions between wide char and multibyte strings.
*/
gchar *gdk_wcstombs (const GdkWChar *src);
gint gdk_mbstowcs (GdkWChar *dest,
const gchar *src,
gint dest_max);
/* Color Context */
......
......@@ -293,6 +293,66 @@ gdk_draw_text (GdkDrawable *drawable,
g_error("undefined font type\n");
}
void
gdk_draw_text_wc (GdkDrawable *drawable,
GdkFont *font,
GdkGC *gc,
gint x,
gint y,
const GdkWChar *text,
gint text_length)
{
GdkWindowPrivate *drawable_private;
GdkFontPrivate *font_private;
GdkGCPrivate *gc_private;
g_return_if_fail (drawable != NULL);
g_return_if_fail (font != NULL);
g_return_if_fail (gc != NULL);
g_return_if_fail (text != NULL);
drawable_private = (GdkWindowPrivate*) drawable;
if (drawable_private->destroyed)
return;
gc_private = (GdkGCPrivate*) gc;
font_private = (GdkFontPrivate*) font;
if (font->type == GDK_FONT_FONT)
{
XFontStruct *xfont = (XFontStruct *) font_private->xfont;
gchar *text_8bit;
gint i;
XSetFont(drawable_private->xdisplay, gc_private->xgc, xfont->fid);
text_8bit = g_new (gchar, text_length);
for (i=0; i<text_length; i++) text_8bit[i] = text[i];
XDrawString (drawable_private->xdisplay, drawable_private->xwindow,
gc_private->xgc, x, y, text_8bit, text_length);
g_free (text_8bit);
}
else if (font->type == GDK_FONT_FONTSET)
{
if (sizeof(GdkWChar) == sizeof(wchar_t))
{
XwcDrawString (drawable_private->xdisplay, drawable_private->xwindow,
(XFontSet) font_private->xfont,
gc_private->xgc, x, y, (wchar_t *)text, text_length);
}
else
{
wchar_t *text_wchar;
gint i;
text_wchar = g_new (wchar_t, text_length);
for (i=0; i<text_length; i++) text_wchar[i] = text[i];
XwcDrawString (drawable_private->xdisplay, drawable_private->xwindow,
(XFontSet) font_private->xfont,
gc_private->xgc, x, y, text_wchar, text_length);
g_free (text_wchar);
}
}
else
g_error("undefined font type\n");
}
void
gdk_draw_pixmap (GdkDrawable *drawable,
GdkGC *gc,
......
......@@ -271,6 +271,62 @@ gdk_text_width (GdkFont *font,
return width;
}
gint
gdk_text_width_wc (GdkFont *font,
const GdkWChar *text,
gint text_length)
{
GdkFontPrivate *private;
gint width;
XFontStruct *xfont;
XFontSet fontset;
g_return_val_if_fail (font != NULL, -1);
g_return_val_if_fail (text != NULL, -1);