kjs_proxy.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef _KJS_PROXY_H_
00023
#define _KJS_PROXY_H_
00024
00025
#include <qvariant.h>
00026
#include <qstring.h>
00027
#include <sys/time.h>
00028
00029
class KHTMLPart;
00030
00031
namespace DOM {
00032
class Node;
00033
class EventListener;
00034
class Event;
00035 }
00036
00037
namespace KJS {
00038
class List;
00039
class Interpreter;
00040
class Completion;
00041
class KJSDebugWin;
00042 }
00043
00044
namespace khtml {
00045
class ChildFrame;
00046 }
00047
00053
class KJSProxy {
00054
public:
00055 KJSProxy() { m_handlerLineno = 0; }
00056
virtual ~KJSProxy() { }
00057
virtual QVariant evaluate(
QString filename,
int baseLine,
const QString &,
const DOM::Node &n,
00058 KJS::Completion *completion = 0) = 0;
00059
virtual void clear() = 0;
00060
virtual DOM::EventListener *createHTMLEventHandler(
QString sourceUrl,
QString name,
QString code) = 0;
00061
virtual void finishedWithEvent(
const DOM::Event &event) = 0;
00062
virtual KJS::Interpreter *interpreter() = 0;
00063
00064
virtual void setDebugEnabled(
bool enabled) = 0;
00065
virtual void showDebugWindow(
bool show=
true) = 0;
00066
virtual bool paused() const = 0;
00067 virtual
void dataReceived() = 0;
00068
00069
void setEventHandlerLineno(
int lineno) { m_handlerLineno = lineno; }
00070
00071 khtml::ChildFrame *m_frame;
00072
int m_handlerLineno;
00073 };
00074
00075
class KJSCPUGuard {
00076
public:
00077 KJSCPUGuard() {}
00078
void start(
unsigned int msec=5000,
unsigned int i_msec=10000);
00079
void stop();
00080
private:
00081 void (*oldAlarmHandler)(
int);
00082
static void alarmHandler(
int);
00083
static bool confirmTerminate();
00084 itimerval oldtv;
00085 };
00086
00087
#endif
This file is part of the documentation for khtml Library Version 3.4.0.