summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_common_private.h
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2017-11-07 11:22:09 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-07 11:34:53 +0900
commitb038d7df25f9cecaa4f0d8c1c7355e4852e5348a (patch)
tree595da7d0114056e147d4a40fedc72d5b71b3927a /src/lib/evas/include/evas_common_private.h
parenta75b3dcdfbe0760972c8b4d55a90dc6250bd1e45 (diff)
Remove evas internal dependency from the evas_font module
Summary: dev branch : devs/subhransu/font The Final goal is to move the evas_font module to ector so that both ector and evas can reuse the code. make the api simple so that sam eapi can be used by evas_textblock and ector text. This is the 1st stage to achive that gola, first remove the evas internal dependancy as much as possible before moving to ector library. Reviewers: jpeg, raster, herdsman, cedric, id213sin Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5419
Diffstat (limited to 'src/lib/evas/include/evas_common_private.h')
-rw-r--r--src/lib/evas/include/evas_common_private.h181
1 files changed, 4 insertions, 177 deletions
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 12cda89d02..4f731d4e79 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -63,6 +63,8 @@
63 63
64#include "Evas_Internal.h" 64#include "Evas_Internal.h"
65 65
66#include "../common/evas_font.h"
67
66#ifdef EAPI 68#ifdef EAPI
67# undef EAPI 69# undef EAPI
68#endif 70#endif
@@ -224,20 +226,6 @@ extern EAPI int _evas_log_dom_global;
224# define THI(x) int x 226# define THI(x) int x
225# define TH_MAX 8 227# define TH_MAX 8
226 228
227#include <ft2build.h>
228#include FT_FREETYPE_H
229#include FT_GLYPH_H
230#include FT_SIZES_H
231#include FT_MODULE_H
232
233#ifndef FT_HAS_COLOR
234# define FT_HAS_COLOR(face) 0
235#endif
236
237#ifndef FT_LOAD_COLOR
238# define FT_LOAD_COLOR FT_LOAD_DEFAULT
239#endif
240
241#ifdef __GNUC__ 229#ifdef __GNUC__
242# if __GNUC__ >= 4 230# if __GNUC__ >= 4
243// BROKEN in gcc 4 on amd64 231// BROKEN in gcc 4 on amd64
@@ -430,11 +418,6 @@ typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
430typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point; 418typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
431typedef struct _RGBA_Map_Point RGBA_Map_Point; 419typedef struct _RGBA_Map_Point RGBA_Map_Point;
432typedef struct _RGBA_Map RGBA_Map; 420typedef struct _RGBA_Map RGBA_Map;
433typedef struct _RGBA_Font RGBA_Font;
434typedef struct _RGBA_Font_Int RGBA_Font_Int;
435typedef struct _RGBA_Font_Source RGBA_Font_Source;
436typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
437typedef struct _RGBA_Font_Glyph_Out RGBA_Font_Glyph_Out;
438typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor; 421typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
439typedef struct _RGBA_Image_Data_Map RGBA_Image_Data_Map; 422typedef struct _RGBA_Image_Data_Map RGBA_Image_Data_Map;
440 423
@@ -478,6 +461,8 @@ typedef void (*Evas_Engine_Thread_Task_Cb)(void *engine_data, Image_Entry *ie, v
478#include "../cache2/evas_cache2.h" 461#include "../cache2/evas_cache2.h"
479#endif 462#endif
480 463
464#include "../common/evas_font_draw.h"
465
481/*****************************************************************************/ 466/*****************************************************************************/
482 467
483typedef void (*Evas_Thread_Command_Cb)(void *data); 468typedef void (*Evas_Thread_Command_Cb)(void *data);
@@ -536,20 +521,6 @@ typedef enum _CPU_Features
536 CPU_FEATURE_SSE3 = (1 << 7) 521 CPU_FEATURE_SSE3 = (1 << 7)
537} CPU_Features; 522} CPU_Features;
538 523
539typedef enum _Font_Hint_Flags
540{
541 FONT_NO_HINT,
542 FONT_AUTO_HINT,
543 FONT_BYTECODE_HINT
544} Font_Hint_Flags;
545
546typedef enum _Font_Rend_Flags
547{
548 FONT_REND_REGULAR = 0,
549 FONT_REND_SLANT = (1 << 0),
550 FONT_REND_WEIGHT = (1 << 1),
551} Font_Rend_Flags;
552
553/*****************************************************************************/ 524/*****************************************************************************/
554 525
555struct _Image_Entry_Flags 526struct _Image_Entry_Flags
@@ -792,7 +763,6 @@ struct _RGBA_Draw_Context
792 763
793#ifdef BUILD_PIPE_RENDER 764#ifdef BUILD_PIPE_RENDER
794#include "../common/evas_map_image.h" 765#include "../common/evas_map_image.h"
795#include "../common/evas_text_utils.h"
796 766
797struct _RGBA_Pipe_Op 767struct _RGBA_Pipe_Op
798{ 768{
@@ -947,146 +917,6 @@ struct _RGBA_Map
947 RGBA_Map_Point pts[1]; 917 RGBA_Map_Point pts[1];
948}; 918};
949 919
950// for fonts...
951/////
952typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
953typedef struct _Fash_Int_Map Fash_Int_Map;
954typedef struct _Fash_Int_Map2 Fash_Int_Map2;
955typedef struct _Fash_Int Fash_Int;
956struct _Fash_Item_Index_Map
957{
958 RGBA_Font_Int *fint;
959 int index;
960};
961struct _Fash_Int_Map
962{
963 Fash_Item_Index_Map item[256];
964};
965struct _Fash_Int_Map2
966{
967 Fash_Int_Map *bucket[256];
968};
969struct _Fash_Int
970{
971 Fash_Int_Map2 *bucket[256];
972 void (*freeme) (Fash_Int *fash);
973};
974
975/////
976typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
977typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
978typedef struct _Fash_Glyph Fash_Glyph;
979struct _Fash_Glyph_Map
980{
981 RGBA_Font_Glyph *item[256];
982};
983struct _Fash_Glyph_Map2
984{
985 Fash_Glyph_Map *bucket[256];
986};
987struct _Fash_Glyph
988{
989 Fash_Glyph_Map2 *bucket[256];
990 void (*freeme) (Fash_Glyph *fash);
991};
992/////
993
994struct _RGBA_Font
995{
996 Eina_List *fonts;
997 Fash_Int *fash;
998 Font_Hint_Flags hinting;
999 int references;
1000 LK(lock);
1001 unsigned char sizeok : 1;
1002};
1003
1004#include "../common/evas_font_ot.h"
1005
1006struct _RGBA_Font_Int
1007{
1008 EINA_INLIST;
1009 RGBA_Font_Source *src;
1010 Eina_Hash *kerning;
1011 Fash_Glyph *fash;
1012 unsigned int size;
1013 float scale_factor;
1014 int real_size;
1015 int max_h;
1016 int references;
1017 int usage;
1018 struct {
1019 FT_Size size;
1020#ifdef USE_HARFBUZZ
1021 void *hb_font;
1022#endif
1023 } ft;
1024 LK(ft_mutex);
1025 Font_Hint_Flags hinting;
1026 Font_Rend_Flags wanted_rend; /* The wanted rendering style */
1027 Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime
1028 in order to comply with the wanted_rend. */
1029
1030 Eina_List *task;
1031#ifdef EVAS_CSERVE2
1032 void *cs2_handler;
1033#endif
1034
1035 int generation;
1036
1037 Efl_Text_Font_Bitmap_Scalable bitmap_scalable;
1038
1039 unsigned char sizeok : 1;
1040 unsigned char inuse : 1;
1041};
1042
1043struct _RGBA_Font_Source
1044{
1045 const char *name;
1046 const char *file;
1047 void *data;
1048 unsigned int current_size;
1049 int data_size;
1050 int references;
1051 struct {
1052 int orig_upem;
1053 FT_Face face;
1054 } ft;
1055};
1056
1057/*
1058 * laziness wins for now. The parts used from the freetpye struct are
1059 * kept intact to avoid changing the code using it until we know exactly
1060 * what needs to be changed
1061 */
1062struct _RGBA_Font_Glyph_Out
1063{
1064 unsigned char *rle;
1065 struct {
1066 unsigned char *buffer;
1067 unsigned short rows;
1068 unsigned short width;
1069 unsigned short pitch;
1070 unsigned short rle_alloc : 1;
1071 unsigned short no_free_glout : 1;
1072 } bitmap;
1073 int rle_size;
1074};
1075
1076struct _RGBA_Font_Glyph
1077{
1078 FT_UInt index;
1079 Evas_Coord width;
1080 Evas_Coord x_bear;
1081 Evas_Coord y_bear;
1082 FT_Glyph glyph;
1083 RGBA_Font_Glyph_Out *glyph_out;
1084 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
1085 void *ext_dat;
1086 void (*ext_dat_free) (void *ext_dat);
1087 RGBA_Font_Int *fi;
1088};
1089
1090struct _RGBA_Gfx_Compositor 920struct _RGBA_Gfx_Compositor
1091{ 921{
1092 const char *name; 922 const char *name;
@@ -1287,7 +1117,6 @@ EAPI void evas_common_blit_init (void);
1287EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y); 1117EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
1288 1118
1289/****/ 1119/****/
1290#include "../common/evas_font.h"
1291 1120
1292/****/ 1121/****/
1293EAPI void evas_common_tilebuf_init (void); 1122EAPI void evas_common_tilebuf_init (void);
@@ -1321,8 +1150,6 @@ Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1321/****/ 1150/****/
1322#include "../common/evas_pipe.h" 1151#include "../common/evas_pipe.h"
1323 1152
1324void evas_font_dir_cache_free(void);
1325
1326EAPI void evas_thread_queue_wait(void); 1153EAPI void evas_thread_queue_wait(void);
1327 1154
1328EAPI int evas_async_events_process_blocking(void); 1155EAPI int evas_async_events_process_blocking(void);