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
42fc3b64
Commit
42fc3b64
authored
Jan 25, 2011
by
Alexander Scott-Johns
Committed by
Alexandre Julliard
Jan 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Implement synthesizing the CF_ENHMETAFILE clipboard format from CF_METAFILEPICT.
parent
198a55bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
2 deletions
+53
-2
clipboard.c
dlls/winex11.drv/clipboard.c
+53
-2
No files found.
dlls/winex11.drv/clipboard.c
View file @
42fc3b64
...
...
@@ -179,6 +179,7 @@ static BOOL X11DRV_CLIPBOARD_SynthesizeData(UINT wFormatID);
static
BOOL
X11DRV_CLIPBOARD_RenderSynthesizedFormat
(
Display
*
display
,
LPWINE_CLIPDATA
lpData
);
static
BOOL
X11DRV_CLIPBOARD_RenderSynthesizedDIB
(
Display
*
display
);
static
BOOL
X11DRV_CLIPBOARD_RenderSynthesizedBitmap
(
Display
*
display
);
static
BOOL
X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile
(
Display
*
display
);
static
void
X11DRV_HandleSelectionRequest
(
HWND
hWnd
,
XSelectionRequestEvent
*
event
,
BOOL
bIsMultiple
);
/* Clipboard formats
...
...
@@ -887,12 +888,15 @@ static BOOL X11DRV_CLIPBOARD_RenderSynthesizedFormat(Display *display, LPWINE_CL
break
;
case
CF_ENHMETAFILE
:
bret
=
X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile
(
display
);
break
;
case
CF_METAFILEPICT
:
FIXME
(
"Synthesizing wFormatID(0x%08x) not implemented
\n
"
,
wFormatID
);
FIXME
(
"Synthesizing CF_METAFILEPICT not implemented
\n
"
);
break
;
default:
FIXME
(
"Called to synthesize unknown format
\n
"
);
FIXME
(
"Called to synthesize unknown format 0x%08x
\n
"
,
wFormatID
);
break
;
}
}
...
...
@@ -1088,6 +1092,53 @@ static BOOL X11DRV_CLIPBOARD_RenderSynthesizedBitmap(Display *display)
/**************************************************************************
* X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile
*/
static
BOOL
X11DRV_CLIPBOARD_RenderSynthesizedEnhMetaFile
(
Display
*
display
)
{
LPWINE_CLIPDATA
lpSource
=
NULL
;
TRACE
(
"
\n
"
);
if
((
lpSource
=
X11DRV_CLIPBOARD_LookupData
(
CF_ENHMETAFILE
))
&&
lpSource
->
hData
)
return
TRUE
;
/* If we have a MF pict and it's not synthesized or it has been rendered */
else
if
((
lpSource
=
X11DRV_CLIPBOARD_LookupData
(
CF_METAFILEPICT
))
&&
(
!
(
lpSource
->
wFlags
&
CF_FLAG_SYNTHESIZED
)
||
lpSource
->
hData
))
{
/* Render source if required */
if
(
lpSource
->
hData
||
X11DRV_CLIPBOARD_RenderFormat
(
display
,
lpSource
))
{
METAFILEPICT
*
pmfp
;
HENHMETAFILE
hData
=
NULL
;
pmfp
=
GlobalLock
(
lpSource
->
hData
);
if
(
pmfp
)
{
UINT
size_mf_bits
=
GetMetaFileBitsEx
(
pmfp
->
hMF
,
0
,
NULL
);
void
*
mf_bits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size_mf_bits
);
if
(
mf_bits
)
{
GetMetaFileBitsEx
(
pmfp
->
hMF
,
size_mf_bits
,
mf_bits
);
hData
=
SetWinMetaFileBits
(
size_mf_bits
,
mf_bits
,
NULL
,
pmfp
);
HeapFree
(
GetProcessHeap
(),
0
,
mf_bits
);
}
GlobalUnlock
(
lpSource
->
hData
);
}
if
(
hData
)
{
X11DRV_CLIPBOARD_InsertClipboardData
(
CF_ENHMETAFILE
,
hData
,
0
,
NULL
,
TRUE
);
return
TRUE
;
}
}
}
return
FALSE
;
}
/**************************************************************************
* X11DRV_CLIPBOARD_ImportXAString
*
* Import XA_STRING, converting the string to CF_TEXT.
...
...
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