/***************************************************************************
                            QClipboard.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 12:08:37 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QClipboard.h>
#include <qtobjc/QClipboard.h>
#include <qtobjc/QImage.h>
#include <qtobjc/QPixmap.h>

@implementation  QClipboard


- clear
{
	qt_QClipboard_clear((qt_QClipboard *)[self qt]);
	return self;
}

- (BOOL) supportsSelection
{
	return (BOOL) qt_QClipboard_supportsSelection((qt_QClipboard *)[self qt]);
}

- (BOOL) ownsSelection
{
	return (BOOL) qt_QClipboard_ownsSelection((qt_QClipboard *)[self qt]);
}

- (BOOL) ownsClipboard
{
	return (BOOL) qt_QClipboard_ownsClipboard((qt_QClipboard *)[self qt]);
}

- setSelectionMode: (BOOL)enable
{
	qt_QClipboard_setSelectionMode((qt_QClipboard *)[self qt], (int)enable);
	return self;
}

- (BOOL) selectionModeEnabled
{
	return (BOOL) qt_QClipboard_selectionModeEnabled((qt_QClipboard *)[self qt]);
}

- (QMimeSource*) data
{
	return (QMimeSource*) [QtSupport objectForQtKey: qt_QClipboard_data((qt_QClipboard *)[self qt]) withClass: [QMimeSource class] allocatedInObjcWorld: YES];
}

- setData: (QMimeSource*)arg1
{
	qt_QClipboard_setData((qt_QClipboard *)[self qt], (qt_QMimeSource*) [arg1 qt]);
	return self;
}

- (NSString *) text
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QClipboard_text((qt_QClipboard *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) text: (NSString *)subtype
{
static qt_QString * _qstring = 0L;
static qt_QCString * _qcstring_subtype = 0L;
	_qstring = qt_QClipboard_text1((qt_QClipboard *)[self qt], (qt_QCString*) [subtype toQCString: &_qcstring_subtype]);
	return [NSString fromQString: _qstring];
}

- setText: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QClipboard_setText((qt_QClipboard *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- (QImage*) image
{
	return (QImage*) [QtSupport objectForQtKey: qt_QClipboard_image((qt_QClipboard *)[self qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

- (QPixmap*) pixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QClipboard_pixmap((qt_QClipboard *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- setImage: (QImage *)arg1
{
	qt_QClipboard_setImage((qt_QClipboard *)[self qt], (qt_QImage *) [arg1 qt]);
	return self;
}

- setPixmap: (QPixmap *)arg1
{
	qt_QClipboard_setPixmap((qt_QClipboard *)[self qt], (qt_QPixmap *) [arg1 qt]);
	return self;
}

//- connectNotify: (NSString *)arg1
//{
//	qt_QClipboard_connectNotify((qt_QClipboard *)[self qt], (char*) [arg1 cString]);
//	return self;
//}

//- (BOOL) event: (QEvent *)arg1
//{
//	return (BOOL) qt_QClipboard_event((qt_QClipboard *)[self qt], (qt_QEvent *) [arg1 qt]);
//}

@end
