KHtml

kjs_views.h
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2001 Peter Kelly ([email protected])
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef _KJS_VIEWS_H_
21 #define _KJS_VIEWS_H_
22 
23 #include "ecma/kjs_dom.h"
24 #include "xml/dom2_viewsimpl.h"
25 
26 namespace KJS
27 {
28 
29 class DOMAbstractView : public DOMObject
30 {
31 public:
32  DOMAbstractView(ExecState *, DOM::AbstractViewImpl *av);
33  ~DOMAbstractView();
34 
35  JSValue *getValueProperty(ExecState *exec, int token);
36  using KJS::JSObject::getOwnPropertySlot;
37  bool getOwnPropertySlot(ExecState *exec, const Identifier &propertyName, PropertySlot &slot) override;
38 
39  // no put - all read-only
40  const ClassInfo *classInfo() const override
41  {
42  return &info;
43  }
44  static const ClassInfo info;
45  virtual DOM::AbstractViewImpl *impl() const
46  {
47  return m_impl.get();
48  }
49  enum { Document, GetComputedStyle };
50 protected:
51  SharedPtr<DOM::AbstractViewImpl> m_impl;
52 };
53 
54 JSValue *getDOMAbstractView(ExecState *exec, DOM::AbstractViewImpl *av);
55 
56 /**
57  * Convert an object to an AbstractView. Returns a null Node if not possible.
58  */
59 DOM::AbstractViewImpl *toAbstractView(JSValue *);
60 
61 } // namespace
62 
63 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:47:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.