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
d98dbf8f
Commit
d98dbf8f
authored
Nov 22, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Nov 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Synthesize CF_METAFILEPICT from CF_ENHMETAFILE.
parent
53089bff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
1 deletion
+45
-1
clipboard.c
dlls/winemac.drv/clipboard.c
+45
-1
No files found.
dlls/winemac.drv/clipboard.c
View file @
d98dbf8f
...
...
@@ -73,6 +73,7 @@ static HANDLE import_clipboard_data(CFDataRef data);
static
HANDLE
import_bmp_to_bitmap
(
CFDataRef
data
);
static
HANDLE
import_bmp_to_dib
(
CFDataRef
data
);
static
HANDLE
import_enhmetafile
(
CFDataRef
data
);
static
HANDLE
import_enhmetafile_to_metafilepict
(
CFDataRef
data
);
static
HANDLE
import_metafilepict
(
CFDataRef
data
);
static
HANDLE
import_metafilepict_to_enhmetafile
(
CFDataRef
data
);
static
HANDLE
import_nsfilenames_to_hdrop
(
CFDataRef
data
);
...
...
@@ -200,7 +201,8 @@ static const struct
{
CF_HDROP
,
CFSTR
(
"org.winehq.builtin.hdrop"
),
import_clipboard_data
,
export_clipboard_data
,
FALSE
},
{
CF_HDROP
,
CFSTR
(
"NSFilenamesPboardType"
),
import_nsfilenames_to_hdrop
,
export_hdrop_to_filenames
,
TRUE
},
{
CF_ENHMETAFILE
,
CFSTR
(
"org.winehq.builtin.enhmetafile"
),
import_enhmetafile
,
export_enhmetafile
,
FALSE
},
{
CF_ENHMETAFILE
,
CFSTR
(
"org.winehq.builtin.enhmetafile"
),
import_enhmetafile
,
export_enhmetafile
,
FALSE
},
{
CF_METAFILEPICT
,
CFSTR
(
"org.winehq.builtin.enhmetafile"
),
import_enhmetafile_to_metafilepict
,
NULL
,
TRUE
},
{
CF_METAFILEPICT
,
CFSTR
(
"org.winehq.builtin.metafilepict"
),
import_metafilepict
,
export_metafilepict
,
FALSE
},
{
CF_ENHMETAFILE
,
CFSTR
(
"org.winehq.builtin.metafilepict"
),
import_metafilepict_to_enhmetafile
,
NULL
,
TRUE
},
...
...
@@ -700,6 +702,48 @@ static HANDLE import_enhmetafile(CFDataRef data)
/**************************************************************************
* import_enhmetafile_to_metafilepict
*
* Import enhanced metafile data, converting it to CF_METAFILEPICT.
*/
static
HANDLE
import_enhmetafile_to_metafilepict
(
CFDataRef
data
)
{
HANDLE
ret
=
0
,
hmf
;
HANDLE
hemf
;
METAFILEPICT
*
mfp
;
if
((
hmf
=
GlobalAlloc
(
0
,
sizeof
(
*
mfp
)))
&&
(
hemf
=
import_enhmetafile
(
data
)))
{
ENHMETAHEADER
header
;
HDC
hdc
=
CreateCompatibleDC
(
0
);
unsigned
int
size
=
GetWinMetaFileBits
(
hemf
,
0
,
NULL
,
MM_ISOTROPIC
,
hdc
);
BYTE
*
bytes
;
bytes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
bytes
&&
GetEnhMetaFileHeader
(
hemf
,
sizeof
(
header
),
&
header
)
&&
GetWinMetaFileBits
(
hemf
,
size
,
bytes
,
MM_ISOTROPIC
,
hdc
))
{
mfp
=
GlobalLock
(
hmf
);
mfp
->
mm
=
MM_ISOTROPIC
;
mfp
->
xExt
=
header
.
rclFrame
.
right
-
header
.
rclFrame
.
left
;
mfp
->
yExt
=
header
.
rclFrame
.
bottom
-
header
.
rclFrame
.
top
;
mfp
->
hMF
=
SetMetaFileBitsEx
(
size
,
bytes
);
GlobalUnlock
(
hmf
);
ret
=
hmf
;
}
if
(
hdc
)
DeleteDC
(
hdc
);
HeapFree
(
GetProcessHeap
(),
0
,
bytes
);
DeleteEnhMetaFile
(
hemf
);
}
if
(
!
ret
)
GlobalFree
(
hmf
);
return
ret
;
}
/**************************************************************************
* import_metafilepict
*
* Import metafile picture data, converting it to CF_METAFILEPICT.
...
...
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