console.cpp revision ee451cb395940862dad63c85adfe8f2fd55e864c
1// Copyright 2014 PDFium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7#include "../../include/javascript/JavaScript.h" 8#include "../../include/javascript/IJavaScript.h" 9#include "../../include/javascript/JS_Define.h" 10#include "../../include/javascript/JS_Object.h" 11#include "../../include/javascript/JS_Value.h" 12#include "../../include/javascript/console.h" 13//#include "../../include/javascript/JS_Module.h" 14#include "../../include/javascript/JS_EventHandler.h" 15//#include "../../include/javascript/JS_ResMgr.h" 16#include "../../include/javascript/JS_Context.h" 17 18/* ------------------------ console ------------------------ */ 19 20BEGIN_JS_STATIC_CONST(CJS_Console) 21END_JS_STATIC_CONST() 22 23BEGIN_JS_STATIC_PROP(CJS_Console) 24END_JS_STATIC_PROP() 25 26BEGIN_JS_STATIC_METHOD(CJS_Console) 27 JS_STATIC_METHOD_ENTRY(clear, 0) 28 JS_STATIC_METHOD_ENTRY(hide, 0) 29 JS_STATIC_METHOD_ENTRY(println, 1) 30 JS_STATIC_METHOD_ENTRY(show, 0) 31END_JS_STATIC_METHOD() 32 33IMPLEMENT_JS_CLASS(CJS_Console,console) 34 35#define MAXCONSOLECONTENTS 10000 36 37console::console(CJS_Object* pJSObject): CJS_EmbedObj(pJSObject) 38{ 39} 40 41console::~console() 42{ 43} 44 45FX_BOOL console::clear(OBJ_METHOD_PARAMS) 46{ 47 48 49 50 return TRUE; 51} 52 53FX_BOOL console::hide(OBJ_METHOD_PARAMS) 54{ 55 56 57 58 59 return TRUE; 60} 61 62FX_BOOL console::println(OBJ_METHOD_PARAMS) 63{ 64 if (params.size() < 1) 65 { 66 return FALSE; 67 } 68 69 return TRUE; 70} 71 72FX_BOOL console::show(OBJ_METHOD_PARAMS) 73{ 74 return TRUE; 75} 76 77 78 79