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
6ca93646
Commit
6ca93646
authored
Nov 20, 2019
by
Gijs Vermeulen
Committed by
Alexandre Julliard
Nov 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add support for additional fields in set_console_output_info.
Signed-off-by:
Gijs Vermeulen
<
gijsvrm@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8b2d5c7c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
11 deletions
+55
-11
server_protocol.h
include/wine/server_protocol.h
+5
-3
wineconsole.c
programs/wineconsole/wineconsole.c
+3
-0
console.c
server/console.c
+30
-5
protocol.def
server/protocol.def
+4
-1
request.h
server/request.h
+2
-0
trace.c
server/trace.c
+4
-1
make_requests
tools/make_requests
+7
-1
No files found.
include/wine/server_protocol.h
View file @
6ca93646
...
@@ -2074,8 +2074,10 @@ struct set_console_output_info_request
...
@@ -2074,8 +2074,10 @@ struct set_console_output_info_request
short
int
max_height
;
short
int
max_height
;
short
int
font_width
;
short
int
font_width
;
short
int
font_height
;
short
int
font_height
;
/* VARARG(colors,uints); */
short
int
font_weight
;
char
__pad_52
[
4
];
short
int
font_pitch_family
;
/* VARARG(colors,uints,64); */
/* VARARG(face_name,unicode_str); */
};
};
struct
set_console_output_info_reply
struct
set_console_output_info_reply
{
{
...
@@ -6691,6 +6693,6 @@ union generic_reply
...
@@ -6691,6 +6693,6 @@ union generic_reply
struct
resume_process_reply
resume_process_reply
;
struct
resume_process_reply
resume_process_reply
;
};
};
#define SERVER_PROTOCOL_VERSION 5
89
#define SERVER_PROTOCOL_VERSION 5
90
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
programs/wineconsole/wineconsole.c
View file @
6ca93646
...
@@ -458,6 +458,9 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
...
@@ -458,6 +458,9 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
req
->
max_height
=
(
r
.
bottom
-
r
.
top
-
GetSystemMetrics
(
SM_CYCAPTION
))
/
cfg
->
cell_height
;
req
->
max_height
=
(
r
.
bottom
-
r
.
top
-
GetSystemMetrics
(
SM_CYCAPTION
))
/
cfg
->
cell_height
;
req
->
font_width
=
cfg
->
cell_width
;
req
->
font_width
=
cfg
->
cell_width
;
req
->
font_height
=
cfg
->
cell_height
;
req
->
font_height
=
cfg
->
cell_height
;
req
->
font_weight
=
cfg
->
font_weight
;
req
->
font_pitch_family
=
FIXED_PITCH
|
FF_DONTCARE
;
wine_server_add_data
(
req
,
cfg
->
face_name
,
lstrlenW
(
cfg
->
face_name
)
*
sizeof
(
WCHAR
)
);
wine_server_call
(
req
);
wine_server_call
(
req
);
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
...
...
server/console.c
View file @
6ca93646
...
@@ -131,6 +131,10 @@ struct font_info
...
@@ -131,6 +131,10 @@ struct font_info
{
{
short
int
width
;
short
int
width
;
short
int
height
;
short
int
height
;
short
int
weight
;
short
int
pitch_family
;
WCHAR
*
face_name
;
data_size_t
face_len
;
};
};
struct
screen_buffer
struct
screen_buffer
...
@@ -433,6 +437,10 @@ static struct screen_buffer *create_console_output( struct console_input *consol
...
@@ -433,6 +437,10 @@ static struct screen_buffer *create_console_output( struct console_input *consol
screen_buffer
->
data
=
NULL
;
screen_buffer
->
data
=
NULL
;
screen_buffer
->
font
.
width
=
0
;
screen_buffer
->
font
.
width
=
0
;
screen_buffer
->
font
.
height
=
0
;
screen_buffer
->
font
.
height
=
0
;
screen_buffer
->
font
.
weight
=
FW_NORMAL
;
screen_buffer
->
font
.
pitch_family
=
FIXED_PITCH
|
FF_DONTCARE
;
screen_buffer
->
font
.
face_name
=
NULL
;
screen_buffer
->
font
.
face_len
=
0
;
memset
(
screen_buffer
->
color_map
,
0
,
sizeof
(
screen_buffer
->
color_map
)
);
memset
(
screen_buffer
->
color_map
,
0
,
sizeof
(
screen_buffer
->
color_map
)
);
list_add_head
(
&
screen_buffer_list
,
&
screen_buffer
->
entry
);
list_add_head
(
&
screen_buffer_list
,
&
screen_buffer
->
entry
);
...
@@ -896,6 +904,8 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
...
@@ -896,6 +904,8 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
const
struct
set_console_output_info_request
*
req
)
const
struct
set_console_output_info_request
*
req
)
{
{
struct
console_renderer_event
evt
;
struct
console_renderer_event
evt
;
data_size_t
font_name_len
,
offset
;
WCHAR
*
font_name
;
memset
(
&
evt
.
u
,
0
,
sizeof
(
evt
.
u
));
memset
(
&
evt
.
u
,
0
,
sizeof
(
evt
.
u
));
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
)
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
)
...
@@ -1039,15 +1049,29 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
...
@@ -1039,15 +1049,29 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
screen_buffer
->
max_width
=
req
->
max_width
;
screen_buffer
->
max_width
=
req
->
max_width
;
screen_buffer
->
max_height
=
req
->
max_height
;
screen_buffer
->
max_height
=
req
->
max_height
;
}
}
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_COLORTABLE
)
{
memcpy
(
screen_buffer
->
color_map
,
get_req_data
(),
min
(
get_req_data_size
(),
sizeof
(
screen_buffer
->
color_map
)
));
}
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_FONT
)
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_FONT
)
{
{
screen_buffer
->
font
.
width
=
req
->
font_width
;
screen_buffer
->
font
.
width
=
req
->
font_width
;
screen_buffer
->
font
.
height
=
req
->
font_height
;
screen_buffer
->
font
.
height
=
req
->
font_height
;
}
screen_buffer
->
font
.
weight
=
req
->
font_weight
;
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_COLORTABLE
)
screen_buffer
->
font
.
pitch_family
=
req
->
font_pitch_family
;
{
offset
=
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_COLORTABLE
?
sizeof
(
screen_buffer
->
color_map
)
:
0
;
memcpy
(
screen_buffer
->
color_map
,
get_req_data
(),
if
(
get_req_data_size
()
>
offset
)
min
(
sizeof
(
screen_buffer
->
color_map
),
get_req_data_size
()
));
{
font_name_len
=
(
get_req_data_size
()
-
offset
)
/
sizeof
(
WCHAR
)
*
sizeof
(
WCHAR
);
font_name
=
mem_alloc
(
font_name_len
);
if
(
font_name
)
{
memcpy
(
font_name
,
(
char
*
)
get_req_data
()
+
offset
,
font_name_len
);
free
(
screen_buffer
->
font
.
face_name
);
screen_buffer
->
font
.
face_name
=
font_name
;
screen_buffer
->
font
.
face_len
=
font_name_len
;
}
}
}
}
return
1
;
return
1
;
...
@@ -1183,6 +1207,7 @@ static void screen_buffer_destroy( struct object *obj )
...
@@ -1183,6 +1207,7 @@ static void screen_buffer_destroy( struct object *obj )
}
}
if
(
screen_buffer
->
fd
)
release_object
(
screen_buffer
->
fd
);
if
(
screen_buffer
->
fd
)
release_object
(
screen_buffer
->
fd
);
free
(
screen_buffer
->
data
);
free
(
screen_buffer
->
data
);
free
(
screen_buffer
->
font
.
face_name
);
}
}
static
struct
fd
*
screen_buffer_get_fd
(
struct
object
*
obj
)
static
struct
fd
*
screen_buffer_get_fd
(
struct
object
*
obj
)
...
...
server/protocol.def
View file @
6ca93646
...
@@ -1633,7 +1633,10 @@ struct console_renderer_event
...
@@ -1633,7 +1633,10 @@ struct console_renderer_event
short int max_height;
short int max_height;
short int font_width; /* font size (width x height) */
short int font_width; /* font size (width x height) */
short int font_height;
short int font_height;
VARARG(colors,uints); /* color table */
short int font_weight; /* font weight */
short int font_pitch_family; /* font pitch & family */
VARARG(colors,uints,64); /* color table */
VARARG(face_name,unicode_str); /* font face name */
@END
@END
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
...
...
server/request.h
View file @
6ca93646
...
@@ -1204,6 +1204,8 @@ C_ASSERT( FIELD_OFFSET(struct set_console_output_info_request, max_width) == 44
...
@@ -1204,6 +1204,8 @@ 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
,
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_width
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_height
)
==
50
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_height
)
==
50
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_weight
)
==
52
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_console_output_info_request
,
font_pitch_family
)
==
54
);
C_ASSERT
(
sizeof
(
struct
set_console_output_info_request
)
==
56
);
C_ASSERT
(
sizeof
(
struct
set_console_output_info_request
)
==
56
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_console_output_info_request
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_console_output_info_request
)
==
16
);
...
...
server/trace.c
View file @
6ca93646
...
@@ -2133,7 +2133,10 @@ static void dump_set_console_output_info_request( const struct set_console_outpu
...
@@ -2133,7 +2133,10 @@ static void dump_set_console_output_info_request( const struct set_console_outpu
fprintf
(
stderr
,
", max_height=%d"
,
req
->
max_height
);
fprintf
(
stderr
,
", max_height=%d"
,
req
->
max_height
);
fprintf
(
stderr
,
", font_width=%d"
,
req
->
font_width
);
fprintf
(
stderr
,
", font_width=%d"
,
req
->
font_width
);
fprintf
(
stderr
,
", font_height=%d"
,
req
->
font_height
);
fprintf
(
stderr
,
", font_height=%d"
,
req
->
font_height
);
dump_varargs_uints
(
", colors="
,
cur_size
);
fprintf
(
stderr
,
", font_weight=%d"
,
req
->
font_weight
);
fprintf
(
stderr
,
", font_pitch_family=%d"
,
req
->
font_pitch_family
);
dump_varargs_uints
(
", colors="
,
min
(
cur_size
,
64
)
);
dump_varargs_unicode_str
(
", face_name="
,
cur_size
);
}
}
static
void
dump_get_console_output_info_request
(
const
struct
get_console_output_info_request
*
req
)
static
void
dump_get_console_output_info_request
(
const
struct
get_console_output_info_request
*
req
)
...
...
tools/make_requests
View file @
6ca93646
...
@@ -216,7 +216,13 @@ sub PARSE_REQUESTS()
...
@@ -216,7 +216,13 @@ sub PARSE_REQUESTS()
next
;
next
;
}
}
if
(
/^\s*VARARG\((\w+),(\w+),(\w+)\)/
)
if
(
/^\s*VARARG\((\w+),(\w+),(\d+)\)/
)
{
$var
=
$1
;
$type
=
"dump_varargs_$2( \"%s\", min(cur_size,$3) )"
;
s!(VARARG\(.*\)\s*;)!/* $1 */!
;
}
elsif
(
/^\s*VARARG\((\w+),(\w+),(\w+)\)/
)
{
{
$var
=
$1
;
$var
=
$1
;
$type
=
"dump_varargs_"
.
$2
.
"( \"%s\", min(cur_size,req->"
.
$3
.
") )"
;
$type
=
"dump_varargs_"
.
$2
.
"( \"%s\", min(cur_size,req->"
.
$3
.
") )"
;
...
...
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