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
b61badcc
Commit
b61badcc
authored
Oct 29, 2015
by
Hugh McMaster
Committed by
Alexandre Julliard
Nov 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add console font information.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
90963730
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
4 deletions
+38
-4
server_protocol.h
include/wine/server_protocol.h
+8
-3
console.c
server/console.c
+16
-0
protocol.def
server/protocol.def
+5
-0
request.h
server/request.h
+5
-1
trace.c
server/trace.c
+4
-0
No files found.
include/wine/server_protocol.h
View file @
b61badcc
...
...
@@ -1896,7 +1896,9 @@ struct set_console_output_info_request
short
int
win_bottom
;
short
int
max_width
;
short
int
max_height
;
char
__pad_46
[
2
];
short
int
font_width
;
short
int
font_height
;
char
__pad_50
[
6
];
};
struct
set_console_output_info_reply
{
...
...
@@ -1908,6 +1910,7 @@ struct set_console_output_info_reply
#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
...
...
@@ -1932,7 +1935,9 @@ struct get_console_output_info_reply
short
int
win_bottom
;
short
int
max_width
;
short
int
max_height
;
char
__pad_34
[
6
];
short
int
font_width
;
short
int
font_height
;
char
__pad_38
[
2
];
};
...
...
@@ -6147,6 +6152,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 48
8
#define SERVER_PROTOCOL_VERSION 48
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/console.c
View file @
b61badcc
...
...
@@ -121,6 +121,12 @@ static const struct object_ops console_input_events_ops =
console_input_events_destroy
/* destroy */
};
struct
font_info
{
short
int
width
;
short
int
height
;
};
struct
screen_buffer
{
struct
object
obj
;
/* object header */
...
...
@@ -139,6 +145,7 @@ struct screen_buffer
unsigned
short
attr
;
/* default attribute for screen buffer */
rectangle_t
win
;
/* current visible window on the screen buffer *
* as seen in wineconsole */
struct
font_info
font
;
/* console font information */
struct
fd
*
fd
;
/* for bare console, attached output fd */
};
...
...
@@ -411,6 +418,8 @@ static struct screen_buffer *create_console_output( struct console_input *consol
screen_buffer
->
win
.
top
=
0
;
screen_buffer
->
win
.
bottom
=
screen_buffer
->
max_height
-
1
;
screen_buffer
->
data
=
NULL
;
screen_buffer
->
font
.
width
=
0
;
screen_buffer
->
font
.
height
=
0
;
list_add_head
(
&
screen_buffer_list
,
&
screen_buffer
->
entry
);
if
(
fd
==
-
1
)
...
...
@@ -1019,6 +1028,11 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
screen_buffer
->
max_width
=
req
->
max_width
;
screen_buffer
->
max_height
=
req
->
max_height
;
}
if
(
req
->
mask
&
SET_CONSOLE_OUTPUT_INFO_FONT
)
{
screen_buffer
->
font
.
width
=
req
->
font_width
;
screen_buffer
->
font
.
height
=
req
->
font_height
;
}
return
1
;
}
...
...
@@ -1676,6 +1690,8 @@ DECL_HANDLER(get_console_output_info)
reply
->
win_bottom
=
screen_buffer
->
win
.
bottom
;
reply
->
max_width
=
screen_buffer
->
max_width
;
reply
->
max_height
=
screen_buffer
->
max_height
;
reply
->
font_width
=
screen_buffer
->
font
.
width
;
reply
->
font_height
=
screen_buffer
->
font
.
height
;
release_object
(
screen_buffer
);
}
}
...
...
server/protocol.def
View file @
b61badcc
...
...
@@ -1495,6 +1495,8 @@ struct console_renderer_event
short int win_bottom;
short int max_width; /* maximum size (width x height) for the window */
short int max_height;
short int font_width; /* font size (width x height) */
short int font_height;
@END
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
...
...
@@ -1502,6 +1504,7 @@ struct console_renderer_event
#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
/* Get info about a console (output only) */
...
...
@@ -1521,6 +1524,8 @@ struct console_renderer_event
short int win_bottom;
short int max_width; /* maximum size (width x height) for the window */
short int max_height;
short int font_width; /* font size (width x height) */
short int font_height;
@END
/* Add input records to a console input queue */
...
...
server/request.h
View file @
b61badcc
...
...
@@ -1112,7 +1112,9 @@ 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
(
sizeof
(
struct
set_console_output_info_request
)
==
48
);
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
(
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
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_console_output_info_reply
,
cursor_size
)
==
8
);
...
...
@@ -1128,6 +1130,8 @@ 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
(
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 @
b61badcc
...
...
@@ -1959,6 +1959,8 @@ static void dump_set_console_output_info_request( const struct set_console_outpu
fprintf
(
stderr
,
", win_bottom=%d"
,
req
->
win_bottom
);
fprintf
(
stderr
,
", max_width=%d"
,
req
->
max_width
);
fprintf
(
stderr
,
", max_height=%d"
,
req
->
max_height
);
fprintf
(
stderr
,
", font_width=%d"
,
req
->
font_width
);
fprintf
(
stderr
,
", font_height=%d"
,
req
->
font_height
);
}
static
void
dump_get_console_output_info_request
(
const
struct
get_console_output_info_request
*
req
)
...
...
@@ -1981,6 +1983,8 @@ static void dump_get_console_output_info_reply( const struct get_console_output_
fprintf
(
stderr
,
", win_bottom=%d"
,
req
->
win_bottom
);
fprintf
(
stderr
,
", max_width=%d"
,
req
->
max_width
);
fprintf
(
stderr
,
", max_height=%d"
,
req
->
max_height
);
fprintf
(
stderr
,
", font_width=%d"
,
req
->
font_width
);
fprintf
(
stderr
,
", font_height=%d"
,
req
->
font_height
);
}
static
void
dump_write_console_input_request
(
const
struct
write_console_input_request
*
req
)
...
...
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