#include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
+// Macro to append SWIG_CSharpException message file/line/function.
+#define SWIG_EXCEPTION_MESSAGE(code, what, filename, linenumber, funcname) \
+do \
+{ \
+ std::string message(what); \
+ std::stringstream fileAndLine; \
+ fileAndLine << " file: " << (filename) << " line: " << (linenumber) << " func: " << (funcname); \
+ message += fileAndLine.str(); \
+ SWIG_CSharpException((code), message.c_str()); \
+} while (0)
+#define SWIG_EXCEPTION_WITH_FILE_AND_LINE(code, what) \
+SWIG_EXCEPTION_MESSAGE(code, what, __FILE__, __LINE__, __FUNCTION__)
+
+#include <cxxabi.h>
// Define Catch exception
-#define CALL_CATCH_EXCEPTION(ret) \
- catch (std::out_of_range & e) \
- { \
- std::string message(const_cast<char *>(e.what())); \
- std::stringstream fileAndLine; \
- fileAndLine << " file: " << __FILE__ << " line: " << __LINE__ << " func: " << __FUNCTION__; \
- message += fileAndLine.str(); \
- SWIG_CSharpException(SWIG_IndexError, message.c_str()); \
- return ret; \
- } \
- catch (std::exception & e) \
- { \
- std::string message(const_cast<char *>(e.what())); \
- std::stringstream fileAndLine; \
- fileAndLine << " file: " << __FILE__ << " line: " << __LINE__ << " func: " << __FUNCTION__; \
- message += fileAndLine.str(); \
- SWIG_CSharpException(SWIG_RuntimeError, message.c_str()); \
- return ret; \
- } \
- catch (Dali::DaliException e) \
- { \
- std::string message(e.condition); \
- std::stringstream fileAndLine; \
- fileAndLine << " file: " << __FILE__ << " line: " << __LINE__ << " func: " << __FUNCTION__; \
- message += fileAndLine.str(); \
- SWIG_CSharpException(SWIG_SystemError, message.c_str()); \
- return ret; \
- } \
- catch (...) \
- { \
- std::string message("unknown error"); \
- std::stringstream fileAndLine; \
- fileAndLine << " file: " << __FILE__ << " line: " << __LINE__ << " func: " << __FUNCTION__; \
- message += fileAndLine.str(); \
- SWIG_CSharpException(SWIG_UnknownError, message.c_str()); \
- return ret; \
+#define CALL_CATCH_EXCEPTION(ret) \
+ catch (std::out_of_range & e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_IndexError, const_cast<char *>(e.what())); \
+ return ret; \
+ } \
+ catch (std::exception & e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_RuntimeError, const_cast<char *>(e.what())); \
+ return ret; \
+ } \
+ catch (Dali::DaliException e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_SystemError, e.condition); \
+ return ret; \
+ } \
+ catch (abi::__forced_unwind & e) \
+ { \
+ /* Throwed by pthread API. just igore and rethrow */ \
+ throw; \
+ } \
+ catch (...) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_UnknownError, "unknown error"); \
+ return ret; \
+ }
+
+// Define Catch exception without rethrow
+#define CALL_CATCH_EXCEPTION_ALWAYS(ret) \
+ catch (std::out_of_range & e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_IndexError, const_cast<char *>(e.what())); \
+ return ret; \
+ } \
+ catch (std::exception & e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_RuntimeError, const_cast<char *>(e.what())); \
+ return ret; \
+ } \
+ catch (Dali::DaliException e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_SystemError, e.condition); \
+ return ret; \
+ } \
+ catch (...) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_UnknownError, "unknown error"); \
+ return ret; \
+ }
+
+// Define Catch exception with inputed file and line infomations
+#define CALL_CATCH_EXCEPTION_WITH_CUSTOM_FILE_AND_LINE(ret, filename, linenumber, funcname) \
+ catch (std::out_of_range & e) \
+ { \
+ SWIG_EXCEPTION_MESSAGE(SWIG_IndexError, const_cast<char *>(e.what()), (filename), (linenumber), (funcname)); \
+ return ret; \
+ } \
+ catch (std::exception & e) \
+ { \
+ SWIG_EXCEPTION_MESSAGE(SWIG_RuntimeError, const_cast<char *>(e.what()), (filename), (linenumber), (funcname)); \
+ return ret; \
+ } \
+ catch (Dali::DaliException e) \
+ { \
+ SWIG_EXCEPTION_MESSAGE(SWIG_SystemError, e.condition, (filename), (linenumber), (funcname)); \
+ return ret; \
+ } \
+ catch (abi::__forced_unwind & e) \
+ { \
+ /* Throwed by pthread API. just igore and rethrow */ \
+ throw; \
+ } \
+ catch (...) \
+ { \
+ SWIG_EXCEPTION_MESSAGE(SWIG_UnknownError, "unknown error", (filename), (linenumber), (funcname)); \
+ return ret; \
+ }
+
+// Define Catch exception if we need extra job before return
+#define CALL_CATCH_EXCEPTION_WITH_FUNCTION(ret, func, ...) \
+ catch (std::out_of_range & e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_IndexError, const_cast<char *>(e.what())); \
+ (*(func))(__VA_ARGS__); \
+ return ret; \
+ } \
+ catch (std::exception & e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_RuntimeError, const_cast<char *>(e.what())); \
+ (*(func))(__VA_ARGS__); \
+ return ret; \
+ } \
+ catch (Dali::DaliException e) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_SystemError, e.condition); \
+ (*(func))(__VA_ARGS__); \
+ return ret; \
+ } \
+ catch (abi::__forced_unwind & e) \
+ { \
+ /* Throwed by pthread API. just igore and rethrow */ \
+ throw; \
+ } \
+ catch (...) \
+ { \
+ SWIG_EXCEPTION_WITH_FILE_AND_LINE(SWIG_UnknownError, "unknown error"); \
+ (*(func))(__VA_ARGS__); \
+ return ret; \
}
+#define GUARD_ON_NULL_RET(arg_name) \
+ if (!(arg_name)) { \
+ std::stringstream output; \
+ output << __FUNCTION__ << " is not allowed to take nullptr as " << #arg_name; \
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, output.str().c_str(), #arg_name); \
+ return; \
+ }
+
+#define GUARD_ON_NULL_RET0(arg_name) \
+ if (!(arg_name)) { \
+ std::stringstream output; \
+ output << __FUNCTION__ << " is not allowed to take nullptr as " << #arg_name; \
+ SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, output.str().c_str(), #arg_name); \
+ return 0; \
+ }
+
+namespace {
+
+// Define useful utils with lambda function
+inline void internal_try_catch(const std::function<void(void)>& func, const char* filename, const int& linenumber, const char* funcname) {
+ try {
+ func();
+ } CALL_CATCH_EXCEPTION_WITH_CUSTOM_FILE_AND_LINE(, filename, linenumber, funcname);
+}
+
+#ifdef try_catch
+#undef try_catch
+#endif
+// Define try_catch macro to get correct line and function_name
+// NOTE: when lamda function use comma(,) at template, compiler think this is kind of argment divisor.
+// This is compiler bug. So we need to cover the function by additional parentheses.
+#define try_catch(func) internal_try_catch((func), __FILE__, __LINE__, __FUNCTION__)
+
+} // anonymous namespace
+
#endif // CSHARP_COMMON_H
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityActivateSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityActivateSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityActivateSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityReadingSkippedSignal(void* arg1) {
Dali::Toolkit::DevelControl::AccessibilityReadingSkippedSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityReadingSkippedSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityReadingPausedSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityReadingPausedSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityReadingPausedSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityReadingResumedSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityReadingResumedSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityReadingResumedSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityReadingCancelledSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityReadingCancelledSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityReadingCancelledSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityReadingStoppedSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityReadingStoppedSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityReadingStoppedSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityGetNameSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityGetNameSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityGetNameSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityGetDescriptionSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityGetDescriptionSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityGetDescriptionSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityDoGestureSignal(void *arg1) {
Dali::Toolkit::DevelControl::AccessibilityDoGestureSignalType *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Toolkit::Control* control = (Dali::Toolkit::Control*) arg1;
result = &(AccessibilityDoGestureSignal(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AppendAccessibilityRelation(void *arg1, void *arg2, int arg3) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
Dali::Actor *destination = (Dali::Actor*) arg2;
Dali::Accessibility::RelationType relation = (Dali::Accessibility::RelationType) arg3;
AppendAccessibilityRelation(*control, *destination, relation);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_RemoveAccessibilityRelation(void *arg1, void *arg2, int arg3) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
Dali::Actor *destination = (Dali::Actor*) arg2;
Dali::Accessibility::RelationType relation = (Dali::Accessibility::RelationType) arg3;
RemoveAccessibilityRelation(*control, *destination, relation);
- });
+ }));
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_new_GetAccessibilityRelations(void *arg1) {
std::vector<std::vector<Dali::Accessibility::Address>> *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
result = new std::vector<std::vector<Dali::Accessibility::Address>>(GetAccessibilityRelations(*control));
- });
+ }));
return (void*)result;
}
//SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityRelations_Size(void *arg1) {
// unsigned int result = 0;
// GUARD_ON_NULL_RET0(arg1);
-// try_catch([&]() {
+// try_catch(([&]() {
// auto *vect = (std::vector<std::vector<Dali::Accessibility::Address>>*) arg1;
// result = vect->size();
-// });
+// }));
// return result;
//}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AccessibilityRelations_RelationSize(void *arg1, int rel) {
unsigned int result = 0;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto *vect = (std::vector<std::vector<Dali::Accessibility::Address>>*) arg1;
if (((unsigned int) rel) >= vect->size())
result = 0;
else
result = vect->at(rel).size();
- });
+ }));
return result;
}
SWIGEXPORT char * SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_new_GetAccessibilityRelations_At(void *arg1, int rel, int pos, int id) {
GUARD_ON_NULL_RET0(arg1);
char *result = nullptr;
- try_catch([&]() {
+ try_catch(([&]() {
auto *vect = (std::vector<std::vector<Dali::Accessibility::Address>>*) arg1;
const auto &r = vect->at(rel);
const auto &e = r.at(pos);
if (id == 1)
result = SWIG_csharp_string_callback(e.GetPath().c_str());
- });
+ }));
return result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_delete_AccessibilityRelations(void *arg1) {
- try_catch([&]() {
+ try_catch(([&]() {
delete static_cast<std::vector<std::vector<Dali::Accessibility::Address>>*>(arg1);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_ClearAccessibilityRelations(void *arg1) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
ClearAccessibilityRelations(*control);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_AppendAccessibilityAttribute(void *arg1, char *arg2, char *arg3) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
GUARD_ON_NULL_RET(arg3);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
const std::string key(arg2);
const std::string value(arg3);
AppendAccessibilityAttribute(*control, key, value);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_RemoveAccessibilityAttribute(void *arg1, char *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
const std::string key(arg2);
RemoveAccessibilityAttribute(*control, key);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_ClearAccessibilityAttributes(void *arg1) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
ClearAccessibilityAttributes(*control);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_SetAccessibilityReadingInfoType2(void *arg1, int arg2) {
&& static_cast<int>(ReadingInfoType::STATE) == 3, "C++ and C# bindings does not match");
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
std::array<uint32_t, 1> data;
data[0] = arg2;
Dali::Actor *control = (Dali::Actor*) arg1;
SetAccessibilityReadingInfoType(*control, ReadingInfoTypes(data));
- });
+ }));
}
SWIGEXPORT int SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_GetAccessibilityReadingInfoType2(void *arg1) {
int result = 0;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto readingInfo = GetAccessibilityReadingInfoType(*control);
result = readingInfo.GetRawData()[0];
- });
+ }));
return result;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_ClearAccessibilityHighlight(void *arg1) {
bool result = false;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
result = ClearAccessibilityHighlight(*control);
- });
+ }));
return result;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_GrabAccessibilityHighlight(void *arg1) {
bool result = false;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
result = GrabAccessibilityHighlight(*control);
- });
+ }));
return result;
}
// TODO - DEPRECATED - REMOVE AFTER TIZENFX MERGE
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_new_States() {
Dali::Accessibility::States *result = nullptr;
- try_catch([&]() {
+ try_catch(([&]() {
result = new Dali::Accessibility::States();
- });
+ }));
return (void*)result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_new_GetAccessibilityStates(void *arg1) {
Dali::Accessibility::States *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
result = new Dali::Accessibility::States(GetAccessibilityStates(*control));
- });
+ }));
return (void*)result;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_States_Get(void *arg1, int arg2) {
bool result = false;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Accessibility::States *states = (Dali::Accessibility::States*) arg1;
Dali::Accessibility::State state = (Dali::Accessibility::State) arg2;
result = states->operator[](state);
- });
+ }));
return result;
}
// TODO - DEPRECATED - REMOVE AFTER TIZENFX MERGE
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_States_Set(void *arg1, int arg2, int arg3) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Accessibility::States *states = (Dali::Accessibility::States*) arg1;
Dali::Accessibility::State state = (Dali::Accessibility::State) arg2;
states->operator[](state) = (bool)arg3;
- });
+ }));
}
// TODO - DEPRECATED - REMOVE AFTER TIZENFX MERGE
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_delete_States(void *arg1) {
- try_catch([&]() {
+ try_catch(([&]() {
delete static_cast<Dali::Accessibility::States*>(arg1);
- });
+ }));
}
// TODO - DEPRECATED - REMOVE AFTER TIZENFX MERGE
SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_States_Copy(void *arg1) {
Dali::Accessibility::States *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto &states = *static_cast<Dali::Accessibility::States *>(arg1);
result = new Dali::Accessibility::States(states);
- });
+ }));
return result;
}
SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_ConvertState(uint64_t arg1) {
Dali::Accessibility::States *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
std::array<uint32_t, 2> data;
data[0] = static_cast<uint32_t>(arg1);
data[1] = static_cast<uint32_t>(arg1 >> 32);
result = new Dali::Accessibility::States(data);
- });
+ }));
return result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_NotifyAccessibilityStateChange(void *arg1, void *arg2, int arg3) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
Dali::Accessibility::States *states = (Dali::Accessibility::States*) arg2;
bool isRecursive = arg3 ? true : false;
NotifyAccessibilityStateChange(*control, *states, isRecursive);
- });
+ }));
}
SWIGEXPORT uint64_t SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_GetAccessibilityState(void *arg1) {
uint64_t result = 0;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto states = GetAccessibilityStates(*control);
result = states.GetRawData()[0];
uint64_t high = states.GetRawData()[1];
result |= (high << 32);
- });
+ }));
return result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_NotifyAccessibilityStateChange2(void *arg1, uint64_t arg2, int arg3) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
std::array<uint32_t, 2> data;
data[0] = static_cast<uint32_t>(arg2);
data[1] = static_cast<uint32_t>(arg2 >> 32);
Dali::Actor *control = (Dali::Actor*) arg1;
bool doRecursive = arg3 ? true : false;
NotifyAccessibilityStateChange(*control, states, doRecursive);
- });
+ }));
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Toolkit_DevelControl_GetBoundAccessibilityObject(void *arg1) {
Dali::Accessibility::Accessible *result = nullptr;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
result = GetBoundAccessibilityObject(*control);
- });
+ }));
return (void*)result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitAccessibilityEvent(void *arg1, int arg2_event) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto accessible = GetBoundAccessibilityObject(*control);
if (accessible)
accessible->Emit((Dali::Accessibility::ObjectPropertyChangeEvent)arg2_event);
else
SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
- });
+ }));
}
// TODO - DEPRECATED - REMOVE AFTER TIZENFX MERGE
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitAccessibilityStateChangedEvent(void *arg1, int arg2_state, int arg3) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto accessible = GetBoundAccessibilityObject(*control);
if (accessible)
accessible->EmitStateChanged((Dali::Accessibility::State)arg2_state, arg3);
else
SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitAccessibilityStateChangedEvent2(void *arg1, uint64_t arg2_state_bitfield, int arg3) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
/* Only one state may be passed with EmitStateChanged function */
/* TODO: replace with std::popcount() after migration to c++20 */
if (1 != __builtin_popcountll(arg2_state_bitfield)) {
accessible->EmitStateChanged((Dali::Accessibility::State)state, arg3);
else
SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitTextInsertedEvent(void *arg1, int arg2_position, int arg3_length, char *arg4_content) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto accessible = GetBoundAccessibilityObject(*control);
std::string content(arg4_content ? arg4_content : "");
accessible->EmitTextInserted(arg2_position, arg3_length, content);
else
SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitTextDeletedEvent(void *arg1, int arg2_position, int arg3_length, char *arg4_content) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto accessible = GetBoundAccessibilityObject(*control);
std::string content(arg4_content ? arg4_content : "");
accessible->EmitTextDeleted(arg2_position, arg3_length, content);
else
SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_EmitTextCursorMovedEvent(void *arg1, int arg2_position) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *control = (Dali::Actor*) arg1;
auto accessible = GetBoundAccessibilityObject(*control);
if (accessible)
accessible->EmitTextCursorMoved(arg2_position);
else
SWIG_CSharpException(SWIG_RuntimeError, "Actor does not have accessible object.");
- });
+ }));
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Accessibility_new_Range(int arg1_start, int arg2_end, char *arg3_content) {
Dali::Accessibility::Range *result = nullptr;
- try_catch([&]() {
+ try_catch(([&]() {
result = new Dali::Accessibility::Range(arg1_start, arg2_end, arg3_content);
- });
+ }));
return (void*)result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_delete_Range(void *arg1_range) {
- try_catch([&]() {
+ try_catch(([&]() {
delete static_cast<Dali::Accessibility::Range*>(arg1_range);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_Bridge_Add_Popup(void *arg1_actor) {
GUARD_ON_NULL_RET(arg1_actor);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *actor = (Dali::Actor*) arg1_actor;
auto accessible = Dali::Accessibility::Accessible::Get(*actor);
auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge();
}
bridge->AddPopup(accessible);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_Bridge_Remove_Popup(void *arg1_actor) {
GUARD_ON_NULL_RET(arg1_actor);
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor *actor = (Dali::Actor*) arg1_actor;
auto accessible = Dali::Accessibility::Accessible::Get(*actor);
auto bridge = Dali::Accessibility::Bridge::GetCurrentBridge();
}
bridge->RemovePopup(accessible);
- });
+ }));
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Accessibility_Accessible_GetCurrentlyHighlightedActor() {
Dali::Actor *result = NULL;
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor actor = Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor();
if (actor)
result = new Dali::Actor(actor);
- });
+ }));
return result;
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Accessibility_Accessible_GetHighlightActor() {
Dali::Actor *result = NULL;
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor actor = Dali::Accessibility::Accessible::GetHighlightActor();
if (actor)
result = new Dali::Actor(actor);
- });
+ }));
return result;
}
// Passing nullptr as actor is used to remove custom highlight,
// what leads to the restoration of default highlight starting
// from next call to GrabHighlight()
- try_catch([&]() {
+ try_catch(([&]() {
Dali::Actor actor = arg1_actor ? *((Dali::Actor*) arg1_actor) : Dali::Actor();
Dali::Accessibility::Accessible::SetHighlightActor(actor);
- });
+ }));
}
#ifdef __cplusplus
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_Empty(void *arg1) {
bool result = false;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (StringToVoidSignal*)arg1;
result = object->Empty();
- });
+ }));
return result;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_GetConnectionCount(void *arg1) {
std::size_t result = 0;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (StringToVoidSignal*)arg1;
result = object->GetConnectionCount();
- });
+ }));
return result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_Connect(void *arg1, void *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (StringToVoidSignal*)arg1;
auto func = (StringToVoidFunc)arg2;
object->Connect(func);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_Disconnect(void *arg1, void *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&] () {
+ try_catch(([&] () {
auto object = (StringToVoidSignal*)arg1;
auto func = (StringToVoidFunc)arg2;
object->Disconnect(func);
- });
+ }));
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_new() {
- try_catch([&]() {
+ try_catch(([&]() {
return new StringToVoidSignal();
- });
+ }));
return nullptr;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_delete(void *arg1) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (StringToVoidSignal*)arg1;
delete object;
- });
+ }));
}
SWIGEXPORT char * SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_GetResult(void *arg1) {
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_StringToVoid_SetResult(void *arg1, char *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
auto result = (std::string*)arg1;
(*result) = arg2;
- });
+ }));
}
/*
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_Empty(void *arg1) {
bool result = false;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (GesturePairSignal*)arg1;
result = object->Empty();
- });
+ }));
return result;
}
SWIGEXPORT unsigned long SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_GetConnectionCount(void *arg1) {
std::size_t result = 0;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (GesturePairSignal*)arg1;
result = object->GetConnectionCount();
- });
+ }));
return result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_Connect(void *arg1, void *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (GesturePairSignal*)arg1;
auto func = (GesturePairFunc)arg2;
object->Connect( func );
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_Disconnect(void *arg1, void *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&] () {
+ try_catch(([&]() {
auto object = (GesturePairSignal*)arg1;
auto func = (GesturePairFunc)arg2;
object->Disconnect(func);
- });
+ }));
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_Emit(void *arg1, void *arg2) {
GUARD_ON_NULL_RET(arg1);
GUARD_ON_NULL_RET(arg2);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (GesturePairSignal*)arg1;
auto gesturePair = (GesturePair*)arg2;
object->Emit(*gesturePair);
- });
+ }));
}
SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_new() {
- try_catch([&]() {
+ try_catch(([&]() {
return new GesturePairSignal();
- });
+ }));
return nullptr;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_delete(void *arg1) {
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto object = (GesturePairSignal*)arg1;
delete object;
- });
+ }));
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_GetSizeOfGestureInfo(void) {
SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_GetResult(void *arg1) {
bool result = false;
GUARD_ON_NULL_RET0(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto gesturePair = (GesturePair*)arg1;
result = (bool)gesturePair->second;
- });
+ }));
return result;
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Signal_GesturePairToVoid_SetResult(void *arg1, bool arg2) {
bool result = arg2;
GUARD_ON_NULL_RET(arg1);
- try_catch([&]() {
+ try_catch(([&]() {
auto gesturePair = (GesturePair*)arg1;
gesturePair->second = result;
- });
+ }));
}
#ifdef __cplusplus