#ifndef RC_INVOKED
#include <stdarg.h>
#include <stdlib.h>
#include <ntstatus.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <winnls.h>
#include <winternl.h>
#include "wine/condrv.h"
#include "wine/rbtree.h"
struct history_line
{
size_t len;
WCHAR text[1];
};
struct font_info
{
short int width;
short int height;
short int weight;
short int pitch_family;
WCHAR *face_name;
size_t face_len;
};
struct edit_line
{
NTSTATUS status;
WCHAR *buf;
unsigned int len;
size_t size;
unsigned int cursor;
WCHAR *yanked;
unsigned int mark;
unsigned int history_index;
WCHAR *current_history;
BOOL insert_key;
BOOL insert_mode;
unsigned int update_begin;
unsigned int update_end;
unsigned int end_offset;
unsigned int home_x;
unsigned int home_y;
unsigned int ctrl_mask;
};
struct console
{
HANDLE server;
unsigned int mode;
struct screen_buffer *active;
int is_unix;
int use_relative_cursor;
int no_window;
INPUT_RECORD *records;
unsigned int record_count;
unsigned int record_size;
int signaled;
WCHAR *read_buffer;
size_t read_buffer_count;
size_t read_buffer_size;
unsigned int read_ioctl;
size_t pending_read;
struct edit_line edit_line;
unsigned int key_state;
struct console_window *window;
WCHAR *title;
WCHAR *title_orig;
struct history_line **history;
unsigned int history_size;
unsigned int history_index;
unsigned int history_mode;
unsigned int edition_mode;
unsigned int input_cp;
unsigned int output_cp;
HWND win;
HANDLE input_thread;
HANDLE tty_input;
HANDLE tty_output;
char tty_buffer[4096];
size_t tty_buffer_count;
unsigned int tty_cursor_x;
unsigned int tty_cursor_y;
unsigned int tty_attr;
int tty_cursor_visible;
};
struct screen_buffer
{
struct console *console;
unsigned int id;
unsigned int mode;
unsigned int width;
unsigned int height;
unsigned int cursor_size;
unsigned int cursor_visible;
unsigned int cursor_x;
unsigned int cursor_y;
unsigned short attr;
unsigned short popup_attr;
unsigned int max_width;
unsigned int max_height;
char_info_t *data;
unsigned int color_map[16];
RECT win;
struct font_info font;
struct wine_rb_entry entry;
};
NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *records,
unsigned int count, BOOL flush );
void notify_screen_buffer_size( struct screen_buffer *screen_buffer );
NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height );
void update_console_font( struct console *console, const WCHAR *face_name, size_t face_name_size,
unsigned int height, unsigned int weight );
BOOL init_window( struct console *console );
void init_message_window( struct console *console );
void update_window_region( struct console *console, const RECT *update );
void update_window_config( struct console *console, BOOL delay );
static inline void empty_update_rect( struct screen_buffer *screen_buffer, RECT *rect )
{
SetRect( rect, screen_buffer->width, screen_buffer->height, 0, 0 );
}
static inline unsigned int get_bounded_cursor_x( struct screen_buffer *screen_buffer )
{
return min( screen_buffer->cursor_x, screen_buffer->width - 1 );
}
#endif
#define IDS_EDIT 0x100
#define IDS_DEFAULT 0x101
#define IDS_PROPERTIES 0x102
#define IDS_MARK 0x110
#define IDS_COPY 0x111
#define IDS_PASTE 0x112
#define IDS_SELECTALL 0x113
#define IDS_SCROLL 0x114
#define IDS_SEARCH 0x115
#define IDS_DLG_TIT_DEFAULT 0x120
#define IDS_DLG_TIT_CURRENT 0x121
#define IDS_DLG_TIT_ERROR 0x122
#define IDS_DLG_ERR_SBWINSIZE 0x130
#define IDS_FNT_DISPLAY 0x200
#define IDS_FNT_PREVIEW 0x201
#define IDD_OPTION 0x0100
#define IDD_FONT 0x0200
#define IDD_CONFIG 0x0300
#define IDC_OPT_CURSOR_SMALL 0x0101
#define IDC_OPT_CURSOR_MEDIUM 0x0102
#define IDC_OPT_CURSOR_LARGE 0x0103
#define IDC_OPT_HIST_SIZE 0x0104
#define IDC_OPT_HIST_SIZE_UD 0x0105
#define IDC_OPT_HIST_NODOUBLE 0x0106
#define IDC_OPT_CONF_CTRL 0x0107
#define IDC_OPT_CONF_SHIFT 0x0108
#define IDC_OPT_QUICK_EDIT 0x0109
#define IDC_OPT_INSERT_MODE 0x0110
#define IDC_FNT_LIST_FONT 0x0201
#define IDC_FNT_LIST_SIZE 0x0202
#define IDC_FNT_COLOR_BK 0x0203
#define IDC_FNT_COLOR_FG 0x0204
#define IDC_FNT_FONT_INFO 0x0205
#define IDC_FNT_PREVIEW 0x0206
#define IDC_CNF_SB_WIDTH 0x0301
#define IDC_CNF_SB_WIDTH_UD 0x0302
#define IDC_CNF_SB_HEIGHT 0x0303
#define IDC_CNF_SB_HEIGHT_UD 0x0304
#define IDC_CNF_WIN_WIDTH 0x0305
#define IDC_CNF_WIN_WIDTH_UD 0x0306
#define IDC_CNF_WIN_HEIGHT 0x0307
#define IDC_CNF_WIN_HEIGHT_UD 0x0308
#define IDC_CNF_CLOSE_EXIT 0x0309
#define IDC_CNF_EDITION_MODE 0x030a