]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/clipbrd.h
turn off directshow by default for lib dependancy
[wxWidgets.git] / include / wx / msw / clipbrd.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
e1ee679c
VZ
2// Name: wx/msw/clipbrd.h
3// Purpose: wxClipboad class and clipboard functions for MSW
2bda0e17
KB
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_CLIPBRD_H_
13#define _WX_CLIPBRD_H_
2bda0e17 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
2bda0e17
KB
16#pragma interface "clipbrd.h"
17#endif
18
47d67540 19#if wxUSE_CLIPBOARD
2bda0e17
KB
20
21#include "wx/list.h"
4ce81a75 22#include "wx/module.h"
3f480da3 23#include "wx/dataobj.h" // for wxDataFormat
2bda0e17 24
26f86486 25// These functions superceded by wxClipboard, but retained in order to
9d701f0e 26// implement wxClipboard, and for compatibility.
26f86486
VZ
27
28// open/close the clipboard
29WXDLLEXPORT bool wxOpenClipboard();
30WXDLLEXPORT bool wxIsClipboardOpened();
31#define wxClipboardOpen wxIsClipboardOpened
32WXDLLEXPORT bool wxCloseClipboard();
33
34// get/set data
35WXDLLEXPORT bool wxEmptyClipboard();
36WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat,
37 const void *data,
38 int width = 0, int height = 0);
39WXDLLEXPORT void* wxGetClipboardData(wxDataFormat dataFormat,
40 long *len = NULL);
41
42// clipboard formats
06e43511 43WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
06e43511 44WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
32c1cda2 45WXDLLEXPORT int wxRegisterClipboardFormat(wxChar *formatName);
26f86486 46WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat,
32c1cda2 47 wxChar *formatName,
26f86486 48 int maxCount);
2bda0e17 49
06e43511
JS
50//-----------------------------------------------------------------------------
51// wxClipboard
52//-----------------------------------------------------------------------------
2bda0e17 53
06e43511 54class WXDLLEXPORT wxDataObject;
2af18715 55class WXDLLEXPORT wxClipboard : public wxClipboardBase
2bda0e17 56{
26f86486 57 DECLARE_DYNAMIC_CLASS(wxClipboard)
2bda0e17 58
06e43511 59public:
26f86486
VZ
60 wxClipboard();
61 ~wxClipboard();
62
63 // open the clipboard before SetData() and GetData()
64 virtual bool Open();
65
66 // close the clipboard after SetData() and GetData()
67 virtual void Close();
68
f536e0f2
VZ
69 // query whether the clipboard is opened
70 virtual bool IsOpened() const;
71
26f86486
VZ
72 // set the clipboard data. all other formats will be deleted.
73 virtual bool SetData( wxDataObject *data );
74
75 // add to the clipboard data.
76 virtual bool AddData( wxDataObject *data );
77
78 // ask if data in correct format is available
2af18715 79 virtual bool IsSupported( const wxDataFormat& format );
26f86486
VZ
80
81 // fill data with data on the clipboard (if available)
1e8335b0 82 virtual bool GetData( wxDataObject& data );
26f86486
VZ
83
84 // clears wxTheClipboard and the system's clipboard if possible
85 virtual void Clear();
d59ceba5
VZ
86
87 // flushes the clipboard: this means that the data which is currently on
88 // clipboard will stay available even after the application exits (possibly
89 // eating memory), otherwise the clipboard will be emptied on exit
90 virtual bool Flush();
91
92 // X11 has two clipboards which get selected by this call. Empty on MSW.
02b7b6b0 93 void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
d59ceba5
VZ
94
95private:
96 bool m_clearOnExit;
a36d790a 97 bool m_isOpened;
2bda0e17
KB
98};
99
47d67540 100#endif // wxUSE_CLIPBOARD
2bda0e17 101#endif
bbcdf8bc 102 // _WX_CLIPBRD_H_