#include "windef.h"
#include "winbase.h"
#include "winreg.h"
-#include "clipboard.h"
#include "win.h"
#include "x11drv.h"
#include "wine/debug.h"
#define S_PRIMARY 1
#define S_CLIPBOARD 2
+typedef struct
+{
+ HWND hWndOpen;
+ HWND hWndOwner;
+ HWND hWndViewer;
+ UINT seqno;
+ UINT flags;
+} CLIPBOARDINFO, *LPCLIPBOARDINFO;
+
static int selectionAcquired = 0; /* Contains the current selection masks */
static Window selectionWindow = None; /* The top level X window which owns the selection */
static BOOL clearAllSelections = FALSE; /* Always lose all selections */
}
else
{
- CLIPBOARDINFO cbInfo;
+ CLIPBOARDINFO cbInfo;
if (X11DRV_CLIPBOARD_GetClipboardInfo(&cbInfo) && cbInfo.hWndOwner)
- {
- /* Send a WM_RENDERFORMAT message to notify the owner to render the
- * data requested into the clipboard.
- */
- TRACE("Sending WM_RENDERFORMAT message to hwnd(%p)\n", cbInfo.hWndOwner);
- SendMessageW(cbInfo.hWndOwner, WM_RENDERFORMAT, (WPARAM)lpData->wFormatID, 0);
+ {
+ /* Send a WM_RENDERFORMAT message to notify the owner to render the
+ * data requested into the clipboard.
+ */
+ TRACE("Sending WM_RENDERFORMAT message to hwnd(%p)\n", cbInfo.hWndOwner);
+ SendMessageW(cbInfo.hWndOwner, WM_RENDERFORMAT, (WPARAM)lpData->wFormatID, 0);
- if (!lpData->hData32 && !lpData->hData16)
- bret = FALSE;
- }
- else
- {
- ERR("hWndClipOwner is lost!\n");
+ if (!lpData->hData32 && !lpData->hData16)
bret = FALSE;
- }
}
+ else
+ {
+ ERR("hWndClipOwner is lost!\n");
+ bret = FALSE;
+ }
+ }
return bret;
}
#include "wingdi.h"
#include "shlobj.h" /* DROPFILES */
-#include "clipboard.h"
#include "win.h"
#include "winpos.h"
#include "winreg.h"
+++ /dev/null
-/*
- * Copyright 1994 Martin Ayotte
- * Copyright 1996 Alex Korobka
- * Copyright 1999 Noel Borthwick
- * Copyright 2003 Ulrich Czekalla for CodeWeavers
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __WINE_CLIPBOARD_H
-#define __WINE_CLIPBOARD_H
-
-#include <windef.h>
-
-typedef struct tagCLIPBOARDINFO
-{
- HWND hWndOpen;
- HWND hWndOwner;
- HWND hWndViewer;
- UINT seqno;
- UINT flags;
-} CLIPBOARDINFO, *LPCLIPBOARDINFO;
-
-#endif /* __WINE_CLIPBOARD_H */
#include "heap.h"
#include "user.h"
#include "win.h"
-#include "clipboard.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#define CF_REGFORMATBASE 0xC000
+typedef struct
+{
+ HWND hWndOpen;
+ HWND hWndOwner;
+ HWND hWndViewer;
+ UINT seqno;
+ UINT flags;
+} CLIPBOARDINFO, *LPCLIPBOARDINFO;
/*
* Indicates if data has changed since open.
/**************************************************************************
* CLIPBOARD_GetClipboardInfo
*/
-BOOL CLIPBOARD_GetClipboardInfo(LPCLIPBOARDINFO cbInfo)
+static BOOL CLIPBOARD_GetClipboardInfo(LPCLIPBOARDINFO cbInfo)
{
BOOL bRet = FALSE;
HWND WINAPI GetClipboardOwner(void)
{
HWND hWndOwner = 0;
- CLIPBOARDINFO cbinfo;
- if (CLIPBOARD_GetClipboardInfo(&cbinfo))
- hWndOwner = cbinfo.hWndOwner;
+ SERVER_START_REQ( set_clipboard_info )
+ {
+ req->flags = 0;
+ if (!wine_server_call_err( req )) hWndOwner = reply->old_owner;
+ }
+ SERVER_END_REQ;
TRACE(" hWndOwner(%p)\n", hWndOwner);
HWND WINAPI GetOpenClipboardWindow(void)
{
HWND hWndOpen = 0;
- CLIPBOARDINFO cbinfo;
- if (CLIPBOARD_GetClipboardInfo(&cbinfo))
- hWndOpen = cbinfo.hWndOpen;
+ SERVER_START_REQ( set_clipboard_info )
+ {
+ req->flags = 0;
+ if (!wine_server_call_err( req )) hWndOpen = reply->old_clipboard;
+ }
+ SERVER_END_REQ;
TRACE(" hWndClipWindow(%p)\n", hWndOpen);
HWND WINAPI GetClipboardViewer(void)
{
HWND hWndViewer = 0;
- CLIPBOARDINFO cbinfo;
- if (CLIPBOARD_GetClipboardInfo(&cbinfo))
- hWndViewer = cbinfo.hWndViewer;
+ SERVER_START_REQ( set_clipboard_info )
+ {
+ req->flags = 0;
+ if (!wine_server_call_err( req )) hWndViewer = reply->old_viewer;
+ }
+ SERVER_END_REQ;
TRACE(" hWndViewer=%p\n", hWndViewer);
*/
DWORD WINAPI GetClipboardSequenceNumber(VOID)
{
- CLIPBOARDINFO cbinfo;
+ DWORD seqno = 0;
- if (!CLIPBOARD_GetClipboardInfo(&cbinfo))
+ SERVER_START_REQ( set_clipboard_info )
{
- ERR("Failed to get clipboard information.\n");
- return 0;
+ req->flags = 0;
+ if (!wine_server_call_err( req )) seqno = reply->seqno;
}
+ SERVER_END_REQ;
- TRACE("returning %x\n", cbinfo.seqno);
- return cbinfo.seqno;
+ TRACE("returning %lx\n", seqno);
+ return seqno;
}