| 1 | // Aseprite | 
|---|
| 2 | // Copyright (C) 2019  Igara Studio S.A. | 
|---|
| 3 | // | 
|---|
| 4 | // This program is distributed under the terms of | 
|---|
| 5 | // the End-User License Agreement for Aseprite. | 
|---|
| 6 |  | 
|---|
| 7 | #ifndef APP_SCRIPT_VALUES_H_INCLUDED | 
|---|
| 8 | #define APP_SCRIPT_VALUES_H_INCLUDED | 
|---|
| 9 | #pragma once | 
|---|
| 10 |  | 
|---|
| 11 | #ifdef ENABLE_SCRIPTING | 
|---|
| 12 |  | 
|---|
| 13 | extern "C"struct lua_State; | 
|---|
| 14 |  | 
|---|
| 15 | namespace app { | 
|---|
| 16 | namespace script { | 
|---|
| 17 |  | 
|---|
| 18 | template<typename T> | 
|---|
| 19 | T get_value_from_lua(lua_State* L, int index); | 
|---|
| 20 |  | 
|---|
| 21 | template<typename T> | 
|---|
| 22 | void push_value_to_lua(lua_State* L, const T& value); | 
|---|
| 23 |  | 
|---|
| 24 | } // namespace script | 
|---|
| 25 | } // namespace app | 
|---|
| 26 |  | 
|---|
| 27 | #endif  // ENABLE_SCRIPTING | 
|---|
| 28 |  | 
|---|
| 29 | #endif | 
|---|
| 30 |  | 
|---|