Lines Matching refs:attr
96 static void setpenattr(VTermState *state, VTermAttr attr, VTermValueType type, VTermValue *val)
99 if(type != vterm_get_attr_type(attr)) {
100 fprintf(stderr, "Cannot set attr %d as it has type %d, not type %d\n",
101 attr, vterm_get_attr_type(attr), type);
106 (*state->callbacks->setpenattr)(attr, val, state->cbdata);
109 static void setpenattr_bool(VTermState *state, VTermAttr attr, int boolean)
112 setpenattr(state, attr, VTERM_VALUETYPE_BOOL, &val);
115 static void setpenattr_int(VTermState *state, VTermAttr attr, int number)
118 setpenattr(state, attr, VTERM_VALUETYPE_INT, &val);
121 static void setpenattr_col(VTermState *state, VTermAttr attr, VTermColor color)
124 setpenattr(state, attr, VTERM_VALUETYPE_COLOR, &val);
127 static void set_pen_col_ansi(VTermState *state, VTermAttr attr, long col)
129 VTermColor *colp = (attr == VTERM_ATTR_BACKGROUND) ? &state->pen.bg : &state->pen.fg;
133 setpenattr_col(state, attr, *colp);
423 int vterm_state_get_penattr(const VTermState *state, VTermAttr attr, VTermValue *val)
425 switch(attr) {