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
65af6985
Commit
65af6985
authored
Dec 09, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use an escape mechanism similar to the x11drv one to set the DC
origin.
parent
f738c146
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
7 deletions
+61
-7
dc.c
dlls/ttydrv/dc.c
+40
-0
ttydrv.h
dlls/ttydrv/ttydrv.h
+12
-0
ttydrv.spec
dlls/ttydrv/ttydrv.spec
+1
-0
wnd.c
dlls/ttydrv/wnd.c
+8
-7
No files found.
dlls/ttydrv/dc.c
View file @
65af6985
...
...
@@ -183,3 +183,43 @@ DWORD TTYDRV_SetDCOrg( TTYDRV_PDEVICE *physDev, INT x, INT y )
physDev
->
org
.
y
=
y
;
return
ret
;
}
/**********************************************************************
* ExtEscape (X11DRV.@)
*/
INT
TTYDRV_ExtEscape
(
TTYDRV_PDEVICE
*
physDev
,
INT
escape
,
INT
in_count
,
LPCVOID
in_data
,
INT
out_count
,
LPVOID
out_data
)
{
switch
(
escape
)
{
case
QUERYESCSUPPORT
:
if
(
in_data
)
{
switch
(
*
(
const
INT
*
)
in_data
)
{
case
TTYDRV_ESCAPE
:
return
TRUE
;
}
}
break
;
case
TTYDRV_ESCAPE
:
if
(
in_data
&&
in_count
>=
sizeof
(
enum
ttydrv_escape_codes
))
{
switch
(
*
(
const
enum
ttydrv_escape_codes
*
)
in_data
)
{
case
TTYDRV_SET_DRAWABLE
:
if
(
in_count
>=
sizeof
(
struct
ttydrv_escape_set_drawable
))
{
const
struct
ttydrv_escape_set_drawable
*
data
=
(
const
struct
ttydrv_escape_set_drawable
*
)
in_data
;
physDev
->
org
=
data
->
org
;
return
TRUE
;
}
break
;
}
}
break
;
}
return
0
;
}
dlls/ttydrv/ttydrv.h
View file @
65af6985
...
...
@@ -100,6 +100,18 @@ INT TTYDRV_DC_SetDIBitsToDevice(TTYDRV_PDEVICE *physDev, INT xDest, INT yDest, D
extern
BOOL
TTYDRV_PALETTE_Initialize
(
void
);
#define TTYDRV_ESCAPE 6999
enum
ttydrv_escape_codes
{
TTYDRV_SET_DRAWABLE
/* set current drawable for a DC */
};
struct
ttydrv_escape_set_drawable
{
enum
ttydrv_escape_codes
code
;
/* escape code (TTYDRV_SET_DRAWABLE) */
POINT
org
;
/* origin of DC relative to drawable */
};
/**************************************************************************
* TTY USER driver
*/
...
...
dlls/ttydrv/ttydrv.spec
View file @
65af6985
...
...
@@ -6,6 +6,7 @@
@ cdecl CreateDC(long ptr wstr wstr wstr ptr) TTYDRV_DC_CreateDC
@ cdecl DeleteDC(ptr) TTYDRV_DC_DeleteDC
@ cdecl Ellipse(ptr long long long long) TTYDRV_DC_Ellipse
@ cdecl ExtEscape(ptr long long ptr long ptr) TTYDRV_ExtEscape
@ cdecl ExtFloodFill(ptr long long long long) TTYDRV_DC_ExtFloodFill
@ cdecl ExtTextOut(ptr long long long ptr ptr long ptr long) TTYDRV_DC_ExtTextOut
@ cdecl GetBitmapBits(long ptr long) TTYDRV_GetBitmapBits
...
...
dlls/ttydrv/wnd.c
View file @
65af6985
...
...
@@ -414,22 +414,23 @@ BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
{
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
HRGN
hrgnVisible
=
0
;
POINT
org
;
struct
ttydrv_escape_set_drawable
escape
;
if
(
!
wndPtr
)
return
FALSE
;
if
(
flags
&
DCX_WINDOW
)
{
org
.
x
=
wndPtr
->
rectWindow
.
left
;
org
.
y
=
wndPtr
->
rectWindow
.
top
;
escape
.
org
.
x
=
wndPtr
->
rectWindow
.
left
;
escape
.
org
.
y
=
wndPtr
->
rectWindow
.
top
;
}
else
{
org
.
x
=
wndPtr
->
rectClient
.
left
;
org
.
y
=
wndPtr
->
rectClient
.
top
;
escape
.
org
.
x
=
wndPtr
->
rectClient
.
left
;
escape
.
org
.
y
=
wndPtr
->
rectClient
.
top
;
}
SetDCOrg16
(
HDC_16
(
hdc
),
org
.
x
,
org
.
y
);
escape
.
code
=
TTYDRV_SET_DRAWABLE
;
ExtEscape
(
hdc
,
TTYDRV_ESCAPE
,
sizeof
(
escape
),
(
LPSTR
)
&
escape
,
0
,
NULL
);
if
(
SetHookFlags16
(
HDC_16
(
hdc
),
DCHF_VALIDATEVISRGN
)
||
/* DC was dirty */
(
flags
&
(
DCX_EXCLUDERGN
|
DCX_INTERSECTRGN
)
))
...
...
@@ -463,7 +464,7 @@ BOOL TTYDRV_GetDC( HWND hwnd, HDC hdc, HRGN hrgn, DWORD flags )
else
{
hrgnVisible
=
DCE_GetVisRgn
(
hwnd
,
flags
,
0
,
0
);
OffsetRgn
(
hrgnVisible
,
org
.
x
,
org
.
y
);
OffsetRgn
(
hrgnVisible
,
escape
.
org
.
x
,
escape
.
org
.
y
);
}
/* apply additional region operation (if any) */
...
...
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