X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugins%2Fdali-script-v8%2Fsrc%2Fcontrols%2Fcontrol-wrapper.cpp;h=b3cc3dc3354a74f509e428c7b9495ee79bef32c2;hb=8c39cebb2a9fdaaad0492de1665bad112d3176f6;hp=09093a2bd2b8f6d155ba93df96bf8f5ba35ade0e;hpb=6e1c16f82d6ea3d44f74e4dc11212ac18c963ef4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/plugins/dali-script-v8/src/controls/control-wrapper.cpp b/plugins/dali-script-v8/src/controls/control-wrapper.cpp index 09093a2..b3cc3dc 100644 --- a/plugins/dali-script-v8/src/controls/control-wrapper.cpp +++ b/plugins/dali-script-v8/src/controls/control-wrapper.cpp @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include +#include #include #include @@ -35,6 +36,7 @@ namespace V8Plugin v8::Persistent ControlWrapper::mControlTemplate; v8::Persistent ControlWrapper::mItemViewTemplate; +v8::Persistent ControlWrapper::mScrollViewTemplate; Vector< void* > ControlWrapper::mControlGarbageContainer; @@ -56,7 +58,8 @@ struct ControlTemplate const ControlTemplate ControlTemplateLookup[]= { { &ControlWrapper::mControlTemplate }, // CONTROL - { &ControlWrapper::mItemViewTemplate } // ITEMVIEW + { &ControlWrapper::mItemViewTemplate }, // ITEMVIEW + { &ControlWrapper::mScrollViewTemplate } // SCROLLVIEW }; /** @@ -65,7 +68,8 @@ const ControlTemplate ControlTemplateLookup[]= enum ControlApiBitMask { CONTROL_API = 1 << 0, - ITEMVIEW_API = 1 << 1 + ITEMVIEW_API = 1 << 1, + SCROLLVIEW_API = 1 << 2 }; /** @@ -87,6 +91,7 @@ const ControlApiStruct ControlApiLookup[]= { {"Control", ControlWrapper::CONTROL, NULL, CONTROL_API }, {"ItemView", ControlWrapper::ITEMVIEW, ItemViewApi::New, CONTROL_API | ITEMVIEW_API }, + {"ScrollView", ControlWrapper::SCROLLVIEW, ScrollViewApi::New, CONTROL_API | SCROLLVIEW_API } }; const unsigned int ControlApiLookupCount = sizeof(ControlApiLookup)/sizeof(ControlApiLookup[0]); @@ -171,6 +176,19 @@ const ControlFunctions ControlFunctionTable[]= { "GetItemId", ItemViewApi::GetItemId, ITEMVIEW_API }, { "GetItemsRange", ItemViewApi::GetItemsRange, ITEMVIEW_API }, + /************************************** + * ScrollView API + **************************************/ + { "SetScrollMode", ScrollViewApi::SetScrollMode, SCROLLVIEW_API }, + { "GetCurrentPage", ScrollViewApi::GetCurrentPage, SCROLLVIEW_API }, + { "ScrollToPosition", ScrollViewApi::ScrollToPosition, SCROLLVIEW_API }, + { "ScrollToPage", ScrollViewApi::ScrollToPage, SCROLLVIEW_API }, + { "ScrollToActor", ScrollViewApi::ScrollToActor, SCROLLVIEW_API }, + { "ScrollToSnapInterval", ScrollViewApi::ScrollToSnapInterval, SCROLLVIEW_API }, + { "SetScrollFlickAlphaFunction", ScrollViewApi::SetScrollFlickAlphaFunction, SCROLLVIEW_API }, + { "SetScrollSnapAlphaFunction", ScrollViewApi::SetScrollSnapAlphaFunction, SCROLLVIEW_API }, + { "SetSnapOvershootAlphaFunction", ScrollViewApi::SetSnapOvershootAlphaFunction, SCROLLVIEW_API }, + }; const unsigned int ControlFunctionTableCount = sizeof(ControlFunctionTable)/sizeof(ControlFunctionTable[0]);