From 207757e70d8b2d9aa8335d968fd7ac79796264ab Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 9 Dec 1998 06:36:57 +0000 Subject: Destroy widgets _after_ propagating unrealize signals through the widget Mon Dec 7 10:27:09 1998 Owen Taylor * 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 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. --- gdk/gdki18n.h | 123 ++-------------------------------------------------------- 1 file changed, 4 insertions(+), 119 deletions(-) (limited to 'gdk/gdki18n.h') diff --git a/gdk/gdki18n.h b/gdk/gdki18n.h index f2bf8553df..c7dba9e702 100644 --- a/gdk/gdki18n.h +++ b/gdk/gdki18n.h @@ -28,124 +28,6 @@ #include -#ifdef X_LOCALE - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -_XFUNCPROTOBEGIN -extern int _Xmblen ( -#if NeedFunctionPrototypes - const char *s, size_t n -#endif - -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern int _Xmbtowc ( -#if NeedFunctionPrototypes - wchar_t *wstr, const char *str, size_t len -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern int _Xwctomb ( -#if NeedFunctionPrototypes - char *str, wchar_t wc -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern size_t _Xmbstowcs ( -#if NeedFunctionPrototypes - wchar_t *wstr, const char *str, size_t len -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern size_t _Xwcstombs ( -#if NeedFunctionPrototypes - char *str, const wchar_t *wstr, size_t len -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern size_t _Xwcslen ( -#if NeedFunctionPrototypes - const wchar_t *wstr -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern wchar_t* _Xwcscpy ( -#if NeedFunctionPrototypes - wchar_t *wstr1, const wchar_t *wstr2 -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern wchar_t* _Xwcsncpy ( -#if NeedFunctionPrototypes - wchar_t *wstr1, const wchar_t *wstr2, size_t len -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern int _Xwcscmp ( -#if NeedFunctionPrototypes - const wchar_t *wstr1, const wchar_t *wstr2 -#endif -); -_XFUNCPROTOEND - -_XFUNCPROTOBEGIN -extern int _Xwcsncmp ( -#if NeedFunctionPrototypes - const wchar_t *wstr1, const wchar_t *wstr2, size_t len -#endif -); -_XFUNCPROTOEND - -/* - * mblen, mbtowc, and mbstowcs of the locale "ja_JP.eucJP" are buggy. - */ - -#ifdef MB_CUR_MAX -# undef MB_CUR_MAX -#endif -#define MB_CUR_MAX 4 -extern int _g_mbtowc (wchar_t *wstr, const char *str, size_t len); - -/* #define mblen _Xmblen */ -/* #define mbtowc _Xmbtowc */ -#define mblen(a,b) _g_mbtowc ((wchar_t *)(NULL), (a), (b)) -#define mbtowc(a,b,c) _g_mbtowc ((a),(b),(c)) - -#define wctomb(a,b) _Xwctomb ((a),(b)) -#define mbstowcs(a,b,c) _Xmbstowcs ((a),(b),(c)) -#define wcstombs(a,b,c) _Xwcstombs ((a),(b),(c)) -#define wcslen(a) _Xwcslen ((a)) -#define wcscpy(a,b) _Xwcscpy ((a),(b)) -#define wcsncpy(a,b,c) _Xwcsncpy ((a),(b),(c)) - -#ifdef __cplusplus -} -#endif - -#endif /* X_LOCALE */ - #if !defined(G_HAVE_BROKEN_WCTYPE) && (defined(G_HAVE_WCTYPE_H) || defined(G_HAVE_WCHAR_H)) && !defined(X_LOCALE) # ifdef G_HAVE_WCTYPE_H # include @@ -154,8 +36,11 @@ extern int _g_mbtowc (wchar_t *wstr, const char *str, size_t len); # include # endif # endif +# define gdk_iswalnum(c) iswalnum(c) +# define gdk_iswspace(c) iswspace(c) #else -# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) +# define gdk_iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c)) +# define gdk_iswspace(c) ((wchar_t)(c) <= 0xFF && isspace(c)) #endif #endif /* __GDK_I18N_H__ */ -- cgit v1.2.1