-
Notifications
You must be signed in to change notification settings - Fork 11
/
egi_txt.h
63 lines (53 loc) · 2.33 KB
/
egi_txt.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
61
62
63
/*------------------ eig_txt.h --------------------------------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
Midas Zhou
--------------------------------------------------------------------*/
#ifndef __EGI_TXT_H__
#define __EGI_TXT_H__
#include "egi.h"
#include "egi_symbol.h"
#include <stdio.h>
#include <stdbool.h>
/* for txt ebox */
EGI_DATA_TXT *egi_init_data_txt(EGI_DATA_TXT *data_txt, /* ----- OBSOLETE ----- */
int offx, int offy, int nl, int llen, EGI_SYMPAGE *font, uint16_t color);
/* For non_FTsymbols */
EGI_DATA_TXT *egi_txtdata_new( int offx, int offy, /* create new txt data */
int nl, /* lines */
int llen, /* chars per line */
EGI_SYMPAGE *font, /* font */
uint16_t color /* txt color */
);
/* For FTsymbols */
EGI_DATA_TXT *egi_utxtdata_new( int offx, int offy, /* offset from ebox left top */
int nl, /* lines */
int pixpl, /* pixels per line */
FT_Face font_face, /* font face type */
int fw, int fh, /* font width and height, in pixels */
int gap, /* adjust gap between lines */
uint16_t color /* txt color */
);
EGI_EBOX * egi_txtbox_new( char *tag,/* create new txt ebox */
EGI_DATA_TXT *egi_data,
bool movable,
int x0, int y0,
int width, int height,
int frame,
int prmcolor
);
int egi_txtbox_activate(EGI_EBOX *ebox);
int egi_txtbox_refresh(EGI_EBOX *ebox);
//static int egi_txtbox_decorate(EGI_EBOX *ebox);
int egi_txtbox_sleep(EGI_EBOX *ebox);
int egi_txtbox_hide(EGI_EBOX *ebox);
int egi_txtbox_unhide(EGI_EBOX *ebox);
EGI_DATA_TXT *egi_txtbox_getdata(EGI_EBOX *ebox);
void egi_free_data_txt(EGI_DATA_TXT *data_txt);
/* For non_FTsymbols only */
int egi_txtbox_readfile(EGI_EBOX *ebox, char *path);
void egi_txtbox_settitle(EGI_EBOX *ebox, char *title);
int egi_push_datatxt(EGI_EBOX *ebox, char *buf, int *pnl);
int egi_txtbox_set_direct(EGI_EBOX *ebox, int direct);
#endif