/* Generated by nsgenbind
 *
 * nsgenbind is published under the MIT Licence.
 * nsgenbind is similar to a compiler is a purely transformative tool which
 * explicitly makes no copyright claim on this generated output
 */

/* DukTape JavaScript bindings for NetSurf browser
 *
 * Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
 * This file is part of NetSurf, http://www.netsurf-browser.org/
 * Released under the terms of the MIT License,
 *        http://www.opensource.org/licenses/mit-license
 */

#include <dom/dom.h>

#include "utils/log.h"
#include "utils/nsurl.h"

#include "javascript/duktape/duktape.h"

struct browser_window;
struct html_content;
struct dom_node;
struct dom_element;
struct dom_document;
struct dom_html_element;
struct dom_node_character_data;
struct dom_node_text;
struct dom_node_list;
struct dom_node_comment;
struct dom_html_collection;
struct dom_html_br_element;


#include "build/Linux-gtk3/duktape/binding.h"
#include "build/Linux-gtk3/duktape/private.h"
#include "build/Linux-gtk3/duktape/prototype.h"

#include "javascript/duktape/dukky.h"

duk_bool_t
dukky_event_modifier_init_get_ctrlKey(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of ctrlKey */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "ctrlKey");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_shiftKey(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of shiftKey */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "shiftKey");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_altKey(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of altKey */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "altKey");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_metaKey(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of metaKey */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "metaKey");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierAltGraph(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierAltGraph */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierAltGraph");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierCapsLock(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierCapsLock */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierCapsLock");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierFn(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierFn */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierFn");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierFnLock(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierFnLock */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierFnLock");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierHyper(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierHyper */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierHyper");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierNumLock(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierNumLock */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierNumLock");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierOS(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierOS */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierOS");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierScrollLock(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierScrollLock */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierScrollLock");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierSuper(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierSuper */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierSuper");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierSymbol(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierSymbol */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierSymbol");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

duk_bool_t
dukky_event_modifier_init_get_modifierSymbolLock(duk_context *ctx, duk_idx_t idx)
{
	duk_bool_t ret = false; /* Default value of modifierSymbolLock */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "modifierSymbolLock");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a boolean */
		ret = duk_require_boolean(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}


