view libclient-js/malikania/js_client_target.cpp @ 66:b2031b785cbc

CMake: rename Config.h to sysconfig.hpp
author David Demelier <markand@malikania.fr>
date Fri, 16 Dec 2016 16:26:31 +0100
parents a47a4477f347
children
line wrap: on
line source

/*
 * js-client-target.cpp -- client resources loader (JavaScript binding)
 *
 * Copyright (c) 2013-2016 Malikania Authors
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include "js-client-target.hpp"

namespace malikania {

class JsTarget : public Client::Target {
public:

};

namespace {

duk_ret_t constructor(duk_context *ctx)
{
    return 0;
}

duk_ret_t draw(duk_context *ctx)
{
    return 0;
}

} // !namespace

void dukx_load_client_target(duk_context *ctx)
{
    StackAssert sa(ctx);

    duk_get_global_string(ctx, "Malikania");
    duk_get_prop_string(ctx, -1, "Client");
    duk_push_c_function(ctx, constructor, 1);
    duk_push_object(ctx);
    duk_put_prop_string(ctx, -1, "prototype");
    duk_put_prop_string(ctx, -2, "Target");
    duk_pop_2(ctx);
}

} // !malikania