diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-01-03 05:12:30 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-01-03 05:12:30 +0000 |
commit | 05f6cf3f7788f8bfe5ee589a9f27a89217c67989 (patch) | |
tree | a39f988ad4391eb4cb4d62c5643c01cae5af13e3 /Plugins/skins/SkinLib/FontState_v8_wrapper.cpp | |
parent | bb6784e0e1a385cdd20b41d3254093e89a210332 (diff) |
skins: It's ALIVE!
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@121 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/skins/SkinLib/FontState_v8_wrapper.cpp')
-rw-r--r-- | Plugins/skins/SkinLib/FontState_v8_wrapper.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Plugins/skins/SkinLib/FontState_v8_wrapper.cpp b/Plugins/skins/SkinLib/FontState_v8_wrapper.cpp index 38e3390..fd0cb5f 100644 --- a/Plugins/skins/SkinLib/FontState_v8_wrapper.cpp +++ b/Plugins/skins/SkinLib/FontState_v8_wrapper.cpp @@ -117,6 +117,23 @@ static void Set_FontState_strikeOut(Local<String> property, Local<Value> value, }
+static Handle<Value> Get_FontState_color(Local<String> property, const AccessorInfo &info)
+{
+ Local<Object> self = info.Holder();
+ Local<External> wrap = Local<External>::Cast(self->GetInternalField(0));
+ FontState *tmp = (FontState *) wrap->Value();
+ return Int32::New(tmp->getColor());
+}
+
+static void Set_FontState_color(Local<String> property, Local<Value> value, const AccessorInfo& info)
+{
+ Local<Object> self = info.Holder();
+ Local<External> wrap = Local<External>::Cast(self->GetInternalField(0));
+ FontState *tmp = (FontState *) wrap->Value();
+ tmp->setColor(value->Int32Value());
+}
+
+
void AddFontStateAcessors(Handle<ObjectTemplate> &templ)
{
templ->SetAccessor(String::New("face"), Get_FontState_face, Set_FontState_face);
@@ -125,4 +142,5 @@ void AddFontStateAcessors(Handle<ObjectTemplate> &templ) templ->SetAccessor(String::New("bold"), Get_FontState_bold, Set_FontState_bold);
templ->SetAccessor(String::New("underline"), Get_FontState_underline, Set_FontState_underline);
templ->SetAccessor(String::New("strikeOut"), Get_FontState_strikeOut, Set_FontState_strikeOut);
+ templ->SetAccessor(String::New("color"), Get_FontState_color, Set_FontState_color);
}
|