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
29236cce
Commit
29236cce
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: Add support for the CF_ENHMETAFILE clipboard format.
parent
cdad6136
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
clipboard.c
dlls/winemac.drv/clipboard.c
+46
-0
No files found.
dlls/winemac.drv/clipboard.c
View file @
29236cce
...
...
@@ -72,6 +72,7 @@ typedef struct
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_metafilepict
(
CFDataRef
data
);
static
HANDLE
import_nsfilenames_to_hdrop
(
CFDataRef
data
);
static
HANDLE
import_oemtext_to_text
(
CFDataRef
data
);
...
...
@@ -90,6 +91,7 @@ static HANDLE import_utf16_to_unicodetext(CFDataRef data);
static
CFDataRef
export_clipboard_data
(
HANDLE
data
);
static
CFDataRef
export_bitmap_to_bmp
(
HANDLE
data
);
static
CFDataRef
export_dib_to_bmp
(
HANDLE
data
);
static
CFDataRef
export_enhmetafile
(
HANDLE
data
);
static
CFDataRef
export_hdrop_to_filenames
(
HANDLE
data
);
static
CFDataRef
export_metafilepict
(
HANDLE
data
);
static
CFDataRef
export_oemtext_to_utf8
(
HANDLE
data
);
...
...
@@ -197,6 +199,7 @@ 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_METAFILEPICT
,
CFSTR
(
"org.winehq.builtin.metafilepict"
),
import_metafilepict
,
export_metafilepict
,
FALSE
},
};
...
...
@@ -675,6 +678,25 @@ static HANDLE import_bmp_to_dib(CFDataRef data)
/**************************************************************************
* import_enhmetafile
*
* Import enhanced metafile data, converting it to CF_ENHMETAFILE.
*/
static
HANDLE
import_enhmetafile
(
CFDataRef
data
)
{
HANDLE
ret
=
0
;
CFIndex
len
=
CFDataGetLength
(
data
);
TRACE
(
"data %s
\n
"
,
debugstr_cf
(
data
));
if
(
len
)
ret
=
SetEnhMetaFileBits
(
len
,
(
const
BYTE
*
)
CFDataGetBytePtr
(
data
));
return
ret
;
}
/**************************************************************************
* import_metafilepict
*
* Import metafile picture data, converting it to CF_METAFILEPICT.
...
...
@@ -1169,6 +1191,30 @@ static CFDataRef export_dib_to_bmp(HANDLE data)
/**************************************************************************
* export_enhmetafile
*
* Export an enhanced metafile to data.
*/
static
CFDataRef
export_enhmetafile
(
HANDLE
data
)
{
CFMutableDataRef
ret
=
NULL
;
unsigned
int
size
=
GetEnhMetaFileBits
(
data
,
0
,
NULL
);
TRACE
(
"data %p
\n
"
,
data
);
ret
=
CFDataCreateMutable
(
NULL
,
size
);
if
(
ret
)
{
CFDataSetLength
(
ret
,
size
);
GetEnhMetaFileBits
(
data
,
size
,
(
BYTE
*
)
CFDataGetMutableBytePtr
(
ret
));
}
TRACE
(
" -> %s
\n
"
,
debugstr_cf
(
ret
));
return
ret
;
}
/**************************************************************************
* export_hdrop_to_filenames
*
* Export CF_HDROP to NSFilenamesPboardType data, which is a CFArray of
...
...
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