Commit 378ce9e6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Remove no longer needed get_console_renderer_events request.

parent a0d32533
......@@ -41,4 +41,53 @@ struct condrv_input_info
unsigned int input_count; /* number of available input records */
};
/* IOCTL_CONDRV_GET_RENDERER_EVENTS result */
struct condrv_renderer_event
{
short event;
union
{
struct
{
short top;
short bottom;
} update;
struct
{
short width;
short height;
} resize;
struct
{
short x;
short y;
} cursor_pos;
struct
{
short visible;
short size;
} cursor_geom;
struct
{
short left;
short top;
short width;
short height;
} display;
} u;
};
enum condrv_renderer_event_type
{
CONSOLE_RENDERER_NONE_EVENT,
CONSOLE_RENDERER_TITLE_EVENT,
CONSOLE_RENDERER_ACTIVE_SB_EVENT,
CONSOLE_RENDERER_SB_RESIZE_EVENT,
CONSOLE_RENDERER_UPDATE_EVENT,
CONSOLE_RENDERER_CURSOR_POS_EVENT,
CONSOLE_RENDERER_CURSOR_GEOM_EVENT,
CONSOLE_RENDERER_DISPLAY_EVENT,
CONSOLE_RENDERER_EXIT_EVENT,
};
#endif /* _INC_CONDRV */
......@@ -1843,63 +1843,6 @@ struct free_console_reply
};
#define CONSOLE_RENDERER_NONE_EVENT 0x00
#define CONSOLE_RENDERER_TITLE_EVENT 0x01
#define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
#define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
#define CONSOLE_RENDERER_UPDATE_EVENT 0x04
#define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
#define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
#define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
#define CONSOLE_RENDERER_EXIT_EVENT 0x08
struct console_renderer_event
{
short event;
union
{
struct
{
short top;
short bottom;
} update;
struct
{
short width;
short height;
} resize;
struct
{
short x;
short y;
} cursor_pos;
struct
{
short visible;
short size;
} cursor_geom;
struct
{
short left;
short top;
short width;
short height;
} display;
} u;
};
struct get_console_renderer_events_request
{
struct request_header __header;
obj_handle_t handle;
};
struct get_console_renderer_events_reply
{
struct reply_header __header;
/* VARARG(data,bytes); */
};
struct open_console_request
{
......@@ -5823,7 +5766,6 @@ enum request
REQ_set_socket_deferred,
REQ_alloc_console,
REQ_free_console,
REQ_get_console_renderer_events,
REQ_open_console,
REQ_attach_console,
REQ_get_console_wait_event,
......@@ -6123,7 +6065,6 @@ union generic_request
struct set_socket_deferred_request set_socket_deferred_request;
struct alloc_console_request alloc_console_request;
struct free_console_request free_console_request;
struct get_console_renderer_events_request get_console_renderer_events_request;
struct open_console_request open_console_request;
struct attach_console_request attach_console_request;
struct get_console_wait_event_request get_console_wait_event_request;
......@@ -6421,7 +6362,6 @@ union generic_reply
struct set_socket_deferred_reply set_socket_deferred_reply;
struct alloc_console_reply alloc_console_reply;
struct free_console_reply free_console_reply;
struct get_console_renderer_events_reply get_console_renderer_events_reply;
struct open_console_reply open_console_reply;
struct attach_console_reply attach_console_reply;
struct get_console_wait_event_reply get_console_wait_event_reply;
......@@ -6655,7 +6595,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 620
#define SERVER_PROTOCOL_VERSION 621
/* ### protocol_version end ### */
......
......@@ -242,7 +242,7 @@ static void WINECON_SetColors(struct inner_data *data, const struct config_data*
*/
void WINECON_GrabChanges(struct inner_data* data)
{
struct console_renderer_event evts[256];
struct condrv_renderer_event evts[256];
int i, ev_found;
DWORD num;
HANDLE h;
......
......@@ -115,7 +115,7 @@ struct console_input_events
struct fd *fd; /* pseudo-fd for ioctls */
int num_alloc; /* number of allocated events */
int num_used; /* number of actually used events */
struct console_renderer_event *events;
struct condrv_renderer_event *events;
struct async_queue read_q; /* read queue */
};
......@@ -354,7 +354,7 @@ static int get_renderer_events( struct console_input_events* evts, struct async
/* add an event to the console's renderer events list */
static void console_input_events_append( struct console_input* console,
struct console_renderer_event* evt)
struct condrv_renderer_event* evt)
{
struct console_input_events* evts;
int collapsed = FALSE;
......@@ -366,7 +366,7 @@ static void console_input_events_append( struct console_input* console,
/* try to collapse evt into current queue's events */
if (evts->num_used)
{
struct console_renderer_event* last = &evts->events[evts->num_used - 1];
struct condrv_renderer_event* last = &evts->events[evts->num_used - 1];
if (last->event == CONSOLE_RENDERER_UPDATE_EVENT &&
evt->event == CONSOLE_RENDERER_UPDATE_EVENT)
......@@ -399,21 +399,6 @@ static void console_input_events_append( struct console_input* console,
if (evts->num_used) wake_up( &evts->obj, 0 );
}
/* retrieves events from the console's renderer events list */
static void console_input_events_get( struct console_input_events* evts )
{
data_size_t num = get_reply_max_size() / sizeof(evts->events[0]);
if (num > evts->num_used) num = evts->num_used;
set_reply_data( evts->events, num * sizeof(evts->events[0]) );
if (num < evts->num_used)
{
memmove( &evts->events[0], &evts->events[num],
(evts->num_used - num) * sizeof(evts->events[0]) );
}
evts->num_used -= num;
}
static struct console_input_events *create_console_input_events(void)
{
struct console_input_events* evt;
......@@ -491,7 +476,7 @@ static struct object *create_console_input( struct thread* renderer, int fd )
static void generate_sb_initial_events( struct console_input *console_input )
{
struct screen_buffer *screen_buffer = console_input->active;
struct console_renderer_event evt;
struct condrv_renderer_event evt;
evt.event = CONSOLE_RENDERER_ACTIVE_SB_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
......@@ -606,7 +591,7 @@ int free_console( struct process *process )
if (--console->num_proc == 0 && console->renderer)
{
/* all processes have terminated... tell the renderer to terminate too */
struct console_renderer_event evt;
struct condrv_renderer_event evt;
evt.event = CONSOLE_RENDERER_EXIT_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
console_input_events_append( console, &evt );
......@@ -873,7 +858,7 @@ static int set_console_input_info( const struct set_console_input_info_request *
const WCHAR *title, data_size_t len )
{
struct console_input *console;
struct console_renderer_event evt;
struct condrv_renderer_event evt;
if (!(console = console_input_get( req->handle, FILE_WRITE_PROPERTIES ))) goto error;
if (console_input_is_bare(console) &&
......@@ -1030,7 +1015,7 @@ static int change_screen_buffer_size( struct screen_buffer *screen_buffer,
static int set_console_output_info( struct screen_buffer *screen_buffer,
const struct set_console_output_info_request *req )
{
struct console_renderer_event evt;
struct condrv_renderer_event evt;
data_size_t font_name_len, offset;
WCHAR *font_name;
......@@ -1407,7 +1392,7 @@ static int write_console_output( struct screen_buffer *screen_buffer, data_size_
if (i && screen_buffer == screen_buffer->input->active)
{
struct console_renderer_event evt;
struct condrv_renderer_event evt;
evt.event = CONSOLE_RENDERER_UPDATE_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
evt.u.update.top = y + x / screen_buffer->width;
......@@ -1458,7 +1443,7 @@ static int fill_console_output( struct screen_buffer *screen_buffer, char_info_t
if (count && screen_buffer == screen_buffer->input->active)
{
struct console_renderer_event evt;
struct condrv_renderer_event evt;
evt.event = CONSOLE_RENDERER_UPDATE_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
evt.u.update.top = y;
......@@ -1526,7 +1511,7 @@ static void scroll_console_output( struct screen_buffer *screen_buffer, int xsrc
{
int j;
char_info_t *psrc, *pdst;
struct console_renderer_event evt;
struct condrv_renderer_event evt;
if (xsrc < 0 || ysrc < 0 || xdst < 0 || ydst < 0 ||
xsrc + w > screen_buffer->width ||
......@@ -1820,18 +1805,6 @@ DECL_HANDLER(free_console)
free_console( current->process );
}
/* let the renderer peek the events it's waiting on */
DECL_HANDLER(get_console_renderer_events)
{
struct console_input_events *evt;
evt = (struct console_input_events *)get_handle_obj( current->process, req->handle,
FILE_READ_PROPERTIES, &console_input_events_ops );
if (!evt) return;
console_input_events_get( evt );
release_object( evt );
}
/* open a handle to the process console */
DECL_HANDLER(open_console)
{
......
......@@ -1473,58 +1473,6 @@ enum server_fd_type
@END
#define CONSOLE_RENDERER_NONE_EVENT 0x00
#define CONSOLE_RENDERER_TITLE_EVENT 0x01
#define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
#define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
#define CONSOLE_RENDERER_UPDATE_EVENT 0x04
#define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
#define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
#define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
#define CONSOLE_RENDERER_EXIT_EVENT 0x08
struct console_renderer_event
{
short event;
union
{
struct
{
short top;
short bottom;
} update;
struct
{
short width;
short height;
} resize;
struct
{
short x;
short y;
} cursor_pos;
struct
{
short visible;
short size;
} cursor_geom;
struct
{
short left;
short top;
short width;
short height;
} display;
} u;
};
/* retrieve console events for the renderer */
@REQ(get_console_renderer_events)
obj_handle_t handle; /* handle to console input events */
@REPLY
VARARG(data,bytes); /* the various console_renderer_events */
@END
/* Open a handle to the process console */
@REQ(open_console)
obj_handle_t from; /* console_in handle to get active screen buffer */
......
......@@ -182,7 +182,6 @@ DECL_HANDLER(enable_socket_event);
DECL_HANDLER(set_socket_deferred);
DECL_HANDLER(alloc_console);
DECL_HANDLER(free_console);
DECL_HANDLER(get_console_renderer_events);
DECL_HANDLER(open_console);
DECL_HANDLER(attach_console);
DECL_HANDLER(get_console_wait_event);
......@@ -481,7 +480,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_set_socket_deferred,
(req_handler)req_alloc_console,
(req_handler)req_free_console,
(req_handler)req_get_console_renderer_events,
(req_handler)req_open_console,
(req_handler)req_attach_console,
(req_handler)req_get_console_wait_event,
......@@ -1130,9 +1128,6 @@ C_ASSERT( FIELD_OFFSET(struct alloc_console_reply, handle_in) == 8 );
C_ASSERT( FIELD_OFFSET(struct alloc_console_reply, event) == 12 );
C_ASSERT( sizeof(struct alloc_console_reply) == 16 );
C_ASSERT( sizeof(struct free_console_request) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_console_renderer_events_request, handle) == 12 );
C_ASSERT( sizeof(struct get_console_renderer_events_request) == 16 );
C_ASSERT( sizeof(struct get_console_renderer_events_reply) == 8 );
C_ASSERT( FIELD_OFFSET(struct open_console_request, from) == 12 );
C_ASSERT( FIELD_OFFSET(struct open_console_request, access) == 16 );
C_ASSERT( FIELD_OFFSET(struct open_console_request, attributes) == 20 );
......
......@@ -2028,16 +2028,6 @@ static void dump_free_console_request( const struct free_console_request *req )
{
}
static void dump_get_console_renderer_events_request( const struct get_console_renderer_events_request *req )
{
fprintf( stderr, " handle=%04x", req->handle );
}
static void dump_get_console_renderer_events_reply( const struct get_console_renderer_events_reply *req )
{
dump_varargs_bytes( " data=", cur_size );
}
static void dump_open_console_request( const struct open_console_request *req )
{
fprintf( stderr, " from=%04x", req->from );
......@@ -4652,7 +4642,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_set_socket_deferred_request,
(dump_func)dump_alloc_console_request,
(dump_func)dump_free_console_request,
(dump_func)dump_get_console_renderer_events_request,
(dump_func)dump_open_console_request,
(dump_func)dump_attach_console_request,
(dump_func)dump_get_console_wait_event_request,
......@@ -4948,7 +4937,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL,
(dump_func)dump_alloc_console_reply,
NULL,
(dump_func)dump_get_console_renderer_events_reply,
(dump_func)dump_open_console_reply,
(dump_func)dump_attach_console_reply,
(dump_func)dump_get_console_wait_event_reply,
......@@ -5244,7 +5232,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"set_socket_deferred",
"alloc_console",
"free_console",
"get_console_renderer_events",
"open_console",
"attach_console",
"get_console_wait_event",
......
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