- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

# /home/v/Kate/WORK_TREES/kate-sorceress-backup/v/src/kate/include/kate/kate.h

Go to the documentation of this file.

    00001 /* Copyright (C) 2008, 2009 Vincent Penquerc'h.
    00002    This file is part of the Kate codec library.
    00003    Written by Vincent Penquerc'h.
    00004
    00005    Use, distribution and reproduction of this library is governed
    00006    by a BSD style source license included with this source in the
    00007    file 'COPYING'. Please read these terms before distributing. */
    00008
    00009
    00010 #ifndef KATE_kate_h_GUARD
    00011 #define KATE_kate_h_GUARD
    00012
    00017 #include "kate/kate_config.h"
    00018
    00021 #define KATE_VERSION_MAJOR 0
    00022 #define KATE_VERSION_MINOR 4
    00023 #define KATE_VERSION_PATCH 1
    00028 #define KATE_BITSTREAM_VERSION_MAJOR 0
    00029 #define KATE_BITSTREAM_VERSION_MINOR 7
    00033 typedef enum {
    00034   kate_utf8
    00035 } kate_text_encoding;
    00036
    00038 typedef enum {
    00039   kate_markup_none,
    00040   kate_markup_simple
    00041 } kate_markup_type;
    00042
    00044 typedef enum {
    00045   kate_pixel,
    00046   kate_percentage,
    00047   kate_millionths
    00048 } kate_space_metric;
    00049
    00050 struct kate_meta;
    00051 typedef struct kate_meta kate_meta;
    00052
    00054 typedef struct kate_region {
    00055   kate_space_metric metric;
    00056   int x;
    00057   int y;
    00058   int w;
    00059   int h;
    00060   int style;
    00061   unsigned int clip:1;
    00062   unsigned int pad0:31;
    00063   kate_meta *meta;
    00064   kate_uintptr_t pad1[5];
    00065 } kate_region;
    00066
    00068 typedef struct kate_color {
    00069   unsigned char r;
    00070   unsigned char g;
    00071   unsigned char b;
    00072   unsigned char a;
    00073 } kate_color;
    00074
    00076 typedef enum {
    00077   kate_wrap_word,
    00078   kate_wrap_none
    00079 } kate_wrap_mode;
    00080
    00082 typedef struct kate_style {
    00083   kate_float halign;
    00084   kate_float valign;
    00086   kate_color text_color;
    00087   kate_color background_color;
    00088   kate_color draw_color;
    00090   kate_space_metric font_metric;
    00091   kate_float font_width;
    00092   kate_float font_height;
    00094   kate_space_metric margin_metric;
    00095   kate_float left_margin;
    00096   kate_float top_margin;
    00097   kate_float right_margin;
    00098   kate_float bottom_margin;
    00100   unsigned int bold:1;
    00101   unsigned int italics:1;
    00102   unsigned int underline:1;
    00103   unsigned int strike:1;
    00104   unsigned int justify:1;
    00105   unsigned int wrap_mode:2;
    00106   unsigned int pad0:25;
    00107
    00108   kate_const char *font;
    00110   kate_meta *meta;
    00111
    00112   kate_uintptr_t pad1[8];
    00113 } kate_style;
    00114
    00116 typedef enum kate_curve_type {
    00117   kate_curve_none,
    00118   kate_curve_static,
    00119   kate_curve_linear,
    00120   kate_curve_catmull_rom_spline,
    00121   kate_curve_bezier_cubic_spline,
    00122   kate_curve_bspline
    00123 } kate_curve_type;
    00124
    00126 typedef struct kate_curve {
    00127   kate_curve_type type;
    00128   size_t npts;
    00129   kate_float *pts;
    00130   kate_uintptr_t pad[5];
    00131 } kate_curve;
    00132
    00134 typedef enum kate_motion_mapping {
    00135   /* these can be used for a x/y position mapping */
    00136   kate_motion_mapping_none,
    00137   kate_motion_mapping_frame,
    00138   kate_motion_mapping_window,
    00139   kate_motion_mapping_region,
    00140   kate_motion_mapping_event_duration,
    00141   kate_motion_mapping_bitmap_size,
    00143 #if 0
    00144   text is useful, find a way to readd it easily
    00145   kate_motion_mapping_text,
    00146 #endif
    00147
    00148   /* more mapping may be added in future versions */
    00149
    00150   kate_motion_mapping_user=128
    00151 } kate_motion_mapping;
    00152
    00154 typedef enum kate_motion_semantics {
    00155   kate_motion_semantics_time,
    00156   kate_motion_semantics_z,
    00157   kate_motion_semantics_region_position,
    00158   kate_motion_semantics_region_size,
    00159   kate_motion_semantics_text_alignment_int,
    00160   kate_motion_semantics_text_alignment_ext,
    00161   kate_motion_semantics_text_position,
    00162   kate_motion_semantics_text_size,
    00163   kate_motion_semantics_marker1_position,
    00164   kate_motion_semantics_marker2_position,
    00165   kate_motion_semantics_marker3_position,
    00166   kate_motion_semantics_marker4_position,
    00167   kate_motion_semantics_glyph_pointer_1,
    00168   kate_motion_semantics_glyph_pointer_2,
    00169   kate_motion_semantics_glyph_pointer_3,
    00170   kate_motion_semantics_glyph_pointer_4,
    00171   kate_motion_semantics_text_color_rg,
    00172   kate_motion_semantics_text_color_ba,
    00173   kate_motion_semantics_background_color_rg,
    00174   kate_motion_semantics_background_color_ba,
    00175   kate_motion_semantics_draw_color_rg,
    00176   kate_motion_semantics_draw_color_ba,
    00177   kate_motion_semantics_style_morph,
    00178   kate_motion_semantics_text_path,
    00179   kate_motion_semantics_text_path_section,
    00180   kate_motion_semantics_draw,
    00181   kate_motion_semantics_text_visible_section,
    00182   kate_motion_semantics_horizontal_margins,
    00183   kate_motion_semantics_vertical_margins,
    00184   kate_motion_semantics_bitmap_position,
    00185   kate_motion_semantics_bitmap_size,
    00186   kate_motion_semantics_marker1_bitmap,
    00187   kate_motion_semantics_marker2_bitmap,
    00188   kate_motion_semantics_marker3_bitmap,
    00189   kate_motion_semantics_marker4_bitmap,
    00190   kate_motion_semantics_glyph_pointer_1_bitmap,
    00191   kate_motion_semantics_glyph_pointer_2_bitmap,
    00192   kate_motion_semantics_glyph_pointer_3_bitmap,
    00193   kate_motion_semantics_glyph_pointer_4_bitmap,
    00194   kate_motion_semantics_draw_width,
    00196   /* more semantics may be added in future versions */
    00197
    00198   kate_motion_semantics_user = 128
    00199 } kate_motion_semantics;
    00200
    00202 typedef struct kate_motion {
    00203   size_t ncurves;
    00204   kate_curve **curves;
    00205   kate_float *durations;
    00206   kate_motion_mapping x_mapping;
    00207   kate_motion_mapping y_mapping;
    00208   kate_motion_semantics semantics;
    00209   unsigned int periodic:1;
    00210   unsigned int pad0:31;
    00211   kate_meta *meta;
    00212   kate_uintptr_t pad1[4];
    00213 } kate_motion;
    00214
    00216 typedef enum kate_text_directionality {
    00217   kate_l2r_t2b,
    00218   kate_r2l_t2b,
    00219   kate_t2b_r2l,
    00220   kate_t2b_l2r
    00221 } kate_text_directionality;
    00222
    00224 typedef struct kate_palette {
    00225   size_t ncolors;
    00226   kate_color *colors;
    00227   kate_meta *meta;
    00228   kate_uintptr_t pad[1];
    00229 } kate_palette;
    00230
    00232 typedef enum kate_bitmap_type {
    00233   kate_bitmap_type_paletted,
    00234   kate_bitmap_type_png
    00235 } kate_bitmap_type;
    00236
    00238 typedef struct kate_bitmap {
    00239   size_t width;
    00240   size_t height;
    00241   unsigned char bpp;
    00242   kate_bitmap_type type;
    00243   unsigned char pad0[1];
    00244   unsigned char internal;
    00245   int palette;
    00246   unsigned char *pixels;
    00247   size_t size;
    00248   int x_offset;
    00249   int y_offset;
    00250   kate_meta *meta;
    00251   kate_uintptr_t pad1[14];
    00252 } kate_bitmap;
    00253
    00255 typedef struct kate_font_range {
    00256   int first_code_point;
    00257   int last_code_point;
    00258   int first_bitmap;
    00259   kate_uintptr_t pad[5];
    00260 } kate_font_range;
    00261
    00263 typedef struct kate_font_mapping {
    00264   size_t nranges;
    00265   kate_font_range **ranges;
    00266   kate_uintptr_t pad[6];
    00267 } kate_font_mapping;
    00268
    00274 typedef struct kate_info {
    00275   unsigned char bitstream_version_major;
    00276   unsigned char bitstream_version_minor;
    00277   unsigned char pad0[2];
    00278
    00279   kate_text_encoding text_encoding;
    00280   kate_text_directionality text_directionality;
    00282   unsigned char num_headers;
    00283   unsigned char granule_shift;
    00284   unsigned char pad1[2];
    00285
    00286   kate_uint32_t gps_numerator;
    00287   kate_uint32_t gps_denominator;
    00289   kate_const char *language;
    00291   kate_const char *category;
    00293   size_t nregions;
    00294   kate_const kate_region *kate_const *regions;
    00296   size_t nstyles;
    00297   kate_const kate_style *kate_const *styles;
    00299   size_t ncurves;
    00300   kate_const kate_curve *kate_const *curves;
    00302   size_t nmotions;
    00303   kate_const kate_motion *kate_const *motions;
    00305   size_t npalettes;
    00306   kate_const kate_palette *kate_const *palettes;
    00308   size_t nbitmaps;
    00309   kate_const kate_bitmap *kate_const *bitmaps;
    00311   size_t nfont_ranges;
    00312   kate_const kate_font_range *kate_const *font_ranges;
    00314   size_t nfont_mappings;
    00315   kate_const kate_font_mapping *kate_const *font_mappings;
    00317   kate_markup_type text_markup_type;
    00319   size_t original_canvas_width;
    00320   size_t original_canvas_height;
    00322   kate_uintptr_t pad2[11];
    00323
    00324   /* internal */
    00325   int remove_markup;
    00326   int no_limits;
    00327   int probe;
    00328
    00329   kate_uintptr_t pad3[13];
    00330 } kate_info;
    00331
    00332 struct kate_encode_state; /* internal */
    00333 struct kate_decode_state; /* internal */
    00334
    00336 typedef struct kate_state {
    00337   kate_const kate_info *ki;
    00339   /* internal */
    00340   kate_const struct kate_encode_state *kes;
    00341   kate_const struct kate_decode_state *kds;
    00342
    00343   kate_uintptr_t pad[5];
    00344 } kate_state;
    00345
    00347 typedef struct kate_comment {
    00348   char **user_comments;
    00349   int *comment_lengths;
    00350   int comments;
    00351   char *vendor;
    00352 } kate_comment;
    00353
    00358 typedef struct kate_event {
    00359   kate_int64_t start;
    00360   kate_int64_t duration;
    00361   kate_int64_t backlink;
    00363   kate_float start_time;
    00364   kate_float end_time;
    00366   kate_int32_t id;
    00368   kate_text_encoding text_encoding;
    00369   kate_text_directionality text_directionality;
    00370   kate_const char *language;
    00371   kate_const char *text;
    00372   size_t len;
    00373   size_t len0;
    00375   size_t nmotions;
    00376   kate_const kate_motion *kate_const *motions;
    00378   kate_const kate_region *region;
    00379   kate_const kate_style *style;
    00380   kate_const kate_style *secondary_style;
    00381   kate_const kate_font_mapping *font_mapping;
    00382   kate_const kate_palette *palette;
    00383   kate_const kate_bitmap *bitmap;
    00385   kate_markup_type text_markup_type;
    00387   size_t nbitmaps;
    00388   kate_const kate_bitmap *kate_const *bitmaps;
    00390   kate_meta *meta;
    00391
    00392   kate_uintptr_t pad0[5];
    00393
    00394   /* internal */
    00395   const kate_info *ki;
    00396   size_t trackers;
    00397
    00398   kate_uintptr_t pad1[10];
    00399 } kate_event;
    00400
    00401 struct kate_tracker_internal; /* internal */
    00402
    00404 typedef struct kate_tracker {
    00405   const kate_info *ki;
    00406   kate_const kate_event *event;
    00407   kate_float t;
    00409   struct {
    00410     unsigned int region:1;
    00411     unsigned int text_alignment_int:1;
    00412     unsigned int text_alignment_ext:1;
    00413     unsigned int text_pos:1;
    00414     unsigned int text_size:1;
    00415     unsigned int marker_pos:4;
    00416     unsigned int text_color:1;
    00417     unsigned int background_color:1;
    00418     unsigned int draw_color:1;
    00419     unsigned int glyph_pointer:4;
    00420     unsigned int path:1;
    00421     unsigned int draw:1;
    00422     unsigned int visible_section:1;
    00423     unsigned int z:1;
    00424     unsigned int hmargins:1;
    00425     unsigned int vmargins:1;
    00426     unsigned int bitmap_pos:1;
    00427     unsigned int bitmap_size:1;
    00428     unsigned int marker_bitmap:4;
    00429     unsigned int glyph_pointer_bitmap:4;
    00430     unsigned int draw_width:1;
    00431     /* 33 bits */
    00432     unsigned int pad0:31;
    00433     /* 64 bits */
    00434   } has;
    00436   int window_w;
    00437   int window_h;
    00438   int frame_x;
    00439   int frame_y;
    00440   int frame_w;
    00441   int frame_h;
    00443   /* has.region */
    00444   kate_float region_x;
    00445   kate_float region_y;
    00446   kate_float region_w;
    00447   kate_float region_h;
    00449   /* has.text_alignment (int/ext) */
    00450   kate_float text_halign;
    00451   kate_float text_valign;
    00453   /* has.text_pos */
    00454   kate_float text_x;
    00455   kate_float text_y;
    00457   /* has.text_size */
    00458   kate_float text_size_x;
    00459   kate_float text_size_y;
    00461   /* has.marker_pos&(1<<n) */
    00462   kate_float marker_x[4];
    00463   kate_float marker_y[4];
    00465   /* has.text_color */
    00466   kate_color text_color;
    00468   /* has.background_color */
    00469   kate_color background_color;
    00471   /* has.draw_color */
    00472   kate_color draw_color;
    00474   /* has.glyph_pointer&(1<<n) */
    00475   kate_float glyph_pointer[4];
    00476   kate_float glyph_height[4];
    00478   /* has.path */
    00479   kate_float path_start;
    00480   kate_float path_end;
    00482   /* has.draw */
    00483   kate_float draw_x;
    00484   kate_float draw_y;
    00486   /* has.visible_section */
    00487   kate_float visible_x;
    00488   kate_float visible_y;
    00490   /* has.z */
    00491   kate_float z;
    00493   /* has.hmargins */
    00494   kate_float left_margin;
    00495   kate_float right_margin;
    00497   /* has.vmargins */
    00498   kate_float top_margin;
    00499   kate_float bottom_margin;
    00501   /* has.bitmap_pos */
    00502   kate_float bitmap_x;
    00503   kate_float bitmap_y;
    00505   /* has.bitmap_size */
    00506   kate_float bitmap_size_x;
    00507   kate_float bitmap_size_y;
    00509   /* has.marker_bitmap&(1<<n) */
    00510   const kate_bitmap *marker_bitmap[4];
    00512   /* has.glyph_pointer_bitmap&(1<<n) */
    00513   const kate_bitmap *glyph_pointer_bitmap[4];
    00515   /* has.draw_width */
    00516   kate_float draw_width;
    00518   /* internal */
    00519   struct kate_tracker_internal *internal;
    00520
    00521   kate_uintptr_t pad[19];
    00522
    00523 } kate_tracker;
    00524
    00526 typedef struct kate_packet {
    00527   size_t nbytes;
    00528   void *data;
    00529 } kate_packet;
    00530
    00531 #ifdef __cplusplus
    00532 extern "C" {
    00533 #endif
    00534
    00536 extern int kate_get_version(void);
    00537 extern const char *kate_get_version_string(void);
    00538 extern int kate_get_bitstream_version(void);
    00539 extern const char *kate_get_bitstream_version_string(void);
    00540
    00542 extern int kate_info_init(kate_info *ki);
    00543 extern int kate_info_set_granule_encoding(kate_info *ki,kate_float resolution,kate_float max_length,kate_float max_event_lifetime);
    00544 extern int kate_info_set_language(kate_info *ki,const char *language);
    00545 extern int kate_info_set_text_directionality(kate_info *ki,kate_text_directionality text_directionality);
    00546 extern int kate_info_set_markup_type(kate_info *ki,kate_markup_type text_markup_type);
    00547 extern int kate_info_set_category(kate_info *ki,const char *category);
    00548 extern int kate_info_set_original_canvas_size(kate_info *ki,size_t width,size_t height);
    00549 extern int kate_info_add_region(kate_info *ki,kate_region *kr);
    00550 extern int kate_info_add_style(kate_info *ki,kate_style *ks);
    00551 extern int kate_info_add_curve(kate_info *ki,kate_curve *kc);
    00552 extern int kate_info_add_motion(kate_info *ki,kate_motion *km);
    00553 extern int kate_info_add_palette(kate_info *ki,kate_palette *kp);
    00554 extern int kate_info_add_bitmap(kate_info *ki,kate_bitmap *kb);
    00555 extern int kate_info_add_font_range(kate_info *ki,kate_font_range *kfr);
    00556 extern int kate_info_add_font_mapping(kate_info *ki,kate_font_mapping *kfm);
    00557 extern int kate_info_matches_language(const kate_info *ki,const char *language);
    00558 extern int kate_info_remove_markup(kate_info *ki,int flag);
    00559 extern int kate_info_no_limits(kate_info *ki,int flag);
    00560 extern int kate_info_clear(kate_info *ki);
    00561
    00563 extern int kate_granule_shift(const kate_info *ki);
    00564 extern int kate_granule_split_time(const kate_info *ki,kate_int64_t granulepos,kate_float *base,kate_float *offset);
    00565 extern kate_float kate_granule_time(const kate_info *ki,kate_int64_t granulepos);
    00566 extern kate_int64_t kate_duration_granule(const kate_info *ki,kate_float duration);
    00567 extern kate_float kate_granule_duration(const kate_info *ki,kate_int64_t duration);
    00568
    00570 extern int kate_clear(kate_state *k);
    00571 extern int kate_motion_get_point(const kate_motion *km,kate_float duration,kate_float t,kate_float *x,kate_float *y);
    00572 extern int kate_curve_get_point(const kate_curve *kc,kate_float t,kate_float *x,kate_float *y);
    00573 extern int kate_region_init(kate_region *kr);
    00574 extern int kate_style_init(kate_style *ks);
    00575 extern int kate_palette_init(kate_palette *kp);
    00576 extern int kate_bitmap_init(kate_bitmap *kb);
    00577 extern int kate_bitmap_init_new(kate_bitmap *kb);
    00578 extern int kate_curve_init(kate_curve *kc);
    00579 extern int kate_motion_init(kate_motion *km);
    00580
    00582 extern int kate_text_get_character(kate_text_encoding text_encoding,const char ** const text,size_t *len0);
    00583 extern int kate_text_set_character(kate_text_encoding text_encoding,int c,char ** const text,size_t *len0);
    00584 extern int kate_text_remove_markup(kate_text_encoding text_encoding,char *text,size_t *len0);
    00585 extern int kate_text_validate(kate_text_encoding text_encoding,const char *text,size_t len0);
    00586
    00588 extern int kate_comment_init(kate_comment *kc);
    00589 extern int kate_comment_clear(kate_comment *kc);
    00590 extern int kate_comment_add(kate_comment *kc,const char *comment);
    00591 extern int kate_comment_add_length(kate_comment *kc,const char *comment,size_t len);
    00592 extern int kate_comment_add_tag(kate_comment *kc,const char *tag,const char *value);
    00593 extern const char *kate_comment_query(const kate_comment *kc,const char *tag,int count);
    00594 extern int kate_comment_query_count(const kate_comment *kc,const char *tag);
    00595
    00597 extern int kate_encode_init(kate_state *k,kate_info *ki);
    00598 extern int kate_encode_headers(kate_state *k,kate_comment *kc,kate_packet *kp);
    00599 extern int kate_encode_text(kate_state *k,kate_float start_time,kate_float stop_time,const char *text,size_t sz,kate_packet *kp); /* text is not null terminated */
    00600 extern int kate_encode_text_raw_times(kate_state *k,kate_int64_t start_time,kate_int64_t stop_time,const char *text,size_t sz,kate_packet *kp); /* text is not null terminated */
    00601 extern int kate_encode_keepalive(kate_state *k,kate_float t,kate_packet *kp);
    00602 extern int kate_encode_keepalive_raw_times(kate_state *k,kate_int64_t t,kate_packet *kp);
    00603 extern int kate_encode_repeat(kate_state *k,kate_float t,kate_float threshold,kate_packet *kp);
    00604 extern int kate_encode_repeat_raw_times(kate_state *k,kate_int64_t t,kate_int64_t threshold,kate_packet *kp);
    00605 extern int kate_encode_finish(kate_state *k,kate_float t,kate_packet *kp); /* t may be negative to use the end granule of the last event */
    00606 extern int kate_encode_finish_raw_times(kate_state *k,kate_int64_t t,kate_packet *kp); /* t may be negative to use the end granule of the last event */
    00607 extern int kate_encode_set_id(kate_state *k,kate_int32_t id);
    00608 extern int kate_encode_set_language(kate_state *k,const char *language); /* language can be NULL */
    00609 extern int kate_encode_set_text_encoding(kate_state *k,kate_text_encoding text_encoding);
    00610 extern int kate_encode_set_text_directionality(kate_state *k,kate_text_directionality text_directionality);
    00611 extern int kate_encode_set_region_index(kate_state *k,size_t region);
    00612 extern int kate_encode_set_region(kate_state *k,const kate_region *kr);
    00613 extern int kate_encode_set_style_index(kate_state *k,size_t style);
    00614 extern int kate_encode_set_style(kate_state *k,const kate_style *ks);
    00615 extern int kate_encode_set_secondary_style_index(kate_state *k,size_t style);
    00616 extern int kate_encode_set_secondary_style(kate_state *k,const kate_style *ks);
    00617 extern int kate_encode_set_font_mapping_index(kate_state *k,size_t font_mapping);
    00618 extern int kate_encode_add_motion(kate_state *k,kate_motion *km,int destroy);
    00619 extern int kate_encode_add_motion_index(kate_state *k,size_t motion);
    00620 extern int kate_encode_set_palette_index(kate_state *k,size_t palette);
    00621 extern int kate_encode_set_palette(kate_state *k,const kate_palette *kp);
    00622 extern int kate_encode_set_bitmap_index(kate_state *k,size_t bitmap);
    00623 extern int kate_encode_set_bitmap(kate_state *k,const kate_bitmap *kb);
    00624 extern int kate_encode_add_bitmap(kate_state *k,const kate_bitmap *kb);
    00625 extern int kate_encode_add_bitmap_index(kate_state *k,size_t bitmap);
    00626 extern int kate_encode_set_markup_type(kate_state *k,int markup_type);
    00627 extern int kate_encode_merge_meta(kate_state *k,kate_meta *meta);
    00628 extern int kate_encode_add_meta(kate_state *k,const kate_meta *meta);
    00629 extern kate_int64_t kate_encode_get_granule(const kate_state *k);
    00630
    00632 extern int kate_decode_is_idheader(const kate_packet *kp);
    00633 extern int kate_decode_init(kate_state *k,kate_info *ki);
    00634 extern int kate_decode_headerin(kate_info *ki,kate_comment *kc,kate_packet *kp);
    00635 extern int kate_decode_packetin(kate_state *k,kate_packet *kp);
    00636 extern int kate_decode_eventout(kate_state *k,kate_const kate_event **ev); /* event can be NULL */
    00637 extern int kate_decode_seek(kate_state *k);
    00638
    00640 extern int kate_tracker_init(kate_tracker *kin,const kate_info *ki,kate_const kate_event *ev);
    00641 extern int kate_tracker_clear(kate_tracker *kin);
    00642 extern int kate_tracker_update(kate_tracker *kin,kate_float t,int window_w,int window_h,int frame_x,int frame_y,int frame_w,int frame_h);
    00643 extern int kate_tracker_morph_styles(kate_style *style,kate_float t,const kate_style *from,const kate_style *to);
    00644 extern int kate_tracker_get_text_path_position(kate_tracker *kin,size_t glyph,int *x,int *y);
    00645 extern int kate_tracker_update_property_at_duration(const kate_tracker *kin,kate_float duration,kate_float t,kate_motion_semantics semantics,kate_float *x,kate_float *y);
    00646 extern int kate_tracker_remap(const kate_tracker *kin,kate_motion_mapping x_mapping,kate_motion_mapping y_mapping,kate_float *x,kate_float *y);
    00647
    00649 extern int kate_font_get_index_from_code_point(const kate_font_mapping *kfm,int c);
    00650
    00652 extern int kate_high_decode_init(kate_state *k);
    00653 extern int kate_high_decode_packetin(kate_state *k,kate_packet *kp,kate_const kate_event **ev);
    00654 extern int kate_high_decode_clear(kate_state *k);
    00655 extern const kate_comment *kate_high_decode_get_comments(kate_state *k);
    00656
    00658 extern int kate_packet_wrap(kate_packet *kp,size_t nbytes,const void *data);
    00659 extern int kate_packet_init(kate_packet *kp,size_t nbytes,const void *data);
    00660 extern int kate_packet_clear(kate_packet *kp);
    00661
    00663 extern int kate_meta_create(kate_meta **km);
    00664 extern int kate_meta_destroy(kate_meta *km);
    00665 extern int kate_meta_add(kate_meta *km,const char *tag,const char *value,size_t len);
    00666 extern int kate_meta_add_string(kate_meta *km,const char *tag,const char *value);
    00667 extern int kate_meta_query_tag_count(const kate_meta *km,const char *tag);
    00668 extern int kate_meta_query_tag(const kate_meta *km,const char *tag,unsigned int idx,const char **value,size_t *len);
    00669 extern int kate_meta_remove_tag(kate_meta *km,const char *tag,unsigned int idx);
    00670 extern int kate_meta_query_count(const kate_meta *km);
    00671 extern int kate_meta_query(const kate_meta *km,unsigned int idx,const char **tag,const char **value,size_t *len);
    00672 extern int kate_meta_remove(kate_meta *km,unsigned int idx);
    00673 extern int kate_meta_merge(kate_meta *km,kate_meta *km2);
    00674
    00675 #ifdef __cplusplus
    00676 }
    00677 #endif
    00678
    00681 #define KATE_E_NOT_FOUND (-1)
    00682 #define KATE_E_INVALID_PARAMETER (-2)
    00683 #define KATE_E_OUT_OF_MEMORY (-3)
    00684 #define KATE_E_BAD_GRANULE (-4)
    00685 #define KATE_E_INIT (-5)
    00686 #define KATE_E_BAD_PACKET (-6)
    00687 #define KATE_E_TEXT (-7)
    00688 #define KATE_E_LIMIT (-8)
    00689 #define KATE_E_VERSION (-9)
    00690 #define KATE_E_NOT_KATE (-10)
    00691 #define KATE_E_BAD_TAG (-11)
    00692 #define KATE_E_IMPL (-12)
    00695 #endif
    00696