-
This commit is contained in:
@@ -12,11 +12,13 @@
|
||||
#include <QHash>
|
||||
#include <QQueue>
|
||||
#include <QTimer>
|
||||
#include <QEventLoop>
|
||||
|
||||
|
||||
class WebViewQt;
|
||||
class WebviewWindow;
|
||||
class Command;
|
||||
class CommandEvent;
|
||||
|
||||
class RKTWEBVIEW_QT_EXPORT Rktwebview_qt : public QObject
|
||||
{
|
||||
@@ -27,10 +29,11 @@ private:
|
||||
QHash<int, WebviewWindow *> _views;
|
||||
QHash<int, event_cb_t> _view_js_callbacks;
|
||||
|
||||
QQueue<Command *> _command_queue;
|
||||
QTimer _process_commands;
|
||||
QTimer _process_events;
|
||||
|
||||
int _evt_loop_depth;
|
||||
QTimer _evt_loop_timer;
|
||||
|
||||
Rktwebview_qt **_handler;
|
||||
|
||||
int _argc;
|
||||
@@ -41,9 +44,20 @@ private:
|
||||
result_t doWindow(rktwebview_t w, int cmd);
|
||||
|
||||
public slots:
|
||||
void processCommands();
|
||||
void processJsEventQueues();
|
||||
|
||||
private slots:
|
||||
void stopEventloop();
|
||||
|
||||
private:
|
||||
void postCommand(Command *cmd);
|
||||
void handleCommandEvent(CommandEvent *e);
|
||||
void processCommand(Command *cmd);
|
||||
|
||||
// QObject interface
|
||||
protected:
|
||||
void customEvent(QEvent *event);
|
||||
|
||||
public:
|
||||
void removeView(int id);
|
||||
|
||||
@@ -91,6 +105,7 @@ public:
|
||||
|
||||
public:
|
||||
Rktwebview_qt(Rktwebview_qt **handler);
|
||||
|
||||
};
|
||||
|
||||
#endif // RKTWEBVIEW_QT_H
|
||||
|
||||
Reference in New Issue
Block a user