<commit_before>/*
 * JSDX Framework
 *
 * Copyright(c) 2012 <NAME> <<EMAIL>>
 *
 */

#include <v8.h>
#include <node.h>
#include <clutter/clutter.h>
#include <mx/mx.h>
#include <sys/time.h>
#include <string.h>
#include <math.h>

#include "../jsdx_toolkit.hpp"
#include "../actor.hpp"
#include "bin.hpp"
#include "scrollable.hpp"
#include "kinetic_scrollview.hpp"

namespace JSDXToolkit {
 
	using namespace node;
	using namespace v8;

	Persistent<FunctionTemplate> KineticScrollView::constructor;

	KineticScrollView::KineticScrollView() : Bin() {
		_actor = mx_kinetic_scroll_view_new();

		mx_kinetic_scroll_view_set_overshoot(MX_KINETIC_SCROLL_VIEW(_actor), 0.2);
	}

	void KineticScrollView::Initialize(Handle<Object> target)
	{
		HandleScope scope;

		Local<FunctionTemplate> tpl = FunctionTemplate::New(New);
		Local<String> name = String::NewSymbol("KineticScrollView");

		/* Constructor */
		constructor = Persistent<FunctionTemplate>::New(tpl);
		constructor->InstanceTemplate()->SetInternalFieldCount(1);
		constructor->SetClassName(name);

		/* Methods */
		Bin::PrototypeMethodsInit(constructor);

		constructor->InstanceTemplate()->SetAccessor(String::NewSymbol("policy_horizontal"), KineticScrollView::PolicyHorizontalGetter, KineticScrollView::PolicyHorizontalSetter);
		constructor->InstanceTemplate()->SetAccessor(String::NewSymbol("policy_vertical"), KineticScrollView::PolicyVerticalGetter, KineticScrollView::PolicyVerticalSetter);

		target->Set(name, constructor->GetFunction());
	}

	/* ECMAScript constructor */
	Handle<Value> KineticScrollView::New(const Arguments& args)<commit_msg>kinetic scrollview will capture event by default<commit_after>/*
 * JSDX Framework
 *
 * Copyright(c) 2012 <NAME> <<EMAIL>>
 *
 */

#include <v8.h>
#include <node.h>
#include <clutter/clutter.h>
#include <mx/mx.h>
#include <sys/time.h>
#include <string.h>
#include <math.h>

#include "../jsdx_toolkit.hpp"
#include "../actor.hpp"
#include "bin.hpp"
#include "scrollable.hpp"
#include "kinetic_scrollview.hpp"

namespace JSDXToolkit {
 
	using namespace node;
	using namespace v8;

	Persistent<FunctionTemplate> KineticScrollView::constructor;

	KineticScrollView::KineticScrollView() : Bin() {
		_actor = mx_kinetic_scroll_view_new();

		mx_kinetic_scroll_view_set_use_captured(MX_KINETIC_SCROLL_VIEW(_actor), TRUE);
		mx_kinetic_scroll_view_set_overshoot(MX_KINETIC_SCROLL_VIEW(_actor), 0.2);
	}

	void KineticScrollView::Initialize(Handle<Object> target)
	{
		HandleScope scope;

		Local<FunctionTemplate> tpl = FunctionTemplate::New(New);
		Local<String> name = String::NewSymbol("KineticScrollView");

		/* Constructor */
		constructor = Persistent<FunctionTemplate>::New(tpl);
		constructor->InstanceTemplate()->SetInternalFieldCount(1);
		constructor->SetClassName(name);

		/* Methods */
		Bin::PrototypeMethodsInit(constructor);

		constructor->InstanceTemplate()->SetAccessor(String::NewSymbol("policy_horizontal"), KineticScrollView::PolicyHorizontalGetter, KineticScrollView::PolicyHorizontalSetter);
		constructor->InstanceTemplate()->SetAccessor(String::NewSymbol("policy_vertical"), KineticScrollView::PolicyVerticalGetter, KineticScrollView::PolicyVerticalSetter);

		target->Set(name, constructor->GetFunction());
	}

	/* ECMAScript constructor */
	Handle<Value> KineticScrollView::New(const Arguments& args)
{'fraction_non_alphanumeric': 0.13925570228091236, 'fraction_numerical': 0.005402160864345739, 'mean_word_length': 7.270471464019852, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6594210', 'n_tokens_mistral': 1126, 'n_tokens_neox': 1042, 'n_words': 165}