Get rid of clipboard.h.
This commit is contained in:
parent
1dcc247562
commit
5329fc8902
|
@ -77,7 +77,6 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "clipboard.h"
|
||||
#include "win.h"
|
||||
#include "x11drv.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -99,6 +98,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
|
|||
#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 */
|
||||
|
@ -742,25 +750,25 @@ static BOOL X11DRV_CLIPBOARD_RenderFormat(LPWINE_CLIPDATA lpData)
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "wingdi.h"
|
||||
#include "shlobj.h" /* DROPFILES */
|
||||
|
||||
#include "clipboard.h"
|
||||
#include "win.h"
|
||||
#include "winpos.h"
|
||||
#include "winreg.h"
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* 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 */
|
|
@ -51,7 +51,6 @@
|
|||
#include "heap.h"
|
||||
#include "user.h"
|
||||
#include "win.h"
|
||||
#include "clipboard.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
@ -61,6 +60,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(clipboard);
|
|||
|
||||
#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.
|
||||
|
@ -100,7 +107,7 @@ BOOL CLIPBOARD_SetClipboardOwner(HWND hWnd)
|
|||
/**************************************************************************
|
||||
* CLIPBOARD_GetClipboardInfo
|
||||
*/
|
||||
BOOL CLIPBOARD_GetClipboardInfo(LPCLIPBOARDINFO cbInfo)
|
||||
static BOOL CLIPBOARD_GetClipboardInfo(LPCLIPBOARDINFO cbInfo)
|
||||
{
|
||||
BOOL bRet = FALSE;
|
||||
|
||||
|
@ -435,10 +442,13 @@ BOOL WINAPI EmptyClipboard(void)
|
|||
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);
|
||||
|
||||
|
@ -452,10 +462,13 @@ HWND WINAPI GetClipboardOwner(void)
|
|||
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);
|
||||
|
||||
|
@ -498,10 +511,13 @@ HWND WINAPI SetClipboardViewer( HWND hWnd )
|
|||
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);
|
||||
|
||||
|
@ -745,14 +761,15 @@ INT WINAPI GetPriorityClipboardFormat(UINT *list, INT nCount)
|
|||
*/
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue