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

# /home/lyrian/OggVorbis/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 3
    00023 #define KATE_VERSION_PATCH 7
    00028 #define KATE_BITSTREAM_VERSION_MAJOR 0
    00029 #define KATE_BITSTREAM_VERSION_MINOR 5
    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
    00051 typedef struct kate_region {
    00052   kate_space_metric metric;
    00053   int x;
    00054   int y;
    00055   int w;
    00056   int h;
    00057   int style;
    00058   unsigned int clip:1;
    00059   unsigned int pad0:31;
    00060   kate_uintptr_t pad1[6];
    00061 } kate_region;
    00062
    00064 typedef struct kate_color {
    00065   unsigned char r;
    00066   unsigned char g;
    00067   unsigned char b;
    00068   unsigned char a;
    00069 } kate_color;
    00070
    00072 typedef enum {
    00073   kate_wrap_word,
    00074   kate_wrap_none
    00075 } kate_wrap_mode;
    00076
    00078 typedef struct kate_style {
    00079   kate_float halign;
    00080   kate_float valign;
    00082   kate_color text_color;
    00083   kate_color background_color;
    00084   kate_color draw_color;
    00086   kate_space_metric font_metric;
    00087   kate_float font_width;
    00088   kate_float font_height;
    00090   kate_space_metric margin_metric;
    00091   kate_float left_margin;
    00092   kate_float top_margin;
    00093   kate_float right_margin;
    00094   kate_float bottom_margin;
    00096   unsigned int bold:1;
    00097   unsigned int italics:1;
    00098   unsigned int underline:1;
    00099   unsigned int strike:1;
    00100   unsigned int justify:1;
    00101   unsigned int wrap_mode:2;
    00102   unsigned int pad0:25;
    00103
    00104   kate_const char *font;
    00106   kate_uintptr_t pad1[9];
    00107 } kate_style;
    00108
    00110 typedef enum kate_curve_type {
    00111   kate_curve_none,
    00112   kate_curve_static,
    00113   kate_curve_linear,
    00114   kate_curve_catmull_rom_spline,
    00115   kate_curve_bezier_cubic_spline,
    00116   kate_curve_bspline
    00117 } kate_curve_type;
    00118
    00120 typedef struct kate_curve {
    00121   kate_curve_type type;
    00122   size_t npts;
    00123   kate_float *pts;
    00124   kate_uintptr_t pad[5];
    00125 } kate_curve;
    00126
    00128 typedef enum kate_motion_mapping {
    00129   /* these can be used for a x/y position mapping */
    00130   kate_motion_mapping_none,
    00131   kate_motion_mapping_frame,
    00132   kate_motion_mapping_window,
    00133   kate_motion_mapping_region,
    00134   kate_motion_mapping_event_duration,
    00135   kate_motion_mapping_bitmap_size,
    00137 #if 0
    00138   text is useful, find a way to readd it easily
    00139   kate_motion_mapping_text,
    00140 #endif
    00141
    00142   /* more mapping may be added in future versions */
    00143
    00144   kate_motion_mapping_user=128
    00145 } kate_motion_mapping;
    00146
    00148 typedef enum kate_motion_semantics {
    00149   kate_motion_semantics_time,
    00150   kate_motion_semantics_z,
    00151   kate_motion_semantics_region_position,
    00152   kate_motion_semantics_region_size,
    00153   kate_motion_semantics_text_alignment_int,
    00154   kate_motion_semantics_text_alignment_ext,
    00155   kate_motion_semantics_text_position,
    00156   kate_motion_semantics_text_size,
    00157   kate_motion_semantics_marker1_position,
    00158   kate_motion_semantics_marker2_position,
    00159   kate_motion_semantics_marker3_position,
    00160   kate_motion_semantics_marker4_position,
    00161   kate_motion_semantics_glyph_pointer_1,
    00162   kate_motion_semantics_glyph_pointer_2,
    00163   kate_motion_semantics_glyph_pointer_3,
    00164   kate_motion_semantics_glyph_pointer_4,
    00165   kate_motion_semantics_text_color_rg,
    00166   kate_motion_semantics_text_color_ba,
    00167   kate_motion_semantics_background_color_rg,
    00168   kate_motion_semantics_background_color_ba,
    00169   kate_motion_semantics_draw_color_rg,
    00170   kate_motion_semantics_draw_color_ba,
    00171   kate_motion_semantics_style_morph,
    00172   kate_motion_semantics_text_path,
    00173   kate_motion_semantics_text_path_section,
    00174   kate_motion_semantics_draw,
    00175   kate_motion_semantics_text_visible_section,
    00176   kate_motion_semantics_horizontal_margins,
    00177   kate_motion_semantics_vertical_margins,
    00178   kate_motion_semantics_bitmap_position,
    00179   kate_motion_semantics_bitmap_size,
    00180   kate_motion_semantics_marker1_bitmap,
    00181   kate_motion_semantics_marker2_bitmap,
    00182   kate_motion_semantics_marker3_bitmap,
    00183   kate_motion_semantics_marker4_bitmap,
    00184   kate_motion_semantics_glyph_pointer_1_bitmap,
    00185   kate_motion_semantics_glyph_pointer_2_bitmap,
    00186   kate_motion_semantics_glyph_pointer_3_bitmap,
    00187   kate_motion_semantics_glyph_pointer_4_bitmap,
    00188   kate_motion_semantics_draw_width,
    00190   /* more semantics may be added in future versions */
    00191
    00192   kate_motion_semantics_user = 128
    00193 } kate_motion_semantics;
    00194
    00196 typedef struct kate_motion {
    00197   size_t ncurves;
    00198   kate_curve **curves;
    00199   kate_float *durations;
    00200   kate_motion_mapping x_mapping;
    00201   kate_motion_mapping y_mapping;
    00202   kate_motion_semantics semantics;
    00203   unsigned int periodic:1;
    00204   unsigned int pad0:31;
    00205   kate_uintptr_t pad1[5];
    00206 } kate_motion;
    00207
    00209 typedef enum kate_text_directionality {
    00210   kate_l2r_t2b,
    00211   kate_r2l_t2b,
    00212   kate_t2b_r2l,
    00213   kate_t2b_l2r
    00214 } kate_text_directionality;
    00215
    00217 typedef struct kate_palette {
    00218   size_t ncolors;
    00219   kate_color *colors;
    00220   kate_uintptr_t pad[2];
    00221 } kate_palette;
    00222
    00224 typedef enum kate_bitmap_type {
    00225   kate_bitmap_type_paletted,
    00226   kate_bitmap_type_png
    00227 } kate_bitmap_type;
    00228
    00230 typedef struct kate_bitmap {
    00231   size_t width;
    00232   size_t height;
    00233   unsigned char bpp;
    00234   kate_bitmap_type type;
    00235   unsigned char pad0[2];
    00236   int palette;
    00237   unsigned char *pixels;
    00238   size_t size;
    00239   int x_offset;
    00240   int y_offset;
    00241 } kate_bitmap;
    00242
    00244 typedef struct kate_font_range {
    00245   int first_code_point;
    00246   int last_code_point;
    00247   int first_bitmap;
    00248   kate_uintptr_t pad[5];
    00249 } kate_font_range;
    00250
    00252 typedef struct kate_font_mapping {
    00253   size_t nranges;
    00254   kate_font_range **ranges;
    00255   kate_uintptr_t pad[6];
    00256 } kate_font_mapping;
    00257
    00263 typedef struct kate_info {
    00264   unsigned char bitstream_version_major;
    00265   unsigned char bitstream_version_minor;
    00266   unsigned char pad0[2];
    00267
    00268   kate_text_encoding text_encoding;
    00269   kate_text_directionality text_directionality;
    00271   unsigned char num_headers;
    00272   unsigned char granule_shift;
    00273   unsigned char pad1[2];
    00274
    00275   kate_uint32_t gps_numerator;
    00276   kate_uint32_t gps_denominator;
    00278   kate_const char *language;
    00280   kate_const char *category;
    00282   size_t nregions;
    00283   kate_const kate_region *kate_const *regions;
    00285   size_t nstyles;
    00286   kate_const kate_style *kate_const *styles;
    00288   size_t ncurves;
    00289   kate_const kate_curve *kate_const *curves;
    00291   size_t nmotions;
    00292   kate_const kate_motion *kate_const *motions;
    00294   size_t npalettes;
    00295   kate_const kate_palette *kate_const *palettes;
    00297   size_t nbitmaps;
    00298   kate_const kate_bitmap *kate_const *bitmaps;
    00300   size_t nfont_ranges;
    00301   kate_const kate_font_range *kate_const *font_ranges;
    00303   size_t nfont_mappings;
    00304   kate_const kate_font_mapping *kate_const *font_mappings;
    00306   kate_markup_type text_markup_type;
    00308   size_t original_canvas_width;
    00309   size_t original_canvas_height;
    00311   kate_uintptr_t pad2[11];
    00312
    00313   /* internal */
    00314   int remove_markup;
    00315   int no_limits;
    00316   int probe;
    00317
    00318   kate_uintptr_t pad3[13];
    00319 } kate_info;
    00320
    00321 struct kate_encode_state; /* internal */
    00322 struct kate_decode_state; /* internal */
    00323
    00325 typedef struct kate_state {
    00326   kate_const kate_info *ki;
    00328   /* internal */
    00329   kate_const struct kate_encode_state *kes;
    00330   kate_const struct kate_decode_state *kds;
    00331
    00332   kate_uintptr_t pad[5];
    00333 } kate_state;
    00334
    00336 typedef struct kate_comment {
    00337   char **user_comments;
    00338   int *comment_lengths;
    00339   int comments;
    00340   char *vendor;
    00341 } kate_comment;
    00342
    00347 typedef struct kate_event {
    00348   kate_int64_t start;
    00349   kate_int64_t duration;
    00350   kate_int64_t backlink;
    00352   kate_float start_time;
    00353   kate_float end_time;
    00355   kate_int32_t id;
    00357   kate_text_encoding text_encoding;
    00358   kate_text_directionality text_directionality;
    00359   kate_const char *language;
    00360   kate_const char *text;
    00361   size_t len;
    00362   size_t len0;
    00364   size_t nmotions;
    00365   kate_const kate_motion *kate_const *motions;
    00367   kate_const kate_region *region;
    00368   kate_const kate_style *style;
    00369   kate_const kate_style *secondary_style;
    00370   kate_const kate_font_mapping *font_mapping;
    00371   kate_const kate_palette *palette;
    00372   kate_const kate_bitmap *bitmap;
    00374   kate_markup_type text_markup_type;
    00376   size_t nbitmaps;
    00377   kate_const kate_bitmap *kate_const *bitmaps;
    00379   kate_uintptr_t pad0[6];
    00380
    00381   /* internal */
    00382   const kate_info *ki;
    00383   size_t trackers;
    00384
    00385   kate_uintptr_t pad1[10];
    00386 } kate_event;
    00387
    00388 struct kate_tracker_internal; /* internal */
    00389
    00391 typedef struct kate_tracker {
    00392   const kate_info *ki;
    00393   kate_const kate_event *event;
    00394   kate_float t;
    00396   struct {
    00397     unsigned int region:1;
    00398     unsigned int text_alignment_int:1;
    00399     unsigned int text_alignment_ext:1;
    00400     unsigned int text_pos:1;
    00401     unsigned int text_size:1;
    00402     unsigned int marker_pos:4;
    00403     unsigned int text_color:1;
    00404     unsigned int background_color:1;
    00405     unsigned int draw_color:1;
    00406     unsigned int glyph_pointer:4;
    00407     unsigned int path:1;
    00408     unsigned int draw:1;
    00409     unsigned int visible_section:1;
    00410     unsigned int z:1;
    00411     unsigned int hmargins:1;
    00412     unsigned int vmargins:1;
    00413     unsigned int bitmap_pos:1;
    00414     unsigned int bitmap_size:1;
    00415     unsigned int marker_bitmap:4;
    00416     unsigned int glyph_pointer_bitmap:4;
    00417     unsigned int draw_width:1;
    00418     /* 33 bits */
    00419     unsigned int pad0:31;
    00420     /* 64 bits */
    00421   } has;
    00423   int window_w;
    00424   int window_h;
    00425   int frame_x;
    00426   int frame_y;
    00427   int frame_w;
    00428   int frame_h;
    00430   /* has.region */
    00431   kate_float region_x;
    00432   kate_float region_y;
    00433   kate_float region_w;
    00434   kate_float region_h;
    00436   /* has.text_alignment (int/ext) */
    00437   kate_float text_halign;
    00438   kate_float text_valign;
    00440   /* has.text_pos */
    00441   kate_float text_x;
    00442   kate_float text_y;
    00444   /* has.text_size */
    00445   kate_float text_size_x;
    00446   kate_float text_size_y;
    00448   /* has.marker_pos&(1<<n) */
    00449   kate_float marker_x[4];
    00450   kate_float marker_y[4];
    00452   /* has.text_color */
    00453   kate_color text_color;
    00455   /* has.background_color */
    00456   kate_color background_color;
    00458   /* has.draw_color */
    00459   kate_color draw_color;
    00461   /* has.glyph_pointer&(1<<n) */
    00462   kate_float glyph_pointer[4];
    00463   kate_float glyph_height[4];
    00465   /* has.path */
    00466   kate_float path_start;
    00467   kate_float path_end;
    00469   /* has.draw */
    00470   kate_float draw_x;
    00471   kate_float draw_y;
    00473   /* has.visible_section */
    00474   kate_float visible_x;
    00475   kate_float visible_y;
    00477   /* has.z */
    00478   kate_float z;
    00480   /* has.hmargins */
    00481   kate_float left_margin;
    00482   kate_float right_margin;
    00484   /* has.vmargins */
    00485   kate_float top_margin;
    00486   kate_float bottom_margin;
    00488   /* has.bitmap_pos */
    00489   kate_float bitmap_x;
    00490   kate_float bitmap_y;
    00492   /* has.bitmap_size */
    00493   kate_float bitmap_size_x;
    00494   kate_float bitmap_size_y;
    00496   /* has.marker_bitmap&(1<<n) */
    00497   const kate_bitmap *marker_bitmap[4];
    00499   /* has.glyph_pointer_bitmap&(1<<n) */
    00500   const kate_bitmap *glyph_pointer_bitmap[4];
    00502   /* has.draw_width */
    00503   kate_float draw_width;
    00505   /* internal */
    00506   struct kate_tracker_internal *internal;
    00507
    00508   kate_uintptr_t pad[19];
    00509
    00510 } kate_tracker;
    00511
    00513 typedef struct kate_packet {
    00514   size_t nbytes;
    00515   void *data;
    00516 } kate_packet;
    00517
    00518 #ifdef __cplusplus
    00519 extern "C" {
    00520 #endif
    00521
    00523 extern int kate_get_version(void);
    00524 extern const char *kate_get_version_string(void);
    00525 extern int kate_get_bitstream_version(void);
    00526 extern const char *kate_get_bitstream_version_string(void);
    00527
    00529 extern int kate_info_init(kate_info *ki);
    00530 extern int kate_info_set_granule_encoding(kate_info *ki,kate_float resolution,kate_float max_length,kate_float max_event_lifetime);
    00531 extern int kate_info_set_language(kate_info *ki,const char *language);
    00532 extern int kate_info_set_text_directionality(kate_info *ki,kate_text_directionality text_directionality);
    00533 extern int kate_info_set_markup_type(kate_info *ki,kate_markup_type text_markup_type);
    00534 extern int kate_info_set_category(kate_info *ki,const char *category);
    00535 extern int kate_info_set_original_canvas_size(kate_info *ki,size_t width,size_t height);
    00536 extern int kate_info_add_region(kate_info *ki,kate_region *kr);
    00537 extern int kate_info_add_style(kate_info *ki,kate_style *ks);
    00538 extern int kate_info_add_curve(kate_info *ki,kate_curve *kc);
    00539 extern int kate_info_add_motion(kate_info *ki,kate_motion *km);
    00540 extern int kate_info_add_palette(kate_info *ki,kate_palette *kp);
    00541 extern int kate_info_add_bitmap(kate_info *ki,kate_bitmap *kb);
    00542 extern int kate_info_add_font_range(kate_info *ki,kate_font_range *kfr);
    00543 extern int kate_info_add_font_mapping(kate_info *ki,kate_font_mapping *kfm);
    00544 extern int kate_info_matches_language(const kate_info *ki,const char *language);
    00545 extern int kate_info_remove_markup(kate_info *ki,int flag);
    00546 extern int kate_info_no_limits(kate_info *ki,int flag);
    00547 extern int kate_info_clear(kate_info *ki);
    00548
    00550 extern int kate_granule_shift(const kate_info *ki);
    00551 extern int kate_granule_split_time(const kate_info *ki,kate_int64_t granulepos,kate_float *base,kate_float *offset);
    00552 extern kate_float kate_granule_time(const kate_info *ki,kate_int64_t granulepos);
    00553 extern kate_int64_t kate_duration_granule(const kate_info *ki,kate_float duration);
    00554 extern kate_float kate_granule_duration(const kate_info *ki,kate_int64_t duration);
    00555
    00557 extern int kate_clear(kate_state *k);
    00558 extern int kate_motion_get_point(const kate_motion *km,kate_float duration,kate_float t,kate_float *x,kate_float *y);
    00559 extern int kate_curve_get_point(const kate_curve *kc,kate_float t,kate_float *x,kate_float *y);
    00560 extern int kate_region_init(kate_region *kr);
    00561 extern int kate_style_init(kate_style *ks);
    00562 extern int kate_palette_init(kate_palette *kp);
    00563 extern int kate_bitmap_init(kate_bitmap *kb);
    00564 extern int kate_curve_init(kate_curve *kc);
    00565 extern int kate_motion_init(kate_motion *km);
    00566
    00568 extern int kate_text_get_character(kate_text_encoding text_encoding,const char ** const text,size_t *len0);
    00569 extern int kate_text_set_character(kate_text_encoding text_encoding,int c,char ** const text,size_t *len0);
    00570 extern int kate_text_remove_markup(kate_text_encoding text_encoding,char *text,size_t *len0);
    00571 extern int kate_text_validate(kate_text_encoding text_encoding,const char *text,size_t len0);
    00572
    00574 extern int kate_comment_init(kate_comment *kc);
    00575 extern int kate_comment_clear(kate_comment *kc);
    00576 extern int kate_comment_add(kate_comment *kc,const char *comment);
    00577 extern int kate_comment_add_length(kate_comment *kc,const char *comment,size_t len);
    00578 extern int kate_comment_add_tag(kate_comment *kc,const char *tag,const char *value);
    00579 extern const char *kate_comment_query(const kate_comment *kc,const char *tag,int count);
    00580 extern int kate_comment_query_count(const kate_comment *kc,const char *tag);
    00581
    00583 extern int kate_encode_init(kate_state *k,kate_info *ki);
    00584 extern int kate_encode_headers(kate_state *k,kate_comment *kc,kate_packet *kp);
    00585 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 */
    00586 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 */
    00587 extern int kate_encode_keepalive(kate_state *k,kate_float t,kate_packet *kp);
    00588 extern int kate_encode_keepalive_raw_times(kate_state *k,kate_int64_t t,kate_packet *kp);
    00589 extern int kate_encode_repeat(kate_state *k,kate_float t,kate_float threshold,kate_packet *kp);
    00590 extern int kate_encode_repeat_raw_times(kate_state *k,kate_int64_t t,kate_int64_t threshold,kate_packet *kp);
    00591 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 */
    00592 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 */
    00593 extern int kate_encode_set_id(kate_state *k,kate_int32_t id);
    00594 extern int kate_encode_set_language(kate_state *k,const char *language); /* language can be NULL */
    00595 extern int kate_encode_set_text_encoding(kate_state *k,kate_text_encoding text_encoding);
    00596 extern int kate_encode_set_text_directionality(kate_state *k,kate_text_directionality text_directionality);
    00597 extern int kate_encode_set_region_index(kate_state *k,size_t region);
    00598 extern int kate_encode_set_region(kate_state *k,const kate_region *kr);
    00599 extern int kate_encode_set_style_index(kate_state *k,size_t style);
    00600 extern int kate_encode_set_style(kate_state *k,const kate_style *ks);
    00601 extern int kate_encode_set_secondary_style_index(kate_state *k,size_t style);
    00602 extern int kate_encode_set_secondary_style(kate_state *k,const kate_style *ks);
    00603 extern int kate_encode_set_font_mapping_index(kate_state *k,size_t font_mapping);
    00604 extern int kate_encode_add_motion(kate_state *k,kate_motion *km,int destroy);
    00605 extern int kate_encode_add_motion_index(kate_state *k,size_t motion);
    00606 extern int kate_encode_set_palette_index(kate_state *k,size_t palette);
    00607 extern int kate_encode_set_palette(kate_state *k,const kate_palette *kp);
    00608 extern int kate_encode_set_bitmap_index(kate_state *k,size_t bitmap);
    00609 extern int kate_encode_set_bitmap(kate_state *k,const kate_bitmap *kb);
    00610 extern int kate_encode_add_bitmap(kate_state *k,const kate_bitmap *kb);
    00611 extern int kate_encode_add_bitmap_index(kate_state *k,size_t bitmap);
    00612 extern int kate_encode_set_markup_type(kate_state *k,int markup_type);
    00613 extern kate_int64_t kate_encode_get_granule(const kate_state *k);
    00614
    00616 extern int kate_decode_is_idheader(const kate_packet *kp);
    00617 extern int kate_decode_init(kate_state *k,kate_info *ki);
    00618 extern int kate_decode_headerin(kate_info *ki,kate_comment *kc,kate_packet *kp);
    00619 extern int kate_decode_packetin(kate_state *k,kate_packet *kp);
    00620 extern int kate_decode_eventout(kate_state *k,kate_const kate_event **ev); /* event can be NULL */
    00621 extern int kate_decode_seek(kate_state *k);
    00622
    00624 extern int kate_tracker_init(kate_tracker *kin,const kate_info *ki,kate_const kate_event *ev);
    00625 extern int kate_tracker_clear(kate_tracker *kin);
    00626 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);
    00627 extern int kate_tracker_morph_styles(kate_style *style,kate_float t,const kate_style *from,const kate_style *to);
    00628 extern int kate_tracker_get_text_path_position(kate_tracker *kin,size_t glyph,int *x,int *y);
    00629 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);
    00630 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);
    00631
    00633 extern int kate_font_get_index_from_code_point(const kate_font_mapping *kfm,int c);
    00634
    00636 extern int kate_high_decode_init(kate_state *k);
    00637 extern int kate_high_decode_packetin(kate_state *k,kate_packet *kp,kate_const kate_event **ev);
    00638 extern int kate_high_decode_clear(kate_state *k);
    00639 extern const kate_comment *kate_high_decode_get_comments(kate_state *k);
    00640
    00642 extern int kate_packet_wrap(kate_packet *kp,size_t nbytes,const void *data);
    00643 extern int kate_packet_init(kate_packet *kp,size_t nbytes,const void *data);
    00644 extern int kate_packet_clear(kate_packet *kp);
    00645
    00646 #ifdef __cplusplus
    00647 }
    00648 #endif
    00649
    00652 #define KATE_E_NOT_FOUND (-1)
    00653 #define KATE_E_INVALID_PARAMETER (-2)
    00654 #define KATE_E_OUT_OF_MEMORY (-3)
    00655 #define KATE_E_BAD_GRANULE (-4)
    00656 #define KATE_E_INIT (-5)
    00657 #define KATE_E_BAD_PACKET (-6)
    00658 #define KATE_E_TEXT (-7)
    00659 #define KATE_E_LIMIT (-8)
    00660 #define KATE_E_VERSION (-9)
    00661 #define KATE_E_NOT_KATE (-10)
    00662 #define KATE_E_BAD_TAG (-11)
    00663 #define KATE_E_IMPL (-12)
    00666 #endif
    00667