1 #ifndef DALI_V8PLUGIN_TEXTURE_SET_WRAPPER_H
2 #define DALI_V8PLUGIN_TEXTURE_SET_WRAPPER_H
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
23 #include <dali/public-api/rendering/texture-set.h>
26 #include <object/handle-wrapper.h>
36 * A TextureSet wrapper.
37 * Provides access to TextureSet specific functionality and V8 memory handling.
39 class TextureSetWrapper : public BaseWrappedObject
46 * @param[in] textureSet DALi TextureSet
47 * @param[in] gc garbage collection interface
49 TextureSetWrapper( const TextureSet& textureSet,
50 GarbageCollectorInterface& gc );
55 virtual ~TextureSetWrapper()
60 * @brief Creates a new TextureSet wrapped inside a Javascript Object.
61 * @param[in] args v8 function call arguments interpreted
63 static void NewTextureSet( const v8::FunctionCallbackInfo< v8::Value >& args);
68 static v8::Handle<v8::Object> WrapTextureSet(v8::Isolate* isolate, const Dali::TextureSet& );
71 // The TextureSetAttribute ObjectTemplate, we cache templates so we don't have
72 // keep generating them everytime we want to create a TextureSet
73 static v8::Persistent<v8::ObjectTemplate> mTextureSetTemplate;
76 * @brief Gets the handle of TextureSet
77 * @return the handle of the TextureSet
79 TextureSet GetTextureSet();
85 TextureSet mTextureSet;
88 * @brief Creates the object template that used to create TextureSets at runtime
89 * @param[in] isolate v8 isolated instance
90 * @return the object template
92 static v8::Handle<v8::ObjectTemplate> MakeTextureSetTemplate( v8::Isolate* isolate );
95 * @brief Gets the object template that used to create TextureSets at runtime
96 * @param[in] isolate v8 isolated instance
97 * @return the object template
99 static v8::Local<v8::ObjectTemplate> GetTextureSetTemplate( v8::Isolate* isolate );
103 } // namespace V8Plugin
107 #endif // DALI_V8PLUGIN_TEXTURE_SET_WRAPPER_H