Flutter Engine
hb_wrappers.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef HB_WRAPPERS_H_
6 #define HB_WRAPPERS_H_
7 
8 #include <hb-subset.h>
9 
10 #include <memory>
11 
12 namespace HarfbuzzWrappers {
14  void operator()(hb_blob_t* ptr) { hb_blob_destroy(ptr); }
15 };
16 
18  void operator()(hb_face_t* ptr) { hb_face_destroy(ptr); }
19 };
20 
22  void operator()(hb_subset_input_t* ptr) { hb_subset_input_destroy(ptr); }
23 };
24 
26  void operator()(hb_set_t* ptr) { hb_set_destroy(ptr); }
27 };
28 
29 using HbBlobPtr = std::unique_ptr<hb_blob_t, hb_blob_deleter>;
30 using HbFacePtr = std::unique_ptr<hb_face_t, hb_face_deleter>;
31 using HbSubsetInputPtr =
32  std::unique_ptr<hb_subset_input_t, hb_subset_input_deleter>;
33 using HbSetPtr = std::unique_ptr<hb_set_t, hb_set_deleter>;
34 
35 }; // namespace HarfbuzzWrappers
36 
37 #endif // HB_WRAPPERS_H_s
void operator()(hb_blob_t *ptr)
Definition: hb_wrappers.h:14
std::unique_ptr< hb_face_t, hb_face_deleter > HbFacePtr
Definition: hb_wrappers.h:30
void operator()(hb_subset_input_t *ptr)
Definition: hb_wrappers.h:22
void operator()(hb_face_t *ptr)
Definition: hb_wrappers.h:18
std::unique_ptr< hb_blob_t, hb_blob_deleter > HbBlobPtr
Definition: hb_wrappers.h:29
std::unique_ptr< hb_set_t, hb_set_deleter > HbSetPtr
Definition: hb_wrappers.h:33
std::unique_ptr< hb_subset_input_t, hb_subset_input_deleter > HbSubsetInputPtr
Definition: hb_wrappers.h:32
void operator()(hb_set_t *ptr)
Definition: hb_wrappers.h:26