mirror of https://github.com/fairyglade/ly
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.1 KiB
C
64 lines
1.1 KiB
C
#ifndef H_LY_DRAW
|
|
#define H_LY_DRAW
|
|
|
|
#include "termbox.h"
|
|
#include "ctypes.h"
|
|
|
|
#include "inputs.h"
|
|
|
|
struct box
|
|
{
|
|
u32 left_up;
|
|
u32 left_down;
|
|
u32 right_up;
|
|
u32 right_down;
|
|
u32 top;
|
|
u32 bot;
|
|
u32 left;
|
|
u32 right;
|
|
};
|
|
|
|
struct term_buf
|
|
{
|
|
u16 width;
|
|
u16 height;
|
|
u16 init_width;
|
|
u16 init_height;
|
|
|
|
struct box box_chars;
|
|
char* info_line;
|
|
u16 labels_max_len;
|
|
u16 box_x;
|
|
u16 box_y;
|
|
u16 box_width;
|
|
u16 box_height;
|
|
|
|
u8* tmp_buf;
|
|
};
|
|
|
|
void draw_init(struct term_buf* buf);
|
|
void draw_free(struct term_buf* buf);
|
|
void draw_box(struct term_buf* buf);
|
|
|
|
struct tb_cell* strn_cell(char* s, u16 len);
|
|
struct tb_cell* str_cell(char* s);
|
|
|
|
void draw_labels(struct term_buf* buf);
|
|
void draw_f_commands();
|
|
void draw_lock_state(struct term_buf* buf);
|
|
void draw_desktop(struct desktop* target);
|
|
void draw_input(struct text* input);
|
|
void draw_input_mask(struct text* input);
|
|
|
|
void position_input(
|
|
struct term_buf* buf,
|
|
struct desktop* desktop,
|
|
struct text* login,
|
|
struct text* password);
|
|
|
|
void animate_init(struct term_buf* buf);
|
|
void animate(struct term_buf* buf);
|
|
bool cascade(struct term_buf* buf, u8* fails);
|
|
|
|
#endif
|