gfx/skia/trunk/include/xml/SkJS.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/include/xml/SkJS.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2006 The Android Open Source Project
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +
    1.13 +#include "SkTypes.h"
    1.14 +#include "SkWindow.h"
    1.15 +
    1.16 +extern "C" {
    1.17 +    typedef long JSWord;
    1.18 +    typedef JSWord jsword;
    1.19 +    typedef jsword  jsval;
    1.20 +    typedef struct JSRuntime JSRuntime;
    1.21 +    typedef struct JSContext JSContext;
    1.22 +    typedef struct JSObject JSObject;
    1.23 +}
    1.24 +
    1.25 +class SkString;
    1.26 +
    1.27 +class SkJS : public SkOSWindow {
    1.28 +public:
    1.29 +    SkJS(void* hwnd);
    1.30 +    ~SkJS();
    1.31 +    SkBool EvaluateScript(const char* script, jsval* rVal);
    1.32 +    SkBool ValueToString(jsval value, SkString* string);
    1.33 +#ifdef SK_DEBUG
    1.34 +    static void Test(void* hwnd);
    1.35 +#endif
    1.36 +protected:
    1.37 +    void InitializeDisplayables(const SkBitmap& , JSContext *, JSObject *, JSObject *);
    1.38 +    void DisposeDisplayables();
    1.39 +    JSRuntime *fRuntime;
    1.40 +    JSContext *fContext;
    1.41 +    JSObject *fGlobal;
    1.42 +};

mercurial