server: Introduce IOCTL_CONDRV_SET_TITLE ioctl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2cfc85dc55
commit
cb28c2dbb0
|
@ -34,6 +34,7 @@
|
|||
#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES)
|
||||
#define IOCTL_CONDRV_SET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 14, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
|
||||
#define IOCTL_CONDRV_GET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 15, METHOD_BUFFERED, FILE_READ_PROPERTIES)
|
||||
#define IOCTL_CONDRV_SET_TITLE CTL_CODE(FILE_DEVICE_CONSOLE, 16, METHOD_BUFFERED, FILE_WRITE_PROPERTIES)
|
||||
|
||||
/* console output ioctls */
|
||||
#define IOCTL_CONDRV_GET_OUTPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 32, METHOD_BUFFERED, FILE_READ_PROPERTIES)
|
||||
|
|
|
@ -1610,6 +1610,27 @@ static int console_input_ioctl( struct fd *fd, ioctl_code_t code, struct async *
|
|||
if (!console->title_len) return 1;
|
||||
return set_reply_data( console->title, min( console->title_len, get_reply_max_size() )) != NULL;
|
||||
|
||||
case IOCTL_CONDRV_SET_TITLE:
|
||||
{
|
||||
data_size_t len = get_req_data_size();
|
||||
struct condrv_renderer_event evt;
|
||||
WCHAR *title = NULL;
|
||||
|
||||
if (len % sizeof(WCHAR))
|
||||
{
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (len && !(title = memdup( get_req_data(), len ))) return 0;
|
||||
free( console->title );
|
||||
console->title = title;
|
||||
console->title_len = len;
|
||||
evt.event = CONSOLE_RENDERER_TITLE_EVENT;
|
||||
console_input_events_append( console, &evt );
|
||||
return 1;
|
||||
}
|
||||
|
||||
default:
|
||||
set_error( STATUS_INVALID_HANDLE );
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue