QtWebKit/qwebkitplatformplugin.h Source File

qwebkitplatformplugin.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  *
19  */
20 
21 #ifndef QWEBKITPLATFORMPLUGIN_H
22 #define QWEBKITPLATFORMPLUGIN_H
23 
24 /*
25  * Warning: The contents of this file is not part of the public QtWebKit API
26  * and may be changed from version to version or even be completely removed.
27 */
28 
29 #if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
30 #include <QMediaPlayer>
31 #endif
32 #include <QtCore/QObject>
33 #include <QtCore/QUrl>
34 #include <QtGui/QColor>
35 
37 public:
38  virtual ~QWebSelectData() {}
39 
41 
42  virtual ItemType itemType(int) const = 0;
43  virtual QString itemText(int index) const = 0;
44  virtual QString itemToolTip(int index) const = 0;
45  virtual bool itemIsEnabled(int index) const = 0;
46  virtual bool itemIsSelected(int index) const = 0;
47  virtual int itemCount() const = 0;
48  virtual bool multiple() const = 0;
49  virtual QColor backgroundColor() const = 0;
50  virtual QColor foregroundColor() const = 0;
51  virtual QColor itemBackgroundColor(int index) const = 0;
52  virtual QColor itemForegroundColor(int index) const = 0;
53 };
54 
55 class QWebSelectMethod : public QObject {
56  Q_OBJECT
57 public:
58  virtual ~QWebSelectMethod() {}
59 
60  virtual void show(const QWebSelectData&) = 0;
61  virtual void hide() = 0;
62 
63 Q_SIGNALS:
64  void selectItem(int index, bool allowMultiplySelections, bool shift);
65  void didHide();
66 };
67 
69 public:
70  virtual ~QWebNotificationData() {}
71 
72  virtual const QString title() const = 0;
73  virtual const QString message() const = 0;
74  virtual const QByteArray iconData() const = 0;
75  virtual const QUrl openerPageUrl() const = 0;
76 };
77 
79  Q_OBJECT
80 public:
83 
84  virtual void showNotification(const QWebNotificationData*) = 0;
85 
86 Q_SIGNALS:
87  void notificationClosed();
88  void notificationClicked();
89 };
90 
92  Q_OBJECT
93 public:
96 
99  };
100 
101  enum HapticEvent {
103  };
104 
105  virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0;
106 };
107 
108 class QWebTouchModifier : public QObject {
109  Q_OBJECT
110 public:
111  virtual ~QWebTouchModifier() {}
112 
115  };
116 
117  virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0;
118 };
119 
120 #if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA
121 class QWebFullScreenVideoHandler : public QObject {
122  Q_OBJECT
123 public:
124  QWebFullScreenVideoHandler() {}
125  virtual ~QWebFullScreenVideoHandler() {}
126  virtual bool requiresFullScreenForVideoPlayback() const = 0;
127 
128 Q_SIGNALS:
129  void fullScreenClosed();
130 
131 public Q_SLOTS:
132  virtual void enterFullScreen(QMediaPlayer*) = 0;
133  virtual void exitFullScreen() = 0;
134 };
135 #endif
136 
138 public:
140 
141  enum Extension {
147  };
148 
149  virtual bool supportsExtension(Extension) const = 0;
150  virtual QObject* createExtension(Extension) const = 0;
151 };
152 
154 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.7");
156 
157 #endif // QWEBKITPLATFORMPLUGIN_H
virtual QString itemToolTip(int index) const =0
virtual QColor itemBackgroundColor(int index) const =0
virtual int itemCount() const =0
virtual QColor itemForegroundColor(int index) const =0
#define QT_END_NAMESPACE
Definition: qglobal.h:128
virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const =0
void selectItem(int index, bool allowMultiplySelections, bool shift)
virtual ItemType itemType(int) const =0
virtual void playHapticFeedback(const HapticEvent, const QString &hapticType, const HapticStrength)=0
Definition: qcolor.h:67
virtual bool supportsExtension(Extension) const =0
#define Q_SLOTS
Definition: qobjectdefs.h:71
virtual const QString title() const =0
#define Q_SIGNALS
Definition: qobjectdefs.h:72
virtual QString itemText(int index) const =0
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
virtual void hide()=0
QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(QWebKitPlatformPlugin,"com.nokia.Qt.WebKit.PlatformPlugin/1.7")
virtual const QByteArray iconData() const =0
virtual bool multiple() const =0
#define Q_OBJECT
Definition: qobjectdefs.h:157
virtual QObject * createExtension(Extension) const =0
virtual const QUrl openerPageUrl() const =0
virtual QColor foregroundColor() const =0
virtual void show(const QWebSelectData &)=0
Definition: qurl.h:61
virtual void showNotification(const QWebNotificationData *)=0
virtual bool itemIsSelected(int index) const =0
virtual bool itemIsEnabled(int index) const =0
virtual const QString message() const =0
virtual QColor backgroundColor() const =0
GLuint index
Definition: GLee.h:1704