-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathAddonData.h
More file actions
36 lines (31 loc) · 1.18 KB
/
AddonData.h
File metadata and controls
36 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <pango/pangocairo.h>
#include <v8.h>
#include <nan.h>
/*
* FontFace describes a font file in terms of one PangoFontDescription that
* will resolve to it and one that the user describes it as (like @font-face)
*/
class FontFace {
public:
PangoFontDescription *sys_desc = nullptr;
PangoFontDescription *user_desc = nullptr;
unsigned char file_path[1024];
};
class AddonData {
public:
Nan::Persistent<v8::FunctionTemplate> canvas_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> gradient_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> context2d_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> image_data_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> image_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> pattern_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> image_backend_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> pdf_backend_ctor_tpl;
Nan::Persistent<v8::FunctionTemplate> svg_backend_ctor_tpl;
Nan::Persistent<v8::Function> context2d_dom_matrix;
Nan::Persistent<v8::Function> context2d_parse_font;
Nan::Persistent<v8::Function> pattern_dom_matrix;
AddonData();
static void Dispose(void*);
};