khtml Library API Documentation

khtml_iface_skel.cc

00001 /****************************************************************************
00002 **
00003 ** DCOP Skeleton created by dcopidl2cpp from khtml_iface.kidl
00004 **
00005 ** WARNING! All changes made in this file will be lost!
00006 **
00007 *****************************************************************************/
00008 
00009 #include "./khtml_iface.h"
00010 
00011 #include <kdatastream.h>
00012 #include <qasciidict.h>
00013 
00014 
00015 static const int KHTMLPartIface_fhash = 37;
00016 static const char* const KHTMLPartIface_ftable[37][3] = {
00017     { "KURL", "url()", "url()" },
00018     { "bool", "closeURL()", "closeURL()" },
00019     { "void", "setJScriptEnabled(bool)", "setJScriptEnabled(bool enable)" },
00020     { "bool", "jScriptEnabled()", "jScriptEnabled()" },
00021     { "void", "setMetaRefreshEnabled(bool)", "setMetaRefreshEnabled(bool enable)" },
00022     { "bool", "metaRefreshEnabled()", "metaRefreshEnabled()" },
00023     { "void", "setDNDEnabled(bool)", "setDNDEnabled(bool b)" },
00024     { "bool", "dndEnabled()", "dndEnabled()" },
00025     { "void", "setJavaEnabled(bool)", "setJavaEnabled(bool enable)" },
00026     { "bool", "javaEnabled()", "javaEnabled()" },
00027     { "void", "setPluginsEnabled(bool)", "setPluginsEnabled(bool enable)" },
00028     { "bool", "pluginsEnabled()", "pluginsEnabled()" },
00029     { "void", "setAutoloadImages(bool)", "setAutoloadImages(bool enable)" },
00030     { "bool", "autoloadImages()", "autoloadImages()" },
00031     { "void", "setOnlyLocalReferences(bool)", "setOnlyLocalReferences(bool enable)" },
00032     { "bool", "onlyLocalReferences()", "onlyLocalReferences()" },
00033     { "bool", "setEncoding(QString)", "setEncoding(QString name)" },
00034     { "QString", "encoding()", "encoding()" },
00035     { "void", "setUserStyleSheet(QString)", "setUserStyleSheet(QString styleSheet)" },
00036     { "void", "setFixedFont(QString)", "setFixedFont(QString name)" },
00037     { "bool", "gotoAnchor(QString)", "gotoAnchor(QString name)" },
00038     { "bool", "nextAnchor()", "nextAnchor()" },
00039     { "bool", "prevAnchor()", "prevAnchor()" },
00040     { "void", "activateNode()", "activateNode()" },
00041     { "QString", "selectedText()", "selectedText()" },
00042     { "void", "selectAll()", "selectAll()" },
00043     { "QString", "lastModified()", "lastModified()" },
00044     { "ASYNC", "print(bool)", "print(bool quick)" },
00045     { "void", "debugRenderTree()", "debugRenderTree()" },
00046     { "void", "debugDOMTree()", "debugDOMTree()" },
00047     { "void", "viewDocumentSource()", "viewDocumentSource()" },
00048     { "void", "viewFrameSource()", "viewFrameSource()" },
00049     { "void", "saveBackground(QString)", "saveBackground(QString url)" },
00050     { "void", "saveDocument(QString)", "saveDocument(QString url)" },
00051     { "QString", "evalJS(QString)", "evalJS(QString script)" },
00052     { "void", "stopAnimations()", "stopAnimations()" },
00053     { 0, 0, 0 }
00054 };
00055 static const int KHTMLPartIface_ftable_hiddens[36] = {
00056     0,
00057     0,
00058     0,
00059     0,
00060     0,
00061     0,
00062     0,
00063     0,
00064     0,
00065     0,
00066     0,
00067     0,
00068     0,
00069     0,
00070     0,
00071     0,
00072     0,
00073     0,
00074     0,
00075     0,
00076     0,
00077     0,
00078     0,
00079     0,
00080     0,
00081     0,
00082     0,
00083     0,
00084     0,
00085     0,
00086     0,
00087     0,
00088     0,
00089     0,
00090     0,
00091     0,
00092 };
00093 
00094 bool KHTMLPartIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00095 {
00096     static QAsciiDict<int>* fdict = 0;
00097     if ( !fdict ) {
00098     fdict = new QAsciiDict<int>( KHTMLPartIface_fhash, true, false );
00099     for ( int i = 0; KHTMLPartIface_ftable[i][1]; i++ )
00100         fdict->insert( KHTMLPartIface_ftable[i][1],  new int( i ) );
00101     }
00102     int* fp = fdict->find( fun );
00103     switch ( fp?*fp:-1) {
00104     case 0: { // KURL url()
00105     replyType = KHTMLPartIface_ftable[0][0]; 
00106     QDataStream _replyStream( replyData, IO_WriteOnly );
00107     _replyStream << url( );
00108     } break;
00109     case 1: { // bool closeURL()
00110     replyType = KHTMLPartIface_ftable[1][0]; 
00111     QDataStream _replyStream( replyData, IO_WriteOnly );
00112     _replyStream << closeURL( );
00113     } break;
00114     case 2: { // void setJScriptEnabled(bool)
00115     bool arg0;
00116     QDataStream arg( data, IO_ReadOnly );
00117     arg >> arg0;
00118     replyType = KHTMLPartIface_ftable[2][0]; 
00119     setJScriptEnabled(arg0 );
00120     } break;
00121     case 3: { // bool jScriptEnabled()
00122     replyType = KHTMLPartIface_ftable[3][0]; 
00123     QDataStream _replyStream( replyData, IO_WriteOnly );
00124     _replyStream << jScriptEnabled( );
00125     } break;
00126     case 4: { // void setMetaRefreshEnabled(bool)
00127     bool arg0;
00128     QDataStream arg( data, IO_ReadOnly );
00129     arg >> arg0;
00130     replyType = KHTMLPartIface_ftable[4][0]; 
00131     setMetaRefreshEnabled(arg0 );
00132     } break;
00133     case 5: { // bool metaRefreshEnabled()
00134     replyType = KHTMLPartIface_ftable[5][0]; 
00135     QDataStream _replyStream( replyData, IO_WriteOnly );
00136     _replyStream << metaRefreshEnabled( );
00137     } break;
00138     case 6: { // void setDNDEnabled(bool)
00139     bool arg0;
00140     QDataStream arg( data, IO_ReadOnly );
00141     arg >> arg0;
00142     replyType = KHTMLPartIface_ftable[6][0]; 
00143     setDNDEnabled(arg0 );
00144     } break;
00145     case 7: { // bool dndEnabled()
00146     replyType = KHTMLPartIface_ftable[7][0]; 
00147     QDataStream _replyStream( replyData, IO_WriteOnly );
00148     _replyStream << dndEnabled( );
00149     } break;
00150     case 8: { // void setJavaEnabled(bool)
00151     bool arg0;
00152     QDataStream arg( data, IO_ReadOnly );
00153     arg >> arg0;
00154     replyType = KHTMLPartIface_ftable[8][0]; 
00155     setJavaEnabled(arg0 );
00156     } break;
00157     case 9: { // bool javaEnabled()
00158     replyType = KHTMLPartIface_ftable[9][0]; 
00159     QDataStream _replyStream( replyData, IO_WriteOnly );
00160     _replyStream << javaEnabled( );
00161     } break;
00162     case 10: { // void setPluginsEnabled(bool)
00163     bool arg0;
00164     QDataStream arg( data, IO_ReadOnly );
00165     arg >> arg0;
00166     replyType = KHTMLPartIface_ftable[10][0]; 
00167     setPluginsEnabled(arg0 );
00168     } break;
00169     case 11: { // bool pluginsEnabled()
00170     replyType = KHTMLPartIface_ftable[11][0]; 
00171     QDataStream _replyStream( replyData, IO_WriteOnly );
00172     _replyStream << pluginsEnabled( );
00173     } break;
00174     case 12: { // void setAutoloadImages(bool)
00175     bool arg0;
00176     QDataStream arg( data, IO_ReadOnly );
00177     arg >> arg0;
00178     replyType = KHTMLPartIface_ftable[12][0]; 
00179     setAutoloadImages(arg0 );
00180     } break;
00181     case 13: { // bool autoloadImages()
00182     replyType = KHTMLPartIface_ftable[13][0]; 
00183     QDataStream _replyStream( replyData, IO_WriteOnly );
00184     _replyStream << autoloadImages( );
00185     } break;
00186     case 14: { // void setOnlyLocalReferences(bool)
00187     bool arg0;
00188     QDataStream arg( data, IO_ReadOnly );
00189     arg >> arg0;
00190     replyType = KHTMLPartIface_ftable[14][0]; 
00191     setOnlyLocalReferences(arg0 );
00192     } break;
00193     case 15: { // bool onlyLocalReferences()
00194     replyType = KHTMLPartIface_ftable[15][0]; 
00195     QDataStream _replyStream( replyData, IO_WriteOnly );
00196     _replyStream << onlyLocalReferences( );
00197     } break;
00198     case 16: { // bool setEncoding(QString)
00199     QString arg0;
00200     QDataStream arg( data, IO_ReadOnly );
00201     arg >> arg0;
00202     replyType = KHTMLPartIface_ftable[16][0]; 
00203     QDataStream _replyStream( replyData, IO_WriteOnly );
00204     _replyStream << setEncoding(arg0 );
00205     } break;
00206     case 17: { // QString encoding()
00207     replyType = KHTMLPartIface_ftable[17][0]; 
00208     QDataStream _replyStream( replyData, IO_WriteOnly );
00209     _replyStream << encoding( );
00210     } break;
00211     case 18: { // void setUserStyleSheet(QString)
00212     QString arg0;
00213     QDataStream arg( data, IO_ReadOnly );
00214     arg >> arg0;
00215     replyType = KHTMLPartIface_ftable[18][0]; 
00216     setUserStyleSheet(arg0 );
00217     } break;
00218     case 19: { // void setFixedFont(QString)
00219     QString arg0;
00220     QDataStream arg( data, IO_ReadOnly );
00221     arg >> arg0;
00222     replyType = KHTMLPartIface_ftable[19][0]; 
00223     setFixedFont(arg0 );
00224     } break;
00225     case 20: { // bool gotoAnchor(QString)
00226     QString arg0;
00227     QDataStream arg( data, IO_ReadOnly );
00228     arg >> arg0;
00229     replyType = KHTMLPartIface_ftable[20][0]; 
00230     QDataStream _replyStream( replyData, IO_WriteOnly );
00231     _replyStream << gotoAnchor(arg0 );
00232     } break;
00233     case 21: { // bool nextAnchor()
00234     replyType = KHTMLPartIface_ftable[21][0]; 
00235     QDataStream _replyStream( replyData, IO_WriteOnly );
00236     _replyStream << nextAnchor( );
00237     } break;
00238     case 22: { // bool prevAnchor()
00239     replyType = KHTMLPartIface_ftable[22][0]; 
00240     QDataStream _replyStream( replyData, IO_WriteOnly );
00241     _replyStream << prevAnchor( );
00242     } break;
00243     case 23: { // void activateNode()
00244     replyType = KHTMLPartIface_ftable[23][0]; 
00245     activateNode( );
00246     } break;
00247     case 24: { // QString selectedText()
00248     replyType = KHTMLPartIface_ftable[24][0]; 
00249     QDataStream _replyStream( replyData, IO_WriteOnly );
00250     _replyStream << selectedText( );
00251     } break;
00252     case 25: { // void selectAll()
00253     replyType = KHTMLPartIface_ftable[25][0]; 
00254     selectAll( );
00255     } break;
00256     case 26: { // QString lastModified()
00257     replyType = KHTMLPartIface_ftable[26][0]; 
00258     QDataStream _replyStream( replyData, IO_WriteOnly );
00259     _replyStream << lastModified( );
00260     } break;
00261     case 27: { // void print(bool)
00262     bool arg0;
00263     QDataStream arg( data, IO_ReadOnly );
00264     arg >> arg0;
00265     replyType = KHTMLPartIface_ftable[27][0]; 
00266     print(arg0 );
00267     } break;
00268     case 28: { // void debugRenderTree()
00269     replyType = KHTMLPartIface_ftable[28][0]; 
00270     debugRenderTree( );
00271     } break;
00272     case 29: { // void debugDOMTree()
00273     replyType = KHTMLPartIface_ftable[29][0]; 
00274     debugDOMTree( );
00275     } break;
00276     case 30: { // void viewDocumentSource()
00277     replyType = KHTMLPartIface_ftable[30][0]; 
00278     viewDocumentSource( );
00279     } break;
00280     case 31: { // void viewFrameSource()
00281     replyType = KHTMLPartIface_ftable[31][0]; 
00282     viewFrameSource( );
00283     } break;
00284     case 32: { // void saveBackground(QString)
00285     QString arg0;
00286     QDataStream arg( data, IO_ReadOnly );
00287     arg >> arg0;
00288     replyType = KHTMLPartIface_ftable[32][0]; 
00289     saveBackground(arg0 );
00290     } break;
00291     case 33: { // void saveDocument(QString)
00292     QString arg0;
00293     QDataStream arg( data, IO_ReadOnly );
00294     arg >> arg0;
00295     replyType = KHTMLPartIface_ftable[33][0]; 
00296     saveDocument(arg0 );
00297     } break;
00298     case 34: { // QString evalJS(QString)
00299     QString arg0;
00300     QDataStream arg( data, IO_ReadOnly );
00301     arg >> arg0;
00302     replyType = KHTMLPartIface_ftable[34][0]; 
00303     QDataStream _replyStream( replyData, IO_WriteOnly );
00304     _replyStream << evalJS(arg0 );
00305     } break;
00306     case 35: { // void stopAnimations()
00307     replyType = KHTMLPartIface_ftable[35][0]; 
00308     stopAnimations( );
00309     } break;
00310     default: 
00311     return DCOPObject::process( fun, data, replyType, replyData );
00312     }
00313     return true;
00314 }
00315 
00316 QCStringList KHTMLPartIface::interfaces()
00317 {
00318     QCStringList ifaces = DCOPObject::interfaces();
00319     ifaces += "KHTMLPartIface";
00320     return ifaces;
00321 }
00322 
00323 QCStringList KHTMLPartIface::functions()
00324 {
00325     QCStringList funcs = DCOPObject::functions();
00326     for ( int i = 0; KHTMLPartIface_ftable[i][2]; i++ ) {
00327     if (KHTMLPartIface_ftable_hiddens[i])
00328         continue;
00329     QCString func = KHTMLPartIface_ftable[i][0];
00330     func += ' ';
00331     func += KHTMLPartIface_ftable[i][2];
00332     funcs << func;
00333     }
00334     return funcs;
00335 }
00336 
00337 
KDE Logo
This file is part of the documentation for khtml Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 30 10:22:18 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003