attribute

attribute — Attribute to decorate text

Synopsis

enum                FepAttrType;
                    FepAttribute;

Description

Details

enum FepAttrType

typedef enum {
    /* compatible with IBusAttrType */
    FEP_ATTR_TYPE_UNDERLINE = 0,
    FEP_ATTR_TYPE_FOREGROUND = 1,
    FEP_ATTR_TYPE_BACKGROUND = 2,

    /* libfep specific */
    FEP_ATTR_TYPE_NONE = 3,
    FEP_ATTR_TYPE_STANDOUT = 4,
    FEP_ATTR_TYPE_BOLD = 5,
    FEP_ATTR_TYPE_BLINK = 6
} FepAttrType;

FEP_ATTR_TYPE_UNDERLINE

Decorate with underline

FEP_ATTR_TYPE_FOREGROUND

Foreground color

FEP_ATTR_TYPE_BACKGROUND

Background color

FEP_ATTR_TYPE_NONE

No attribute

FEP_ATTR_TYPE_STANDOUT

Reverse video

FEP_ATTR_TYPE_BOLD

Bold

FEP_ATTR_TYPE_BLINK

Blink

FepAttribute

typedef struct {
  FepAttrType type;
  unsigned int value;
  unsigned int start_index;
  unsigned int end_index;
} FepAttribute;

FepAttrType type;

type of the attribute

unsigned int value;

value of the attribute

unsigned int start_index;

starting position of the attribute

unsigned int end_index;

end position (exclusive) of the attribute