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
c0da44e4
Commit
c0da44e4
authored
Oct 31, 1999
by
Huw D M Davies
Committed by
Alexandre Julliard
Oct 31, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
It appears that StartDoc sends the STARTDOC escape with the DOCINFO
structure pointed to with the output data parameter.
parent
0f298856
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
15 deletions
+61
-15
escape.c
graphics/escape.c
+26
-2
init.c
graphics/win16drv/init.c
+18
-10
wingdi16.h
include/wine/wingdi16.h
+2
-0
printdrv.c
misc/printdrv.c
+15
-3
No files found.
graphics/escape.c
View file @
c0da44e4
...
...
@@ -114,7 +114,10 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
break
;
}
/* Escape(hdc,STARTDOC,LPSTR,NULL); */
/* Escape(hdc,STARTDOC,LPSTR,LPDOCINFOA);
* lpvOutData is actually a pointer to the DocInfo structure and used as
* a second input parameter
*/
case
STARTDOC
:
/* string may not be \0 terminated */
if
(
lpszInData
)
{
...
...
@@ -123,6 +126,18 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
segin
=
SEGPTR_GET
(
cp
);
}
else
segin
=
0
;
if
(
lpvOutData
)
{
DOCINFO16
*
lpsegdoc
=
SEGPTR_NEW
(
DOCINFO16
);
DOCINFOA
*
lpdoc
=
lpvOutData
;
memset
(
lpsegdoc
,
0
,
sizeof
(
*
lpsegdoc
));
lpsegdoc
->
cbSize
=
sizeof
(
*
lpsegdoc
);
lpsegdoc
->
lpszDocName
=
SEGPTR_GET
(
SEGPTR_STRDUP
(
lpdoc
->
lpszDocName
));
lpsegdoc
->
lpszOutput
=
SEGPTR_GET
(
SEGPTR_STRDUP
(
lpdoc
->
lpszOutput
));
lpsegdoc
->
lpszDatatype
=
SEGPTR_GET
(
SEGPTR_STRDUP
(
lpdoc
->
lpszDatatype
));
lpsegdoc
->
fwType
=
lpdoc
->
fwType
;
segout
=
SEGPTR_GET
(
lpsegdoc
);
}
break
;
case
SETABORTPROC
:
...
...
@@ -193,7 +208,16 @@ INT WINAPI Escape( HDC hdc, INT nEscape, INT cbInput,
SEGPTR_FREE
(
x
);
break
;
}
case
STARTDOC
:
case
STARTDOC
:
{
DOCINFO16
*
doc
=
PTR_SEG_TO_LIN
(
segout
);
SEGPTR_FREE
(
PTR_SEG_TO_LIN
(
doc
->
lpszDocName
));
SEGPTR_FREE
(
PTR_SEG_TO_LIN
(
doc
->
lpszOutput
));
SEGPTR_FREE
(
PTR_SEG_TO_LIN
(
doc
->
lpszDatatype
));
SEGPTR_FREE
(
doc
);
SEGPTR_FREE
(
PTR_SEG_TO_LIN
(
segin
));
break
;
}
case
CLIP_TO_PATH
:
case
END_PATH
:
SEGPTR_FREE
(
PTR_SEG_TO_LIN
(
segin
));
...
...
graphics/win16drv/init.c
View file @
c0da44e4
...
...
@@ -339,19 +339,27 @@ static INT WIN16DRV_Escape( DC *dc, INT nEscape, INT cbInput,
}
break
;
case
STARTDOC
:
nRet
=
PRTDRV_Control
(
physDev
->
segptrPDEVICE
,
nEscape
,
lpInData
,
lpOutData
);
if
(
nRet
!=
-
1
)
{
HDC
*
tmpHdc
=
SEGPTR_NEW
(
HDC
);
{
/* lpInData is not necessarily \0 terminated so make it so */
char
*
cp
=
SEGPTR_ALLOC
(
cbInput
+
1
);
memcpy
(
cp
,
PTR_SEG_TO_LIN
(
lpInData
),
cbInput
);
cp
[
cbInput
]
=
'\0'
;
nRet
=
PRTDRV_Control
(
physDev
->
segptrPDEVICE
,
nEscape
,
SEGPTR_GET
(
cp
),
lpOutData
);
SEGPTR_FREE
(
cp
);
if
(
nRet
!=
-
1
)
{
HDC
*
tmpHdc
=
SEGPTR_NEW
(
HDC
);
#define SETPRINTERDC SETABORTPROC
*
tmpHdc
=
dc
->
hSelf
;
PRTDRV_Control
(
physDev
->
segptrPDEVICE
,
SETPRINTERDC
,
SEGPTR_GET
(
tmpHdc
),
(
SEGPTR
)
NULL
);
SEGPTR_FREE
(
tmpHdc
);
}
*
tmpHdc
=
dc
->
hSelf
;
PRTDRV_Control
(
physDev
->
segptrPDEVICE
,
SETPRINTERDC
,
SEGPTR_GET
(
tmpHdc
),
(
SEGPTR
)
NULL
);
SEGPTR_FREE
(
tmpHdc
);
}
}
break
;
default:
nRet
=
PRTDRV_Control
(
physDev
->
segptrPDEVICE
,
nEscape
,
...
...
include/wine/wingdi16.h
View file @
c0da44e4
...
...
@@ -261,6 +261,8 @@ typedef struct
INT16
cbSize
;
SEGPTR
lpszDocName
;
SEGPTR
lpszOutput
;
SEGPTR
lpszDatatype
;
DWORD
fwType
;
}
DOCINFO16
,
*
LPDOCINFO16
;
typedef
BOOL16
(
CALLBACK
*
ABORTPROC16
)(
HDC16
,
INT16
);
...
...
misc/printdrv.c
View file @
c0da44e4
...
...
@@ -45,8 +45,16 @@ INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
docA
.
cbSize
=
lpdoc
->
cbSize
;
docA
.
lpszDocName
=
PTR_SEG_TO_LIN
(
lpdoc
->
lpszDocName
);
docA
.
lpszOutput
=
PTR_SEG_TO_LIN
(
lpdoc
->
lpszOutput
);
docA
.
lpszDatatype
=
NULL
;
docA
.
fwType
=
0
;
if
(
lpdoc
->
cbSize
>=
14
)
docA
.
lpszDatatype
=
PTR_SEG_TO_LIN
(
lpdoc
->
lpszDatatype
);
else
docA
.
lpszDatatype
=
NULL
;
if
(
lpdoc
->
cbSize
>=
18
)
docA
.
fwType
=
lpdoc
->
fwType
;
else
docA
.
fwType
=
0
;
return
StartDocA
(
hdc
,
&
docA
);
}
...
...
@@ -54,6 +62,10 @@ INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
/******************************************************************
* StartDocA [GDI32.347]
*
* StartDoc calls the STARTDOC Escape with the input data pointing to DocName
* and the output data (which is used as a second input parameter).pointing at
* the whole docinfo structure. This seems to be an undocumented feature of
* the STARTDOC Escape.
*/
INT
WINAPI
StartDocA
(
HDC
hdc
,
const
DOCINFOA
*
doc
)
{
...
...
@@ -68,7 +80,7 @@ INT WINAPI StartDocA(HDC hdc, const DOCINFOA* doc)
return
dc
->
funcs
->
pStartDoc
(
dc
,
doc
);
else
return
Escape
(
hdc
,
STARTDOC
,
strlen
(
doc
->
lpszDocName
),
doc
->
lpszDocName
,
0
);
doc
->
lpszDocName
,
(
LPVOID
)
doc
);
}
/*************************************************************************
...
...
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