Commit Graph

48 Commits

Author SHA1 Message Date
Ken Thomases 019983e2c6 winemac: Reimplement query_pasteboard_data() using the user32 clipboard API.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:09:27 +02:00
Ken Thomases 33b9494ecf winemac: Simplify format_for_type() and callers since there's at most one format for a given Mac pasteboard type.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:09:24 +02:00
Ken Thomases 9cedf37205 winemac: Remove no-longer-called clipboard entry points.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:09:22 +02:00
Ken Thomases 1837210159 winemac: Use GetDIBits to retrieve the bitmap header when exporting a bitmap.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:09:18 +02:00
Ken Thomases 12ea83acb5 winemac: Clamp the number of colors to <= 256 in bitmap_info_size().
… as is done in user32's and gdi32's version of the same function.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:08:34 +02:00
Ken Thomases 8b75e66a5b winemac: Don't export/import CF_TEXT or CF_OEMTEXT to/from Mac-native data types.
The relevant Mac-native types, public.utf16-plain-text and public.utf8-plain-text,
are handled by CF_UNICODETEXT and user32 handles the synthesis of CF_TEXT and
CF_OEMTEXT from that.

CF_TEXT and CF_OEMTEXT are still exported and imported with a Wine-specific
type to preserve cross-prefix copy/paste fidelity.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:06:04 +02:00
Ken Thomases c22590b697 winemac: Don't export/import CF_BITMAP or CF_DIBV5 to/from a Mac-native data type.
The relevant Mac-native type, com.microsoft.bmp, is handled by CF_DIB and
user32 handles the synthesis of CF_BITMAP and CF_DIBV5 from that.

CF_BITMAP and CF_DIBV5 are still exported and imported with a Wine-specific
type to preserve cross-prefix copy/paste fidelity.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:05:51 +02:00
Ken Thomases 40eb776aaa winemac: Remove support for converting among standard clipboard formats.
User32 handles that now.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:05:47 +02:00
Ken Thomases b47183812a winemac: Remove support for owner-displayed clipboard formats.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:02:57 +02:00
Ken Thomases e846da321a winemac: Convert old-Mac-style line breaks (CR) to Windows-style CRLF when importing UTF-16.
At least one Mac app, TextWrangler, puts UTF-16 data on the pasteboard with
lines separated by CR (although it uses LF for the UTF-8 form of the same text).
Other Mac apps handle it properly; we should, too.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:02:52 +02:00
Ken Thomases 861541c5e6 winemac: Allocate clipboard data as GMEM_FIXED.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:02:42 +02:00
Charles Davis 1dcf51f0fc winemac.drv: Move create_bitmap_from_dib() above the import/export functions.
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-05 01:27:52 +09:00
Charles Davis 9a18a62fb2 winemac.drv: Fix our handling of bitmaps on the clipboard.
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-02 23:27:26 +09:00
Alexandre Julliard 070a82e743 user32: Merge the AcquireClipboard and EmptyClipboard driver entry points. 2015-06-03 18:46:53 +09:00
Alexandre Julliard b7c340de73 user32: Get rid of the unused parameter in the EmptyClipboard driver entry point. 2015-06-03 18:46:53 +09:00
Ken Thomases eac789c6da winemac: Put clipboard formats synthesized from other standard clipboard formats at the end of the list. 2013-11-22 13:59:33 +01:00
Ken Thomases f2640745b3 winemac: Make macdrv_EnumClipboardFormats() always use macdrv_copy_pasteboard_formats().
This makes sure that the formats are enumerated in a consistent order.
2013-11-22 13:59:08 +01:00
Ken Thomases b28a014c44 winemac: Cache the "natural" clipboard format entry associated with synthesized built-in entries at startup. 2013-11-22 13:59:03 +01:00
Ken Thomases ee53ea4b93 winemac: Add a function to find the "natural" clipboard format entry for a format ID. 2013-11-22 13:58:48 +01:00
Ken Thomases a0061e0a30 winemac: Synthesize text clipboard formats in CF_TEXT, CF_OEMTEXT, CF_UNICODETEXT order. 2013-11-22 13:58:42 +01:00
Ken Thomases d98dbf8fbd winemac: Synthesize CF_METAFILEPICT from CF_ENHMETAFILE. 2013-11-22 13:58:33 +01:00
Ken Thomases 53089bff2e winemac: Synthesize CF_ENHMETAFILE from CF_METAFILEPICT. 2013-11-22 13:58:28 +01:00
Ken Thomases 29236cce4c winemac: Add support for the CF_ENHMETAFILE clipboard format. 2013-11-22 13:58:20 +01:00
Ken Thomases cdad61369c winemac: Add support for the CF_METAFILEPICT clipboard format. 2013-11-22 13:58:12 +01:00
Ken Thomases a983cfb01d winemac: Ignore Mac-originating pasteboard types which aren't mapped to standard clipboard formats.
New clipboard formats had been registered for them, but that was pointless.
No Windows app would ever expect or make use of such clipboard formats or the
associated pasteboard data.
2013-11-22 13:58:02 +01:00
Ken Thomases aa53603135 winemac: Reduce duplicated code by consolidating exit paths from format_for_type(). 2013-11-06 15:52:48 +01:00
Ken Thomases 7c0c30b4d6 winemac: Fix search for clipboard format matching a pasteboard type so it can fail when it should.
It had been acting as though the last registered clipboard format always
matched any pasteboard type.
2013-11-06 15:52:45 +01:00
Ken Thomases 3ececfd2a5 winemac: Fix a leak in macdrv_CountClipboardFormats(). (Clang). 2013-10-21 10:46:44 +02:00
Ken Thomases 49197e811b winemac: Rename some confusingly-named variables. 2013-10-21 10:46:33 +02:00
Ken Thomases c7f8e71ab6 winemac: Fix some bytes-vs-WCHARs length computation bugs in the UTF-16 clipboard support. 2013-10-21 10:46:29 +02:00
Charles Davis a157c7bd81 winemac.drv: Support the public UTF-16 type for Unicode text. 2013-08-22 22:06:43 +02:00
Ken Thomases cba4bcb47f winemac: Handle failure to get clipboard format name; don't use uninitialized buffer. 2013-04-09 11:25:05 +02:00
Ken Thomases 678f086904 winemac: Support CFSTR_SHELLURLW (UniformResourceLocator) clipboard format, mapped to public.url. 2013-03-26 12:12:28 +01:00
Ken Thomases 36343f520b winemac: Specify import and export functions explicitly in builtin_format_names[]. 2013-03-26 12:12:26 +01:00
Ken Thomases 7993bd3d90 winemac: Implement support for drag-and-drop. 2013-03-14 12:03:32 +01:00
Ken Thomases fb5794a764 winemac: Extract new function from macdrv_EnumClipboardFormats() parameterized by the target pasteboard. 2013-03-14 12:02:49 +01:00
Ken Thomases caf6db7bf9 winemac: Extract new function from macdrv_IsClipboardFormatAvailable() parameterized by the target pasteboard. 2013-03-14 12:02:45 +01:00
Ken Thomases c8e6bad153 winemac: Extract new function from macdrv_GetClipboardData() parameterized by the target pasteboard. 2013-03-14 12:02:41 +01:00
Ken Thomases 4ae5b106f8 winemac: Enable pasteboard functions to operate on arbitrary pasteboards.
... not just the general pasteboard (although the general pasteboard is
still the default).
2013-03-14 12:02:36 +01:00
Ken Thomases bff19b1739 winemac: Add support for CF_HDROP clipboard format, mapped to/from Cocoa's NSFilenamesPboardType. 2013-03-14 12:02:23 +01:00
Ken Thomases 6528619494 winemac: Add support for CF_DIB and CF_BITMAP clipboard formats. 2013-03-14 12:02:10 +01:00
Ken Thomases a8d55288de winemac: Add clipboard formats which can or must be put on Mac pasteboard without transformation. 2013-03-14 12:02:05 +01:00
Ken Thomases 449e2655c2 winemac: Add support for delay-rendered (a.k.a. promised) clipboard data. 2013-03-11 10:53:38 +01:00
Ken Thomases bf824ed38c winemac: Implement setting of clipboard data with support for text formats. 2013-03-11 10:53:26 +01:00
Ken Thomases 764a8edb09 winemac: Implement GetClipboardData() with support for text formats. 2013-03-11 10:53:21 +01:00
Ken Thomases 7cf3e0596f winemac: Implement EnumClipboardFormats() with support for text formats. 2013-03-11 10:53:15 +01:00
Ken Thomases af10783e18 winemac: Implement IsClipboardFormatAvailable() with support for text formats. 2013-03-11 10:53:05 +01:00
Ken Thomases 6b2b3e69f7 winemac: Implement CountClipboardFormats() with support for text formats. 2013-03-11 10:52:59 +01:00