1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsBaseClipboard_h__
7 #define nsBaseClipboard_h__
9 #include "mozilla/Logging.h"
10 #include "nsIClipboard.h"
11 #include "nsITransferable.h"
14 static mozilla::LazyLogModule
sWidgetClipboardLog("WidgetClipboard");
15 #define CLIPBOARD_LOG(...) \
16 MOZ_LOG(sWidgetClipboardLog, LogLevel::Debug, (__VA_ARGS__))
17 #define CLIPBOARD_LOG_ENABLED() \
18 MOZ_LOG_TEST(sWidgetClipboardLog, LogLevel::Debug)
20 class nsITransferable
;
21 class nsIClipboardOwner
;
25 * Native Win32 BaseClipboard wrapper
28 class nsBaseClipboard
: public nsIClipboard
{
39 virtual ~nsBaseClipboard();
41 NS_IMETHOD
SetNativeClipboardData(int32_t aWhichClipboard
) = 0;
42 NS_IMETHOD
GetNativeClipboardData(nsITransferable
* aTransferable
,
43 int32_t aWhichClipboard
) = 0;
45 bool mEmptyingForSetData
;
46 nsCOMPtr
<nsIClipboardOwner
> mClipboardOwner
;
47 nsCOMPtr
<nsITransferable
> mTransferable
;
50 bool mIgnoreEmptyNotification
= false;
53 #endif // nsBaseClipboard_h__