Commit c4789b08 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Introduce IOCTL_CONDRV_ATTACH_RENDERER ioctl.

parent 5a174dd6
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
/* console renderer ioctls */ /* console renderer ioctls */
#define IOCTL_CONDRV_GET_RENDERER_EVENTS CTL_CODE(FILE_DEVICE_CONSOLE, 70, METHOD_BUFFERED, FILE_READ_PROPERTIES) #define IOCTL_CONDRV_GET_RENDERER_EVENTS CTL_CODE(FILE_DEVICE_CONSOLE, 70, METHOD_BUFFERED, FILE_READ_PROPERTIES)
#define IOCTL_CONDRV_ATTACH_RENDERER CTL_CODE(FILE_DEVICE_CONSOLE, 71, METHOD_BUFFERED, FILE_READ_PROPERTIES)
/* console handle type */
typedef unsigned int condrv_handle_t;
/* structure for console char/attribute info */ /* structure for console char/attribute info */
typedef struct typedef struct
......
...@@ -1732,6 +1732,29 @@ static int console_input_events_ioctl( struct fd *fd, ioctl_code_t code, struct ...@@ -1732,6 +1732,29 @@ static int console_input_events_ioctl( struct fd *fd, ioctl_code_t code, struct
queue_async( &evts->read_q, async ); queue_async( &evts->read_q, async );
return 1; return 1;
case IOCTL_CONDRV_ATTACH_RENDERER:
{
struct console_input *console_input;
if (get_req_data_size() != sizeof(condrv_handle_t))
{
set_error( STATUS_INVALID_PARAMETER );
return 0;
}
console_input = (struct console_input *)get_handle_obj( current->process, *(condrv_handle_t *)get_req_data(),
0, &console_input_ops );
if (!console_input) return 0;
if (!console_input->evt)
{
console_input->evt = (struct console_input_events *)grab_object( evts );
console_input->renderer = current;
}
else set_error( STATUS_INVALID_HANDLE );
release_object( console_input );
return !get_error();
}
default: default:
set_error( STATUS_INVALID_HANDLE ); set_error( STATUS_INVALID_HANDLE );
return 0; return 0;
......
...@@ -114,6 +114,7 @@ static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code ) ...@@ -114,6 +114,7 @@ static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code )
switch(*code) switch(*code)
{ {
#define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break #define CASE(c) case c: fprintf( stderr, "%s%s", prefix, #c ); break
CASE(IOCTL_CONDRV_ATTACH_RENDERER);
CASE(IOCTL_CONDRV_FILL_OUTPUT); CASE(IOCTL_CONDRV_FILL_OUTPUT);
CASE(IOCTL_CONDRV_GET_INPUT_INFO); CASE(IOCTL_CONDRV_GET_INPUT_INFO);
CASE(IOCTL_CONDRV_GET_MODE); CASE(IOCTL_CONDRV_GET_MODE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment