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

#include "/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/kdeui/kmainwindowiface.h"

#include <kdatastream.h>
#include <qasciidict.h>


static const int KMainWindowInterface_fhash = 23;
static const char* const KMainWindowInterface_ftable[22][3] = {
    { "QCStringList", "actions()", "actions()" },
    { "bool", "activateAction(QCString)", "activateAction(QCString action)" },
    { "bool", "disableAction(QCString)", "disableAction(QCString action)" },
    { "bool", "enableAction(QCString)", "enableAction(QCString action)" },
    { "bool", "actionIsEnabled(QCString)", "actionIsEnabled(QCString action)" },
    { "QCString", "actionToolTip(QCString)", "actionToolTip(QCString action)" },
    { "DCOPRef", "action(QCString)", "action(QCString name)" },
    { "QMap<QCString,DCOPRef>", "actionMap()", "actionMap()" },
    { "int", "getWinID()", "getWinID()" },
    { "void", "grabWindowToClipBoard()", "grabWindowToClipBoard()" },
    { "void", "hide()", "hide()" },
    { "void", "maximize()", "maximize()" },
    { "void", "minimize()", "minimize()" },
    { "void", "resize(int,int)", "resize(int newWidth,int newHeight)" },
    { "void", "move(int,int)", "move(int newX,int newY)" },
    { "void", "setGeometry(int,int,int,int)", "setGeometry(int newX,int newY,int newWidth,int newHeight)" },
    { "void", "raise()", "raise()" },
    { "void", "lower()", "lower()" },
    { "void", "restore()", "restore()" },
    { "void", "show()", "show()" },
    { "void", "close()", "close()" },
    { 0, 0, 0 }
};
static const int KMainWindowInterface_ftable_hiddens[21] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KMainWindowInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    static QAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new QAsciiDict<int>( KMainWindowInterface_fhash, true, false );
	for ( int i = 0; KMainWindowInterface_ftable[i][1]; i++ )
	    fdict->insert( KMainWindowInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // QCStringList actions()
	replyType = KMainWindowInterface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << actions( );
    } break;
    case 1: { // bool activateAction(QCString)
	QCString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMainWindowInterface_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << activateAction(arg0 );
    } break;
    case 2: { // bool disableAction(QCString)
	QCString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMainWindowInterface_ftable[2][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << disableAction(arg0 );
    } break;
    case 3: { // bool enableAction(QCString)
	QCString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMainWindowInterface_ftable[3][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << enableAction(arg0 );
    } break;
    case 4: { // bool actionIsEnabled(QCString)
	QCString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMainWindowInterface_ftable[4][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << actionIsEnabled(arg0 );
    } break;
    case 5: { // QCString actionToolTip(QCString)
	QCString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMainWindowInterface_ftable[5][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << actionToolTip(arg0 );
    } break;
    case 6: { // DCOPRef action(QCString)
	QCString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMainWindowInterface_ftable[6][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << action(arg0 );
    } break;
    case 7: { // QMap<QCString,DCOPRef> actionMap()
	replyType = KMainWindowInterface_ftable[7][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << actionMap( );
    } break;
    case 8: { // int getWinID()
	replyType = KMainWindowInterface_ftable[8][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getWinID( );
    } break;
    case 9: { // void grabWindowToClipBoard()
	replyType = KMainWindowInterface_ftable[9][0]; 
	grabWindowToClipBoard( );
    } break;
    case 10: { // void hide()
	replyType = KMainWindowInterface_ftable[10][0]; 
	hide( );
    } break;
    case 11: { // void maximize()
	replyType = KMainWindowInterface_ftable[11][0]; 
	maximize( );
    } break;
    case 12: { // void minimize()
	replyType = KMainWindowInterface_ftable[12][0]; 
	minimize( );
    } break;
    case 13: { // void resize(int,int)
	int arg0;
	int arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KMainWindowInterface_ftable[13][0]; 
	resize(arg0, arg1 );
    } break;
    case 14: { // void move(int,int)
	int arg0;
	int arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KMainWindowInterface_ftable[14][0]; 
	move(arg0, arg1 );
    } break;
    case 15: { // void setGeometry(int,int,int,int)
	int arg0;
	int arg1;
	int arg2;
	int arg3;
	QDataStream 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 = KMainWindowInterface_ftable[15][0]; 
	setGeometry(arg0, arg1, arg2, arg3 );
    } break;
    case 16: { // void raise()
	replyType = KMainWindowInterface_ftable[16][0]; 
	raise( );
    } break;
    case 17: { // void lower()
	replyType = KMainWindowInterface_ftable[17][0]; 
	lower( );
    } break;
    case 18: { // void restore()
	replyType = KMainWindowInterface_ftable[18][0]; 
	restore( );
    } break;
    case 19: { // void show()
	replyType = KMainWindowInterface_ftable[19][0]; 
	show( );
    } break;
    case 20: { // void close()
	replyType = KMainWindowInterface_ftable[20][0]; 
	close( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList KMainWindowInterface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KMainWindowInterface_ftable[i][2]; i++ ) {
	if (KMainWindowInterface_ftable_hiddens[i])
	    continue;
	QCString func = KMainWindowInterface_ftable[i][0];
	func += ' ';
	func += KMainWindowInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


