wineconsole: Implement GetConsoleWindow.
diff --git a/server/console.c b/server/console.c
index 88a24e8..b0a3424 100644
--- a/server/console.c
+++ b/server/console.c
@@ -63,6 +63,7 @@
int edition_mode; /* index to edition mode flavors */
int input_cp; /* console input codepage */
int output_cp; /* console output codepage */
+ user_handle_t win; /* window handle if backend supports it */
struct event *event; /* event to wait on for input queue */
};
@@ -281,6 +282,7 @@
console_input->edition_mode = 0;
console_input->input_cp = 0;
console_input->output_cp = 0;
+ console_input->win = 0;
console_input->event = create_event( NULL, NULL, 0, 1, 0 );
if (!console_input->history || !console_input->evt)
@@ -719,6 +721,10 @@
{
console->output_cp = req->output_cp;
}
+ if (req->mask & SET_CONSOLE_INPUT_INFO_WIN)
+ {
+ console->win = req->win;
+ }
release_object( console );
return 1;
error:
@@ -1413,6 +1419,7 @@
reply->edition_mode = console->edition_mode;
reply->input_cp = console->input_cp;
reply->output_cp = console->output_cp;
+ reply->win = console->win;
release_object( console );
}
diff --git a/server/protocol.def b/server/protocol.def
index e35c32a..6e13cb2 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1090,15 +1090,16 @@
/* Set info about a console (input only) */
@REQ(set_console_input_info)
- obj_handle_t handle; /* handle to console input, or 0 for process' console */
- int mask; /* setting mask (see below) */
- obj_handle_t active_sb; /* active screen buffer */
- int history_mode; /* whether we duplicate lines in history */
- int history_size; /* number of lines in history */
- int edition_mode; /* index to the edition mode flavors */
- int input_cp; /* console input codepage */
- int output_cp; /* console output codepage */
- VARARG(title,unicode_str); /* console title */
+ obj_handle_t handle; /* handle to console input, or 0 for process' console */
+ int mask; /* setting mask (see below) */
+ obj_handle_t active_sb; /* active screen buffer */
+ int history_mode; /* whether we duplicate lines in history */
+ int history_size; /* number of lines in history */
+ int edition_mode; /* index to the edition mode flavors */
+ int input_cp; /* console input codepage */
+ int output_cp; /* console output codepage */
+ user_handle_t win; /* console window if backend supports it */
+ VARARG(title,unicode_str); /* console title */
@END
#define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
#define SET_CONSOLE_INPUT_INFO_TITLE 0x02
@@ -1107,19 +1108,21 @@
#define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
#define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
#define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
+#define SET_CONSOLE_INPUT_INFO_WIN 0x80
/* Get info about a console (input only) */
@REQ(get_console_input_info)
- obj_handle_t handle; /* handle to console input, or 0 for process' console */
+ obj_handle_t handle; /* handle to console input, or 0 for process' console */
@REPLY
- int history_mode; /* whether we duplicate lines in history */
- int history_size; /* number of lines in history */
- int history_index; /* number of used lines in history */
- int edition_mode; /* index to the edition mode flavors */
- int input_cp; /* console input codepage */
- int output_cp; /* console output codepage */
- VARARG(title,unicode_str); /* console title */
+ int history_mode; /* whether we duplicate lines in history */
+ int history_size; /* number of lines in history */
+ int history_index; /* number of used lines in history */
+ int edition_mode; /* index to the edition mode flavors */
+ int input_cp; /* console input codepage */
+ int output_cp; /* console output codepage */
+ user_handle_t win; /* console window if backend supports it */
+ VARARG(title,unicode_str); /* console title */
@END
diff --git a/server/trace.c b/server/trace.c
index e6f8847..d0c4e0e 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1473,6 +1473,7 @@
fprintf( stderr, " edition_mode=%d,", req->edition_mode );
fprintf( stderr, " input_cp=%d,", req->input_cp );
fprintf( stderr, " output_cp=%d,", req->output_cp );
+ fprintf( stderr, " win=%p,", req->win );
fprintf( stderr, " title=" );
dump_varargs_unicode_str( cur_size );
}
@@ -1490,6 +1491,7 @@
fprintf( stderr, " edition_mode=%d,", req->edition_mode );
fprintf( stderr, " input_cp=%d,", req->input_cp );
fprintf( stderr, " output_cp=%d,", req->output_cp );
+ fprintf( stderr, " win=%p,", req->win );
fprintf( stderr, " title=" );
dump_varargs_unicode_str( cur_size );
}