/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from KDesktopIface.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/kdesktop/KDesktopIface.h"

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


static const int KDesktopIface_fhash = 31;
static const char* const KDesktopIface_ftable[30][3] = {
    { "void", "runAutoStart()", "runAutoStart()" },
    { "void", "rearrangeIcons()", "rearrangeIcons()" },
    { "void", "rearrangeIcons(bool)", "rearrangeIcons(bool)" },
    { "void", "lineupIcons()", "lineupIcons()" },
    { "void", "selectAll()", "selectAll()" },
    { "void", "unselectAll()", "unselectAll()" },
    { "void", "refreshIcons()", "refreshIcons()" },
    { "void", "setShowDesktop(bool)", "setShowDesktop(bool b)" },
    { "bool", "showDesktopState()", "showDesktopState()" },
    { "void", "toggleShowDesktop()", "toggleShowDesktop()" },
    { "TQStringList", "selectedURLs()", "selectedURLs()" },
    { "void", "configure()", "configure()" },
    { "void", "popupExecuteCommand()", "popupExecuteCommand()" },
    { "void", "popupExecuteCommand(TQString)", "popupExecuteCommand(TQString command)" },
    { "DCOPRef", "background()", "background()" },
    { "DCOPRef", "screenSaver()", "screenSaver()" },
    { "void", "refresh()", "refresh()" },
    { "void", "logout()", "logout()" },
    { "bool", "isVRoot()", "isVRoot()" },
    { "void", "setVRoot(bool)", "setVRoot(bool enable)" },
    { "void", "clearCommandHistory()", "clearCommandHistory()" },
    { "bool", "isIconsEnabled()", "isIconsEnabled()" },
    { "void", "setIconsEnabled(bool)", "setIconsEnabled(bool enable)" },
    { "void", "switchDesktops(int)", "switchDesktops(int delta)" },
    { "void", "desktopIconsAreaChanged(TQRect,int)", "desktopIconsAreaChanged(TQRect area,int screen)" },
    { "TQPoint", "findPlaceForIcon(int,int)", "findPlaceForIcon(int column,int row)" },
    { "void", "addIcon(TQString,int,int)", "addIcon(TQString url,int x,int y)" },
    { "void", "addIcon(TQString,TQString,int,int)", "addIcon(TQString url,TQString dest,int x,int y)" },
    { "void", "removeIcon(TQString)", "removeIcon(TQString dest)" },
    { 0, 0, 0 }
};
static const int KDesktopIface_ftable_hiddens[29] = {
    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 KDesktopIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KDesktopIface_fhash, true, false );
	for ( int i = 0; KDesktopIface_ftable[i][1]; i++ )
	    fdict->insert( KDesktopIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void runAutoStart()
	replyType = KDesktopIface_ftable[0][0]; 
	runAutoStart( );
    } break;
    case 1: { // void rearrangeIcons()
	replyType = KDesktopIface_ftable[1][0]; 
	rearrangeIcons( );
    } break;
    case 2: { // void rearrangeIcons(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[2][0]; 
	rearrangeIcons(arg0 );
    } break;
    case 3: { // void lineupIcons()
	replyType = KDesktopIface_ftable[3][0]; 
	lineupIcons( );
    } break;
    case 4: { // void selectAll()
	replyType = KDesktopIface_ftable[4][0]; 
	selectAll( );
    } break;
    case 5: { // void unselectAll()
	replyType = KDesktopIface_ftable[5][0]; 
	unselectAll( );
    } break;
    case 6: { // void refreshIcons()
	replyType = KDesktopIface_ftable[6][0]; 
	refreshIcons( );
    } break;
    case 7: { // void setShowDesktop(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[7][0]; 
	setShowDesktop(arg0 );
    } break;
    case 8: { // bool showDesktopState()
	replyType = KDesktopIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << showDesktopState( );
    } break;
    case 9: { // void toggleShowDesktop()
	replyType = KDesktopIface_ftable[9][0]; 
	toggleShowDesktop( );
    } break;
    case 10: { // TQStringList selectedURLs()
	replyType = KDesktopIface_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << selectedURLs( );
    } break;
    case 11: { // void configure()
	replyType = KDesktopIface_ftable[11][0]; 
	configure( );
    } break;
    case 12: { // void popupExecuteCommand()
	replyType = KDesktopIface_ftable[12][0]; 
	popupExecuteCommand( );
    } break;
    case 13: { // void popupExecuteCommand(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[13][0]; 
	popupExecuteCommand(arg0 );
    } break;
    case 14: { // DCOPRef background()
	replyType = KDesktopIface_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << background( );
    } break;
    case 15: { // DCOPRef screenSaver()
	replyType = KDesktopIface_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << screenSaver( );
    } break;
    case 16: { // void refresh()
	replyType = KDesktopIface_ftable[16][0]; 
	refresh( );
    } break;
    case 17: { // void logout()
	replyType = KDesktopIface_ftable[17][0]; 
	logout( );
    } break;
    case 18: { // bool isVRoot()
	replyType = KDesktopIface_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isVRoot( );
    } break;
    case 19: { // void setVRoot(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[19][0]; 
	setVRoot(arg0 );
    } break;
    case 20: { // void clearCommandHistory()
	replyType = KDesktopIface_ftable[20][0]; 
	clearCommandHistory( );
    } break;
    case 21: { // bool isIconsEnabled()
	replyType = KDesktopIface_ftable[21][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isIconsEnabled( );
    } break;
    case 22: { // void setIconsEnabled(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[22][0]; 
	setIconsEnabled(arg0 );
    } break;
    case 23: { // void switchDesktops(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[23][0]; 
	switchDesktops(arg0 );
    } break;
    case 24: { // void desktopIconsAreaChanged(TQRect,int)
	TQRect arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KDesktopIface_ftable[24][0]; 
	desktopIconsAreaChanged(arg0, arg1 );
    } break;
    case 25: { // TQPoint findPlaceForIcon(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KDesktopIface_ftable[25][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << findPlaceForIcon(arg0, arg1 );
    } break;
    case 26: { // void addIcon(TQString,int,int)
	TQString 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 = KDesktopIface_ftable[26][0]; 
	addIcon(arg0, arg1, arg2 );
    } break;
    case 27: { // void addIcon(TQString,TQString,int,int)
	TQString arg0;
	TQString arg1;
	int arg2;
	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 = KDesktopIface_ftable[27][0]; 
	addIcon(arg0, arg1, arg2, arg3 );
    } break;
    case 28: { // void removeIcon(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDesktopIface_ftable[28][0]; 
	removeIcon(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


