Changeset 64557 in webkit


Ignore:
Timestamp:
Aug 3, 2010 8:26:55 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] Platform plugin interface for Haptics
https://bugs.webkit.org/show_bug.cgi?id=43143

Patch by Kim Grönholm <kim.1.gronholm@nokia.com> on 2010-08-03
Reviewed by Simon Hausmann.

Platform plugin interface for playing haptic feedback

  • Api/qwebkitplatformplugin.h:

(QWebHapticFeedbackPlayer::):
(QWebKitPlatformPlugin::):

  • examples/platformplugin/WebPlugin.h:

(WebPlugin::createHapticFeedbackPlayer):

  • examples/platformplugin/qwebkitplatformplugin.h:

(QWebHapticFeedbackPlayer::):
(QWebKitPlatformPlugin::):

Location:
trunk/WebKit/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebkitplatformplugin.h

    r61487 r64557  
    8282};
    8383
     84class QWebHapticFeedbackPlayer
     85{
     86public:
     87    enum HapticStrength {
     88        None, Weak, Medium, Strong
     89    };
     90
     91    enum HapticEvent {
     92        Press, Release
     93    };
     94
     95    virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0;
     96};
     97
    8498class QWebKitPlatformPlugin
    8599{
     
    89103    enum Extension {
    90104        MultipleSelections,
    91         Notifications
     105        Notifications,
     106        Haptics
    92107    };
    93108
     
    95110    virtual QWebSelectMethod* createSelectInputMethod() const = 0;
    96111    virtual QWebNotificationPresenter* createNotificationPresenter() const = 0;
     112    virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0;
    97113
    98114};
    99115
    100 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.2");
     116Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.3");
    101117
    102118#endif // QWEBKITPLATFORMPLUGIN_H
  • trunk/WebKit/qt/ChangeLog

    r64513 r64557  
     12010-08-03  Kim Grönholm  <kim.1.gronholm@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Platform plugin interface for Haptics
     6        https://bugs.webkit.org/show_bug.cgi?id=43143
     7
     8        Platform plugin interface for playing haptic feedback
     9
     10        * Api/qwebkitplatformplugin.h:
     11        (QWebHapticFeedbackPlayer::):
     12        (QWebKitPlatformPlugin::):
     13        * examples/platformplugin/WebPlugin.h:
     14        (WebPlugin::createHapticFeedbackPlayer):
     15        * examples/platformplugin/qwebkitplatformplugin.h:
     16        (QWebHapticFeedbackPlayer::):
     17        (QWebKitPlatformPlugin::):
     18
    1192010-07-27  Luiz Agostini  <luiz.agostini@openbossa.org>
    220
  • trunk/WebKit/qt/examples/platformplugin/WebPlugin.h

    r61121 r64557  
    9393        return new WebNotificationPresenter();
    9494    }
     95    virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const {
     96        return 0;
     97    }
    9598};
    9699
  • trunk/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h

    r61487 r64557  
    8282};
    8383
     84class QWebHapticFeedbackPlayer
     85{
     86public:
     87    enum HapticStrength {
     88        None, Weak, Medium, Strong
     89    };
     90
     91    enum HapticEvent {
     92        Press, Release
     93    };
     94
     95    virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0;
     96};
     97
    8498class QWebKitPlatformPlugin
    8599{
     
    89103    enum Extension {
    90104        MultipleSelections,
    91         Notifications
     105        Notifications,
     106        Haptics
    92107    };
    93108
     
    95110    virtual QWebSelectMethod* createSelectInputMethod() const = 0;
    96111    virtual QWebNotificationPresenter* createNotificationPresenter() const = 0;
     112    virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0;
    97113
    98114};
    99115
    100 Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.2");
     116Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.3");
    101117
    102118#endif // QWEBKITPLATFORMPLUGIN_H
Note: See TracChangeset for help on using the changeset viewer.