* fhandler.h (fhandler_dev_clipboard): Add private member

cygnativeformat.  Declare private method set_clipboard.
	* fhandler_clipboard.cc (cygnativeformat): Convert static variable to
	fhandler_dev_clipboard member.
	(fhandler_dev_clipboard::set_clipboard): Convert from static function
	to fhandler_dev_clipboard method.
This commit is contained in:
Corinna Vinschen 2013-12-10 21:05:23 +00:00
parent 10e4d79a19
commit f2988299eb
3 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2013-12-10 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_dev_clipboard): Add private member
cygnativeformat. Declare private method set_clipboard.
* fhandler_clipboard.cc (cygnativeformat): Convert static variable to
fhandler_dev_clipboard member.
(fhandler_dev_clipboard::set_clipboard): Convert from static function
to fhandler_dev_clipboard method.
2013-12-09 Christopher Faylor <me.cygwin2013@cgf.cx>
* globals.cc (hntdll): Define/declare.

View File

@ -1688,9 +1688,12 @@ class fhandler_dev_random: public fhandler_base
class fhandler_dev_clipboard: public fhandler_base
{
UINT cygnativeformat;
off_t pos;
void *membuffer;
size_t msize;
int set_clipboard (const void *buf, size_t len);
public:
fhandler_dev_clipboard ();
int is_windows () { return 1; }

View File

@ -28,8 +28,6 @@ details. */
*/
static const WCHAR *CYGWIN_NATIVE = L"CYGWIN_NATIVE_CLIPBOARD";
/* this is MT safe because windows format id's are atomic */
static UINT cygnativeformat;
typedef struct
{
@ -61,8 +59,8 @@ fhandler_dev_clipboard::dup (fhandler_base * child, int flags)
return fhandler_base::dup (child, flags);
}
static int
set_clipboard (const void *buf, size_t len)
int
fhandler_dev_clipboard::set_clipboard (const void *buf, size_t len)
{
HGLOBAL hmem;
/* Native CYGWIN format */