5 #ifndef PPAPI_CPP_TRUETYPE_FONT_H_
6 #define PPAPI_CPP_TRUETYPE_FONT_H_
8 #include "ppapi/c/dev/ppb_truetype_font_dev.h"
9 #include "ppapi/c/pp_time.h"
10 #include "ppapi/cpp/completion_callback.h"
11 #include "ppapi/cpp/pass_ref.h"
12 #include "ppapi/cpp/resource.h"
56 desc_.family = family_.
pp_var();
60 return desc_.generic_family;
63 desc_.generic_family =
family;
66 PP_TrueTypeFontStyle_Dev
style()
const {
return desc_.style; }
71 PP_TrueTypeFontWeight_Dev
weight()
const {
return desc_.weight; }
76 PP_TrueTypeFontWidth_Dev
width()
const {
return desc_.width; }
81 PP_TrueTypeFontCharset_Dev
charset()
const {
return desc_.charset; }
227 if (!temp_storage_.empty()) {
233 std::vector<TrueTypeFontDesc_Dev>&
output() {
235 typedef std::vector<PP_TrueTypeFontDesc_Dev> Entries;
236 for (Entries::iterator it = temp_storage_.begin();
237 it != temp_storage_.end(); ++it)
239 temp_storage_.clear();
240 return output_storage_;
244 std::vector<PP_TrueTypeFontDesc_Dev> temp_storage_;
245 std::vector<TrueTypeFontDesc_Dev> output_storage_;
272 #endif // PPAPI_CPP_TRUETYPE_FONT_H_
const PP_ArrayOutput & pp_array_output()
static std::vector< TrueTypeFontDesc_Dev > & StorageToPluginArg(StorageType &t)
int32_t Describe(const CompletionCallbackWithOutput< TrueTypeFontDesc_Dev > &callback)
static void Initialize(StorageType *)
PP_TrueTypeFontDesc_Dev StorageType
PP_TrueTypeFontCharset_Dev charset() const
PP_TrueTypeFontStyle_Dev style() const
void set_family(const Var &family)
PP_TrueTypeFontDesc_Dev * APIArgType
int32_t GetTable(uint32_t table, int32_t offset, int32_t max_data_length, const CompletionCallbackWithOutput< std::vector< char > > &callback)
virtual ~TrueTypeFontDescArrayOutputAdapterWithStorage()
PP_TrueTypeFontWeight_Dev weight() const
void set_charset(PP_TrueTypeFontCharset_Dev charset)
void set_output(std::vector< PP_TrueTypeFontDesc_Dev > *output)
const PP_Var & pp_var() const
static TrueTypeFontDesc_Dev StorageToPluginArg(StorageType &t)
PP_TrueTypeFontWidth_Dev width() const
const PP_TrueTypeFontDesc_Dev & pp_desc() const
The TrueTypeFont_Dev class represents a TrueType font resource.
void set_style(PP_TrueTypeFontStyle_Dev style)
TrueTypeFont_Dev()
Default constructor for creating a TrueTypeFont_Dev object.
static int32_t GetFontFamilies(const InstanceHandle &instance, const CompletionCallbackWithOutput< std::vector< Var > > &callback)
std::vector< TrueTypeFontDesc_Dev > & output()
TrueTypeFontDescArrayOutputAdapterWithStorage()
TrueTypeFontDesc_Dev & operator=(const TrueTypeFontDesc_Dev &other)
static int32_t GetFontsInFamily(const InstanceHandle &instance, const Var &family, const CompletionCallbackWithOutput< std::vector< TrueTypeFontDesc_Dev > > &callback)
TrueTypeFontDescArrayOutputAdapterWithStorage StorageType
static APIArgType StorageToAPIArg(StorageType &t)
int32_t GetTableTags(const CompletionCallbackWithOutput< std::vector< uint32_t > > &callback)
A generic type used for passing data types between the module and the page.
PP_ArrayOutput APIArgType
void set_weight(PP_TrueTypeFontWeight_Dev weight)
A reference counted module resource.
void set_generic_family(PP_TrueTypeFontFamily_Dev family)
PP_TrueTypeFontFamily_Dev generic_family() const
void set_width(PP_TrueTypeFontWidth_Dev width)
static APIArgType StorageToAPIArg(StorageType &t)
static void Initialize(StorageType *t)