libkate: /home/v/Kate/WORK_TREES/kate-sorceress-backup/v/src/kate/src/kate_encode_state.h Source File

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

- File List
- Globals

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

    00001 /* Copyright (C) 2008 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_encode_state_h_GUARD
    00011 #define KATE_kate_encode_state_h_GUARD
    00012
    00013 #include "kate_internal.h"
    00014 #include "kate_bitwise.h"
    00015 #include "kate/kate.h"
    00016
    00017 typedef struct kate_event_timing {
    00018   kate_int64_t start;
    00019   kate_int64_t end;
    00020
    00021   kate_int32_t id;
    00022   kate_int64_t repeat;
    00023
    00024   size_t original_size;
    00025   void *original_data;
    00026
    00027   size_t repeat_size;
    00028   void *repeat_data;
    00029 } kate_event_timing;
    00030
    00031 typedef struct kate_encode_state {
    00032   kate_pack_buffer kpb;
    00033
    00034   const kate_info *ki;
    00035
    00036   kate_int32_t id;
    00037
    00038   kate_int64_t granulepos;
    00039   kate_int64_t packetno;
    00040
    00041   kate_int64_t furthest_granule;
    00042
    00043   size_t nmotions;
    00044   kate_motion **motions;
    00045   int *destroy_motions;
    00046   size_t *motion_indices;
    00047
    00048   size_t nbitmaps;
    00049   const kate_bitmap **bitmaps;
    00050   size_t *bitmap_indices;
    00051
    00052   int eos;
    00053
    00054   size_t ntimings;
    00055   kate_event_timing *timings;
    00056
    00057   struct {
    00058     char *language;
    00059     kate_text_encoding text_encoding;
    00060     kate_text_directionality text_directionality;
    00061     kate_markup_type text_markup_type;
    00062     int region_index;
    00063     const kate_region *region;
    00064     int style_index;
    00065     const kate_style *style;
    00066     int secondary_style_index;
    00067     const kate_style *secondary_style;
    00068     int font_mapping_index;
    00069
    00070     const kate_palette *palette;
    00071     int palette_index;
    00072     const kate_bitmap *bitmap;
    00073     int bitmap_index;
    00074   } overrides;
    00075 } kate_encode_state;
    00076
    00077 extern kate_encode_state *kate_encode_state_create(const kate_info *ki) kate_internal;
    00078 extern int kate_encode_state_clear_overrides(kate_encode_state *kes) kate_internal;
    00079 extern int kate_encode_state_add_motion(kate_encode_state *kes,kate_motion *km,int destroy) kate_internal;
    00080 extern int kate_encode_state_add_motion_index(kate_encode_state *kes,size_t motion) kate_internal;
    00081 extern int kate_encode_state_add_bitmap(kate_encode_state *kes,const kate_bitmap *kb) kate_internal;
    00082 extern int kate_encode_state_add_bitmap_index(kate_encode_state *kes,size_t bitmap) kate_internal;
    00083 extern int kate_encode_state_destroy(kate_encode_state *kes) kate_internal;
    00084
    00085 extern int kate_encode_state_add_event(kate_encode_state *kes,kate_int64_t start,kate_int64_t end) kate_internal;
    00086 extern int kate_encode_state_get_earliest_event(kate_encode_state *kes,kate_int64_t *start,kate_int64_t *end) kate_internal;
    00087 extern int kate_encode_state_get_latest_event(kate_encode_state *kes,kate_int64_t *start,kate_int64_t *end) kate_internal;
    00088 extern int kate_encode_state_trim_events(kate_encode_state *kes,kate_int64_t t) kate_internal;
    00089 extern int kate_encode_state_save_event_buffer(kate_encode_state *kes,size_t size,const void *data) kate_internal;
    00090 extern int kate_encode_state_get_repeat(kate_encode_state *kes,kate_int64_t t,kate_int64_t threshold,kate_packet *kp) kate_internal;
    00091
    00092 #endif