}
void SwigDirector_WidgetImpl::OnCreate(std::string const &contentInfo, Dali::Window window) {
- char * jcontentInfo = 0 ;
void * jwindow ;
if (!swig_callbackOnCreate) {
Dali::Internal::Adaptor::Widget::OnCreate(contentInfo,window);
return;
} else {
- jcontentInfo = SWIG_csharp_string_callback((&contentInfo)->c_str());
jwindow = (void *)new Dali::Window((const Dali::Window &)window);
- swig_callbackOnCreate(jcontentInfo, jwindow);
+ swig_callbackOnCreate(contentInfo.c_str(), jwindow);
}
}
void SwigDirector_WidgetImpl::OnTerminate(std::string const &contentInfo, Dali::Widget::Termination type) {
- char * jcontentInfo = 0 ;
int jtype ;
if (!swig_callbackOnTerminate) {
Dali::Internal::Adaptor::Widget::OnTerminate(contentInfo,type);
return;
} else {
- jcontentInfo = SWIG_csharp_string_callback((&contentInfo)->c_str());
jtype = (int)type;
- swig_callbackOnTerminate(jcontentInfo, jtype);
+ swig_callbackOnTerminate(contentInfo.c_str(), jtype);
}
}
}
void SwigDirector_WidgetImpl::OnUpdate(std::string const &contentInfo, int force) {
- char * jcontentInfo = 0 ;
int jforce ;
if (!swig_callbackOnUpdate) {
Dali::Internal::Adaptor::Widget::OnUpdate(contentInfo,force);
return;
} else {
- jcontentInfo = SWIG_csharp_string_callback((&contentInfo)->c_str());
jforce = force;
- swig_callbackOnUpdate(jcontentInfo, jforce);
+ swig_callbackOnUpdate(contentInfo.c_str(), jforce);
}
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
try {
if (jarg3) {
- void (*handler)(char *) = (void (*)(char *))jarg3;
+ void (*handler)(const char *) = (void (*)(const char *))jarg3;
(arg1)->EvaluateJavaScript((std::string const &)*arg2, [handler](const std::string &result) {
- handler(SWIG_csharp_string_callback(result.c_str()));
+ handler(result.c_str());
});
}
else {
Dali::Toolkit::WebView* webview = (Dali::Toolkit::WebView*)jarg1;
std::string exposedObjectName = jarg2;
- void (*handler)(char*) = (void (*)(char*))jarg3;
+ void (*handler)(const char*) = (void (*)(const char*))jarg3;
{
try {
webview->AddJavaScriptMessageHandler(exposedObjectName, [handler](const std::string &message) {
- handler(SWIG_csharp_string_callback(message.c_str()));
+ handler(message.c_str());
});
} CALL_CATCH_EXCEPTION();
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterJavaScriptAlertCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView* webview = (Dali::Toolkit::WebView*)jarg1;
- bool (*handler)(char*) = (bool (*)(char*))jarg2;
+ bool (*handler)(const char*) = (bool (*)(const char*))jarg2;
{
try {
if (handler)
{
webview->RegisterJavaScriptAlertCallback([handler](const std::string &message) -> bool {
- return handler(SWIG_csharp_string_callback(message.c_str()));
+ return handler(message.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterJavaScriptConfirmCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView* webview = (Dali::Toolkit::WebView*)jarg1;
- bool (*handler)(char*) = (bool (*)(char*))jarg2;
+ bool (*handler)(const char*) = (bool (*)(const char*))jarg2;
{
try {
if (handler)
{
webview->RegisterJavaScriptConfirmCallback([handler](const std::string &message) -> bool {
- return handler(SWIG_csharp_string_callback(message.c_str()));
+ return handler(message.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterJavaScriptPromptCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView* webview = (Dali::Toolkit::WebView*)jarg1;
- bool (*handler)(char *, char*) = (bool (*)(char *, char*))jarg2;
+ bool (*handler)(const char *, const char*) = (bool (*)(const char *, const char*))jarg2;
{
try {
{
webview->RegisterJavaScriptPromptCallback([handler](const std::string &message1,
const std::string &message2) -> bool {
- return handler(SWIG_csharp_string_callback(message1.c_str()),
- SWIG_csharp_string_callback(message2.c_str()));
+ return handler(message1.c_str(),
+ message2.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterGeolocationPermissionCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView *arg1 = (Dali::Toolkit::WebView *)jarg1;
- bool (*handler)(char *, char *) = (bool (*)(char *, char *))jarg2;
+ bool (*handler)(const char *, const char *) = (bool (*)(const char *, const char *))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterGeolocationPermissionCallback([handler](const std::string &host, const std::string &protocol) -> bool {
- return handler(SWIG_csharp_string_callback(host.c_str()),
- SWIG_csharp_string_callback(protocol.c_str()));
+ return handler(host.c_str(),
+ protocol.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterPageLoadStartedCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView *arg1 = (Dali::Toolkit::WebView *)jarg1;
- void (*handler)(char*) = (void (*)(char*))jarg2;
+ void (*handler)(const char*) = (void (*)(const char*))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterPageLoadStartedCallback([handler](const std::string& url) {
- handler(SWIG_csharp_string_callback(url.c_str()));
+ handler(url.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterPageLoadInProgressCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView *arg1 = (Dali::Toolkit::WebView *)jarg1;
- void (*handler)(char*) = (void (*)(char*))jarg2;
+ void (*handler)(const char*) = (void (*)(const char*))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterPageLoadInProgressCallback([handler](const std::string& url) {
- handler(SWIG_csharp_string_callback(url.c_str()));
+ handler(url.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterPageLoadFinishedCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView *arg1 = (Dali::Toolkit::WebView *)jarg1;
- void (*handler)(char*) = (void (*)(char*))jarg2;
+ void (*handler)(const char*) = (void (*)(const char*))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterPageLoadFinishedCallback([handler](const std::string& url) {
- handler(SWIG_csharp_string_callback(url.c_str()));
+ handler(url.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_RegisterUrlChangedCallback(void * jarg1, void * jarg2) {
Dali::Toolkit::WebView *arg1 = (Dali::Toolkit::WebView *)jarg1;
- void (*handler)(char*) = (void (*)(char*))jarg2;
+ void (*handler)(const char*) = (void (*)(const char*))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterUrlChangedCallback([handler](const std::string& url) {
- handler(SWIG_csharp_string_callback(url.c_str()));
+ handler(url.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebView_GetPlainTextAsynchronously(void * nuiWebView, void * nuiCallback) {
Dali::Toolkit::WebView *webview = (Dali::Toolkit::WebView *)nuiWebView;
- void (*callback)(char*) = (void (*)(char*))nuiCallback;
+ void (*handler)(const char*) = (void (*)(const char*))nuiCallback;
{
try {
- webview->GetPlainTextAsynchronously([callback](const std::string& url) {
- callback(SWIG_csharp_string_callback(url.c_str()));
+ webview->GetPlainTextAsynchronously([handler](const std::string& url) {
+ handler(url.c_str());
});
} CALL_CATCH_EXCEPTION();
}
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebContext_RegisterDownloadStartedCallback(void * jarg1, void * jarg2) {
Dali::WebEngineContext *arg1 = (Dali::WebEngineContext *)jarg1;
- void (*handler)(char *) = (void (*)(char *))jarg2;
+ void (*handler)(const char *) = (void (*)(const char *))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterDownloadStartedCallback(
[handler](const std::string& url) {
- handler(SWIG_csharp_string_callback(url.c_str()));
+ handler(url.c_str());
});
}
else
SWIGEXPORT void SWIGSTDCALL CSharp_Dali_WebContext_RegisterMimeOverriddenCallback(void *jarg1, void *jarg2) {
Dali::WebEngineContext *arg1 = (Dali::WebEngineContext *)jarg1;
- bool (*handler)(char *, char *, char *) = (bool (*)(char *, char *, char *))jarg2;
+ bool (*handler)(const char *, const char *, const char *) = (bool (*)(const char *, const char *, const char *))jarg2;
{
try {
if (handler)
{
(arg1)->RegisterMimeOverriddenCallback(
[handler](const std::string& url, const std::string& mime, std::string& newMime) -> bool {
- return handler(SWIG_csharp_string_callback(url.c_str()),
- SWIG_csharp_string_callback(mime.c_str()),
- SWIG_csharp_string_callback(newMime.c_str()));
+ return handler(url.c_str(),
+ mime.c_str(),
+ newMime.c_str());
});
}
else