summaryrefslogtreecommitdiff
path: root/plugins/Skins/SkinLib/V8Wrappers.h
blob: b2c5eb2b92527c5016c0ed860efe22bebb5db3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __V8_WRAPPERS_H__
# define __V8_WRAPPERS_H__

#include "V8Templates.h"
#include "SkinOptions.h"


class V8Wrappers : public V8Templates
{
public:
	virtual v8::Handle<v8::Object> newState(FieldType type);
	virtual void fillState(v8::Handle<v8::Object> obj, FieldState *state);

	virtual v8::Handle<v8::ObjectTemplate> getOptionsTemplate();
	virtual v8::Handle<v8::Object> newOptions();
	virtual void fillOptions(v8::Handle<v8::Object> v8Obj, SkinOptions *obj, bool configure);

	virtual v8::Handle<v8::ObjectTemplate> getDialogInfoTemplate();
	virtual v8::Handle<v8::Object> newDialogInfo();
	virtual void fillDialogInfo(v8::Handle<v8::Object> v8Obj, DialogInfo *obj, const char *prefix = NULL);

private:
	v8::Persistent<v8::ObjectTemplate> optionsTemplate;
	v8::Persistent<v8::ObjectTemplate> dialogInfoTemplate;

protected:
	virtual void addGlobalTemplateFields(v8::Handle<v8::ObjectTemplate> &templ);

	virtual void addSkinOptionTemplateFields(v8::Handle<v8::ObjectTemplate> &templ);

};



#endif // __V8_WRAPPERS_H__