diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /xparts/src/interfaces | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'xparts/src/interfaces')
-rw-r--r-- | xparts/src/interfaces/Makefile.am | 3 | ||||
-rw-r--r-- | xparts/src/interfaces/xbrowserextension.h | 17 | ||||
-rw-r--r-- | xparts/src/interfaces/xbrowsersignals.h | 15 | ||||
-rw-r--r-- | xparts/src/interfaces/xpart.h | 36 | ||||
-rw-r--r-- | xparts/src/interfaces/xparthost.h | 53 | ||||
-rw-r--r-- | xparts/src/interfaces/xpartmanager.h | 20 |
6 files changed, 144 insertions, 0 deletions
diff --git a/xparts/src/interfaces/Makefile.am b/xparts/src/interfaces/Makefile.am new file mode 100644 index 00000000..0d4b7f97 --- /dev/null +++ b/xparts/src/interfaces/Makefile.am @@ -0,0 +1,3 @@ + +xkpartsinclude_HEADERS = xpart.h xparthost.h +xkpartsincludedir = $(includedir)/xkparts diff --git a/xparts/src/interfaces/xbrowserextension.h b/xparts/src/interfaces/xbrowserextension.h new file mode 100644 index 00000000..57297441 --- /dev/null +++ b/xparts/src/interfaces/xbrowserextension.h @@ -0,0 +1,17 @@ +#ifndef __xpart_browser_h__ +#define __xpart_browser_h__ + +#include <dcopref.h> + +class XBrowserExtension : public DCOPObject +{ + K_DCOP + +k_dcop: + virtual void setBrowserSignals( const DCOPRef &ref) = 0; + + virtual QByteArray saveState() = 0; + virtual void restoreState( QByteArray state ) = 0; +}; + +#endif diff --git a/xparts/src/interfaces/xbrowsersignals.h b/xparts/src/interfaces/xbrowsersignals.h new file mode 100644 index 00000000..6d41d28b --- /dev/null +++ b/xparts/src/interfaces/xbrowsersignals.h @@ -0,0 +1,15 @@ +#ifndef __xpart_browsersignals_h__ +#define __xpart_browsersignals_h__ + +#include <dcopobject.h> + +class XBrowserSignals : public DCOPObject +{ + K_DCOP + +k_dcop: + virtual ASYNC openURLRequest( const QCString &url) = 0; + virtual ASYNC createNewWindow( const QCString &url ) = 0; +}; + +#endif diff --git a/xparts/src/interfaces/xpart.h b/xparts/src/interfaces/xpart.h new file mode 100644 index 00000000..7722f5fb --- /dev/null +++ b/xparts/src/interfaces/xpart.h @@ -0,0 +1,36 @@ +#ifndef __xkparts_part_h__ +#define __xkparts_part_h__ + +#include <dcopobject.h> +#include <dcopref.h> +#include <qglobal.h> + +class XPart : public DCOPObject +{ + K_DCOP +k_dcop: + + /** The XPartManager uses the windowId() to embed the part. */ + virtual Q_UINT32 windowId() = 0; + + /** Called when the part should display itself */ + virtual void show() = 0; + + /** sent by the XPartHost to request url opening */ + virtual bool openURL( const QCString& url ) = 0; + + /** sent by the XPartHost to close the url */ + virtual bool closeURL() = 0; + + /** Called when an action (previously registered with + * XPartHost::createActions()) has been activated. Name is the name of the + * action, state is used with Toggle actions to precise the current state. + */ + virtual ASYNC activateAction( const QString &name, int state ) = 0; + + /** Are extentions available -> browser extension / TextEditor ? */ + virtual DCOPRef queryExtension( const QCString& extension ) = 0; + +}; + +#endif diff --git a/xparts/src/interfaces/xparthost.h b/xparts/src/interfaces/xparthost.h new file mode 100644 index 00000000..3d1d95f4 --- /dev/null +++ b/xparts/src/interfaces/xparthost.h @@ -0,0 +1,53 @@ +#ifndef __xkparts_parthost_h__ +#define __xkparts_parthost_h__ + +#include <dcopobject.h> +#include <dcopref.h> + +class XPartHost : public DCOPObject +{ + K_DCOP +public: + XPartHost(QCString name) : DCOPObject(name) {} + +k_dcop: + + /** The XPart should register itself to its host when it is created */ + virtual DCOPRef registerXPart( const DCOPRef &part ) = 0; + + /** Returns the registered part */ + virtual DCOPRef part() = 0; + + /** The XPart informs its host about its available actions. + * the actions are sent to the XPart using XPart::activateAction */ + virtual ASYNC createActions( const QCString &xmlActions ) = 0; + + /** DCOP signal emitted by the XPart and received here, to be + * forwarded to the KPartHost. See KParts documentation for + * more details. */ + virtual ASYNC setWindowCaption( const QString &caption ) = 0; + + /** DCOP signal emitted by the XPart and received here, to be + * forwarded to the KPartHost. See KParts documentation for + * more details. */ + virtual ASYNC setStatusBarText( const QString &text ) = 0; + + + /** DCOP signal emitted by the XPart and received here, to be + * forwarded to the KPartHost. See KParts documentation for + * more details. */ + virtual ASYNC started() = 0; + + /** DCOP signal emitted by the XPart and received here, to be + * forwarded to the KPartHost. See KParts documentation for + * more details. */ + virtual ASYNC completed() = 0; + + /** DCOP signal emitted by the XPart and received here, to be + * forwarded to the KPartHost. See KParts documentation for + * more details. */ + virtual ASYNC canceled( const QString &errMsg ) = 0; + +}; + +#endif diff --git a/xparts/src/interfaces/xpartmanager.h b/xparts/src/interfaces/xpartmanager.h new file mode 100644 index 00000000..a172ee3f --- /dev/null +++ b/xparts/src/interfaces/xpartmanager.h @@ -0,0 +1,20 @@ +#ifndef __xkparts_partmanager_h__ +#define __xkparts_partmanager_h__ + +#include <dcopobject.h> +#include <qglobal.h> + +class XKPartManager : public DCOPObject +{ + K_DCOP + +k_dcop: + /** Query a XPart able to handle a given mimetype */ + virtual DCOPRef createPart( QString servicetype ) = 0; + + /** Delete a previously created XPart */ + virtual void deletePart( DCOPRef ref ) = 0; +}; + + +#endif |