58b5124e46
The clipboards are managed in a simple string->Clipboard map. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10703 a95241bf-73f2-0310-859d-f6bbb57e9c96
35 lines
623 B
C++
35 lines
623 B
C++
// Clipboard.h
|
|
|
|
#ifndef CLIPBOARD_H
|
|
#define CLIPBOARD_H
|
|
|
|
#include <String.h>
|
|
#include <Message.h>
|
|
#include <Messenger.h>
|
|
#include "WatchingService.h"
|
|
|
|
class Clipboard {
|
|
public:
|
|
Clipboard(const char *name);
|
|
~Clipboard();
|
|
|
|
void SetData(const BMessage *data, BMessenger dataSource);
|
|
|
|
const BMessage *Data() const;
|
|
BMessenger DataSource() const;
|
|
int32 Count() const;
|
|
|
|
bool AddWatcher(BMessenger watcher);
|
|
bool RemoveWatcher(BMessenger watcher);
|
|
void NotifyWatchers();
|
|
|
|
private:
|
|
BString fName;
|
|
BMessage fData;
|
|
BMessenger fDataSource;
|
|
int32 fCount;
|
|
WatchingService fWatchingService;
|
|
};
|
|
|
|
#endif // CLIPBOARD_H
|