21 #ifndef __kparts_browserextension_h__
22 #define __kparts_browserextension_h__
24 #include <sys/types.h>
29 #include <QtCore/QSharedDataPointer>
31 template <
class T1,
class T2>
struct QPair;
32 template<
typename T>
class Q3PtrList;
33 template <
class Key,
class T>
class QMap;
34 template<
typename T>
class QList;
45 class BrowserInterface;
47 struct BrowserArgumentsPrivate;
67 BrowserArguments(
const BrowserArguments &args );
68 BrowserArguments &operator=(
const BrowserArguments &args);
70 virtual ~BrowserArguments();
99 void setContentType(
const QString & contentType );
108 void setDoPost(
bool enable );
121 void setLockHistory(
bool lock );
122 bool lockHistory()
const;
127 void setNewTab(
bool newTab );
146 bool redirectedRequest ()
const;
154 void setRedirectedRequest(
bool redirected);
174 void setForcesNewWindow(
bool forcesNewWindow );
179 bool forcesNewWindow()
const;
182 BrowserArgumentsPrivate *d;
185 class WindowArgsPrivate;
199 WindowArgs(
const QRect &_geometry,
bool _fullscreen,
bool _menuBarVisible,
200 bool _toolBarsVisible,
bool _statusBarVisible,
bool _resizable );
201 WindowArgs(
int _x,
int _y,
int _width,
int _height,
bool _fullscreen,
202 bool _menuBarVisible,
bool _toolBarsVisible,
203 bool _statusBarVisible,
bool _resizable );
211 void setWidth(
int w);
214 void setHeight(
int h);
217 void setFullScreen(
bool fs);
218 bool isFullScreen()
const;
220 void setMenuBarVisible(
bool visible);
221 bool isMenuBarVisible()
const;
223 void setToolBarsVisible(
bool visible);
224 bool toolBarsVisible()
const;
226 void setStatusBarVisible(
bool visible);
227 bool isStatusBarVisible()
const;
229 void setResizable(
bool resizable);
230 bool isResizable()
const;
232 void setLowerWindow(
bool lower);
233 bool lowerWindow()
const;
235 void setScrollBarsVisible(
bool visible);
236 bool scrollBarsVisible()
const;
239 QSharedDataPointer<WindowArgsPrivate> d;
265 class OpenUrlEventPrivate;
266 OpenUrlEventPrivate *
const d;
323 Q_PROPERTY(
bool urlDropHandling READ isURLDropHandlingEnabled WRITE setURLDropHandlingEnabled )
339 DefaultPopupItems=0x0000,
340 ShowNavigationItems=0x0001,
344 ShowCreateDirectory=0x0010,
346 ShowTextSelectionItems=0x0020,
350 ShowUrlOperations=0x0100,
354 Q_DECLARE_FLAGS( PopupFlags, PopupFlag )
375 virtual
int xOffset();
381 virtual
int yOffset();
390 virtual
void saveState( QDataStream &stream );
399 virtual
void restoreState( QDataStream &stream );
406 bool isURLDropHandlingEnabled() const;
418 void setURLDropHandlingEnabled(
bool enable );
429 bool isActionEnabled( const
char * name ) const;
437 QString actionText( const
char * name ) const;
468 static ActionSlotMap actionSlotMap();
474 static ActionSlotMap * actionSlotMapPtr();
496 #if !defined(Q_MOC_RUN) && !defined(DOXYGEN_SHOULD_SKIP_THIS) && !defined(IN_IDE_PARSER)
504 void enableAction(
const char * name,
bool enabled );
512 void setActionText(
const char * name,
const QString& text );
520 void openUrlRequest(
const KUrl &url,
530 void openUrlRequestDelayed(
const KUrl &url,
549 void openUrlNotify();
554 void setLocationBarUrl(
const QString &url );
559 void setIconUrl(
const KUrl &url );
575 void createNewWindow(
const KUrl &url,
589 void loadingProgress(
int percent );
593 void speedProgress(
int bytesPerSecond );
595 void infoMessage(
const QString & );
627 void popupMenu(
const QPoint &global,
const KUrl &url,
628 mode_t mode = static_cast<mode_t>(-1),
644 void selectionInfo(
const QString &text );
655 void mouseOverInfo(
const KFileItem& item );
661 void addWebSideBar(
const KUrl &url,
const QString& name);
666 void moveTopLevelWidget(
int x,
int y );
671 void resizeTopLevelWidget(
int w,
int h );
682 void setPageSecurity(
int );
690 void slotCompleted();
691 void slotOpenUrlRequest(
const KUrl &url,
695 void slotEmitOpenUrlRequestDelayed();
696 void slotEnableAction(
const char *,
bool );
697 void slotSetActionText(
const char*,
const QString& );
703 class BrowserExtensionPrivate;
704 BrowserExtensionPrivate *
const d;
732 virtual const QList<KParts::ReadOnlyPart*> frames()
const;
744 virtual bool openUrlInFrame(
const KUrl &url,
755 class BrowserHostExtensionPrivate;
756 BrowserHostExtensionPrivate *
const d;
770 TypeVoid=0, TypeBool, TypeFunction, TypeNumber, TypeObject, TypeString
780 virtual bool get(
const unsigned long objid,
const QString & field,
Type & type,
unsigned long & retobjid, QString & value );
784 virtual bool put(
const unsigned long objid,
const QString & field,
const QString & value );
788 virtual bool call(
const unsigned long objid,
const QString & func,
const QStringList & args,
Type & type,
unsigned long & retobjid, QString & value );
792 virtual void unregister(
const unsigned long objid );
796 #if !defined(Q_MOC_RUN) && !defined(DOXYGEN_SHOULD_SKIP_THIS) && !defined(IN_IDE_PARSER)
805 class LiveConnectExtensionPrivate;
806 LiveConnectExtensionPrivate *
const d;
811 Q_DECLARE_OPERATORS_FOR_FLAGS( KParts::BrowserExtension::PopupFlags )