Commit caf8ebc6 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Reference count the fonts used in the text widget.

Mon Aug 24 18:37:15 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c: Reference count the fonts used in
	the text widget.

	* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
	freeing functions to be more consistent, and more
	convenient; leave the old names in for backwards compatibility.

	* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
	allocations in pseudo-color colormaps to greatly reduce
	calls to XAllocColor. Keep a per-colormap hashtable to
	speed up finding if there is an already-allocated matching
	color.

	* gdk/gdkcolor.c: Don't just match read the system colormap
	when the colormap is created, but synchronize our copy
	with the system colormap periodically.

	* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
	Change XIM constants names to match GDK conventions

	* gtk/testinput.c: Allow the drawing area to get the focus.

	* gtk/testgtk.c: Change around the Text test to demonstrates
	multiple fonts, use more colors.

	* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
	so they work after a widget is unrealized.

	* gtk/gtktext.[ch]: Remove the requirement that the text
	widget be realized before adding text (!) Allocate colors
	ourself, instead of requiring the caller allocate them.
	Allow changing styles to work properly by keeping track
	of the values for a certain property are default or
	set explicitely.

	* gtk/gtkmenu.h: Added some comments.

	* gtk/gtkentry.c: Changes to match XIM constants.

	* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
	for adding keyed data to drawables. (Uses g_dataset
	internally)

	* gdk/gdkpixmap.c: Keep track of the colors we allocate,
	when creating an XPM - store them as user data for the GdkPixmap,
	so we don't leak colors when we create pixmaps from XPM's.

	Allocate memory for color information in large blocks instead of
	as many little pieces.
parent b93d6892
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
Mon Aug 24 18:37:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: Reference count the fonts used in
the text widget.
* gdk/gdk.h gdk/gdkcolor.c: Rename the color allocation
freeing functions to be more consistent, and more
convenient; leave the old names in for backwards compatibility.
* gdk/gdkcolor.c gdk/gdkprivate.h: Reference count the
allocations in pseudo-color colormaps to greatly reduce
calls to XAllocColor. Keep a per-colormap hashtable to
speed up finding if there is an already-allocated matching
color.
* gdk/gdkcolor.c: Don't just match read the system colormap
when the colormap is created, but synchronize our copy
with the system colormap periodically.
* gdk/gdk.c gdk/gdktypes.h gtk/gtkentry.c gtk/gtktext.c:
Change XIM constants names to match GDK conventions
* gtk/testinput.c: Allow the drawing area to get the focus.
* gtk/testgtk.c: Change around the Text test to demonstrates
multiple fonts, use more colors.
* gtk/gtkwidget.c: Improve gtk_widget_get_colormap()/visual()
so they work after a widget is unrealized.
* gtk/gtktext.[ch]: Remove the requirement that the text
widget be realized before adding text (!) Allocate colors
ourself, instead of requiring the caller allocate them.
Allow changing styles to work properly by keeping track
of the values for a certain property are default or
set explicitely.
* gtk/gtkmenu.h: Added some comments.
* gtk/gtkentry.c: Changes to match XIM constants.
* gtk/gdk.h gdk/gdkwindow.c: Add gdk_drawable_set_data(),
for adding keyed data to drawables. (Uses g_dataset
internally)
* gdk/gdkpixmap.c: Keep track of the colors we allocate,
when creating an XPM - store them as user data for the GdkPixmap,
so we don't leak colors when we create pixmaps from XPM's.
Allocate memory for color information in large blocks instead of
as many little pieces.
Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org> Mon Aug 24 11:09:32 PDT 1998 Manish Singh <yosh@gimp.org>
* gdk/gdkrgb.c: removed some unused variables * gdk/gdkrgb.c: removed some unused variables
......
...@@ -271,3 +271,5 @@ Text/Edit widget: ...@@ -271,3 +271,5 @@ Text/Edit widget:
[ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ] [ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ]
- "changed" emitted when doing deletes on empty Text widget. - "changed" emitted when doing deletes on empty Text widget.
- Delete IC in editable->unrealize, not editable->finalize?
\ No newline at end of file
...@@ -446,15 +446,15 @@ gdk_init (int *argc, ...@@ -446,15 +446,15 @@ gdk_init (int *argc,
{ {
(*argv)[i++] = NULL; (*argv)[i++] = NULL;
if (strcmp ("none", (*argv)[i]) == 0) if (strcmp ("none", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMPreeditNone); gdk_im_set_best_style (GDK_IM_PREEDIT_NONE);
else if (strcmp ("nothing", (*argv)[i]) == 0) else if (strcmp ("nothing", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMPreeditNothing); gdk_im_set_best_style (GDK_IM_PREEDIT_NOTHING);
else if (strcmp ("area", (*argv)[i]) == 0) else if (strcmp ("area", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMPreeditArea); gdk_im_set_best_style (GDK_IM_PREEDIT_AREA);
else if (strcmp ("position", (*argv)[i]) == 0) else if (strcmp ("position", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMPreeditPosition); gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
else if (strcmp ("callbacks", (*argv)[i]) == 0) else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMPreeditCallbacks); gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
} }
} }
else if (strcmp ("--xim-status", (*argv)[i]) == 0) else if (strcmp ("--xim-status", (*argv)[i]) == 0)
...@@ -463,13 +463,13 @@ gdk_init (int *argc, ...@@ -463,13 +463,13 @@ gdk_init (int *argc,
{ {
(*argv)[i++] = NULL; (*argv)[i++] = NULL;
if (strcmp ("none", (*argv)[i]) == 0) if (strcmp ("none", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMStatusNone); gdk_im_set_best_style (GDK_IM_STATUS_NONE);
else if (strcmp ("nothing", (*argv)[i]) == 0) else if (strcmp ("nothing", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMStatusNothing); gdk_im_set_best_style (GDK_IM_STATUS_NOTHING);
else if (strcmp ("area", (*argv)[i]) == 0) else if (strcmp ("area", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMStatusArea); gdk_im_set_best_style (GDK_IM_STATUS_AREA);
else if (strcmp ("callbacks", (*argv)[i]) == 0) else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GdkIMStatusCallbacks); gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
} }
} }
#endif #endif
...@@ -584,10 +584,10 @@ gdk_init (int *argc, ...@@ -584,10 +584,10 @@ gdk_init (int *argc,
xim_using = FALSE; xim_using = FALSE;
xim_im = NULL; xim_im = NULL;
xim_styles = NULL; xim_styles = NULL;
if (!(xim_best_allowed_style & GdkIMPreeditMask)) if (!(xim_best_allowed_style & GDK_IM_PREEDIT_MASK))
gdk_im_set_best_style (GdkIMPreeditCallbacks); gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
if (!(xim_best_allowed_style & GdkIMStatusMask)) if (!(xim_best_allowed_style & GDK_IM_STATUS_MASK))
gdk_im_set_best_style (GdkIMStatusCallbacks); gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
xim_ic = NULL; xim_ic = NULL;
xim_window = (GdkWindow*)NULL; xim_window = (GdkWindow*)NULL;
...@@ -3570,34 +3570,34 @@ gdk_im_choose_better_style (GdkIMStyle style1, GdkIMStyle style2) ...@@ -3570,34 +3570,34 @@ gdk_im_choose_better_style (GdkIMStyle style1, GdkIMStyle style2)
if (style1 == 0) return style2; if (style1 == 0) return style2;
if (style2 == 0) return style1; if (style2 == 0) return style1;
if ((style1 & (GdkIMPreeditMask | GdkIMStatusMask)) if ((style1 & (GDK_IM_PREEDIT_MASK | GDK_IM_STATUS_MASK))
== (style2 & (GdkIMPreeditMask | GdkIMStatusMask))) == (style2 & (GDK_IM_PREEDIT_MASK | GDK_IM_STATUS_MASK)))
return style1; return style1;
s1 = style1 & GdkIMPreeditMask; s1 = style1 & GDK_IM_PREEDIT_MASK;
s2 = style2 & GdkIMPreeditMask; s2 = style2 & GDK_IM_PREEDIT_MASK;
u = s1 | s2; u = s1 | s2;
if (s1 != s2) { if (s1 != s2) {
if (u & GdkIMPreeditCallbacks) if (u & GDK_IM_PREEDIT_CALLBACKS)
return (s1 == GdkIMPreeditCallbacks)? style1:style2; return (s1 == GDK_IM_PREEDIT_CALLBACKS)? style1:style2;
else if (u & GdkIMPreeditPosition) else if (u & GDK_IM_PREEDIT_POSITION)
return (s1 == GdkIMPreeditPosition)? style1:style2; return (s1 == GDK_IM_PREEDIT_POSITION)? style1:style2;
else if (u & GdkIMPreeditArea) else if (u & GDK_IM_PREEDIT_AREA)
return (s1 == GdkIMPreeditArea)? style1:style2; return (s1 == GDK_IM_PREEDIT_AREA)? style1:style2;
else if (u & GdkIMPreeditNothing) else if (u & GDK_IM_PREEDIT_NOTHING)
return (s1 == GdkIMPreeditNothing)? style1:style2; return (s1 == GDK_IM_PREEDIT_NOTHING)? style1:style2;
} else { } else {
s1 = style1 & GdkIMStatusMask; s1 = style1 & GDK_IM_STATUS_MASK;
s2 = style2 & GdkIMStatusMask; s2 = style2 & GDK_IM_STATUS_MASK;
u = s1 | s2; u = s1 | s2;
if ( u & GdkIMStatusCallbacks) if ( u & GDK_IM_STATUS_CALLBACKS)
return (s1 == GdkIMStatusCallbacks)? style1:style2; return (s1 == GDK_IM_STATUS_CALLBACKS)? style1:style2;
else if ( u & GdkIMStatusArea) else if ( u & GDK_IM_STATUS_AREA)
return (s1 == GdkIMStatusArea)? style1:style2; return (s1 == GDK_IM_STATUS_AREA)? style1:style2;
else if ( u & GdkIMStatusNothing) else if ( u & GDK_IM_STATUS_NOTHING)
return (s1 == GdkIMStatusNothing)? style1:style2; return (s1 == GDK_IM_STATUS_NOTHING)? style1:style2;
else if ( u & GdkIMStatusNone) else if ( u & GDK_IM_STATUS_NONE)
return (s1 == GdkIMStatusNone)? style1:style2; return (s1 == GDK_IM_STATUS_NONE)? style1:style2;
} }
return 0; /* Get rid of stupid warning */ return 0; /* Get rid of stupid warning */
} }
...@@ -3623,39 +3623,39 @@ gdk_im_decide_style (GdkIMStyle supported_style) ...@@ -3623,39 +3623,39 @@ gdk_im_decide_style (GdkIMStyle supported_style)
GdkIMStyle GdkIMStyle
gdk_im_set_best_style (GdkIMStyle style) gdk_im_set_best_style (GdkIMStyle style)
{ {
if (style & GdkIMPreeditMask) if (style & GDK_IM_PREEDIT_MASK)
{ {
xim_best_allowed_style &= ~GdkIMPreeditMask; xim_best_allowed_style &= ~GDK_IM_PREEDIT_MASK;
xim_best_allowed_style |= GdkIMPreeditNone; xim_best_allowed_style |= GDK_IM_PREEDIT_NONE;
if (!(style & GdkIMPreeditNone)) if (!(style & GDK_IM_PREEDIT_NONE))
{ {
xim_best_allowed_style |= GdkIMPreeditNothing; xim_best_allowed_style |= GDK_IM_PREEDIT_NOTHING;
if (!(style & GdkIMPreeditNothing)) if (!(style & GDK_IM_PREEDIT_NOTHING))
{ {
xim_best_allowed_style |= GdkIMPreeditArea; xim_best_allowed_style |= GDK_IM_PREEDIT_AREA;
if (!(style & GdkIMPreeditArea)) if (!(style & GDK_IM_PREEDIT_AREA))
{ {
xim_best_allowed_style |= GdkIMPreeditPosition; xim_best_allowed_style |= GDK_IM_PREEDIT_POSITION;
if (!(style & GdkIMPreeditPosition)) if (!(style & GDK_IM_PREEDIT_POSITION))
xim_best_allowed_style |= GdkIMPreeditCallbacks; xim_best_allowed_style |= GDK_IM_PREEDIT_CALLBACKS;
} }
} }
} }
} }
if (style & GdkIMStatusMask) if (style & GDK_IM_STATUS_MASK)
{ {
xim_best_allowed_style &= ~GdkIMStatusMask; xim_best_allowed_style &= ~GDK_IM_STATUS_MASK;
xim_best_allowed_style |= GdkIMStatusNone; xim_best_allowed_style |= GDK_IM_STATUS_NONE;
if (!(style & GdkIMStatusNone)) if (!(style & GDK_IM_STATUS_NONE))
{ {
xim_best_allowed_style |= GdkIMStatusNothing; xim_best_allowed_style |= GDK_IM_STATUS_NOTHING;
if (!(style & GdkIMStatusNothing)) if (!(style & GDK_IM_STATUS_NOTHING))
{ {
xim_best_allowed_style |= GdkIMStatusArea; xim_best_allowed_style |= GDK_IM_STATUS_AREA;
if (!(style & GdkIMStatusArea)) if (!(style & GDK_IM_STATUS_AREA))
xim_best_allowed_style |= GdkIMStatusCallbacks; xim_best_allowed_style |= GDK_IM_STATUS_CALLBACKS;
} }
} }
} }
...@@ -3960,13 +3960,13 @@ gdk_im_end (void) ...@@ -3960,13 +3960,13 @@ gdk_im_end (void)
GdkIMStyle GdkIMStyle
gdk_im_decide_style (GdkIMStyle supported_style) gdk_im_decide_style (GdkIMStyle supported_style)
{ {
return GdkIMPreeditNone | GdkIMStatusNone; return GDK_IM_PREEDIT_NONE | GDK_IM_STATUS_NONE;
} }
GdkIMStyle GdkIMStyle
gdk_im_set_best_style (GdkIMStyle style) gdk_im_set_best_style (GdkIMStyle style)
{ {
return GdkIMPreeditNone | GdkIMStatusNone; return GDK_IM_PREEDIT_NONE | GDK_IM_STATUS_NONE;
} }
gint gint
...@@ -3991,7 +3991,7 @@ gdk_ic_destroy (GdkIC ic) ...@@ -3991,7 +3991,7 @@ gdk_ic_destroy (GdkIC ic)
GdkIMStyle GdkIMStyle
gdk_ic_get_style (GdkIC ic) gdk_ic_get_style (GdkIC ic)
{ {
return GdkIMPreeditNone | GdkIMStatusNone; return GDK_IM_PREEDIT_NONE | GDK_IM_STATUS_NONE;
} }
void void
......
...@@ -307,6 +307,11 @@ void gdk_window_set_functions (GdkWindow *window, ...@@ -307,6 +307,11 @@ void gdk_window_set_functions (GdkWindow *window,
GdkWMFunction functions); GdkWMFunction functions);
GList * gdk_window_get_toplevels (void); GList * gdk_window_get_toplevels (void);
void gdk_drawable_set_data (GdkDrawable *drawable,
const gchar *key,
gpointer data,
GDestroyNotify destroy_func);
/* Cursors /* Cursors
*/ */
...@@ -455,6 +460,22 @@ gint gdk_colormap_get_system_size (void); ...@@ -455,6 +460,22 @@ gint gdk_colormap_get_system_size (void);
void gdk_colormap_change (GdkColormap *colormap, void gdk_colormap_change (GdkColormap *colormap,
gint ncolors); gint ncolors);
gint gdk_colormap_alloc_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors,
gboolean writeable,
gboolean best_match,
gboolean *success);
gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
GdkColor *color,
gboolean writeable,
gboolean best_match);
void gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors);
void gdk_colors_store (GdkColormap *colormap, void gdk_colors_store (GdkColormap *colormap,
GdkColor *colors, GdkColor *colors,
gint ncolors); gint ncolors);
...@@ -482,8 +503,10 @@ gint gdk_color_alloc (GdkColormap *colormap, ...@@ -482,8 +503,10 @@ gint gdk_color_alloc (GdkColormap *colormap,
GdkColor *color); GdkColor *color);
gint gdk_color_change (GdkColormap *colormap, gint gdk_color_change (GdkColormap *colormap,
GdkColor *color); GdkColor *color);
gint gdk_color_equal (GdkColor *colora, guint gdk_color_hash (const GdkColor *colora,
GdkColor *colorb); const GdkColor *colorb);
gint gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
/* Fonts /* Fonts
...@@ -722,22 +745,27 @@ GdkTimeCoord *gdk_input_motion_events (GdkWindow *window, ...@@ -722,22 +745,27 @@ GdkTimeCoord *gdk_input_motion_events (GdkWindow *window,
/* International Input Method Support Functions /* International Input Method Support Functions
*/ */
gint gdk_im_ready (void); gint gdk_im_ready (void);
void gdk_im_begin (GdkIC ic, GdkWindow* window); void gdk_im_begin (GdkIC ic,
void gdk_im_end (void); GdkWindow* window);
GdkIMStyle gdk_im_decide_style (GdkIMStyle supported_style); void gdk_im_end (void);
GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style); GdkIMStyle gdk_im_decide_style (GdkIMStyle supported_style);
GdkIC gdk_ic_new (GdkWindow* client_window, GdkIMStyle gdk_im_set_best_style (GdkIMStyle best_allowed_style);
GdkWindow* focus_window, GdkIC gdk_ic_new (GdkWindow* client_window,
GdkIMStyle style, ...); GdkWindow* focus_window,
void gdk_ic_destroy (GdkIC ic); GdkIMStyle style, ...);
GdkIMStyle gdk_ic_get_style (GdkIC ic); void gdk_ic_destroy (GdkIC ic);
void gdk_ic_set_values (GdkIC ic, ...); GdkIMStyle gdk_ic_get_style (GdkIC ic);
void gdk_ic_get_values (GdkIC ic, ...); void gdk_ic_set_values (GdkIC ic,
void gdk_ic_set_attr (GdkIC ic, const char *target, ...); ...);
void gdk_ic_get_attr (GdkIC ic, const char *target, ...); void gdk_ic_get_values (GdkIC ic,
GdkEventMask gdk_ic_get_events (GdkIC ic); ...);
void gdk_ic_set_attr (GdkIC ic,
const char *target, ...);