/* 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"

/* Dictionary HitRegionOptions:path unhandled type (1) */

/* Dictionary HitRegionOptions:fillRule unhandled type (1) */

const char *
dukky_hit_region_options_get_id(duk_context *ctx, duk_idx_t idx)
{
	const char *ret = ""; /* Default value of id */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "id");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a string */
		ret = duk_require_string(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

const char *
dukky_hit_region_options_get_parentID(duk_context *ctx, duk_idx_t idx)
{
	const char *ret = "NULL"; /* Default value of parentID */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "parentID");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a string */
		ret = duk_require_string(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

const char *
dukky_hit_region_options_get_cursor(duk_context *ctx, duk_idx_t idx)
{
	const char *ret = "inherit"; /* Default value of cursor */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "cursor");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a string */
		ret = duk_require_string(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

/* Dictionary HitRegionOptions:control unhandled type (1) */

const char *
dukky_hit_region_options_get_label(duk_context *ctx, duk_idx_t idx)
{
	const char *ret = "NULL"; /* Default value of label */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "label");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a string */
		ret = duk_require_string(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}

const char *
dukky_hit_region_options_get_role(duk_context *ctx, duk_idx_t idx)
{
	const char *ret = "NULL"; /* Default value of role */
	/* ... obj@idx ... */
	duk_get_prop_string(ctx, idx, "role");
	/* ... obj@idx ... value/undefined */
	if (!duk_is_undefined(ctx, -1)) {
		/* Note, this throws a duk_error if it's not a string */
		ret = duk_require_string(ctx, -1);
	}
	duk_pop(ctx);
	return ret;
}


