00001
00002
00003
00004
00005
00006
00007
00008
00009
#include "./viewcursordcopinterface.h"
00010
00011
#include <kdatastream.h>
00012
#include <qasciidict.h>
00013
00014
namespace KTextEditor {
00015
00016
static const int ViewCursorDCOPInterface_fhash = 11;
00017
static const char*
const ViewCursorDCOPInterface_ftable[11][3] = {
00018 {
"uint",
"viewCursorInterfaceNumber()",
"viewCursorInterfaceNumber()" },
00019 {
"QPoint",
"cursorCoordinates()",
"cursorCoordinates()" },
00020 {
"void",
"cursorPosition(uint,uint)",
"cursorPosition(uint line,uint col)" },
00021 {
"void",
"cursorPositionReal(uint,uint)",
"cursorPositionReal(uint line,uint col)" },
00022 {
"bool",
"setCursorPosition(uint,uint)",
"setCursorPosition(uint line,uint col)" },
00023 {
"bool",
"setCursorPositionReal(uint,uint)",
"setCursorPositionReal(uint line,uint col)" },
00024 {
"uint",
"cursorLine()",
"cursorLine()" },
00025 {
"uint",
"cursorColumn()",
"cursorColumn()" },
00026 {
"uint",
"cursorColumnReal()",
"cursorColumnReal()" },
00027 {
"void",
"cursorPositionChanged()",
"cursorPositionChanged()" },
00028 { 0, 0, 0 }
00029 };
00030
static const int ViewCursorDCOPInterface_ftable_hiddens[10] = {
00031 0,
00032 0,
00033 0,
00034 0,
00035 0,
00036 0,
00037 0,
00038 0,
00039 0,
00040 0,
00041 };
00042
00043
bool ViewCursorDCOPInterface::process(
const QCString &fun,
const QByteArray &data,
QCString& replyType,
QByteArray &replyData)
00044 {
00045
static QAsciiDict<int>* fdict = 0;
00046
if ( !fdict ) {
00047 fdict =
new QAsciiDict<int>( ViewCursorDCOPInterface_fhash,
true,
false );
00048
for (
int i = 0; ViewCursorDCOPInterface_ftable[i][1]; i++ )
00049 fdict->insert( ViewCursorDCOPInterface_ftable[i][1],
new int( i ) );
00050 }
00051
int* fp = fdict->find( fun );
00052
switch ( fp?*fp:-1) {
00053
case 0: {
00054 replyType = ViewCursorDCOPInterface_ftable[0][0];
00055
QDataStream _replyStream( replyData, IO_WriteOnly );
00056 _replyStream << viewCursorInterfaceNumber( );
00057 }
break;
00058
case 1: {
00059 replyType = ViewCursorDCOPInterface_ftable[1][0];
00060
QDataStream _replyStream( replyData, IO_WriteOnly );
00061 _replyStream <<
cursorCoordinates( );
00062 }
break;
00063
case 2: {
00064 uint arg0;
00065 uint arg1;
00066
QDataStream arg( data, IO_ReadOnly );
00067 arg >> arg0;
00068 arg >> arg1;
00069 replyType = ViewCursorDCOPInterface_ftable[2][0];
00070
cursorPosition(arg0, arg1 );
00071 }
break;
00072
case 3: {
00073 uint arg0;
00074 uint arg1;
00075
QDataStream arg( data, IO_ReadOnly );
00076 arg >> arg0;
00077 arg >> arg1;
00078 replyType = ViewCursorDCOPInterface_ftable[3][0];
00079
cursorPositionReal(arg0, arg1 );
00080 }
break;
00081
case 4: {
00082 uint arg0;
00083 uint arg1;
00084
QDataStream arg( data, IO_ReadOnly );
00085 arg >> arg0;
00086 arg >> arg1;
00087 replyType = ViewCursorDCOPInterface_ftable[4][0];
00088
QDataStream _replyStream( replyData, IO_WriteOnly );
00089 _replyStream <<
setCursorPosition(arg0, arg1 );
00090 }
break;
00091
case 5: {
00092 uint arg0;
00093 uint arg1;
00094
QDataStream arg( data, IO_ReadOnly );
00095 arg >> arg0;
00096 arg >> arg1;
00097 replyType = ViewCursorDCOPInterface_ftable[5][0];
00098
QDataStream _replyStream( replyData, IO_WriteOnly );
00099 _replyStream <<
setCursorPositionReal(arg0, arg1 );
00100 }
break;
00101
case 6: {
00102 replyType = ViewCursorDCOPInterface_ftable[6][0];
00103
QDataStream _replyStream( replyData, IO_WriteOnly );
00104 _replyStream << cursorLine( );
00105 }
break;
00106
case 7: {
00107 replyType = ViewCursorDCOPInterface_ftable[7][0];
00108
QDataStream _replyStream( replyData, IO_WriteOnly );
00109 _replyStream << cursorColumn( );
00110 }
break;
00111
case 8: {
00112 replyType = ViewCursorDCOPInterface_ftable[8][0];
00113
QDataStream _replyStream( replyData, IO_WriteOnly );
00114 _replyStream << cursorColumnReal( );
00115 }
break;
00116
case 9: {
00117 replyType = ViewCursorDCOPInterface_ftable[9][0];
00118 cursorPositionChanged( );
00119 }
break;
00120
default:
00121
return DCOPObject::process( fun, data, replyType, replyData );
00122 }
00123
return true;
00124 }
00125
00126 QCStringList
ViewCursorDCOPInterface::interfaces()
00127 {
00128 QCStringList ifaces =
DCOPObject::interfaces();
00129 ifaces +=
"KTextEditor::ViewCursorDCOPInterface";
00130
return ifaces;
00131 }
00132
00133 QCStringList
ViewCursorDCOPInterface::functions()
00134 {
00135 QCStringList funcs =
DCOPObject::functions();
00136
for (
int i = 0; ViewCursorDCOPInterface_ftable[i][2]; i++ ) {
00137
if (ViewCursorDCOPInterface_ftable_hiddens[i])
00138
continue;
00139
QCString func = ViewCursorDCOPInterface_ftable[i][0];
00140 func +=
' ';
00141 func += ViewCursorDCOPInterface_ftable[i][2];
00142 funcs << func;
00143 }
00144
return funcs;
00145 }
00146
00147 }
00148