${dali_csharp_binder_dir}/src/style-manager-wrap.cpp
${dali_csharp_binder_dir}/src/drag-and-drop-wrap.cpp
${dali_csharp_binder_dir}/src/font-client-wrap.cpp
+ ${dali_csharp_binder_dir}/src/slim-custom-view-impl.cpp
)
# added for key grab binding only for tizen
#include <stdio.h>
#include "common.h"
+#include "slim-custom-view-impl.h"
SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
{ SWIG_CSharpApplicationException, NULL },
return jresult;
}
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_View_NewCustom() {
+ void * jresult;
+ Dali::Toolkit::Control result;
+
+ {
+ try {
+ result = SlimCustomViewImpl::New(Dali::Toolkit::Internal::Control::ControlBehaviour::DISABLE_STYLE_CHANGE_SIGNALS);
+ } CALL_CATCH_EXCEPTION(0);
+ }
+
+ jresult = new Dali::Toolkit::Control((const Dali::Toolkit::Control &)result);
+ return jresult;
+}
SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_View__SWIG_0() {
void * jresult ;
--- /dev/null
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include "slim-custom-view-impl.h"
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/object/handle-devel.h>
+#include <dali/public-api/object/type-registry.h>
+#include <dali-toolkit/dali-toolkit.h>
+
+// INTERNAL INCLUDES
+#include "nui-view-accessible.h"
+
+SlimCustomViewImpl::SlimCustomViewImpl(ControlBehaviour behaviourFlags) : Control(behaviourFlags)
+{
+}
+
+Dali::Toolkit::Control SlimCustomViewImpl::New(ControlBehaviour additionalBehaviour)
+{
+ // Create the implementation, temporarily owned on stack
+ Dali::IntrusivePtr<SlimCustomViewImpl> controlImpl = new SlimCustomViewImpl(Control::ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehaviour));
+
+ // Pass ownership to handle
+ Dali::Toolkit::Control handle(*controlImpl);
+
+ // Second-phase init of the implementation
+ // This can only be done after the CustomActor connection has been made...
+ controlImpl->Initialize();
+
+ // Impersonate Control by adopting its TypeInfo. Without this, many things don't work.
+ Dali::TypeInfo typeInfo = Dali::TypeRegistry::Get().GetTypeInfo(typeid(Control));
+ if(typeInfo)
+ {
+ Dali::DevelHandle::SetTypeInfo(handle, typeInfo);
+ }
+
+ return handle;
+}
+
+Dali::Toolkit::DevelControl::ControlAccessible* SlimCustomViewImpl::CreateAccessibleObject()
+{
+ return new NUIViewAccessible(Self());
+}
--- /dev/null
+#ifndef CSHARP_SLIM_CUSTOM_VIEW_IMPL_H
+#define CSHARP_SLIM_CUSTOM_VIEW_IMPL_H
+
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/public-api/controls/control.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+
+// INTERNAL INCLUDES
+#include "common.h"
+
+// SlimCustomViewImpl behaves almost identically to Toolkit::Internal::Control,
+// but is associated with a NUIViewAccessible, therefore opening the possibility
+// of providing Accessibility support in C#.
+class SlimCustomViewImpl : public Dali::Toolkit::Internal::Control
+{
+ using Dali::Toolkit::Internal::Control::ControlBehaviour;
+
+ SlimCustomViewImpl(ControlBehaviour behaviourFlags);
+
+public:
+ static Dali::Toolkit::Control New(ControlBehaviour additionalBehaviour);
+
+protected:
+ Dali::Toolkit::DevelControl::ControlAccessible* CreateAccessibleObject() override;
+};
+
+#endif // CSHARP_SLIM_CUSTOM_VIEW_IMPL_H