/***************************************************************************
                            KWin.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 2002, 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 <kdec/kde_KWin.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KWin.h>
#include <qtobjc/QPixmap.h>


@implementation  KWin

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


+ setActiveWindow: (unsigned int)win
{
	kde_KWin_setActiveWindow((unsigned int)win);
	return self;
}

+ invokeContextHelp
{
	kde_KWin_invokeContextHelp();
	return self;
}

+ setSystemTrayWindowFor: (unsigned int)trayWin forWin: (unsigned int)forWin
{
	kde_KWin_setSystemTrayWindowFor((unsigned int)trayWin, (unsigned int)forWin);
	return self;
}

//+ (int) info: (unsigned int)win
//{
//	return (int) kde_KWin_info((unsigned int)win);
//}

+ (QPixmap*) icon: (unsigned int)win width: (int)width height: (int)height scale: (BOOL)scale
{
	return (QPixmap*) [QtSupport objectForQtKey: kde_KWin_icon((unsigned int)win, (int)width, (int)height, (int)scale) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

+ (QPixmap*) icon: (unsigned int)win 
{
	return (QPixmap*) [QtSupport objectForQtKey: kde_KWin_icon((unsigned int)win, -1, -1, 0) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

+ setIcons: (unsigned int)win icon: (QPixmap *)icon miniIcon: (QPixmap *)miniIcon
{
	kde_KWin_setIcons((unsigned int)win, (qt_QPixmap *) [icon qt], (qt_QPixmap *) [miniIcon qt]);
	return self;
}

+ setType: (unsigned int)win windowType: (int)windowType
{
	kde_KWin_setType((unsigned int)win, (int)windowType);
	return self;
}

+ setState: (unsigned int)win state: (unsigned long)state
{
	kde_KWin_setState((unsigned int)win, (unsigned long)state);
	return self;
}

+ clearState: (unsigned int)win state: (unsigned long)state
{
	kde_KWin_clearState((unsigned int)win, (unsigned long)state);
	return self;
}

+ setOnAllDesktops: (unsigned int)win b: (BOOL)b
{
	kde_KWin_setOnAllDesktops((unsigned int)win, (int)b);
	return self;
}

+ setOnDesktop: (unsigned int)win desktop: (int)desktop
{
	kde_KWin_setOnDesktop((unsigned int)win, (int)desktop);
	return self;
}

+ setStrut: (unsigned int)win left: (int)left right: (int)right top: (int)top bottom: (int)bottom
{
	kde_KWin_setStrut((unsigned int)win, (int)left, (int)right, (int)top, (int)bottom);
	return self;
}

+ (int) currentDesktop
{
	return (int) kde_KWin_currentDesktop();
}

+ (int) numberOfDesktops
{
	return (int) kde_KWin_numberOfDesktops();
}

+ setCurrentDesktop: (int)desktop
{
	kde_KWin_setCurrentDesktop((int)desktop);
	return self;
}

+ iconifyWindow: (unsigned int)win animation: (BOOL)animation
{
	kde_KWin_iconifyWindow((unsigned int)win, (int)animation);
	return self;
}

+ iconifyWindow: (unsigned int)win 
{
	kde_KWin_iconifyWindow((unsigned int)win, 1);
	return self;
}

+ deIconifyWindow: (unsigned int)win animation: (BOOL)animation
{
	kde_KWin_deIconifyWindow((unsigned int)win, (int)animation);
	return self;
}

+ deIconifyWindow: (unsigned int)win 
{
	kde_KWin_deIconifyWindow((unsigned int)win, 1);
	return self;
}

+ appStarted
{
	kde_KWin_appStarted();
	return self;
}

@end
