do
{
Evas_Object_Textblock_Text_Item *new_ti;
+ /* FIXME: We assume here that it's ok to have an empty item with
+ * no text nodes, make sure it's the case. */
if (ti->parent.text_node)
{
- cutoff = evas_bidi_end_of_run_get(ti->parent.text_node->bidi_props,
+ cutoff = evas_common_script_end_of_run_get(
+ eina_ustrbuf_string_get(ti->parent.text_node->unicode),
+ ti->parent.text_node->bidi_props,
ti->parent.text_pos, len);
if (cutoff > 0)
{
evas_tiler.c \
evas_regionbuf.c \
evas_pipe.c \
-evas_bidi_utils.c \
+language/evas_bidi_utils.c \
+language/evas_script_utils.c \
evas_map_image.c \
evas_map_image.h
evas_scale_smooth_scaler_up.c \
evas_scale_span.h \
evas_pipe.h \
-evas_bidi_utils.h \
+language/evas_bidi_utils.h \
+language/evas_script_utils.h \
evas_map_image_internal.c \
evas_map_image_core.c \
evas_map_image_loop.c
#ifndef _EVAS_FONT_H
#define _EVAS_FONT_H
-#include "evas_bidi_utils.h"
+#include "language/evas_bidi_utils.h"
/* main */
#include "evas_private.h"
#include "evas_blend_private.h"
-#include "evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
+#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
#include "evas_font_private.h" /* for Frame-Queuing support */
#define WORD_CACHE_MAXLEN 50
#include "evas_common.h"
-#include "evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
+#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
#include "evas_font_private.h" /* for Frame-Queuing support */
EAPI int
#ifndef _EVAS_PIPE_H
#define _EVAS_PIPE_H
-#include "evas_bidi_utils.h"
+#include "language/evas_bidi_utils.h"
#ifdef BUILD_PTHREAD
typedef struct _Thinfo
#endif
#include <Eina.h>
-#include "evas_common.h"
#ifdef USE_FRIBIDI
# include <fribidi/fribidi.h>
#endif
};
+#include "evas_common.h"
struct _Evas_BiDi_Props {
Evas_BiDi_Direction dir;
};
--- /dev/null
+/**
+ * @internal
+ * @addtogroup Evas_Utils
+ *
+ * @{
+ */
+/**
+ * @internal
+ * @defgroup Evas_Script Evas Script (language) utility functions
+ *
+ * This set of functions and types helps evas handle scripts correctly.
+ * @todo Document types, structures and macros.
+ *
+ * @{
+ */
+#include <Eina.h>
+
+#include "evas_script_utils.h"
+#include "evas_bidi_utils.h" /* Used for fallback. */
+int
+evas_common_script_end_of_run_get(const Eina_Unicode *str,
+ const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len)
+{
+ /* FIXME: Currently we fall back to bidi runs, should fix */
+ (void) str;
+#ifdef BIDI_SUPPORT
+ return evas_bidi_end_of_run_get(bidi_props, start, len);
+#else
+ (void) bidi_props;
+ return 0;
+#endif
+}
+
+/*
+ * @}
+ */
+/*
+ * @}
+ */
+
--- /dev/null
+#ifndef _EVAS_SCRIPT_UTILS
+#define _EVAS_SCRIPT_UTILS
+
+#include <Eina.h>
+#include "evas_bidi_utils.h"
+
+int
+evas_common_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
+
+#endif
+
#ifdef BUILD_PIPE_RENDER
#include "../engines/common/evas_map_image.h"
-#include "../engines/common/evas_bidi_utils.h"
+#include "../engines/common/language/evas_bidi_utils.h"
struct _RGBA_Pipe_Op
{
#include "../file/evas_module.h"
#include "../file/evas_path.h"
-#include "../engines/common/evas_bidi_utils.h"
+#include "../engines/common/language/evas_bidi_utils.h"
+#include "../engines/common/language/evas_script_utils.h"
#ifdef EVAS_MAGIC_DEBUG
/* complain when peole pass in wrong object types etc. */