move around - flatter.
[profile/ivi/evas.git] / src / modules / engines / software_16 / evas_engine.c
1 #include "evas_common.h"
2 #include "evas_private.h"
3 #include "evas_common_soft16.h"
4
5 /*
6  *****
7  **
8  ** ENGINE ROUTINES
9  **
10  *****
11  */
12
13 #define NOT_IMPLEMENTED()                                               \
14    fprintf(stderr, "NOT_IMPLEMENTED: %s() at %s:%d\n",                  \
15            __FUNCTION__, __FILE__, __LINE__)
16
17 static void *
18 eng_context_new(void *data)
19 {
20    return evas_common_draw_context_new();
21 }
22
23 static void
24 eng_context_free(void *data, void *context)
25 {
26    evas_common_draw_context_free(context);
27 }
28
29 static void
30 eng_context_clip_set(void *data, void *context, int x, int y, int w, int h)
31 {
32    evas_common_draw_context_set_clip(context, x, y, w, h);
33 }
34
35 static void
36 eng_context_clip_clip(void *data, void *context, int x, int y, int w, int h)
37 {
38    evas_common_draw_context_clip_clip(context, x, y, w, h);
39 }
40
41 static void
42 eng_context_clip_unset(void *data, void *context)
43 {
44    evas_common_draw_context_unset_clip(context);
45 }
46
47 static int
48 eng_context_clip_get(void *data, void *context, int *x, int *y, int *w, int *h)
49 {
50    *x = ((RGBA_Draw_Context *)context)->clip.x;
51    *y = ((RGBA_Draw_Context *)context)->clip.y;
52    *w = ((RGBA_Draw_Context *)context)->clip.w;
53    *h = ((RGBA_Draw_Context *)context)->clip.h;
54    return ((RGBA_Draw_Context *)context)->clip.use;
55 }
56
57 static void
58 eng_context_color_set(void *data, void *context, int r, int g, int b, int a)
59 {
60    evas_common_draw_context_set_color(context, r, g, b, a);
61 }
62
63 static int
64 eng_context_color_get(void *data, void *context, int *r, int *g, int *b, int *a)
65 {
66    *r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->col.col));
67    *g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->col.col));
68    *b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->col.col));
69    *a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->col.col));
70    return 1;
71 }
72
73 static void
74 eng_context_multiplier_set(void *data, void *context, int r, int g, int b, int a)
75 {
76    evas_common_draw_context_set_multiplier(context, r, g, b, a);
77 }
78
79 static void
80 eng_context_multiplier_unset(void *data, void *context)
81 {
82    evas_common_draw_context_unset_multiplier(context);
83 }
84
85 static int
86 eng_context_multiplier_get(void *data, void *context, int *r, int *g, int *b, int *a)
87 {
88    *r = (int)(R_VAL(&((RGBA_Draw_Context *)context)->mul.col));
89    *g = (int)(G_VAL(&((RGBA_Draw_Context *)context)->mul.col));
90    *b = (int)(B_VAL(&((RGBA_Draw_Context *)context)->mul.col));
91    *a = (int)(A_VAL(&((RGBA_Draw_Context *)context)->mul.col));
92    return ((RGBA_Draw_Context *)context)->mul.use;
93 }
94
95 static void
96 eng_context_cutout_add(void *data, void *context, int x, int y, int w, int h)
97 {
98    evas_common_draw_context_add_cutout(context, x, y, w, h);
99 }
100
101 static void
102 eng_context_cutout_clear(void *data, void *context)
103 {
104    evas_common_draw_context_clear_cutouts(context);
105 }
106
107 static void
108 eng_context_anti_alias_set(void *data, void *context, unsigned char aa)
109 {
110    evas_common_draw_context_set_anti_alias(context, aa);
111 }
112
113 static unsigned char
114 eng_context_anti_alias_get(void *data, void *context)
115 {
116    return ((RGBA_Draw_Context *)context)->anti_alias;
117 }
118
119 static void
120 eng_context_color_interpolation_set(void *data, void *context, int color_space)
121 {
122    evas_common_draw_context_set_color_interpolation(context, color_space);
123 }
124
125 static int
126 eng_context_color_interpolation_get(void *data, void *context)
127 {
128    return ((RGBA_Draw_Context *)context)->interpolation.color_space;
129 }
130
131 static void
132 eng_context_render_op_set(void *data, void *context, int op)
133 {
134    evas_common_draw_context_set_render_op(context, op);
135 }
136
137 static int
138 eng_context_render_op_get(void *data, void *context)
139 {
140    return ((RGBA_Draw_Context *)context)->render_op;
141 }
142
143
144
145 static void
146 eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int w, int h)
147 {
148    soft16_rectangle_draw(surface, context, x, y, w, h);
149 }
150
151 static void
152 eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int x2, int y2)
153 {
154    soft16_line_draw(surface, context, x1, y1, x2, y2);
155 }
156
157 static void *
158 eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
159 {
160    return evas_common_polygon_point_add(polygon, x, y);
161 }
162
163 static void *
164 eng_polygon_points_clear(void *data, void *context, void *polygon)
165 {
166    return evas_common_polygon_points_clear(polygon);
167 }
168
169 static void
170 eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
171 {
172    soft16_polygon_draw(surface, context, polygon);
173 }
174
175 static void *
176 eng_gradient_new(void *data)
177 {
178    NOT_IMPLEMENTED();
179    return NULL;
180 //   return evas_common_gradient_new();
181 }
182
183 static void
184 eng_gradient_free(void *data, void *gradient)
185 {
186    NOT_IMPLEMENTED();
187 //   evas_common_gradient_free(gradient);
188 }
189
190 static void
191 eng_gradient_color_stop_add(void *data, void *gradient, int r, int g, int b, int a, int delta)
192 {
193    NOT_IMPLEMENTED();
194 //   evas_common_gradient_color_stop_add(gradient, r, g, b, a, delta);
195 }
196
197 static void
198 eng_gradient_alpha_stop_add(void *data, void *gradient, int a, int delta)
199 {
200    NOT_IMPLEMENTED();
201 //   evas_common_gradient_alpha_stop_add(gradient, a, delta);
202 }
203
204 static void
205 eng_gradient_color_data_set(void *data, void *gradient, void *map, int len, int has_alpha)
206 {
207    NOT_IMPLEMENTED();
208 //   evas_common_gradient_color_data_set(gradient, map, len, has_alpha);
209 }
210
211 static void
212 eng_gradient_alpha_data_set(void *data, void *gradient, void *alpha_map, int len)
213 {
214    NOT_IMPLEMENTED();
215 //   evas_common_gradient_alpha_data_set(gradient, alpha_map, len);
216 }
217
218 static void
219 eng_gradient_clear(void *data, void *gradient)
220 {
221    NOT_IMPLEMENTED();
222 //   evas_common_gradient_clear(gradient);
223 }
224
225 static void
226 eng_gradient_fill_set(void *data, void *gradient, int x, int y, int w, int h)
227 {
228    NOT_IMPLEMENTED();
229 //   evas_common_gradient_fill_set(gradient, x, y, w, h);
230 }
231
232 static void
233 eng_gradient_fill_angle_set(void *data, void *gradient, double angle)
234 {
235    NOT_IMPLEMENTED();
236 //   evas_common_gradient_fill_angle_set(gradient, angle);
237 }
238
239 static void
240 eng_gradient_fill_spread_set(void *data, void *gradient, int spread)
241 {
242    NOT_IMPLEMENTED();
243 //   evas_common_gradient_fill_spread_set(gradient, spread);
244 }
245
246 static void
247 eng_gradient_angle_set(void *data, void *gradient, double angle)
248 {
249    NOT_IMPLEMENTED();
250 //   evas_common_gradient_map_angle_set(gradient, angle);
251 }
252
253 static void
254 eng_gradient_offset_set(void *data, void *gradient, float offset)
255 {
256    NOT_IMPLEMENTED();
257 //   evas_common_gradient_map_offset_set(gradient, offset);
258 }
259
260 static void
261 eng_gradient_direction_set(void *data, void *gradient, int direction)
262 {
263    NOT_IMPLEMENTED();
264 //   evas_common_gradient_map_direction_set(gradient, direction);
265 }
266
267 static void
268 eng_gradient_type_set(void *data, void *gradient, char *name, char *params)
269 {
270    NOT_IMPLEMENTED();
271 //   evas_common_gradient_type_set(gradient, name, params);
272 }
273
274 static int
275 eng_gradient_is_opaque(void *data, void *context, void *gradient, int x, int y, int w, int h)
276 {
277    NOT_IMPLEMENTED();
278    return 0;
279 //   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
280 //   RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
281 //
282 //   if (!dc || !gr || !gr->type.geometer)  return 0;
283 //   return !(gr->type.geometer->has_alpha(gr, dc->render_op) |
284 //              gr->type.geometer->has_mask(gr, dc->render_op));
285 }
286
287 static int
288 eng_gradient_is_visible(void *data, void *context, void *gradient, int x, int y, int w, int h)
289 {
290    NOT_IMPLEMENTED();
291    return 0;
292 //   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
293 //
294 //   if (!dc || !gradient)  return 0;
295 //   return 1;
296 }
297
298 static void
299 eng_gradient_render_pre(void *data, void *context, void *gradient)
300 {
301 //   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
302 //   RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
303 //   int  len;
304 //
305 //   if (!dc || !gr || !gr->type.geometer)  return;
306 //   gr->type.geometer->geom_set(gr);
307 //   len = gr->type.geometer->get_map_len(gr);
308 //   evas_common_gradient_map(dc, gr, len);
309    NOT_IMPLEMENTED();
310 }
311
312 static void
313 eng_gradient_render_post(void *data, void *gradient)
314 {
315    NOT_IMPLEMENTED();
316 }
317
318 static void
319 eng_gradient_draw(void *data, void *context, void *surface, void *gradient, int x, int y, int w, int h)
320 {
321 //   evas_common_gradient_draw(surface, context, x, y, w, h, gradient);
322 //   evas_common_cpu_end_opt();
323    NOT_IMPLEMENTED();
324 }
325
326 static int
327 eng_image_alpha_get(void *data, void *image)
328 {
329    Soft16_Image *im;
330
331    if (!image) return 0;
332    im = image;
333    return im->cache_entry.flags.alpha;
334 }
335
336 static int
337 eng_image_colorspace_get(void *data, void *image)
338 {
339    return EVAS_COLORSPACE_RGB565_A5P;
340 }
341
342 static void *
343 eng_image_alpha_set(void *data, void *image, int have_alpha)
344 {
345    if (!image) return NULL;
346    have_alpha = !!have_alpha;
347    image = soft16_image_alpha_set(image, have_alpha);
348    return image;
349 }
350
351 static void *
352 eng_image_border_set(void *data, void *image, int l, int r, int t, int b)
353 {
354    return image;
355 }
356
357 static void
358 eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b)
359 {
360 }
361
362 static char *
363 eng_image_comment_get(void *data, void *image, char *key)
364 {
365    return NULL;
366 }
367
368 static char *
369 eng_image_format_get(void *data, void *image)
370 {
371    NOT_IMPLEMENTED();
372    return NULL;
373 }
374
375 static void
376 eng_image_colorspace_set(void *data, void *image, int cspace)
377 {
378    NOT_IMPLEMENTED();
379 }
380
381 static void
382 eng_image_native_set(void *data, void *image, void *native)
383 {
384    NOT_IMPLEMENTED();
385 }
386
387 static void *
388 eng_image_native_get(void *data, void *image)
389 {
390    NOT_IMPLEMENTED();
391    return NULL;
392 }
393
394 static void *
395 eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo)
396 {
397    return evas_cache_image_request(evas_common_soft16_image_cache_get(), file, key, lo, error);
398 }
399
400 static void *
401 eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
402 {
403    if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P))
404      {
405         fprintf(stderr, "Unsupported colorspace %d in %s() (%s:%d)\n",
406                 cspace, __FUNCTION__, __FILE__, __LINE__);
407         return NULL;
408      }
409    return evas_cache_image_data(evas_common_soft16_image_cache_get(), w, h, image_data, alpha, EVAS_COLORSPACE_RGB565_A5P);
410 }
411
412 static void *
413 eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
414 {
415    if ((image_data) && (cspace != EVAS_COLORSPACE_RGB565_A5P))
416      {
417         fprintf(stderr, "Unsupported colorspace %d in %s() (%s:%d)\n",
418                 cspace, __FUNCTION__, __FILE__, __LINE__);
419         return NULL;
420      }
421    return evas_cache_image_copied_data(evas_common_soft16_image_cache_get(), w, h, image_data, alpha, EVAS_COLORSPACE_RGB565_A5P);
422 }
423
424 static void
425 eng_image_free(void *data, void *image)
426 {
427    evas_cache_image_drop((Image_Entry *) image);
428 }
429
430 static void
431 eng_image_size_get(void *data, void *image, int *w, int *h)
432 {
433    Soft16_Image *im;
434
435    if (w) *w = 0;
436    if (h) *h = 0;
437    if (!image) return;
438    im = image;
439    if (w) *w = im->cache_entry.w;
440    if (h) *h = im->cache_entry.h;
441 }
442
443 static void *
444 eng_image_size_set(void *data, void *image, int w, int h)
445 {
446    if (!image) return NULL;
447    if ((w <= 0) || (h <= 0))
448      {
449         evas_cache_image_drop((Image_Entry *) image);
450         return NULL;
451      }
452    return evas_cache_image_size_set((Image_Entry *) image, w, h);
453 }
454
455 static void
456 eng_image_stride_get(void *data, void *image, int *stride)
457 {
458    Soft16_Image *im;
459
460    if (stride) *stride = 0;
461    if (!image) return;
462    im = image;
463    if (stride) *stride = im->stride;
464 }
465
466 static void *
467 eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
468 {
469    /* FIXME: is this required? */
470    //NOT_IMPLEMENTED();
471    return image;
472 }
473
474 static void *
475 eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
476 {
477    Soft16_Image *im;
478
479    if (!image)
480      {
481         *image_data = NULL;
482         return NULL;
483      }
484
485    im = image;
486    evas_cache_image_load_data(&im->cache_entry);
487
488    if (to_write)
489      im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry);
490
491    if (image_data) *image_data = (DATA32 *) im->pixels;
492
493    return im;
494 }
495
496 static void *
497 eng_image_data_put(void *data, void *image, DATA32 *image_data)
498 {
499    Soft16_Image *old_im, *new_im;
500
501    if (!image) return NULL;
502
503    old_im = image;
504    if ((DATA16 *)image_data == old_im->pixels) return old_im;
505
506    new_im = (Soft16_Image *) evas_cache_image_copied_data(evas_common_soft16_image_cache_get(), old_im->cache_entry.w, old_im->cache_entry.h, image_data, old_im->cache_entry.flags.alpha, EVAS_COLORSPACE_RGB565_A5P);
507    evas_cache_image_drop(&old_im->cache_entry);
508    return new_im;
509 }
510
511 #include <assert.h>
512
513 static void
514 eng_image_draw(void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth)
515 {
516    Soft16_Image *im;
517
518    im = (Soft16_Image *) image;
519
520    evas_cache_image_load_data(&im->cache_entry);
521    soft16_image_draw(im, surface, context,
522                      src_x, src_y, src_w, src_h,
523                      dst_x, dst_y, dst_w, dst_h,
524                      smooth);
525 }
526
527 static void
528 eng_image_cache_flush(void *data)
529 {
530    evas_cache_image_flush(evas_common_soft16_image_cache_get());
531 }
532
533 static void
534 eng_image_cache_set(void *data, int bytes)
535 {
536    evas_cache_image_set(evas_common_soft16_image_cache_get(), bytes);
537 }
538
539 static int
540 eng_image_cache_get(void *data)
541 {
542    return evas_cache_image_get(evas_common_soft16_image_cache_get());
543 }
544
545 static void *
546 eng_font_load(void *data, const char *name, int size)
547 {
548    return evas_common_font_load(name, size);
549 }
550
551 static void *
552 eng_font_memory_load(void *data, char *name, int size, const void *fdata, int fdata_size)
553 {
554    return evas_common_font_memory_load(name, size, fdata, fdata_size);
555 }
556
557 static void *
558 eng_font_add(void *data, void *font, const char *name, int size)
559 {
560    return evas_common_font_add(font, name, size);
561 }
562
563 static void *
564 eng_font_memory_add(void *data, void *font, char *name, int size, const void *fdata, int fdata_size)
565 {
566    return evas_common_font_memory_add(font, name, size, fdata, fdata_size);
567 }
568
569 static void
570 eng_font_free(void *data, void *font)
571 {
572    evas_common_font_free(font);
573 }
574
575 static int
576 eng_font_ascent_get(void *data, void *font)
577 {
578    return evas_common_font_ascent_get(font);
579 }
580
581 static int
582 eng_font_descent_get(void *data, void *font)
583 {
584    return evas_common_font_descent_get(font);
585 }
586
587 static int
588 eng_font_max_ascent_get(void *data, void *font)
589 {
590    return evas_common_font_max_ascent_get(font);
591 }
592
593 static int
594 eng_font_max_descent_get(void *data, void *font)
595 {
596    return evas_common_font_max_descent_get(font);
597 }
598
599 static void
600 eng_font_string_size_get(void *data, void *font, const char *text, int *w, int *h)
601 {
602    evas_common_font_query_size(font, text, w, h);
603 }
604
605 static int
606 eng_font_inset_get(void *data, void *font, const char *text)
607 {
608    return evas_common_font_query_inset(font, text);
609 }
610
611 static int
612 eng_font_h_advance_get(void *data, void *font, const char *text)
613 {
614    int h, v;
615
616    evas_common_font_query_advance(font, text, &h, &v);
617    return h;
618 }
619
620 static int
621 eng_font_v_advance_get(void *data, void *font, const char *text)
622 {
623    int h, v;
624
625    evas_common_font_query_advance(font, text, &h, &v);
626    return v;
627 }
628
629 static int
630 eng_font_char_coords_get(void *data, void *font, const char *text, int pos, int *cx, int *cy, int *cw, int *ch)
631 {
632    return evas_common_font_query_char_coords(font, text, pos, cx, cy, cw, ch);
633 }
634
635 static int
636 eng_font_char_at_coords_get(void *data, void *font, const char *text, int x, int y, int *cx, int *cy, int *cw, int *ch)
637 {
638    return evas_common_font_query_text_at_pos(font, text, x, y, cx, cy, cw, ch);
639 }
640
641 static void
642 eng_font_draw(void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const char *text)
643 {
644    static RGBA_Image    *im = NULL;
645    Soft16_Image         *dst = surface;
646
647    if (!im)
648      im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get());
649    evas_cache_image_surface_alloc(&im->cache_entry, dst->cache_entry.w, dst->cache_entry.h);
650    evas_common_draw_context_font_ext_set(context,
651                                          surface,
652                                          soft16_font_glyph_new,
653                                          soft16_font_glyph_free,
654                                          soft16_font_glyph_draw);
655    evas_common_font_draw(im, context, font, x, y, text);
656    evas_common_draw_context_font_ext_set(context,
657                                          NULL,
658                                          NULL,
659                                          NULL,
660                                          NULL);
661 }
662
663 static void
664 eng_font_cache_flush(void *data)
665 {
666    evas_common_font_flush();
667 }
668
669 static void
670 eng_font_cache_set(void *data, int bytes)
671 {
672    evas_common_font_cache_set(bytes);
673 }
674
675 static int
676 eng_font_cache_get(void *data)
677 {
678    return evas_common_font_cache_get();
679 }
680
681 static void
682 eng_font_hinting_set(void *data, void *font, int hinting)
683 {
684    evas_common_font_hinting_set(font, hinting);
685 }
686
687 static int
688 eng_font_hinting_can_hint(void *data, int hinting)
689 {
690    return evas_common_hinting_available(hinting);
691 }
692
693
694 /*
695  *****
696  **
697  ** ENGINE API
698  **
699  *****
700  */
701
702 static Evas_Func func =
703 {
704    NULL,
705      NULL,
706      NULL,
707      NULL,
708      NULL,
709      NULL,
710      NULL,
711      NULL,
712      NULL,
713      NULL,
714      NULL,
715      NULL,
716      NULL,
717      /* draw context virtual methods */
718      eng_context_new,
719      eng_context_free,
720      eng_context_clip_set,
721      eng_context_clip_clip,
722      eng_context_clip_unset,
723      eng_context_clip_get,
724      eng_context_color_set,
725      eng_context_color_get,
726      eng_context_multiplier_set,
727      eng_context_multiplier_unset,
728      eng_context_multiplier_get,
729      eng_context_cutout_add,
730      eng_context_cutout_clear,
731      eng_context_anti_alias_set,
732      eng_context_anti_alias_get,
733      eng_context_color_interpolation_set,
734      eng_context_color_interpolation_get,
735      eng_context_render_op_set,
736      eng_context_render_op_get,
737      /* rect draw funcs */
738      eng_rectangle_draw,
739      /* line draw funcs */
740      eng_line_draw,
741      /* polygon draw funcs */
742      eng_polygon_point_add,
743      eng_polygon_points_clear,
744      eng_polygon_draw,
745      /* gradient draw funcs */
746      eng_gradient_new,
747      eng_gradient_free,
748      eng_gradient_color_stop_add,
749      eng_gradient_alpha_stop_add,
750      eng_gradient_color_data_set,
751      eng_gradient_alpha_data_set,
752      eng_gradient_clear,
753      eng_gradient_fill_set,
754      eng_gradient_fill_angle_set,
755      eng_gradient_fill_spread_set,
756      eng_gradient_angle_set,
757      eng_gradient_offset_set,
758      eng_gradient_direction_set,
759      eng_gradient_type_set,
760      eng_gradient_is_opaque,
761      eng_gradient_is_visible,
762      eng_gradient_render_pre,
763      eng_gradient_render_post,
764      eng_gradient_draw,
765      /* image draw funcs */
766      eng_image_load,
767      eng_image_new_from_data,
768      eng_image_new_from_copied_data,
769      eng_image_free,
770      eng_image_size_get,
771      eng_image_size_set,
772      eng_image_stride_get,
773      eng_image_dirty_region,
774      eng_image_data_get,
775      eng_image_data_put,
776      eng_image_alpha_set,
777      eng_image_alpha_get,
778      eng_image_border_set,
779      eng_image_border_get,
780      eng_image_draw,
781      eng_image_comment_get,
782      eng_image_format_get,
783      eng_image_colorspace_set,
784      eng_image_colorspace_get,
785      eng_image_native_set,
786      eng_image_native_get,
787      /* image cache funcs */
788      eng_image_cache_flush,
789      eng_image_cache_set,
790      eng_image_cache_get,
791      /* font draw functions */
792      eng_font_load,
793      eng_font_memory_load,
794      eng_font_add,
795      eng_font_memory_add,
796      eng_font_free,
797      eng_font_ascent_get,
798      eng_font_descent_get,
799      eng_font_max_ascent_get,
800      eng_font_max_descent_get,
801      eng_font_string_size_get,
802      eng_font_inset_get,
803      eng_font_h_advance_get,
804      eng_font_v_advance_get,
805      eng_font_char_coords_get,
806      eng_font_char_at_coords_get,
807      eng_font_draw,
808      /* font cache functions */
809      eng_font_cache_flush,
810      eng_font_cache_set,
811      eng_font_cache_get,
812      /* font hinting functions */
813      eng_font_hinting_set,
814      eng_font_hinting_can_hint
815      /* FUTURE software generic calls go here */
816 };
817
818 /*
819  *****
820  **
821  ** MODULE ACCESSIBLE API API
822  **
823  *****
824  */
825
826 EAPI int
827 module_open(Evas_Module *em)
828 {
829    if (!em) return 0;
830    em->functions = (void *)(&func);
831    return 1;
832 }
833
834 EAPI void
835 module_close(void)
836 {
837 }
838
839 EAPI Evas_Module_Api evas_modapi =
840 {
841   EVAS_MODULE_API_VERSION,
842   EVAS_MODULE_TYPE_ENGINE,
843   "software_16",
844   "none"
845 };