comparison util.h @ 466:796508f828f6

Refactor much of the "windowing" UI code into a new module, ui.[ch]
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 May 2012 06:56:18 +0300
parents 35d67bd0613b
children ad7ddce47878
comparison
equal deleted inserted replaced
465:c3b3b6d89084 466:796508f828f6
13 13
14 14
15 #define NN_TMPBUF_SIZE (4096) 15 #define NN_TMPBUF_SIZE (4096)
16 #define NN_ALLOC_SIZE (128) 16 #define NN_ALLOC_SIZE (128)
17 #define NN_NUM_BUCKETS (256) 17 #define NN_NUM_BUCKETS (256)
18 #define NN_BACKBUF_LEN (512) // Backbuffer size (in lines)
19 18
20 19
21 typedef struct _nn_user_t 20 typedef struct _nn_user_t
22 { 21 {
23 char *name; 22 char *name;
70 char * nn_editbuf_get_string(nn_editbuf_t *buf, size_t start, size_t end); 69 char * nn_editbuf_get_string(nn_editbuf_t *buf, size_t start, size_t end);
71 70
72 71
73 typedef struct 72 typedef struct
74 { 73 {
75 qringbuf_t *data; // "Backbuffer" data for this window
76 int pos; // Current position in the window, 0 = real time
77 BOOL dirty;
78
79 char *id; // Chatter ID, NULL = main window
80 int num; // Window number
81
82 char *buf;
83 size_t len, bufsize;
84 size_t chlen;
85 } nn_window_t;
86
87 nn_window_t *nn_window_new(const char *);
88 void nn_window_free(nn_window_t *);
89
90
91 typedef struct
92 {
93 size_t len; 74 size_t len;
94 char *str; 75 char *str;
95 } nn_strtuple_t; 76 } nn_strtuple_t;
96 77
97 78