25 #include "../space_info/textview.h"
37 switch (cl_iter->
type) {
60 int prompt_len = strlen(sc->
prompt);
63 cl_dummy->
len = prompt_len + cl->
len;
66 memcpy(cl_dummy->
line, sc->
prompt, prompt_len);
67 memcpy(cl_dummy->
line + prompt_len, cl->
line, cl->
len + 1);
110 const char *
str,
int width,
int *row,
int *column,
const char *end)
122 if (end &&
str >= end) {
136 int offl = 0, offc = 0;
140 pen[0] = cwidth * offc;
168 rcti *r_draw_rect_outer)
171 r_draw_rect->
xmin = margin;
173 r_draw_rect->
ymin = margin;
177 r_draw_rect_outer->
xmin = 0;
178 r_draw_rect_outer->
xmax = region->
winx;
179 r_draw_rect_outer->
ymin = 0;
180 r_draw_rect_outer->
ymax = region->
winy;
187 void **r_mval_pick_item,
188 int *r_mval_pick_offset)
219 ret =
textview_draw(&tvc, do_draw, mval, r_mval_pick_item, r_mval_pick_offset);
227 const int mval[2] = {INT_MAX, INT_MAX};
233 const int mval[2] = {INT_MAX, INT_MAX};
239 int r_mval_pick_offset = 0;
240 void *mval_pick_item =
NULL;
243 return r_mval_pick_offset;
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_str_utf8_char_width_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_str_utf8_size_safe(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
@ GPU_SHADER_2D_UNIFORM_COLOR
Read Guarded memory(de)allocation.
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
return(oflags[bm->toolflag_index].f &oflag) !=0
void console_textview_main(SpaceConsole *sc, const ARegion *region)
void console_scrollback_prompt_end(SpaceConsole *sc, ConsoleLine *cl_dummy)
int console_textview_height(SpaceConsole *sc, const ARegion *region)
void console_scrollback_prompt_begin(SpaceConsole *sc, ConsoleLine *cl_dummy)
static void console_textview_const_colors(TextViewContext *UNUSED(tvc), uchar bg_sel[4])
static int console_textview_step(TextViewContext *tvc)
static enum eTextViewContext_LineFlag console_line_data(TextViewContext *tvc, uchar fg[4], uchar UNUSED(bg[4]), int *UNUSED(icon), uchar UNUSED(icon_fg[4]), uchar UNUSED(icon_bg[4]))
static int console_textview_begin(TextViewContext *tvc)
static void console_textview_line_get(TextViewContext *tvc, const char **r_line, int *r_len)
static void console_textview_draw_rect_calc(const ARegion *region, rcti *r_draw_rect, rcti *r_draw_rect_outer)
static void console_textview_end(TextViewContext *tvc)
int console_char_pick(SpaceConsole *sc, const ARegion *region, const int mval[2])
static void console_textview_draw_cursor(TextViewContext *tvc, int cwidth, int columns)
static int console_textview_main__internal(SpaceConsole *sc, const ARegion *region, const bool do_draw, const int mval[2], void **r_mval_pick_item, int *r_mval_pick_offset)
static void console_cursor_wrap_offset(const char *str, int width, int *row, int *column, const char *end)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
void(* line_get)(struct TextViewContext *tvc, const char **r_line, int *r_len)
int(* begin)(struct TextViewContext *tvc)
void(* const_colors)(struct TextViewContext *tvc, unsigned char bg_sel[4])
enum eTextViewContext_LineFlag(* line_data)(struct TextViewContext *tvc, uchar fg[4], uchar bg[4], int *r_icon, uchar r_icon_fg[4], uchar r_icon_bg[4])
void(* end)(struct TextViewContext *tvc)
int(* step)(struct TextViewContext *tvc)
void(* draw_cursor)(struct TextViewContext *tvc, int cwidth, int columns)
int textview_draw(TextViewContext *tvc, const bool do_draw, const int mval_init[2], void **r_mval_pick_item, int *r_mval_pick_offset)
eTextViewContext_LineFlag