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
36343f52
Commit
36343f52
authored
Mar 26, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Specify import and export functions explicitly in builtin_format_names[].
parent
2d76befb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
clipboard.c
dlls/winemac.drv/clipboard.c
+19
-11
No files found.
dlls/winemac.drv/clipboard.c
View file @
36343f52
...
@@ -197,15 +197,17 @@ static const WCHAR wszPNG[] = {'P','N','G',0};
...
@@ -197,15 +197,17 @@ static const WCHAR wszPNG[] = {'P','N','G',0};
static
const
WCHAR
wszHTMLFormat
[]
=
{
'H'
,
'T'
,
'M'
,
'L'
,
' '
,
'F'
,
'o'
,
'r'
,
'm'
,
'a'
,
't'
,
0
};
static
const
WCHAR
wszHTMLFormat
[]
=
{
'H'
,
'T'
,
'M'
,
'L'
,
' '
,
'F'
,
'o'
,
'r'
,
'm'
,
'a'
,
't'
,
0
};
static
const
struct
static
const
struct
{
{
LPCWSTR
name
;
LPCWSTR
name
;
CFStringRef
type
;
CFStringRef
type
;
DRVIMPORTFUNC
import
;
DRVEXPORTFUNC
export
;
}
builtin_format_names
[]
=
}
builtin_format_names
[]
=
{
{
{
wszRichTextFormat
,
CFSTR
(
"public.rtf"
)
},
{
wszRichTextFormat
,
CFSTR
(
"public.rtf"
)
,
import_clipboard_data
,
export_clipboard_data
},
{
wszGIF
,
CFSTR
(
"com.compuserve.gif"
)
},
{
wszGIF
,
CFSTR
(
"com.compuserve.gif"
)
,
import_clipboard_data
,
export_clipboard_data
},
{
wszJFIF
,
CFSTR
(
"public.jpeg"
)
},
{
wszJFIF
,
CFSTR
(
"public.jpeg"
)
,
import_clipboard_data
,
export_clipboard_data
},
{
wszPNG
,
CFSTR
(
"public.png"
)
},
{
wszPNG
,
CFSTR
(
"public.png"
)
,
import_clipboard_data
,
export_clipboard_data
},
{
wszHTMLFormat
,
CFSTR
(
"public.html"
)
},
{
wszHTMLFormat
,
CFSTR
(
"public.html"
)
,
import_clipboard_data
,
export_clipboard_data
},
};
};
/* The prefix prepended to an external Mac pasteboard type to make a Win32 clipboard format name. org.winehq.mac-type. */
/* The prefix prepended to an external Mac pasteboard type to make a Win32 clipboard format name. org.winehq.mac-type. */
...
@@ -1755,12 +1757,11 @@ BOOL CDECL macdrv_SetClipboardData(UINT format_id, HANDLE data, BOOL owner)
...
@@ -1755,12 +1757,11 @@ BOOL CDECL macdrv_SetClipboardData(UINT format_id, HANDLE data, BOOL owner)
void
macdrv_clipboard_process_attach
(
void
)
void
macdrv_clipboard_process_attach
(
void
)
{
{
UINT
i
;
UINT
i
;
WINE_CLIPFORMAT
*
format
;
/* Register built-in formats */
/* Register built-in formats */
for
(
i
=
0
;
i
<
sizeof
(
builtin_format_ids
)
/
sizeof
(
builtin_format_ids
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
builtin_format_ids
)
/
sizeof
(
builtin_format_ids
[
0
]);
i
++
)
{
{
WINE_CLIPFORMAT
*
format
;
if
(
!
(
format
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
format
))))
break
;
if
(
!
(
format
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
format
))))
break
;
format
->
format_id
=
builtin_format_ids
[
i
].
id
;
format
->
format_id
=
builtin_format_ids
[
i
].
id
;
format
->
type
=
CFRetain
(
builtin_format_ids
[
i
].
type
);
format
->
type
=
CFRetain
(
builtin_format_ids
[
i
].
type
);
...
@@ -1772,8 +1773,15 @@ void macdrv_clipboard_process_attach(void)
...
@@ -1772,8 +1773,15 @@ void macdrv_clipboard_process_attach(void)
/* Register known mappings between Windows formats and Mac types */
/* Register known mappings between Windows formats and Mac types */
for
(
i
=
0
;
i
<
sizeof
(
builtin_format_names
)
/
sizeof
(
builtin_format_names
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
builtin_format_names
)
/
sizeof
(
builtin_format_names
[
0
]);
i
++
)
insert_clipboard_format
(
RegisterClipboardFormatW
(
builtin_format_names
[
i
].
name
),
{
builtin_format_names
[
i
].
type
);
if
(
!
(
format
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
format
))))
break
;
format
->
format_id
=
RegisterClipboardFormatW
(
builtin_format_names
[
i
].
name
);
format
->
type
=
CFRetain
(
builtin_format_names
[
i
].
type
);
format
->
import_func
=
builtin_format_names
[
i
].
import
;
format
->
export_func
=
builtin_format_names
[
i
].
export
;
format
->
synthesized
=
FALSE
;
list_add_tail
(
&
format_list
,
&
format
->
entry
);
}
}
}
...
...
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