2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2017-11-16 16:00:00 +03:00
|
|
|
/* vim:expandtab:shiftwidth=4:tabstop=4:
|
|
|
|
*/
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef __nsClipboardX11_h_
|
|
|
|
#define __nsClipboardX11_h_
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2022-02-02 17:55:12 +03:00
|
|
|
#include "mozilla/Maybe.h"
|
|
|
|
#include "nsClipboard.h"
|
|
|
|
|
2017-11-16 16:00:00 +03:00
|
|
|
class nsRetrievalContextX11 : public nsRetrievalContext {
|
2018-11-30 13:46:48 +03:00
|
|
|
public:
|
2022-02-02 17:55:12 +03:00
|
|
|
ClipboardData GetClipboardData(const char* aMimeType,
|
|
|
|
int32_t aWhichClipboard) override;
|
|
|
|
mozilla::GUniquePtr<char> GetClipboardText(int32_t aWhichClipboard) override;
|
2022-02-11 10:43:11 +03:00
|
|
|
ClipboardTargets GetTargetsImpl(int32_t aWhichClipboard) override;
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2017-11-16 16:00:00 +03:00
|
|
|
nsRetrievalContextX11();
|
2018-11-30 13:46:48 +03:00
|
|
|
|
|
|
|
private:
|
2022-02-05 01:09:44 +03:00
|
|
|
// Spins X event loop until timing out or being completed.
|
2022-02-02 17:55:12 +03:00
|
|
|
ClipboardData WaitForClipboardData(ClipboardDataType aDataType,
|
2022-02-02 17:55:13 +03:00
|
|
|
int32_t aWhichClipboard,
|
2022-02-02 17:55:12 +03:00
|
|
|
const char* aMimeType = nullptr);
|
2017-11-16 16:00:00 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __nsClipboardX11_h_ */
|