diff options
author | Cedric Bail <cedric.bail@samsung.com> | 2013-05-07 10:50:57 +0900 |
---|---|---|
committer | Cedric Bail <cedric.bail@samsung.com> | 2013-05-08 18:16:59 +0900 |
commit | c3f9d3b8b8f2530923353beff4e67661a75f7614 (patch) | |
tree | 976fd19448c0ddf755686308335cd427e9ba6ae3 /src/lib/evas/include | |
parent | 559b1b33012d0577216303ebf127733bf80aea1d (diff) |
evas: Make Evas_Loader API public.
Diffstat (limited to 'src/lib/evas/include')
-rw-r--r-- | src/lib/evas/include/evas_common.h | 51 | ||||
-rw-r--r-- | src/lib/evas/include/evas_private.h | 26 |
2 files changed, 4 insertions, 73 deletions
diff --git a/src/lib/evas/include/evas_common.h b/src/lib/evas/include/evas_common.h index a1b94fcc20..03a2777d58 100644 --- a/src/lib/evas/include/evas_common.h +++ b/src/lib/evas/include/evas_common.h | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <Eina.h> | 50 | #include <Eina.h> |
51 | #include "Evas.h" | 51 | #include "Evas.h" |
52 | //#include "Evas_GL.h" | 52 | //#include "Evas_GL.h" |
53 | #include "Evas_Loader.h" | ||
53 | 54 | ||
54 | #ifndef HAVE_LROUND | 55 | #ifndef HAVE_LROUND |
55 | /* right now i dont care about rendering bugs on platforms without lround | 56 | /* right now i dont care about rendering bugs on platforms without lround |
@@ -352,8 +353,6 @@ typedef unsigned short DATA16; | |||
352 | typedef unsigned char DATA8; | 353 | typedef unsigned char DATA8; |
353 | 354 | ||
354 | typedef struct _Image_Entry Image_Entry; | 355 | typedef struct _Image_Entry Image_Entry; |
355 | typedef struct _Image_Entry_Property Image_Entry_Property; | ||
356 | typedef struct _Image_Entry_Animated Image_Entry_Animated; | ||
357 | typedef struct _Image_Entry_Flags Image_Entry_Flags; | 356 | typedef struct _Image_Entry_Flags Image_Entry_Flags; |
358 | typedef struct _Image_Entry_Frame Image_Entry_Frame; | 357 | typedef struct _Image_Entry_Frame Image_Entry_Frame; |
359 | typedef struct _Image_Timestamp Image_Timestamp; | 358 | typedef struct _Image_Timestamp Image_Timestamp; |
@@ -361,7 +360,6 @@ typedef struct _Engine_Image_Entry Engine_Image_Entry; | |||
361 | typedef struct _Evas_Cache_Target Evas_Cache_Target; | 360 | typedef struct _Evas_Cache_Target Evas_Cache_Target; |
362 | typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; | 361 | typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; |
363 | 362 | ||
364 | typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts; | ||
365 | #ifdef BUILD_PIPE_RENDER | 363 | #ifdef BUILD_PIPE_RENDER |
366 | typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op; | 364 | typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op; |
367 | typedef struct _RGBA_Pipe RGBA_Pipe; | 365 | typedef struct _RGBA_Pipe RGBA_Pipe; |
@@ -495,25 +493,6 @@ typedef enum _Font_Rend_Flags | |||
495 | 493 | ||
496 | /*****************************************************************************/ | 494 | /*****************************************************************************/ |
497 | 495 | ||
498 | struct _RGBA_Image_Loadopts | ||
499 | { | ||
500 | int scale_down_by; // if > 1 then use this | ||
501 | double dpi; // if > 0.0 use this | ||
502 | unsigned int w, h; // if > 0 use this | ||
503 | unsigned int degree;//if>0 there is some info related with rotation | ||
504 | struct { | ||
505 | unsigned int x, y, w, h; | ||
506 | } region; | ||
507 | struct { | ||
508 | int src_x, src_y, src_w, src_h; | ||
509 | int dst_w, dst_h; | ||
510 | int smooth; | ||
511 | Evas_Image_Scale_Hint scale_hint; | ||
512 | } scale_load; | ||
513 | |||
514 | Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info) | ||
515 | }; | ||
516 | |||
517 | struct _Image_Entry_Flags | 496 | struct _Image_Entry_Flags |
518 | { | 497 | { |
519 | Eina_Bool loaded : 1; | 498 | Eina_Bool loaded : 1; |
@@ -544,17 +523,6 @@ struct _Image_Entry_Frame | |||
544 | Eina_Bool loaded : 1; | 523 | Eina_Bool loaded : 1; |
545 | }; | 524 | }; |
546 | 525 | ||
547 | struct _Image_Entry_Animated | ||
548 | { | ||
549 | Eina_List *frames; | ||
550 | Evas_Image_Animated_Loop_Hint loop_hint; | ||
551 | int frame_count; | ||
552 | int loop_count; | ||
553 | int cur_frame; | ||
554 | |||
555 | Eina_Bool animated : 1; | ||
556 | }; | ||
557 | |||
558 | struct _Evas_Cache_Target | 526 | struct _Evas_Cache_Target |
559 | { | 527 | { |
560 | EINA_INLIST; | 528 | EINA_INLIST; |
@@ -572,19 +540,6 @@ struct _Image_Timestamp | |||
572 | #endif | 540 | #endif |
573 | }; | 541 | }; |
574 | 542 | ||
575 | struct _Image_Entry_Property | ||
576 | { | ||
577 | unsigned int w; | ||
578 | unsigned int h; | ||
579 | |||
580 | unsigned char scale; | ||
581 | |||
582 | Eina_Bool rotated; | ||
583 | Eina_Bool alpha; | ||
584 | Eina_Bool premul; | ||
585 | Eina_Bool alpha_sparse; | ||
586 | }; | ||
587 | |||
588 | struct _Image_Entry | 543 | struct _Image_Entry |
589 | { | 544 | { |
590 | EINA_INLIST; | 545 | EINA_INLIST; |
@@ -610,7 +565,7 @@ struct _Image_Entry | |||
610 | RGBA_Pipe *pipe; | 565 | RGBA_Pipe *pipe; |
611 | #endif | 566 | #endif |
612 | 567 | ||
613 | RGBA_Image_Loadopts load_opts; | 568 | Evas_Image_Load_Opts load_opts; |
614 | int space; | 569 | int space; |
615 | 570 | ||
616 | unsigned int w; | 571 | unsigned int w; |
@@ -634,7 +589,7 @@ struct _Image_Entry | |||
634 | LK(lock_cancel); | 589 | LK(lock_cancel); |
635 | 590 | ||
636 | /* for animation feature */ | 591 | /* for animation feature */ |
637 | Image_Entry_Animated animated; | 592 | Evas_Image_Animated animated; |
638 | 593 | ||
639 | /* Reference to the file */ | 594 | /* Reference to the file */ |
640 | Eina_File *f; | 595 | Eina_File *f; |
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index bc3805e7cf..82a0211833 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <eina_safety_checks.h> | 9 | #include <eina_safety_checks.h> |
10 | 10 | ||
11 | #include "Evas.h" | 11 | #include "Evas.h" |
12 | #include "Evas_Loader.h" | ||
12 | 13 | ||
13 | #include "../file/evas_module.h" | 14 | #include "../file/evas_module.h" |
14 | #include "../file/evas_path.h" | 15 | #include "../file/evas_path.h" |
@@ -32,11 +33,7 @@ typedef struct _Evas_Font Evas_Font; | |||
32 | typedef struct _Evas_Font_Alias Evas_Font_Alias; | 33 | typedef struct _Evas_Font_Alias Evas_Font_Alias; |
33 | typedef struct _Evas_Font_Description Evas_Font_Description; | 34 | typedef struct _Evas_Font_Description Evas_Font_Description; |
34 | typedef struct _Evas_Data_Node Evas_Data_Node; | 35 | typedef struct _Evas_Data_Node Evas_Data_Node; |
35 | typedef RGBA_Image_Loadopts Evas_Image_Load_Opts; | ||
36 | typedef Image_Entry_Animated Evas_Image_Animated; | ||
37 | typedef Image_Entry_Property Evas_Image_Property; | ||
38 | typedef struct _Evas_Func Evas_Func; | 36 | typedef struct _Evas_Func Evas_Func; |
39 | typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func; | ||
40 | typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; | 37 | typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; |
41 | typedef struct _Evas_Object_Func Evas_Object_Func; | 38 | typedef struct _Evas_Object_Func Evas_Object_Func; |
42 | typedef struct _Evas_Intercept_Func Evas_Intercept_Func; | 39 | typedef struct _Evas_Intercept_Func Evas_Intercept_Func; |
@@ -900,27 +897,6 @@ struct _Evas_Func | |||
900 | Eina_Bool (*pixel_alpha_get) (void *image, int x, int y, DATA8 *alpha, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); | 897 | Eina_Bool (*pixel_alpha_get) (void *image, int x, int y, DATA8 *alpha, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); |
901 | }; | 898 | }; |
902 | 899 | ||
903 | struct _Evas_Image_Load_Func | ||
904 | { | ||
905 | Eina_Bool threadable; | ||
906 | void *(*file_open) (Eina_File *f, const char *key, | ||
907 | Evas_Image_Load_Opts *opts, | ||
908 | Evas_Image_Animated *animated, | ||
909 | int *error); | ||
910 | void (*file_close) (void *loader_data); | ||
911 | |||
912 | Eina_Bool (*file_head) (void *loader_data, | ||
913 | Evas_Image_Property *prop, | ||
914 | int *error); | ||
915 | Eina_Bool (*file_data) (void *loader_data, | ||
916 | Evas_Image_Property *prop, | ||
917 | void *pixels, int *error); | ||
918 | double (*frame_duration) (void *loader_data, | ||
919 | int start, int frame_num); | ||
920 | |||
921 | Eina_Bool do_region; | ||
922 | }; | ||
923 | |||
924 | struct _Evas_Image_Save_Func | 900 | struct _Evas_Image_Save_Func |
925 | { | 901 | { |
926 | int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress); | 902 | int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress); |