The m17n Library 1.8.4
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
internal-gui.h File Reference

Data Structures

struct  MFrame
 Type of frames. More...
 
struct  MGlyph
 
struct  MGlyphString
 
struct  MDrawPoint
 
struct  MDeviceDriver
 

Macros

#define M_CHECK_WRITABLE(frame, err, ret)
 
#define M_CHECK_READABLE(frame, err, ret)
 
#define MGLYPH(idx)    (gstring->glyphs + ((idx) >= 0 ? (idx) : (gstring->used + (idx))))
 
#define GLYPH_INDEX(g)    ((g) - gstring->glyphs)
 
#define INIT_GLYPH(g)    (memset (&(g), 0, sizeof (g)))
 
#define APPEND_GLYPH(gstring, g)    MLIST_APPEND1 ((gstring), glyphs, (g), MERROR_DRAW)
 
#define INSERT_GLYPH(gstring, at, g)
 
#define DELETE_GLYPH(gstring, at)
 
#define REPLACE_GLYPHS(gstring, from, to, len)
 

Typedefs

typedef struct MRealizedFontset MRealizedFontset
 

Enumerations

enum  MDeviceType {
  MDEVICE_SUPPORT_OUTPUT = 1 ,
  MDEVICE_SUPPORT_INPUT = 2
}
 
enum  glyph_type {
  GLYPH_CHAR ,
  GLYPH_SPACE ,
  GLYPH_PAD ,
  GLYPH_BOX ,
  GLYPH_ANCHOR ,
  GLYPH_TYPE_MAX
}
 
enum  glyph_category {
  GLYPH_CATEGORY_NORMAL ,
  GLYPH_CATEGORY_MODIFIER ,
  GLYPH_CATEGORY_FORMATTER
}
 

Functions

int mfont__init ()
 
void mfont__fini ()
 
int mface__init ()
 
void mface__fini ()
 
int mdraw__init ()
 
void mdraw__fini ()
 
int mfont__fontset_init ()
 
void mfont__fontset_fini ()
 
int minput__win_init ()
 
void minput__win_fini ()
 

Variables

MSymbol Mlatin
 
MSymbol Mgd
 

Macro Definition Documentation

◆ M_CHECK_WRITABLE

#define M_CHECK_WRITABLE (   frame,
  err,
  ret 
)
Value:
do { \
if (! ((frame)->device_type & MDEVICE_SUPPORT_OUTPUT)) \
MERROR ((err), (ret)); \
} while (0)
@ MDEVICE_SUPPORT_OUTPUT
Definition: internal-gui.h:5

◆ M_CHECK_READABLE

#define M_CHECK_READABLE (   frame,
  err,
  ret 
)
Value:
do { \
if (! ((frame)->device_type & MDEVICE_SUPPORT_INPUT)) \
MERROR ((err), (ret)); \
} while (0)
@ MDEVICE_SUPPORT_INPUT
Definition: internal-gui.h:6

◆ MGLYPH

#define MGLYPH (   idx)     (gstring->glyphs + ((idx) >= 0 ? (idx) : (gstring->used + (idx))))

◆ GLYPH_INDEX

#define GLYPH_INDEX (   g)     ((g) - gstring->glyphs)

◆ INIT_GLYPH

#define INIT_GLYPH (   g)     (memset (&(g), 0, sizeof (g)))

◆ APPEND_GLYPH

#define APPEND_GLYPH (   gstring,
 
)     MLIST_APPEND1 ((gstring), glyphs, (g), MERROR_DRAW)

◆ INSERT_GLYPH

#define INSERT_GLYPH (   gstring,
  at,
 
)
Value:
do { \
MLIST_INSERT1 ((gstring), glyphs, (at), 1, MERROR_DRAW); \
(gstring)->glyphs[at] = g; \
} while (0)
@ MERROR_DRAW
Definition: m17n-misc.h:52

◆ DELETE_GLYPH

#define DELETE_GLYPH (   gstring,
  at 
)
Value:
do { \
MLIST_DELETE1 (gstring, glyphs, at, 1); \
} while (0)

◆ REPLACE_GLYPHS

#define REPLACE_GLYPHS (   gstring,
  from,
  to,
  len 
)
Value:
do { \
int newlen = (gstring)->used - (from); \
int diff = newlen - (len); \
\
if (diff < 0) \
MLIST_DELETE1 (gstring, glyphs, (to) + newlen, -diff); \
else if (diff > 0) \
MLIST_INSERT1 ((gstring), glyphs, (to) + (len), diff, MERROR_DRAW); \
memmove ((gstring)->glyphs + to, (gstring)->glyphs + (from + diff), \
(sizeof (MGlyph)) * newlen); \
(gstring)->used -= newlen; \
} while (0)
Definition: internal-gui.h:58

Typedef Documentation

◆ MRealizedFontset

Enumeration Type Documentation

◆ MDeviceType

Enumerator
MDEVICE_SUPPORT_OUTPUT 
MDEVICE_SUPPORT_INPUT 

◆ glyph_type

enum glyph_type
Enumerator
GLYPH_CHAR 
GLYPH_SPACE 
GLYPH_PAD 
GLYPH_BOX 
GLYPH_ANCHOR 
GLYPH_TYPE_MAX 

◆ glyph_category

Enumerator
GLYPH_CATEGORY_NORMAL 
GLYPH_CATEGORY_MODIFIER 
GLYPH_CATEGORY_FORMATTER 

Function Documentation

◆ mfont__init()

int mfont__init ( )

◆ mfont__fini()

void mfont__fini ( )

◆ mface__init()

int mface__init ( )

◆ mface__fini()

void mface__fini ( )

◆ mdraw__init()

int mdraw__init ( )

◆ mdraw__fini()

void mdraw__fini ( )

◆ mfont__fontset_init()

int mfont__fontset_init ( )

◆ mfont__fontset_fini()

void mfont__fontset_fini ( )

◆ minput__win_init()

int minput__win_init ( )

◆ minput__win_fini()

void minput__win_fini ( )

Variable Documentation

◆ Mlatin

MSymbol Mlatin
extern

m17n-lib Home