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
610b001d
Commit
610b001d
authored
Mar 28, 1999
by
Huw D M Davies
Committed by
Alexandre Julliard
Mar 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Escapes for the PostScript driver.
parent
022d3727
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
145 additions
and
23 deletions
+145
-23
escape.c
graphics/psdrv/escape.c
+145
-23
No files found.
graphics/psdrv/escape.c
View file @
610b001d
...
...
@@ -30,6 +30,7 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput,
TRACE
(
psdrv
,
"NEXTBAND rect to 0,0 - 0,0
\n
"
);
physDev
->
job
.
banding
=
FALSE
;
}
/* Fall through */
case
NEWFRAME
:
TRACE
(
psdrv
,
"NEWFRAME
\n
"
);
...
...
@@ -44,6 +45,46 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput,
physDev
->
job
.
NeedPageHeader
=
TRUE
;
return
1
;
case
QUERYESCSUPPORT
:
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for QUERYESCSUPPORT
\n
"
,
cbInput
);
return
0
;
}
else
{
UINT16
num
=
*
(
UINT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
TRACE
(
psdrv
,
"QUERYESCSUPPORT for %d
\n
"
,
num
);
switch
(
num
)
{
case
NEWFRAME
:
case
NEXTBAND
:
case
QUERYESCSUPPORT
:
case
SETABORTPROC
:
case
STARTDOC
:
case
ENDDOC
:
case
GETPHYSPAGESIZE
:
case
GETPRINTINGOFFSET
:
case
GETSCALINGFACTOR
:
case
SETCOPYCOUNT
:
case
GETTECHNOLOGY
:
case
SETLINECAP
:
case
SETLINEJOIN
:
case
SETMITERLIMIT
:
case
SETCHARSET
:
case
EXT_DEVICE_CAPS
:
case
SET_BOUNDS
:
return
TRUE
;
default:
return
FALSE
;
}
}
case
SETABORTPROC
:
FIXME
(
psdrv
,
"SETABORTPROC: Ignoring
\n
"
);
/* dc->w.lpfnPrint = (FARPROC16)lpInData;
*/
return
1
;
case
STARTDOC
:
TRACE
(
psdrv
,
"STARTDOC
\n
"
);
if
(
physDev
->
job
.
hJob
)
{
...
...
@@ -67,18 +108,23 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput,
return
0
;
return
1
;
case
QUERYESCSUPPORT
:
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for QUERYESCSUPPORT
\n
"
,
cbInput
);
return
0
;
}
else
{
UINT16
num
=
*
(
UINT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
TRACE
(
psdrv
,
"QUERYESCSUPPORT for %d
\n
"
,
num
);
case
ENDDOC
:
TRACE
(
psdrv
,
"ENDDOC
\n
"
);
if
(
!
physDev
->
job
.
hJob
)
{
FIXME
(
psdrv
,
"hJob == 0. Now what?
\n
"
);
return
0
;
}
case
SETABORTPROC
:
FIXME
(
psdrv
,
"SETABORTPROC: ignoring
\n
"
);
physDev
->
job
.
NeedPageHeader
=
FALSE
;
if
(
!
PSDRV_WriteFooter
(
dc
))
return
0
;
if
(
CloseJob16
(
physDev
->
job
.
hJob
)
==
SP_ERROR
)
{
WARN
(
psdrv
,
"CloseJob error
\n
"
);
return
0
;
}
physDev
->
job
.
hJob
=
0
;
return
1
;
case
GETPHYSPAGESIZE
:
...
...
@@ -93,7 +139,7 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput,
case
GETPRINTINGOFFSET
:
{
POINT16
*
p
=
(
POINT16
*
)
PTR_SEG_TO_LIN
(
lpOutData
);
POINT16
*
p
=
(
POINT16
*
)
PTR_SEG_TO_LIN
(
lpOutData
);
p
->
x
=
p
->
y
=
0
;
TRACE
(
psdrv
,
"GETPRINTINGOFFSET: returning %dx%d
\n
"
,
p
->
x
,
p
->
y
);
...
...
@@ -102,36 +148,112 @@ INT PSDRV_Escape( DC *dc, INT nEscape, INT cbInput,
case
GETSCALINGFACTOR
:
{
POINT16
*
p
=
(
POINT16
*
)
PTR_SEG_TO_LIN
(
lpOutData
);
POINT16
*
p
=
(
POINT16
*
)
PTR_SEG_TO_LIN
(
lpOutData
);
p
->
x
=
p
->
y
=
0
;
TRACE
(
psdrv
,
"GETSCALINGFACTOR: returning %dx%d
\n
"
,
p
->
x
,
p
->
y
);
return
1
;
}
case
ENDDOC
:
TRACE
(
psdrv
,
"ENDDOC
\n
"
);
if
(
!
physDev
->
job
.
hJob
)
{
FIXME
(
psdrv
,
"hJob == 0. Now what?
\n
"
);
case
SETCOPYCOUNT
:
{
INT16
*
NumCopies
=
(
INT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
INT16
*
ActualCopies
=
(
INT16
*
)
PTR_SEG_TO_LIN
(
lpOutData
);
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for SETCOPYCOUNT
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
psdrv
,
"SETCOPYCOUNT %d
\n
"
,
*
NumCopies
);
*
ActualCopies
=
1
;
return
1
;
}
case
GETTECHNOLOGY
:
{
LPSTR
p
=
(
LPSTR
)
PTR_SEG_TO_LIN
(
lpOutData
);
strcpy
(
p
,
"PostScript"
);
*
(
p
+
strlen
(
p
)
+
1
)
=
'\0'
;
/* 2 '\0's at end of string */
return
1
;
}
case
SETLINECAP
:
{
INT16
newCap
=
*
(
INT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for SETLINECAP
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
psdrv
,
"SETLINECAP %d
\n
"
,
newCap
);
return
0
;
}
case
SETLINEJOIN
:
{
INT16
newJoin
=
*
(
INT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for SETLINEJOIN
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
psdrv
,
"SETLINEJOIN %d
\n
"
,
newJoin
);
return
0
;
}
physDev
->
job
.
NeedPageHeader
=
FALSE
;
case
SETMITERLIMIT
:
{
INT16
newLimit
=
*
(
INT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for SETMITERLIMIT
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
psdrv
,
"SETMITERLIMIT %d
\n
"
,
newLimit
);
return
0
;
}
if
(
!
PSDRV_WriteFooter
(
dc
))
case
SETCHARSET
:
/* Undocumented escape used by winword6.
Switches between ANSI and a special charset.
If *lpInData == 1 we require that
0x91 is quoteleft
0x92 is quoteright
0x93 is quotedblleft
0x94 is quotedblright
0x95 is bullet
0x96 is endash
0x97 is emdash
0xa0 is non break space - yeah right.
If *lpInData == 0 we get ANSI.
Since there's nothing else there, let's just make these the default
anyway and see what happens...
*/
return
1
;
case
EXT_DEVICE_CAPS
:
{
UINT16
cap
=
*
(
UINT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
if
(
cbInput
!=
2
)
{
WARN
(
psdrv
,
"cbInput != 2 (=%d) for EXT_DEVICE_CAPS
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
psdrv
,
"EXT_DEVICE_CAPS %d
\n
"
,
cap
);
return
0
;
}
if
(
CloseJob16
(
physDev
->
job
.
hJob
)
==
SP_ERROR
)
{
WARN
(
psdrv
,
"CloseJob error
\n
"
);
case
SET_BOUNDS
:
{
RECT16
*
r
=
(
RECT16
*
)
PTR_SEG_TO_LIN
(
lpInData
);
if
(
cbInput
!=
8
)
{
WARN
(
psdrv
,
"cbInput != 8 (=%d) for SET_BOUNDS
\n
"
,
cbInput
);
return
0
;
}
TRACE
(
psdrv
,
"SET_BOUNDS (%d,%d) - (%d,%d)
\n
"
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
);
return
0
;
}
physDev
->
job
.
hJob
=
0
;
return
1
;
default:
FIXME
(
psdrv
,
"Unimplemented code 0x%x
\n
"
,
nEscape
);
return
0
;
}
}
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