/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from KWinInterface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/twin/KWinInterface.h"

#include <kdatastream.h>
#include <tqasciidict.h>


static const int KWinInterface_fhash = 37;
static const char* const KWinInterface_ftable[32][3] = {
    { "ASYNC", "cascadeDesktop()", "cascadeDesktop()" },
    { "ASYNC", "unclutterDesktop()", "unclutterDesktop()" },
    { "ASYNC", "reconfigure()", "reconfigure()" },
    { "ASYNC", "killWindowId(unsigned long int)", "killWindowId(unsigned long int winId)" },
    { "ASYNC", "suspendWindowId(unsigned long int)", "suspendWindowId(unsigned long int winId)" },
    { "ASYNC", "resumeWindowId(unsigned long int)", "resumeWindowId(unsigned long int winId)" },
    { "bool", "isResumeableWindowID(unsigned long int)", "isResumeableWindowID(unsigned long int winId)" },
    { "void", "refresh()", "refresh()" },
    { "void", "doNotManage(TQString)", "doNotManage(TQString)" },
    { "void", "showWindowMenuAt(unsigned long int,int,int)", "showWindowMenuAt(unsigned long int winId,int x,int y)" },
    { "void", "showWindowMenu(unsigned long int)", "showWindowMenu(unsigned long int winId)" },
    { "void", "kDestopResized()", "kDestopResized()" },
    { "void", "setDesktopLayout(int,int,int)", "setDesktopLayout(int orientation,int x,int y)" },
    { "bool", "setCurrentDesktop(int)", "setCurrentDesktop(int)" },
    { "int", "currentDesktop()", "currentDesktop()" },
    { "void", "nextDesktop()", "nextDesktop()" },
    { "void", "previousDesktop()", "previousDesktop()" },
    { "void", "circulateDesktopApplications()", "circulateDesktopApplications()" },
    { "void", "updateOverlappingShadows(unsigned long int)", "updateOverlappingShadows(unsigned long int window)" },
    { "void", "setShadowed(unsigned long int,bool)", "setShadowed(unsigned long int window,bool shadowed)" },
    { "void", "tileWindowToBorder(unsigned long int,int)", "tileWindowToBorder(unsigned long int w1,int location)" },
    { "void", "tileTwoWindowsHorizontally(unsigned long int,unsigned long int)", "tileTwoWindowsHorizontally(unsigned long int w1,unsigned long int w2)" },
    { "void", "tileTwoWindowsVertically(unsigned long int,unsigned long int)", "tileTwoWindowsVertically(unsigned long int w1,unsigned long int w2)" },
    { "void", "tileFourWindowsInGrid(unsigned long int,unsigned long int,unsigned long int,unsigned long int)", "tileFourWindowsInGrid(unsigned long int w1,unsigned long int w2,unsigned long int w3,unsigned long int w4)" },
    { "void", "startKompmgr()", "startKompmgr()" },
    { "void", "stopKompmgr()", "stopKompmgr()" },
    { "bool", "kompmgrIsRunning()", "kompmgrIsRunning()" },
    { "void", "kompmgrReloadSettings()", "kompmgrReloadSettings()" },
    { "void", "setOpacity(unsigned long int,unsigned int)", "setOpacity(unsigned long int winId,unsigned int opacityPercent)" },
    { "void", "setShadowSize(unsigned long int,unsigned int)", "setShadowSize(unsigned long int winId,unsigned int shadowSizePercent)" },
    { "void", "setUnshadowed(unsigned long int)", "setUnshadowed(unsigned long int winId)" },
    { 0, 0, 0 }
};
static const int KWinInterface_ftable_hiddens[31] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KWinInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KWinInterface_fhash, true, false );
	for ( int i = 0; KWinInterface_ftable[i][1]; i++ )
	    fdict->insert( KWinInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void cascadeDesktop()
	replyType = KWinInterface_ftable[0][0]; 
	cascadeDesktop( );
    } break;
    case 1: { // void unclutterDesktop()
	replyType = KWinInterface_ftable[1][0]; 
	unclutterDesktop( );
    } break;
    case 2: { // void reconfigure()
	replyType = KWinInterface_ftable[2][0]; 
	reconfigure( );
    } break;
    case 3: { // void killWindowId(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[3][0]; 
	killWindowId(arg0 );
    } break;
    case 4: { // void suspendWindowId(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[4][0]; 
	suspendWindowId(arg0 );
    } break;
    case 5: { // void resumeWindowId(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[5][0]; 
	resumeWindowId(arg0 );
    } break;
    case 6: { // bool isResumeableWindowID(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isResumeableWindowID(arg0 );
    } break;
    case 7: { // void refresh()
	replyType = KWinInterface_ftable[7][0]; 
	refresh( );
    } break;
    case 8: { // void doNotManage(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[8][0]; 
	doNotManage(arg0 );
    } break;
    case 9: { // void showWindowMenuAt(unsigned long int,int,int)
	unsigned long int arg0;
	int arg1;
	int arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = KWinInterface_ftable[9][0]; 
	showWindowMenuAt(arg0, arg1, arg2 );
    } break;
    case 10: { // void showWindowMenu(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[10][0]; 
	showWindowMenu(arg0 );
    } break;
    case 11: { // void kDestopResized()
	replyType = KWinInterface_ftable[11][0]; 
	kDestopResized( );
    } break;
    case 12: { // void setDesktopLayout(int,int,int)
	int arg0;
	int arg1;
	int arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = KWinInterface_ftable[12][0]; 
	setDesktopLayout(arg0, arg1, arg2 );
    } break;
    case 13: { // bool setCurrentDesktop(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setCurrentDesktop(arg0 );
    } break;
    case 14: { // int currentDesktop()
	replyType = KWinInterface_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentDesktop( );
    } break;
    case 15: { // void nextDesktop()
	replyType = KWinInterface_ftable[15][0]; 
	nextDesktop( );
    } break;
    case 16: { // void previousDesktop()
	replyType = KWinInterface_ftable[16][0]; 
	previousDesktop( );
    } break;
    case 17: { // void circulateDesktopApplications()
	replyType = KWinInterface_ftable[17][0]; 
	circulateDesktopApplications( );
    } break;
    case 18: { // void updateOverlappingShadows(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[18][0]; 
	updateOverlappingShadows(arg0 );
    } break;
    case 19: { // void setShadowed(unsigned long int,bool)
	unsigned long int arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KWinInterface_ftable[19][0]; 
	setShadowed(arg0, arg1 );
    } break;
    case 20: { // void tileWindowToBorder(unsigned long int,int)
	unsigned long int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KWinInterface_ftable[20][0]; 
	tileWindowToBorder(arg0, arg1 );
    } break;
    case 21: { // void tileTwoWindowsHorizontally(unsigned long int,unsigned long int)
	unsigned long int arg0;
	unsigned long int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KWinInterface_ftable[21][0]; 
	tileTwoWindowsHorizontally(arg0, arg1 );
    } break;
    case 22: { // void tileTwoWindowsVertically(unsigned long int,unsigned long int)
	unsigned long int arg0;
	unsigned long int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KWinInterface_ftable[22][0]; 
	tileTwoWindowsVertically(arg0, arg1 );
    } break;
    case 23: { // void tileFourWindowsInGrid(unsigned long int,unsigned long int,unsigned long int,unsigned long int)
	unsigned long int arg0;
	unsigned long int arg1;
	unsigned long int arg2;
	unsigned long int arg3;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	if (arg.atEnd()) return false;
	arg >> arg3;
	replyType = KWinInterface_ftable[23][0]; 
	tileFourWindowsInGrid(arg0, arg1, arg2, arg3 );
    } break;
    case 24: { // void startKompmgr()
	replyType = KWinInterface_ftable[24][0]; 
	startKompmgr( );
    } break;
    case 25: { // void stopKompmgr()
	replyType = KWinInterface_ftable[25][0]; 
	stopKompmgr( );
    } break;
    case 26: { // bool kompmgrIsRunning()
	replyType = KWinInterface_ftable[26][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << kompmgrIsRunning( );
    } break;
    case 27: { // void kompmgrReloadSettings()
	replyType = KWinInterface_ftable[27][0]; 
	kompmgrReloadSettings( );
    } break;
    case 28: { // void setOpacity(unsigned long int,unsigned int)
	unsigned long int arg0;
	unsigned int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KWinInterface_ftable[28][0]; 
	setOpacity(arg0, arg1 );
    } break;
    case 29: { // void setShadowSize(unsigned long int,unsigned int)
	unsigned long int arg0;
	unsigned int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KWinInterface_ftable[29][0]; 
	setShadowSize(arg0, arg1 );
    } break;
    case 30: { // void setUnshadowed(unsigned long int)
	unsigned long int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KWinInterface_ftable[30][0]; 
	setUnshadowed(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KWinInterface::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "KWinInterface";
    return ifaces;
}

QCStringList KWinInterface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KWinInterface_ftable[i][2]; i++ ) {
	if (KWinInterface_ftable_hiddens[i])
	    continue;
	TQCString func = KWinInterface_ftable[i][0];
	func += ' ';
	func += KWinInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

void KWinInterface::kompmgrStarted()
{
    TQByteArray data;
    emitDCOPSignal( "kompmgrStarted()", data );
}

void KWinInterface::kompmgrStopped()
{
    TQByteArray data;
    emitDCOPSignal( "kompmgrStopped()", data );
}

void KWinInterface::dcopResetAllClients()
{
    TQByteArray data;
    emitDCOPSignal( "dcopResetAllClients()", data );
}


