From 05f6cf3f7788f8bfe5ee589a9f27a89217c67989 Mon Sep 17 00:00:00 2001 From: pescuma Date: Sat, 3 Jan 2009 05:12:30 +0000 Subject: skins: It's ALIVE! git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@121 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/skins/SkinLib/FontState_v8_wrapper.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Plugins/skins/SkinLib/FontState_v8_wrapper.cpp') 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 property, Local value, } +static Handle Get_FontState_color(Local property, const AccessorInfo &info) +{ + Local self = info.Holder(); + Local wrap = Local::Cast(self->GetInternalField(0)); + FontState *tmp = (FontState *) wrap->Value(); + return Int32::New(tmp->getColor()); +} + +static void Set_FontState_color(Local property, Local value, const AccessorInfo& info) +{ + Local self = info.Holder(); + Local wrap = Local::Cast(self->GetInternalField(0)); + FontState *tmp = (FontState *) wrap->Value(); + tmp->setColor(value->Int32Value()); +} + + void AddFontStateAcessors(Handle &templ) { templ->SetAccessor(String::New("face"), Get_FontState_face, Set_FontState_face); @@ -125,4 +142,5 @@ void AddFontStateAcessors(Handle &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); } -- cgit v1.2.3