Commit 998314b8 authored by Matthias Clasen's avatar Matthias Clasen

gdk: Add a copy of pango_unichar_direction

This api has been deprecated in pango.
parent 417c57e5
......@@ -41,6 +41,8 @@
#include <string.h>
#include <stdlib.h>
#include <fribidi.h>
/**
* SECTION:general
......@@ -1113,3 +1115,20 @@ gdk_disable_multidevice (void)
_gdk_disable_multidevice = TRUE;
}
PangoDirection
gdk_unichar_direction (gunichar ch)
{
FriBidiCharType fribidi_ch_type;
G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar));
fribidi_ch_type = fribidi_get_bidi_type (ch);
if (!FRIBIDI_IS_STRONG (fribidi_ch_type))
return PANGO_DIRECTION_NEUTRAL;
else if (FRIBIDI_IS_RTL (fribidi_ch_type))
return PANGO_DIRECTION_RTL;
else
return PANGO_DIRECTION_LTR;
}
......@@ -558,6 +558,8 @@ cairo_surface_t * _gdk_offscreen_window_create_surface (GdkWindow *window,
gint width,
gint height);
PangoDirection gdk_unichar_direction (gunichar ch);
G_END_DECLS
#endif /* __GDK_INTERNALS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment