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
61efdbfd
Commit
61efdbfd
authored
Apr 16, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Add a helper to find an input slot.
parent
c9178fdf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
driver.c
dlls/wineps.drv/driver.c
+13
-6
ps.c
dlls/wineps.drv/ps.c
+3
-10
psdrv.h
dlls/wineps.drv/psdrv.h
+2
-0
No files found.
dlls/wineps.drv/driver.c
View file @
61efdbfd
...
...
@@ -45,6 +45,17 @@ static inline int paper_size_from_points( float size )
return
size
*
254
/
72
;
}
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
PSDRV_DEVMODE
*
dm
)
{
INPUTSLOT
*
slot
;
LIST_FOR_EACH_ENTRY
(
slot
,
&
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
if
(
slot
->
WinBin
==
dm
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
)
return
slot
;
return
NULL
;
}
/************************************************************************
*
* PSDRV_MergeDevmodes
...
...
@@ -117,13 +128,9 @@ void PSDRV_MergeDevmodes( PSDRV_DEVMODE *dm1, PSDRV_DEVMODE *dm2, PRINTERINFO *p
if
(
dm2
->
dmPublic
.
dmFields
&
DM_DEFAULTSOURCE
)
{
INPUTSLOT
*
slot
;
LIST_FOR_EACH_ENTRY
(
slot
,
&
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
if
(
slot
->
WinBin
==
dm2
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
)
break
;
INPUTSLOT
*
slot
=
find_slot
(
pi
->
ppd
,
dm2
);
if
(
&
slot
->
entry
!=
&
pi
->
ppd
->
InputSlots
)
if
(
slot
)
{
dm1
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
=
dm2
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
;
TRACE
(
"Changing bin to '%s'
\n
"
,
slot
->
FullName
);
...
...
dlls/wineps.drv/ps.c
View file @
61efdbfd
...
...
@@ -301,7 +301,7 @@ INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
char
*
buf
,
*
escaped_title
;
INPUTSLOT
*
slot
;
INPUTSLOT
*
slot
=
find_slot
(
physDev
->
pi
->
ppd
,
physDev
->
Devmode
)
;
PAGESIZE
*
page
;
DUPLEX
*
duplex
;
int
win_duplex
;
...
...
@@ -350,15 +350,8 @@ INT PSDRV_WriteHeader( PHYSDEV dev, LPCWSTR title )
write_spool
(
dev
,
copies_buf
,
strlen
(
copies_buf
));
}
LIST_FOR_EACH_ENTRY
(
slot
,
&
physDev
->
pi
->
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
{
if
(
slot
->
WinBin
==
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmDefaultSource
)
{
if
(
slot
->
InvocationString
)
{
PSDRV_WriteFeature
(
dev
,
"*InputSlot"
,
slot
->
Name
,
slot
->
InvocationString
);
break
;
}
}
}
if
(
slot
&&
slot
->
InvocationString
)
PSDRV_WriteFeature
(
dev
,
"*InputSlot"
,
slot
->
Name
,
slot
->
InvocationString
);
LIST_FOR_EACH_ENTRY
(
page
,
&
physDev
->
pi
->
ppd
->
PageSizes
,
PAGESIZE
,
entry
)
{
if
(
page
->
WinPage
==
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmPaperSize
)
{
...
...
dlls/wineps.drv/psdrv.h
View file @
61efdbfd
...
...
@@ -401,6 +401,8 @@ extern HINSTANCE PSDRV_hInstance DECLSPEC_HIDDEN;
extern
HANDLE
PSDRV_Heap
DECLSPEC_HIDDEN
;
extern
char
*
PSDRV_ANSIVector
[
256
]
DECLSPEC_HIDDEN
;
extern
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
PSDRV_DEVMODE
*
dm
);
/* GDI driver functions */
extern
BOOL
PSDRV_Arc
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
DECLSPEC_HIDDEN
;
...
...
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