File: ui_font_cache.h

package info (click to toggle)
mlterm 3.9.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,340 kB
  • sloc: ansic: 154,713; sh: 5,302; cpp: 2,953; objc: 2,776; java: 2,472; makefile: 2,445; perl: 1,674; xml: 44
file content (60 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download
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
/* -*- c-basic-offset:2; tab-width:2; indent-tabs-mode:nil -*- */

#ifndef __UI_FONT_CACHE_H__
#define __UI_FONT_CACHE_H__

#include "ui.h"

#include <pobl/bl_map.h>
#include <pobl/bl_types.h>
#include <mef/ef_charset.h>

#include "ui_font_config.h"

BL_MAP_TYPEDEF(ui_font, vt_font_t, ui_font_t *);

typedef struct ui_font_cache {
  /*
   * Public(readonly)
   */
  Display *display;
  u_int font_size;
  ef_charset_t usascii_font_cs;
  ui_font_config_t *font_config;
  int letter_space;

  ui_font_t *usascii_font;

  /*
   * Private
   */
  BL_MAP(ui_font) uifont_table;
  struct {
    vt_font_t font;
    ui_font_t *uifont;

  } prev_cache;

  u_int ref_count;

} ui_font_cache_t;

void ui_set_use_leftward_double_drawing(int use);

void ui_compose_dec_special_font(void);

ui_font_cache_t *ui_acquire_font_cache(Display *display, u_int font_size,
                                       ef_charset_t usascii_font_cs, ui_font_config_t *font_config,
                                       int letter_space);

void ui_release_font_cache(ui_font_cache_t *font_cache);

void ui_font_cache_unload(ui_font_cache_t *font_cache);

void ui_font_cache_unload_all(void);

ui_font_t *ui_font_cache_get_font(ui_font_cache_t *font_cache, vt_font_t font);

XFontSet ui_font_cache_get_fontset(ui_font_cache_t *font_cache);

#endif