hb-shape-plan.h revision 13240:8c09472c3de2
1193323Sed/*
2193323Sed * Copyright �� 2012  Google, Inc.
3193323Sed *
4193323Sed *  This is part of HarfBuzz, a text shaping library.
5193323Sed *
6193323Sed * Permission is hereby granted, without written agreement and without
7193323Sed * license or royalty fees, to use, copy, modify, and distribute this
8193323Sed * software and its documentation for any purpose, provided that the
9193323Sed * above copyright notice and the following two paragraphs appear in
10193323Sed * all copies of this software.
11193323Sed *
12193323Sed * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13193323Sed * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14193323Sed * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15193323Sed * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16193323Sed * DAMAGE.
17193323Sed *
18193323Sed * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19193323Sed * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20193323Sed * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
21193323Sed * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22193323Sed * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23193323Sed *
24193323Sed * Google Author(s): Behdad Esfahbod
25193323Sed */
26193323Sed
27193323Sed#ifndef HB_H_IN
28193323Sed#error "Include <hb.h> instead."
29193323Sed#endif
30193323Sed
31193323Sed#ifndef HB_SHAPE_PLAN_H
32219077Sdim#define HB_SHAPE_PLAN_H
33193323Sed
34193323Sed#include "hb-common.h"
35193323Sed#include "hb-font.h"
36193323Sed
37219077SdimHB_BEGIN_DECLS
38219077Sdim
39193323Sedtypedef struct hb_shape_plan_t hb_shape_plan_t;
40193323Sed
41193323Sedhb_shape_plan_t *
42219077Sdimhb_shape_plan_create (hb_face_t                     *face,
43193323Sed                      const hb_segment_properties_t *props,
44198090Srdivacky                      const hb_feature_t            *user_features,
45193323Sed                      unsigned int                   num_user_features,
46219077Sdim                      const char * const            *shaper_list);
47193323Sed
48193323Sedhb_shape_plan_t *
49193323Sedhb_shape_plan_create_cached (hb_face_t                     *face,
50219077Sdim                             const hb_segment_properties_t *props,
51193323Sed                             const hb_feature_t            *user_features,
52193323Sed                             unsigned int                   num_user_features,
53193323Sed                             const char * const            *shaper_list);
54219077Sdim
55193323Sedhb_shape_plan_t *
56193323Sedhb_shape_plan_get_empty (void);
57193323Sed
58193323Sedhb_shape_plan_t *
59193323Sedhb_shape_plan_reference (hb_shape_plan_t *shape_plan);
60193323Sed
61219077Sdimvoid
62198090Srdivackyhb_shape_plan_destroy (hb_shape_plan_t *shape_plan);
63198090Srdivacky
64201360Srdivackyhb_bool_t
65201360Srdivackyhb_shape_plan_set_user_data (hb_shape_plan_t    *shape_plan,
66201360Srdivacky                             hb_user_data_key_t *key,
67201360Srdivacky                             void *              data,
68201360Srdivacky                             hb_destroy_func_t   destroy,
69201360Srdivacky                             hb_bool_t           replace);
70201360Srdivacky
71201360Srdivackyvoid *
72201360Srdivackyhb_shape_plan_get_user_data (hb_shape_plan_t    *shape_plan,
73201360Srdivacky                             hb_user_data_key_t *key);
74201360Srdivacky
75201360Srdivacky
76201360Srdivackyhb_bool_t
77201360Srdivackyhb_shape_plan_execute (hb_shape_plan_t    *shape_plan,
78201360Srdivacky                       hb_font_t          *font,
79193323Sed                       hb_buffer_t        *buffer,
80193323Sed                       const hb_feature_t *features,
81193323Sed                       unsigned int        num_features);
82193323Sed
83219077Sdimconst char *
84193323Sedhb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan);
85193323Sed
86193323Sed
87219077SdimHB_END_DECLS
88193323Sed
89193323Sed#endif /* HB_SHAPE_PLAN_H */
90193323Sed