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
d5f27e19
Commit
d5f27e19
authored
Dec 19, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Keep track of all supported device resolutions.
parent
57f84bc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
7 deletions
+44
-7
driver.c
dlls/wineps.drv/driver.c
+15
-7
ppd.c
dlls/wineps.drv/ppd.c
+21
-0
psdrv.h
dlls/wineps.drv/psdrv.h
+8
-0
No files found.
dlls/wineps.drv/driver.c
View file @
d5f27e19
...
...
@@ -638,14 +638,22 @@ DWORD PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszP
case
DC_ENUMRESOLUTIONS
:
{
LONG
*
lp
=
(
LONG
*
)
lpszOutput
;
RESOLUTION
*
res
;
LONG
*
lp
=
(
LONG
*
)
lpszOutput
;
int
i
=
0
;
if
(
lpszOutput
!=
NULL
)
{
lp
[
0
]
=
pi
->
ppd
->
DefaultResolution
;
lp
[
1
]
=
pi
->
ppd
->
DefaultResolution
;
}
ret
=
1
;
break
;
LIST_FOR_EACH_ENTRY
(
res
,
&
pi
->
ppd
->
Resolutions
,
RESOLUTION
,
entry
)
{
i
++
;
if
(
lpszOutput
!=
NULL
)
{
lp
[
0
]
=
res
->
resx
;
lp
[
1
]
=
res
->
resy
;
lp
+=
2
;
}
}
ret
=
i
;
break
;
}
/* Windows returns 9999 too */
...
...
dlls/wineps.drv/ppd.c
View file @
d5f27e19
...
...
@@ -659,6 +659,7 @@ PPD *PSDRV_ParsePPD( char *fname, HANDLE printer )
ppd
->
ColorDevice
=
CD_NotSpecified
;
list_init
(
&
ppd
->
Resolutions
);
list_init
(
&
ppd
->
InstalledFonts
);
list_init
(
&
ppd
->
PageSizes
);
list_init
(
&
ppd
->
Constraints
);
...
...
@@ -713,6 +714,26 @@ PPD *PSDRV_ParsePPD( char *fname, HANDLE printer )
WARN
(
"failed to parse DefaultResolution %s
\n
"
,
debugstr_a
(
tuple
.
value
));
}
else
if
(
!
strcmp
(
"*Resolution"
,
tuple
.
key
))
{
SIZE
sz
;
if
(
parse_resolution
(
tuple
.
option
,
&
sz
))
{
RESOLUTION
*
res
;
TRACE
(
"Resolution %dx%d, invocation %s
\n
"
,
sz
.
cx
,
sz
.
cy
,
tuple
.
value
);
res
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
res
)
);
res
->
resx
=
sz
.
cx
;
res
->
resy
=
sz
.
cy
;
res
->
InvocationString
=
tuple
.
value
;
tuple
.
value
=
NULL
;
list_add_tail
(
&
ppd
->
Resolutions
,
&
res
->
entry
);
}
else
WARN
(
"failed to parse Resolution %s
\n
"
,
debugstr_a
(
tuple
.
option
));
}
else
if
(
!
strcmp
(
"*Font"
,
tuple
.
key
))
{
FONTNAME
*
fn
=
HeapAlloc
(
PSDRV_Heap
,
0
,
sizeof
(
*
fn
)
);
...
...
dlls/wineps.drv/psdrv.h
View file @
d5f27e19
...
...
@@ -183,6 +183,13 @@ typedef struct
WORD
WinDuplex
;
/* eg DMDUP_SIMPLEX */
}
DUPLEX
;
typedef
struct
{
struct
list
entry
;
int
resx
,
resy
;
char
*
InvocationString
;
}
RESOLUTION
;
/* Many Mac OS X based ppd files don't include a *ColorDevice line, so
we use a tristate here rather than a boolean. Code that
cares is expected to treat these as if they were colour. */
...
...
@@ -196,6 +203,7 @@ typedef struct {
char
*
NickName
;
int
LanguageLevel
;
COLORDEVICE
ColorDevice
;
struct
list
Resolutions
;
int
DefaultResolution
;
signed
int
LandscapeOrientation
;
char
*
JCLBegin
;
...
...
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