Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f592f931
Commit
f592f931
authored
Aug 10, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Aug 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Get and set the console pop-up color attributes.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b9a79c09
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
39 deletions
+56
-39
server_protocol.h
include/wine/server_protocol.h
+13
-11
wineconsole.c
programs/wineconsole/wineconsole.c
+2
-1
console.c
server/console.c
+8
-1
protocol.def
server/protocol.def
+13
-10
request.h
server/request.h
+18
-16
trace.c
server/trace.c
+2
-0
No files found.
include/wine/server_protocol.h
View file @
f592f931
...
...
@@ -1939,6 +1939,7 @@ struct set_console_output_info_request
short
int
width
;
short
int
height
;
short
int
attr
;
short
int
popup_attr
;
short
int
win_left
;
short
int
win_top
;
short
int
win_right
;
...
...
@@ -1948,20 +1949,21 @@ struct set_console_output_info_request
short
int
font_width
;
short
int
font_height
;
/* VARARG(colors,uints); */
char
__pad_5
0
[
6
];
char
__pad_5
2
[
4
];
};
struct
set_console_output_info_reply
{
struct
reply_header
__header
;
};
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
#define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
#define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
#define SET_CONSOLE_OUTPUT_INFO_FONT 0x40
#define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x80
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
#define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
#define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
#define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
#define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
#define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
...
...
@@ -1980,6 +1982,7 @@ struct get_console_output_info_reply
short
int
width
;
short
int
height
;
short
int
attr
;
short
int
popup_attr
;
short
int
win_left
;
short
int
win_top
;
short
int
win_right
;
...
...
@@ -1989,7 +1992,6 @@ struct get_console_output_info_reply
short
int
font_width
;
short
int
font_height
;
/* VARARG(colors,uints); */
char
__pad_38
[
2
];
};
...
...
@@ -6248,6 +6250,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 50
8
#define SERVER_PROTOCOL_VERSION 50
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
programs/wineconsole/wineconsole.c
View file @
f592f931
...
...
@@ -226,7 +226,8 @@ static void WINECON_SetColors(struct inner_data *data, const struct config_data*
SERVER_START_REQ
(
set_console_output_info
)
{
req
->
handle
=
wine_server_obj_handle
(
data
->
hConOut
);
req
->
mask
=
SET_CONSOLE_OUTPUT_INFO_COLORTABLE
;
req
->
mask
=
SET_CONSOLE_OUTPUT_INFO_COLORTABLE
|
SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR
;
req
->
popup_attr
=
cfg
->
popup_attr
;
wine_server_add_data
(
req
,
cfg
->
color_map
,
color_map_size
);
wine_server_call
(
req
);
}
...
...
server/console.c
View file @
f592f931
...
...
@@ -146,7 +146,8 @@ struct screen_buffer
int
max_width
;
/* size (w-h) of the window given font size */
int
max_height
;
char_info_t
*
data
;
/* the data for each cell - a width x height matrix */
unsigned
short
attr
;
/* default attribute for screen buffer */
unsigned
short
attr
;
/* default fill attributes (screen colors) */
unsigned
short
popup_attr
;
/* pop-up color attributes */
unsigned
int
color_map
[
16
];
/* color table */
rectangle_t
win
;
/* current visible window on the screen buffer *
* as seen in wineconsole */
...
...
@@ -420,6 +421,7 @@ static struct screen_buffer *create_console_output( struct console_input *consol
screen_buffer
->
cursor_x
=
0
;
screen_buffer
->
cursor_y
=
0
;
screen_buffer
->
attr
=
0x0F
;
screen_buffer
->
popup_attr
=
0xF5
;
screen_buffer
->
win
.
left
=
0
;
screen_buffer
->
win
.
right
=
screen_buffer
->
max_width
-
1
;
screen_buffer
->
win
.
top
=
0
;
...
...
@@ -999,6 +1001,10 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
{
screen_buffer
->
attr
=
req
->
attr
;
}
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR
)
{
screen_buffer
->
popup_attr
=
req
->
popup_attr
;
}
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
)
{
if
(
req
->
win_left
<
0
||
req
->
win_left
>
req
->
win_right
||
...
...
@@ -1689,6 +1695,7 @@ DECL_HANDLER(get_console_output_info)
reply
->
width
=
screen_buffer
->
width
;
reply
->
height
=
screen_buffer
->
height
;
reply
->
attr
=
screen_buffer
->
attr
;
reply
->
popup_attr
=
screen_buffer
->
popup_attr
;
reply
->
win_left
=
screen_buffer
->
win
.
left
;
reply
->
win_top
=
screen_buffer
->
win
.
top
;
reply
->
win_right
=
screen_buffer
->
win
.
right
;
...
...
server/protocol.def
View file @
f592f931
...
...
@@ -1528,7 +1528,8 @@ struct console_renderer_event
short int cursor_y;
short int width; /* width of the screen buffer */
short int height; /* height of the screen buffer */
short int attr; /* default attribute */
short int attr; /* default fill attributes (screen colors) */
short int popup_attr; /* pop-up color attributes */
short int win_left; /* window actually displayed by renderer */
short int win_top; /* the rect area is expressed within the */
short int win_right; /* boundaries of the screen buffer */
...
...
@@ -1539,14 +1540,15 @@ struct console_renderer_event
short int font_height;
VARARG(colors,uints); /* color table */
@END
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
#define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
#define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
#define SET_CONSOLE_OUTPUT_INFO_FONT 0x40
#define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x80
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
#define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
#define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
#define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
#define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
#define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
/* Get info about a console (output only) */
...
...
@@ -1559,7 +1561,8 @@ struct console_renderer_event
short int cursor_y;
short int width; /* width of the screen buffer */
short int height; /* height of the screen buffer */
short int attr; /* default attribute */
short int attr; /* default fill attributes (screen colors) */
short int popup_attr; /* pop-up color attributes */
short int win_left; /* window actually displayed by renderer */
short int win_top; /* the rect area is expressed within the */
short int win_right; /* boundaries of the screen buffer */
...
...
server/request.h
View file @
f592f931
...
...
@@ -1126,14 +1126,15 @@ C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, cursor_y) == 26 )
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
width
)
==
28
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
height
)
==
30
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
attr
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_left
)
==
34
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_top
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_right
)
==
38
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_bottom
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
max_width
)
==
42
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
max_height
)
==
44
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_width
)
==
46
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_height
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
popup_attr
)
==
34
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_left
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_top
)
==
38
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_right
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
win_bottom
)
==
42
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
max_width
)
==
44
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
max_height
)
==
46
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_width
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_height
)
==
50
);
C_ASSERT
(
sizeof
(
struct
set_console_output_info_request
)
==
56
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_console_output_info_request
)
==
16
);
...
...
@@ -1144,14 +1145,15 @@ C_ASSERT( FIELD_OFFSET(struct get_console_output_info_reply, cursor_y) == 14 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
width
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
height
)
==
18
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
attr
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_left
)
==
22
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_top
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_right
)
==
26
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_bottom
)
==
28
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
max_width
)
==
30
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
max_height
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
font_width
)
==
34
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
font_height
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
popup_attr
)
==
22
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_left
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_top
)
==
26
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_right
)
==
28
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
win_bottom
)
==
30
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
max_width
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
max_height
)
==
34
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
font_width
)
==
36
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
font_height
)
==
38
);
C_ASSERT
(
sizeof
(
struct
get_console_output_info_reply
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
write_console_input_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
write_console_input_request
)
==
16
);
...
...
server/trace.c
View file @
f592f931
...
...
@@ -2033,6 +2033,7 @@ static void dump_set_console_output_info_request( const struct set_console_outpu
fprintf
(
stderr
,
", width=%d"
,
req
->
width
);
fprintf
(
stderr
,
", height=%d"
,
req
->
height
);
fprintf
(
stderr
,
", attr=%d"
,
req
->
attr
);
fprintf
(
stderr
,
", popup_attr=%d"
,
req
->
popup_attr
);
fprintf
(
stderr
,
", win_left=%d"
,
req
->
win_left
);
fprintf
(
stderr
,
", win_top=%d"
,
req
->
win_top
);
fprintf
(
stderr
,
", win_right=%d"
,
req
->
win_right
);
...
...
@@ -2058,6 +2059,7 @@ static void dump_get_console_output_info_reply( const struct get_console_output_
fprintf
(
stderr
,
", width=%d"
,
req
->
width
);
fprintf
(
stderr
,
", height=%d"
,
req
->
height
);
fprintf
(
stderr
,
", attr=%d"
,
req
->
attr
);
fprintf
(
stderr
,
", popup_attr=%d"
,
req
->
popup_attr
);
fprintf
(
stderr
,
", win_left=%d"
,
req
->
win_left
);
fprintf
(
stderr
,
", win_top=%d"
,
req
->
win_top
);
fprintf
(
stderr
,
", win_right=%d"
,
req
->
win_right
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment