forked from AuroraMiddleware/gtk
gdk: Add a copy of pango_unichar_direction
This api has been deprecated in pango.
This commit is contained in:
parent
3e5a7bb898
commit
8c973bd837
19
gdk/gdk.c
19
gdk/gdk.c
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user