00001
00002
00003
00004
00005
00006
00007
00008
00009
#include "./kmainwindowiface.h"
00010
00011
#include <kdatastream.h>
00012
#include <qasciidict.h>
00013
00014
00015
static const int KMainWindowInterface_fhash = 23;
00016
static const char*
const KMainWindowInterface_ftable[21][3] = {
00017 {
"QCStringList",
"actions()",
"actions()" },
00018 {
"bool",
"activateAction(QCString)",
"activateAction(QCString action)" },
00019 {
"bool",
"disableAction(QCString)",
"disableAction(QCString action)" },
00020 {
"bool",
"enableAction(QCString)",
"enableAction(QCString action)" },
00021 {
"bool",
"actionIsEnabled(QCString)",
"actionIsEnabled(QCString action)" },
00022 {
"QCString",
"actionToolTip(QCString)",
"actionToolTip(QCString action)" },
00023 {
"DCOPRef",
"action(QCString)",
"action(QCString name)" },
00024 {
"QMap<QCString,DCOPRef>",
"actionMap()",
"actionMap()" },
00025 {
"int",
"getWinID()",
"getWinID()" },
00026 {
"void",
"grabWindowToClipBoard()",
"grabWindowToClipBoard()" },
00027 {
"void",
"hide()",
"hide()" },
00028 {
"void",
"maximize()",
"maximize()" },
00029 {
"void",
"minimize()",
"minimize()" },
00030 {
"void",
"resize(int,int)",
"resize(int newWidth,int newHeight)" },
00031 {
"void",
"move(int,int)",
"move(int newX,int newY)" },
00032 {
"void",
"setGeometry(int,int,int,int)",
"setGeometry(int newX,int newY,int newWidth,int newHeight)" },
00033 {
"void",
"raise()",
"raise()" },
00034 {
"void",
"lower()",
"lower()" },
00035 {
"void",
"restore()",
"restore()" },
00036 {
"void",
"show()",
"show()" },
00037 { 0, 0, 0 }
00038 };
00039
static const int KMainWindowInterface_ftable_hiddens[20] = {
00040 0,
00041 0,
00042 0,
00043 0,
00044 0,
00045 0,
00046 0,
00047 0,
00048 0,
00049 0,
00050 0,
00051 0,
00052 0,
00053 0,
00054 0,
00055 0,
00056 0,
00057 0,
00058 0,
00059 0,
00060 };
00061
00062
bool KMainWindowInterface::process(
const QCString &fun,
const QByteArray &data,
QCString& replyType,
QByteArray &replyData)
00063 {
00064
static QAsciiDict<int>* fdict = 0;
00065
if ( !fdict ) {
00066 fdict =
new QAsciiDict<int>( KMainWindowInterface_fhash,
true,
false );
00067
for (
int i = 0; KMainWindowInterface_ftable[i][1]; i++ )
00068 fdict->insert( KMainWindowInterface_ftable[i][1],
new int( i ) );
00069 }
00070
int* fp = fdict->find( fun );
00071
switch ( fp?*fp:-1) {
00072
case 0: {
00073 replyType = KMainWindowInterface_ftable[0][0];
00074
QDataStream _replyStream( replyData, IO_WriteOnly );
00075 _replyStream <<
actions( );
00076 }
break;
00077
case 1: {
00078
QCString arg0;
00079
QDataStream arg( data, IO_ReadOnly );
00080
if (arg.atEnd())
return false;
00081 arg >> arg0;
00082 replyType = KMainWindowInterface_ftable[1][0];
00083
QDataStream _replyStream( replyData, IO_WriteOnly );
00084 _replyStream <<
activateAction(arg0 );
00085 }
break;
00086
case 2: {
00087
QCString arg0;
00088
QDataStream arg( data, IO_ReadOnly );
00089
if (arg.atEnd())
return false;
00090 arg >> arg0;
00091 replyType = KMainWindowInterface_ftable[2][0];
00092
QDataStream _replyStream( replyData, IO_WriteOnly );
00093 _replyStream <<
disableAction(arg0 );
00094 }
break;
00095
case 3: {
00096
QCString arg0;
00097
QDataStream arg( data, IO_ReadOnly );
00098
if (arg.atEnd())
return false;
00099 arg >> arg0;
00100 replyType = KMainWindowInterface_ftable[3][0];
00101
QDataStream _replyStream( replyData, IO_WriteOnly );
00102 _replyStream <<
enableAction(arg0 );
00103 }
break;
00104
case 4: {
00105
QCString arg0;
00106
QDataStream arg( data, IO_ReadOnly );
00107
if (arg.atEnd())
return false;
00108 arg >> arg0;
00109 replyType = KMainWindowInterface_ftable[4][0];
00110
QDataStream _replyStream( replyData, IO_WriteOnly );
00111 _replyStream <<
actionIsEnabled(arg0 );
00112 }
break;
00113
case 5: {
00114
QCString arg0;
00115
QDataStream arg( data, IO_ReadOnly );
00116
if (arg.atEnd())
return false;
00117 arg >> arg0;
00118 replyType = KMainWindowInterface_ftable[5][0];
00119
QDataStream _replyStream( replyData, IO_WriteOnly );
00120 _replyStream <<
actionToolTip(arg0 );
00121 }
break;
00122
case 6: {
00123
QCString arg0;
00124
QDataStream arg( data, IO_ReadOnly );
00125
if (arg.atEnd())
return false;
00126 arg >> arg0;
00127 replyType = KMainWindowInterface_ftable[6][0];
00128
QDataStream _replyStream( replyData, IO_WriteOnly );
00129 _replyStream <<
action(arg0 );
00130 }
break;
00131
case 7: {
00132 replyType = KMainWindowInterface_ftable[7][0];
00133
QDataStream _replyStream( replyData, IO_WriteOnly );
00134 _replyStream <<
actionMap( );
00135 }
break;
00136
case 8: {
00137 replyType = KMainWindowInterface_ftable[8][0];
00138
QDataStream _replyStream( replyData, IO_WriteOnly );
00139 _replyStream <<
getWinID( );
00140 }
break;
00141
case 9: {
00142 replyType = KMainWindowInterface_ftable[9][0];
00143
grabWindowToClipBoard( );
00144 }
break;
00145
case 10: {
00146 replyType = KMainWindowInterface_ftable[10][0];
00147 hide( );
00148 }
break;
00149
case 11: {
00150 replyType = KMainWindowInterface_ftable[11][0];
00151 maximize( );
00152 }
break;
00153
case 12: {
00154 replyType = KMainWindowInterface_ftable[12][0];
00155 minimize( );
00156 }
break;
00157
case 13: {
00158
int arg0;
00159
int arg1;
00160
QDataStream arg( data, IO_ReadOnly );
00161
if (arg.atEnd())
return false;
00162 arg >> arg0;
00163
if (arg.atEnd())
return false;
00164 arg >> arg1;
00165 replyType = KMainWindowInterface_ftable[13][0];
00166 resize(arg0, arg1 );
00167 }
break;
00168
case 14: {
00169
int arg0;
00170
int arg1;
00171
QDataStream arg( data, IO_ReadOnly );
00172
if (arg.atEnd())
return false;
00173 arg >> arg0;
00174
if (arg.atEnd())
return false;
00175 arg >> arg1;
00176 replyType = KMainWindowInterface_ftable[14][0];
00177 move(arg0, arg1 );
00178 }
break;
00179
case 15: {
00180
int arg0;
00181
int arg1;
00182
int arg2;
00183
int arg3;
00184
QDataStream arg( data, IO_ReadOnly );
00185
if (arg.atEnd())
return false;
00186 arg >> arg0;
00187
if (arg.atEnd())
return false;
00188 arg >> arg1;
00189
if (arg.atEnd())
return false;
00190 arg >> arg2;
00191
if (arg.atEnd())
return false;
00192 arg >> arg3;
00193 replyType = KMainWindowInterface_ftable[15][0];
00194 setGeometry(arg0, arg1, arg2, arg3 );
00195 }
break;
00196
case 16: {
00197 replyType = KMainWindowInterface_ftable[16][0];
00198 raise( );
00199 }
break;
00200
case 17: {
00201 replyType = KMainWindowInterface_ftable[17][0];
00202 lower( );
00203 }
break;
00204
case 18: {
00205 replyType = KMainWindowInterface_ftable[18][0];
00206 restore( );
00207 }
break;
00208
case 19: {
00209 replyType = KMainWindowInterface_ftable[19][0];
00210 show( );
00211 }
break;
00212
default:
00213
return DCOPObject::process( fun, data, replyType, replyData );
00214 }
00215
return true;
00216 }
00217
00218 QCStringList
KMainWindowInterface::interfaces()
00219 {
00220 QCStringList ifaces =
DCOPObject::interfaces();
00221 ifaces +=
"KMainWindowInterface";
00222
return ifaces;
00223 }
00224
00225 QCStringList
KMainWindowInterface::functions()
00226 {
00227 QCStringList funcs =
DCOPObject::functions();
00228
for (
int i = 0; KMainWindowInterface_ftable[i][2]; i++ ) {
00229
if (KMainWindowInterface_ftable_hiddens[i])
00230
continue;
00231
QCString func = KMainWindowInterface_ftable[i][0];
00232 func +=
' ';
00233 func += KMainWindowInterface_ftable[i][2];
00234 funcs << func;
00235 }
00236
return funcs;
00237 }
00238
00239