22 #ifndef WINDOWEDWEBAPP_H
23 #define WINDOWEDWEBAPP_H
29 #include "AsyncCaller.h"
34 #include "WindowProperties.h"
35 #include "WindowTypes.h"
36 #include <PIpcChannelListener.h>
37 #include <PIpcBuffer.h>
42 class SysMgrTouchEvent;
52 WindowedWebApp(
int width,
int height, WindowType::Type type, PIpcChannel *channel = 0);
62 virtual int resizeEvent(
int newWidth,
int newHeight,
bool resizeBuffer);
63 virtual void flipEvent(
int newWidth,
int newHeight);
64 virtual void asyncFlipEvent(
int newWidth,
int newHeight,
int newScreenWidth,
int newScreenHeight);
86 virtual int getKey()
const;
90 virtual void onResize(
int width,
int height,
bool resizeBuffer);
91 virtual void onFlip(
int newWidth,
int newHeight);
92 virtual void onAsyncFlip(
int newWidth,
int newHeight,
int newScreenWidth,
int newScreenHeight);
93 virtual void onSyncResize(
int width,
int height,
bool resizeBuffer,
int* newKey);
96 virtual void onClose(
bool disableKeepAlive);
97 virtual void onInputEvent(
const SysMgrEventWrapper& wrapper);
98 virtual void onKeyEvent(
const SysMgrKeyEvent& keyEvent);
99 virtual void onTouchEvent(
const SysMgrTouchEvent& touchEvent);
115 virtual void windowSize(
int& width,
int& height);
116 virtual void screenSize(
int& width,
int& height);
134 virtual void focus();
136 virtual void invalContents(
int x,
int y,
int width,
int height);
205 struct RecordedGestureEntry {
206 RecordedGestureEntry(
float s,
float r,
int cX,
int cY)
219 std::list<RecordedGestureEntry> m_recordedGestures;
221 void recordGesture(
float s,
float r,
int cX,
int cY);
222 RecordedGestureEntry getAveragedGesture()
const;
224 void keyGesture(QKeyEvent* e);
225 QTimer* m_paintTimer;