forked from reboot/obs-text-pango
-
Notifications
You must be signed in to change notification settings - Fork 16
/
text-pango.h
60 lines (44 loc) · 914 Bytes
/
text-pango.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include <obs-module.h>
#include <obs-scene.h>
enum {
ALIGN_LEFT = 0,
ALIGN_RIGHT = 1,
ALIGN_CENTER = 2,
ALIGN_TOP = 3,
ALIGN_BOTTOM = 4, // Align with gdi/freetype if possible.
};
struct pango_source {
/* Config */
bool from_file;
char *text;
char *text_file;
bool font_from_file;
const char *font_file; // direct from QT
char *font_name;
uint16_t font_size;
uint32_t font_flags;
bool vertical;
int align;
int v_align;
bool gradient;
uint32_t color[2];
bool outline;
uint32_t outline_width;
uint32_t outline_color;
bool drop_shadow;
uint32_t drop_shadow_offset;
uint32_t drop_shadow_color;
bool log_mode;
uint32_t log_lines;
uint32_t custom_width;
bool word_wrap;
char *encoding;
char *lang;
/* State */
gs_texture_t *tex;
uint32_t width, height;
bool file_load_failed;
time_t file_timestamp;
float file_last_checked; // Sec since last checked
};