version 1.372, 2013/01/17 00:11:22 |
version 1.373, 2013/01/18 02:16:21 |
|
|
|
|
#define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON|MODE_MOUSE_ANY) |
#define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON|MODE_MOUSE_ANY) |
|
|
/* |
/* A single UTF-8 character. */ |
* A single UTF-8 character. |
|
* |
|
* The data member in this must be UTF8_SIZE to allow screen_write_copy to |
|
* reinject stored UTF-8 data back into screen_write_cell after combining (ugh |
|
* XXX XXX). |
|
*/ |
|
struct utf8_data { |
struct utf8_data { |
u_char data[UTF8_SIZE]; |
u_char data[UTF8_SIZE]; |
|
|
|
|
#define GRID_FLAG_FG256 0x1 |
#define GRID_FLAG_FG256 0x1 |
#define GRID_FLAG_BG256 0x2 |
#define GRID_FLAG_BG256 0x2 |
#define GRID_FLAG_PADDING 0x4 |
#define GRID_FLAG_PADDING 0x4 |
#define GRID_FLAG_UTF8 0x8 |
|
|
|
/* Grid line flags. */ |
/* Grid line flags. */ |
#define GRID_LINE_WRAPPED 0x1 |
#define GRID_LINE_WRAPPED 0x1 |
|
|
u_char flags; |
u_char flags; |
u_char fg; |
u_char fg; |
u_char bg; |
u_char bg; |
u_char data; |
|
} __packed; |
|
|
|
/* Grid cell UTF-8 data. Used instead of data in grid_cell for UTF-8 cells. */ |
u_char xstate; /* top 4 bits width, bottom 4 bits size */ |
struct grid_utf8 { |
u_char xdata[UTF8_SIZE]; |
u_char width; |
|
u_char data[UTF8_SIZE]; |
|
} __packed; |
} __packed; |
|
|
/* Grid line. */ |
/* Grid line. */ |
|
|
u_int cellsize; |
u_int cellsize; |
struct grid_cell *celldata; |
struct grid_cell *celldata; |
|
|
u_int utf8size; |
|
struct grid_utf8 *utf8data; |
|
|
|
int flags; |
int flags; |
} __packed; |
} __packed; |
|
|
|
|
struct window_pane *wp; |
struct window_pane *wp; |
|
|
const struct grid_cell *cell; |
const struct grid_cell *cell; |
const struct grid_utf8 *utf8; |
|
|
|
u_int num; |
u_int num; |
void *ptr; |
void *ptr; |
|
|
|
|
/* Saved last cell on line. */ |
/* Saved last cell on line. */ |
struct grid_cell last_cell; |
struct grid_cell last_cell; |
struct grid_utf8 last_utf8; |
|
u_int last_width; |
u_int last_width; |
}; |
}; |
|
|
|
|
void tty_putcode1(struct tty *, enum tty_code_code, int); |
void tty_putcode1(struct tty *, enum tty_code_code, int); |
void tty_putcode2(struct tty *, enum tty_code_code, int, int); |
void tty_putcode2(struct tty *, enum tty_code_code, int, int); |
void tty_putcode_ptr1(struct tty *, enum tty_code_code, const void *); |
void tty_putcode_ptr1(struct tty *, enum tty_code_code, const void *); |
void tty_putcode_ptr2(struct tty *, enum tty_code_code, const void *, const void *); |
void tty_putcode_ptr2(struct tty *, enum tty_code_code, const void *, |
|
const void *); |
void tty_puts(struct tty *, const char *); |
void tty_puts(struct tty *, const char *); |
void tty_putc(struct tty *, u_char); |
void tty_putc(struct tty *, u_char); |
void tty_pututf8(struct tty *, const struct grid_utf8 *); |
void tty_putn(struct tty *, const void *, size_t, u_int); |
void tty_init(struct tty *, struct client *, int, char *); |
void tty_init(struct tty *, struct client *, int, char *); |
int tty_resize(struct tty *); |
int tty_resize(struct tty *); |
int tty_set_size(struct tty *, u_int, u_int); |
int tty_set_size(struct tty *, u_int, u_int); |
|
|
void grid_scroll_history(struct grid *); |
void grid_scroll_history(struct grid *); |
void grid_scroll_history_region(struct grid *, u_int, u_int); |
void grid_scroll_history_region(struct grid *, u_int, u_int); |
void grid_expand_line(struct grid *, u_int, u_int); |
void grid_expand_line(struct grid *, u_int, u_int); |
void grid_expand_line_utf8(struct grid *, u_int, u_int); |
|
const struct grid_cell *grid_peek_cell(struct grid *, u_int, u_int); |
const struct grid_cell *grid_peek_cell(struct grid *, u_int, u_int); |
struct grid_cell *grid_get_cell(struct grid *, u_int, u_int); |
struct grid_cell *grid_get_cell(struct grid *, u_int, u_int); |
void grid_set_cell(struct grid *, u_int, u_int, const struct grid_cell *); |
void grid_set_cell(struct grid *, u_int, u_int, const struct grid_cell *); |
const struct grid_utf8 *grid_peek_utf8(struct grid *, u_int, u_int); |
|
struct grid_utf8 *grid_get_utf8(struct grid *, u_int, u_int); |
|
void grid_set_utf8(struct grid *, u_int, u_int, const struct grid_utf8 *); |
|
void grid_clear(struct grid *, u_int, u_int, u_int, u_int); |
void grid_clear(struct grid *, u_int, u_int, u_int, u_int); |
void grid_clear_lines(struct grid *, u_int, u_int); |
void grid_clear_lines(struct grid *, u_int, u_int); |
void grid_move_lines(struct grid *, u_int, u_int, u_int); |
void grid_move_lines(struct grid *, u_int, u_int, u_int); |
|
|
void grid_duplicate_lines( |
void grid_duplicate_lines( |
struct grid *, u_int, struct grid *, u_int, u_int); |
struct grid *, u_int, struct grid *, u_int, u_int); |
|
|
/* grid-utf8.c */ |
/* grid-cell.c */ |
size_t grid_utf8_size(const struct grid_utf8 *); |
u_int grid_cell_width(const struct grid_cell *); |
size_t grid_utf8_copy(const struct grid_utf8 *, char *, size_t); |
void grid_cell_get(const struct grid_cell *, struct utf8_data *); |
void grid_utf8_set(struct grid_utf8 *, const struct utf8_data *); |
void grid_cell_set(struct grid_cell *, const struct utf8_data *); |
int grid_utf8_append(struct grid_utf8 *, const struct utf8_data *); |
void grid_cell_one(struct grid_cell *, u_char); |
int grid_utf8_compare(const struct grid_utf8 *, const struct grid_utf8 *); |
|
|
|
/* grid-view.c */ |
/* grid-view.c */ |
const struct grid_cell *grid_view_peek_cell(struct grid *, u_int, u_int); |
const struct grid_cell *grid_view_peek_cell(struct grid *, u_int, u_int); |
struct grid_cell *grid_view_get_cell(struct grid *, u_int, u_int); |
struct grid_cell *grid_view_get_cell(struct grid *, u_int, u_int); |
void grid_view_set_cell( |
void grid_view_set_cell( |
struct grid *, u_int, u_int, const struct grid_cell *); |
struct grid *, u_int, u_int, const struct grid_cell *); |
const struct grid_utf8 *grid_view_peek_utf8(struct grid *, u_int, u_int); |
|
struct grid_utf8 *grid_view_get_utf8(struct grid *, u_int, u_int); |
|
void grid_view_set_utf8( |
|
struct grid *, u_int, u_int, const struct grid_utf8 *); |
|
void grid_view_clear_history(struct grid *); |
void grid_view_clear_history(struct grid *); |
void grid_view_clear(struct grid *, u_int, u_int, u_int, u_int); |
void grid_view_clear(struct grid *, u_int, u_int, u_int, u_int); |
void grid_view_scroll_region_up(struct grid *, u_int, u_int); |
void grid_view_scroll_region_up(struct grid *, u_int, u_int); |
|
|
void screen_write_clearstartofscreen(struct screen_write_ctx *); |
void screen_write_clearstartofscreen(struct screen_write_ctx *); |
void screen_write_clearscreen(struct screen_write_ctx *); |
void screen_write_clearscreen(struct screen_write_ctx *); |
void screen_write_clearhistory(struct screen_write_ctx *); |
void screen_write_clearhistory(struct screen_write_ctx *); |
void screen_write_cell(struct screen_write_ctx *, |
void screen_write_cell(struct screen_write_ctx *, const struct grid_cell *); |
const struct grid_cell *, const struct utf8_data *); |
|
void screen_write_setselection(struct screen_write_ctx *, u_char *, u_int); |
void screen_write_setselection(struct screen_write_ctx *, u_char *, u_int); |
void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int); |
void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int); |
void screen_write_bracketpaste(struct screen_write_ctx *, int); |
void screen_write_bracketpaste(struct screen_write_ctx *, int); |