/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
#include <stdlib.h>
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
using namespace Dali;
using namespace Dali::Toolkit;
int destFactorRgb = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_RGB );
int srcFactorAlpha = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_ALPHA );
int destFactorAlpha = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_ALPHA );
- DALI_TEST_CHECK( srcFactorRgb == BlendingFactor::ONE );
- DALI_TEST_CHECK( destFactorRgb == BlendingFactor::ONE_MINUS_SRC_ALPHA );
- DALI_TEST_CHECK( srcFactorAlpha == BlendingFactor::ONE );
- DALI_TEST_CHECK( destFactorAlpha == BlendingFactor::ONE );
+ DALI_TEST_CHECK( srcFactorRgb == BlendFactor::ONE );
+ DALI_TEST_CHECK( destFactorRgb == BlendFactor::ONE_MINUS_SRC_ALPHA );
+ DALI_TEST_CHECK( srcFactorAlpha == BlendFactor::ONE );
+ DALI_TEST_CHECK( destFactorAlpha == BlendFactor::ONE );
value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
DALI_TEST_CHECK( value.Get( enable ) );
#include <dali/public-api/rendering/renderer.h>
#include <dali/public-api/rendering/texture-set.h>
#include <dali/public-api/rendering/shader.h>
+#include <dali/devel-api/images/nine-patch-image.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/dali-toolkit.h>
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
int blendMode = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::BLEND_MODE );
- DALI_TEST_EQUALS( static_cast<BlendingMode::Type>(blendMode), BlendingMode::ON, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast<BlendMode::Type>(blendMode), BlendMode::ON, TEST_LOCATION );
TestGlAbstraction& gl = application.GetGlAbstraction();
application.Render(0);
int blendMode = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::BLEND_MODE );
- DALI_TEST_EQUALS( static_cast<BlendingMode::Type>(blendMode), BlendingMode::AUTO, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast<BlendMode::Type>(blendMode), BlendMode::AUTO, TEST_LOCATION );
Vector4 actualColor(Vector4::ZERO);
DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "borderColor", actualColor ) );
application.SendNotification();
application.Render(0);
blendMode = actor.GetRendererAt(0u).GetProperty<int>( Renderer::Property::BLEND_MODE );
- DALI_TEST_EQUALS( static_cast<BlendingMode::Type>(blendMode), BlendingMode::ON, TEST_LOCATION );
+ DALI_TEST_EQUALS( static_cast<BlendMode::Type>(blendMode), BlendMode::ON, TEST_LOCATION );
END_TEST;
}
develapibloomviewdir = $(develapicontrolsdir)/bloom-view
develapibubbleemitterdir = $(develapicontrolsdir)/bubble-effect
develapieffectsviewdir = $(develapicontrolsdir)/effects-view
+develapigaussianblurviewdir = $(develapicontrolsdir)/gaussian-blur-view
develapimagnifierdir = $(develapicontrolsdir)/magnifier
develapipopupdir = $(develapicontrolsdir)/popup
develapiprogressbardir = $(develapicontrolsdir)/progress-bar
develapibuilder_HEADERS = $(devel_api_builder_header_files)
develapieffectsview_HEADERS = $(devel_api_effects_view_header_files)
develapifocusmanager_HEADERS = $(devel_api_focus_manager_header_files)
+develapigaussianblurview_HEADERS = $(devel_api_gaussian_blur_view_header_files)
develapiimageatlas_HEADERS = $(devel_api_image_atlas_header_files)
develapimagnifier_HEADERS = $(devel_api_magnifier_header_files)
develapipopup_HEADERS = $(devel_api_popup_header_files)
publicapibuttonsdir = $(publicapicontrolsdir)/buttons
publicapidefaultcontrolsdir = $(publicapicontrolsdir)/default-controls
publicapiflexcontainerdir = $(publicapicontrolsdir)/flex-container
-publicapigaussianblurviewdir = $(publicapicontrolsdir)/gaussian-blur-view
publicapiimageviewdir = $(publicapicontrolsdir)/image-view
publicapivideoviewdir = $(publicapicontrolsdir)/video-view
publicapimodel3dviewdir = $(publicapicontrolsdir)/model3d-view
publicapibuttons_HEADERS = $(public_api_buttons_header_files)
publicapidefaultcontrols_HEADERS = $(public_api_default_controls_header_files)
publicapiflexcontainer_HEADERS = $(public_api_flex_container_header_files)
-publicapigaussianblurview_HEADERS = $(public_api_gaussian_blur_view_header_files)
publicapiimageview_HEADERS = $(public_api_image_view_header_files)
publicapivideoview_HEADERS = $(public_api_video_view_header_files)
publicapiitemview_HEADERS = $(public_api_item_view_header_files)
# Extra tags for Tizen 3.0
ALIASES += SINCE_1_2_2="@since 1.2.2"
ALIASES += SINCE_1_2_4="@since 1.2.4"
+ALIASES += SINCE_1_2_5="@since 1.2.5"
ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
## Extra tags for Tizen 3.0
#ALIASES += SINCE_1_2_2="\par Since:\n 3.0, DALi version 1.2.2"
#ALIASES += SINCE_1_2_4="\par Since:\n 3.0, DALi version 1.2.4"
+#ALIASES += SINCE_1_2_5="\par Since:\n 3.0, DALi version 1.2.5"
## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release.
## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0.
#include <dali-toolkit/public-api/controls/buttons/radio-button.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/control.h>
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
#include <dali-toolkit/public-api/controls/flex-container/flex-container.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
#define __DALI_TOOLKIT_UIBUILDER_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
#include <dali/public-api/animation/linear-constrainer.h>
#include <dali/devel-api/animation/path-constrainer.h>
#include <dali/public-api/images/frame-buffer-image.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_BLOOM_VIEW_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*
*/
+// EXTERNAL INCLUDES
+#include <dali/public-api/images/pixel.h>
+
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
namespace Dali
{
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// CLASS HEADER
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
// EXTERNAL INCLUDES
$(devel_api_src_dir)/transition-effects/cube-transition-fold-effect.cpp \
$(devel_api_src_dir)/transition-effects/cube-transition-wave-effect.cpp \
$(devel_api_src_dir)/visual-factory/visual-factory.cpp \
- $(devel_api_src_dir)/visual-factory/visual-base.cpp
+ $(devel_api_src_dir)/visual-factory/visual-base.cpp \
+ $(devel_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.cpp
# Add devel header files here
$(devel_api_src_dir)/transition-effects/cube-transition-cross-effect.h \
$(devel_api_src_dir)/transition-effects/cube-transition-fold-effect.h \
$(devel_api_src_dir)/transition-effects/cube-transition-wave-effect.h
+
+devel_api_gaussian_blur_view_header_files = \
+ $(devel_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.h
#define __DALI_TOOLKIT_SHADER_EFFECT_BENDY_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_BLIND_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_BOUNCING_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_CAROUSEL_EFFECT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_DISPLACEMENT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_LOCAL_DISSOLVE_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
#include <sstream>
namespace Dali
#define __DALI_TOOLKIT_SHADER_EFFECT_IRIS_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_MASK_EFFECT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// EXTERNAL INCLUDES
#include <dali/public-api/images/image.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_MIRROR_EFFECT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_OVERLAY_EFFECT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// EXTERNAL INCLUDES
#include <dali/public-api/images/image.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_QUADRATIC_BEZIER_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_RIPPLE_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_RIPPLE2D_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHEAR_EFFECT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_SOFT_BUTTON_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_SPOT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_SQUARE_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_SHADER_EFFECT_SWIRL_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
namespace Dali
{
#include <dali/devel-api/images/texture-set-image.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
#include <dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h>
// Create render targets
// create off screen buffer of new size to render our child actors to
- mRenderTargetForRenderingChildren = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Dali::Image::UNUSED );
- mBloomExtractTarget = FrameBufferImage::New( mDownsampledWidth, mDownsampledHeight, mPixelFormat, Dali::Image::UNUSED );
- FrameBufferImage mBlurExtractTarget = FrameBufferImage::New( mDownsampledWidth, mDownsampledHeight, mPixelFormat, Dali::Image::UNUSED );
- mOutputRenderTarget = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Dali::Image::UNUSED);
+ mRenderTargetForRenderingChildren = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
+ mBloomExtractTarget = FrameBufferImage::New( mDownsampledWidth, mDownsampledHeight, mPixelFormat );
+ FrameBufferImage mBlurExtractTarget = FrameBufferImage::New( mDownsampledWidth, mDownsampledHeight, mPixelFormat );
+ mOutputRenderTarget = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
//////////////////////////////////////////////////////
#define __DALI_TOOLKIT_INTERNAL_BLOOM_VIEW_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
mBubbleRoot.SetSize(mMovementArea);
// Prepare the frame buffer to store the color adjusted background image
- mEffectImage = FrameBufferImage::New( mMovementArea.width/4.f, mMovementArea.height/4.f, Pixel::RGBA8888, Dali::Image::UNUSED );
+ mEffectImage = FrameBufferImage::New( mMovementArea.width/4.f, mMovementArea.height/4.f, Pixel::RGBA8888 );
// Generate the geometry, which is used by all bubbleActors
mMeshGeometry = CreateGeometry( mNumBubblePerActor*mDensity );
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
#include <dali-toolkit/internal/controls/image-view/image-view-impl.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/devel-api/shader-effects/image-region-effect.h>
+#include <dali-toolkit/devel-api/shader-effects/image-region-effect.h>
namespace Dali
{
#define __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// EXTERNAL INCLUDES
#include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
+#include <dali/devel-api/shader-effects/shader-effect.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
-#include <dali-toolkit/devel-api/shader-effects/image-region-effect.h>
#include "button-impl.h"
Actor self( Self() );
- mImageForChildren = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Dali::Image::UNUSED );
+ mImageForChildren = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
InitializeVisual( self, mVisualForChildren, mImageForChildren );
mVisualForChildren.SetDepthIndex( DepthIndex::CONTENT+1 );
- mImagePostFilter = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Dali::Image::UNUSED );
+ mImagePostFilter = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
TextureSet textureSet = TextureSet::New();
TextureSetImage( textureSet, 0u, mImagePostFilter );
self.GetRendererAt( 0 ).SetTextures( textureSet );
#define __DALI_TOOLKIT_INTERNAL_EFFECTS_VIEW_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/controls/effects-view/effects-view.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
namespace Dali
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/public-api/visuals/visual-properties.h>
// TODO:
#define __DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
namespace Dali
#include <dali/public-api/actors/camera-actor.h>
#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/render-tasks/render-task.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
{
float exponent = static_cast<float>(i);
mBlurredImage[i-1] = FrameBufferImage::New( mTargetSize.width/std::pow(2.f,exponent) , mTargetSize.height/std::pow(2.f,exponent),
- GAUSSIAN_BLUR_RENDER_TARGET_PIXEL_FORMAT, Dali::Image::NEVER );
+ GAUSSIAN_BLUR_RENDER_TARGET_PIXEL_FORMAT );
InitializeVisual( self, mVisuals[i], mBlurredImage[i - 1] );
mVisuals[ i ].SetDepthIndex( i );
SetShaderEffect( mVisuals[ i ] );
#define __DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h>
-#include <dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
namespace Dali
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
#include <libintl.h>
#include <cfloat>
#include <dali/public-api/animation/animation.h>
-#include <dali/public-api/images/nine-patch-image.h>
+#include <dali/devel-api/images/nine-patch-image.h>
#include <dali/public-api/images/resource-image.h>
#include <dali/public-api/math/vector2.h>
#include <dali/public-api/math/vector4.h>
mActorForInput.SetSize( mTargetSize );
// create internal offscreen for result of horizontal pass
- mImageForHorz = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED );
+ mImageForHorz = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = Toolkit::ImageView::New( mImageForHorz );
mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
mActorForHorz.SetSize( mTargetSize );
// create internal offscreen for result of the two pass blurred image
- mBlurredImage = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED);
+ mBlurredImage = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
// create an actor to blend the blurred image and the input image with the given blur strength
mActorForBlending.SetImage( mBlurredImage );
mActorForBlending.SetParentOrigin( ParentOrigin::CENTER );
void EmbossFilter::Enable()
{
- mImageForEmboss1 = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED );
- mImageForEmboss2 = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED );
+ mImageForEmboss1 = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
+ mImageForEmboss2 = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
Property::Map customShader;
customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = EMBOSS_FRAGMENT_SOURCE;
mActorForInput.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 1.0f / mTargetSize.width, 0.0f ) );
// create internal offscreen for result of horizontal pass
- mImageForHorz = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Image::UNUSED );
+ mImageForHorz = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat );
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = Toolkit::ImageView::New( mImageForHorz );
mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters controlSize[%f,%f] offscreenSize[%f,%f] direction[%d] alignmentOffset[%f]\n",
controlSize.x, controlSize.y, offScreenSize.x, offScreenSize.y, direction, alignmentOffset );
- FrameBufferImage offscreenRenderTargetForText = FrameBufferImage::New( offScreenSize.width, offScreenSize.height, Pixel::RGBA8888, Dali::Image::UNUSED );
+ FrameBufferImage offscreenRenderTargetForText = FrameBufferImage::New( offScreenSize.width, offScreenSize.height, Pixel::RGBA8888 );
Renderer renderer;
CreateCameraActor( offScreenSize, mOffscreenCameraActor );
#include <dali/public-api/images/pixel-data.h>
#include <dali/public-api/rendering/texture.h>
#include <dali/public-api/rendering/texture-set.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
#include <dali/public-api/rendering/texture-set.h>
// INTERNAL HEADER
// EXTERNAL INCLUDES
#include <dali/public-api/images/image.h>
#include <dali/public-api/images/image-operations.h>
-#include <dali/public-api/images/nine-patch-image.h>
+#include <dali/devel-api/images/nine-patch-image.h>
#include <dali/public-api/rendering/geometry.h>
#include <dali/public-api/rendering/sampler.h>
#include <dali/public-api/rendering/shader.h>
+++ /dev/null
-/*
- * Copyright (c) 2015 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/public-api/images/buffer-image.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace
-{
-const unsigned int MAX_BORDER_SIZE( 9 );
-}
-
-ImageActor CreateSolidColorActor( const Vector4& color, bool border, const Vector4& borderColor, const unsigned int borderSize )
-{
- ImageActor image;
- if( borderSize > MAX_BORDER_SIZE )
- {
- return image;
- }
-
- const unsigned int bitmapWidth = borderSize * 2 + 2;
- bool needAlphaChannel = (color.a < 1.0f) || ( border && borderColor.a < 1.0f );
- BufferImage imageData;
- if( needAlphaChannel )
- {
- imageData = BufferImage::New( bitmapWidth, bitmapWidth, Pixel::RGBA8888 );
- }
- else
- {
- imageData = BufferImage::New( bitmapWidth, bitmapWidth, Pixel::RGB888 );
- }
-
- // Create the image
- PixelBuffer* pixbuf = imageData.GetBuffer();
- if( !pixbuf )
- {
- return image;
- }
-
- Vector4 outerColor = color;
- if ( border )
- {
- outerColor = borderColor;
- }
-
- // Using a (2 + border) x (2 + border) image gives a better blend with the GL implementation
- // than a (1 + border) x (1 + border) image
- const unsigned int bitmapSize = bitmapWidth * bitmapWidth;
- const unsigned int topLeft = bitmapWidth * borderSize + borderSize;
- const unsigned int topRight = topLeft + 1;
- const unsigned int bottomLeft = bitmapWidth * (borderSize + 1) + borderSize;
- const unsigned int bottomRight = bottomLeft + 1;
-
- if( needAlphaChannel )
- {
- for( size_t i = 0; i < bitmapSize; ++i )
- {
- if( i == topLeft ||
- i == topRight ||
- i == bottomLeft ||
- i == bottomRight )
- {
- pixbuf[i*4+0] = 0xFF * color.r;
- pixbuf[i*4+1] = 0xFF * color.g;
- pixbuf[i*4+2] = 0xFF * color.b;
- pixbuf[i*4+3] = 0xFF * color.a;
- }
- else
- {
- pixbuf[i*4+0] = 0xFF * outerColor.r;
- pixbuf[i*4+1] = 0xFF * outerColor.g;
- pixbuf[i*4+2] = 0xFF * outerColor.b;
- pixbuf[i*4+3] = 0xFF * outerColor.a;
- }
- }
- }
- else
- {
- for( size_t i = 0; i < bitmapSize; ++i )
- {
- if( i == topLeft ||
- i == topRight ||
- i == bottomLeft ||
- i == bottomRight )
- {
- pixbuf[i*3+0] = 0xFF * color.r;
- pixbuf[i*3+1] = 0xFF * color.g;
- pixbuf[i*3+2] = 0xFF * color.b;
- }
- else
- {
- pixbuf[i*3+0] = 0xFF * outerColor.r;
- pixbuf[i*3+1] = 0xFF * outerColor.g;
- pixbuf[i*3+2] = 0xFF * outerColor.b;
- }
- }
- }
-
- imageData.Update();
- image = ImageActor::New( imageData );
- image.SetParentOrigin( ParentOrigin::CENTER );
-
- if( border )
- {
- image.SetStyle( ImageActor::STYLE_NINE_PATCH );
- image.SetNinePatchBorder( Vector4::ONE * (float)borderSize * 2.0f );
- }
-
- return image;
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_SOLID_COLOR_ACTOR_H__
-#define __DALI_TOOLKIT_SOLID_COLOR_ACTOR_H__
-
-/*
- * Copyright (c) 2015 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/public-api/math/vector4.h>
-#include <dali/public-api/actors/image-actor.h>
-
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-/**
- * @brief Creates a Dali::ImageActor with a solid color, optionally it creates a border.
- *
- * If the \e border parameter is set to \e true, the Dali::ImageActor's style is set to Dali::ImageActor::STYLE_NINE_PATCH.
- *
- * @SINCE_1_0.0
- * @remarks This is an experimental feature and might not be supported in the next release. We do recommend not to use it.
- * @param[in] color The ImageActor's color.
- * @param[in] border If \e true, a border is created. By default, the value is set to \e false.
- * @param[in] borderColor The color for the ImageActor's border. By default, the value is set to Color::WHITE.
- * @param[in] borderSize The size for the ImageActor's border. By default, the value is set to 1 pixel. It supports under 10 pixel for clear result of gl blend
- * @return a handle to the new ImageActor
- * @see Control
- */
-DALI_IMPORT_API ImageActor CreateSolidColorActor( const Vector4& color, bool border = false, const Vector4& borderColor = Color::WHITE, const unsigned int borderSize = 1 );
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_SOLID_COLOR_ACTOR_H__
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 5;
+const unsigned int TOOLKIT_MICRO_VERSION = 6;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
$(public_api_src_dir)/controls/buttons/check-box-button.cpp \
$(public_api_src_dir)/controls/buttons/push-button.cpp \
$(public_api_src_dir)/controls/buttons/radio-button.cpp \
- $(public_api_src_dir)/controls/default-controls/solid-color-actor.cpp \
$(public_api_src_dir)/controls/flex-container/flex-container.cpp \
$(public_api_src_dir)/controls/image-view/image-view.cpp \
$(public_api_src_dir)/controls/model3d-view/model3d-view.cpp \
$(public_api_src_dir)/controls/text-controls/text-editor.cpp \
$(public_api_src_dir)/controls/text-controls/text-label.cpp \
$(public_api_src_dir)/controls/text-controls/text-field.cpp \
- $(public_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.cpp \
$(public_api_src_dir)/styling/style-manager.cpp \
$(public_api_src_dir)/accessibility-manager/accessibility-manager.cpp \
$(public_api_src_dir)/focus-manager/keyboard-focus-manager.cpp \
$(public_api_src_dir)/controls/buttons/push-button.h \
$(public_api_src_dir)/controls/buttons/radio-button.h
-public_api_default_controls_header_files = \
- $(public_api_src_dir)/controls/default-controls/solid-color-actor.h
-
public_api_model3d_view_header_files = \
$(public_api_src_dir)/controls/model3d-view/model3d-view.h
public_api_flex_container_header_files = \
$(public_api_src_dir)/controls/flex-container/flex-container.h
-public_api_gaussian_blur_view_header_files = \
- $(public_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.h
-
public_api_image_view_header_files = \
$(public_api_src_dir)/controls/image-view/image-view.h
Name: dali-addon
Summary: DALi module for Node.JS
-Version: 1.2.5
+Version: 1.2.6
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
Name: dali-toolkit
Summary: The OpenGLES Canvas Core Library Toolkit
-Version: 1.2.5
+Version: 1.2.6
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-2-Clause and MIT
#include <dali/public-api/images/resource-image.h>
#include <dali/public-api/actors/actor-enumerations.h>
#include <dali/public-api/actors/draw-mode.h>
-#include <dali/public-api/actors/image-actor.h>
-#include <dali/public-api/actors/blending.h>
#include <dali/public-api/actors/camera-actor.h>
#include <dali/public-api/actors/sampling.h>
#include <dali/public-api/render-tasks/render-task.h>
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
* @param {Integer} options.height image height
* @param {Object } [options.nativeImage] ** currently not supported **
* @param {Integer} [options.pixelFormat] pixel format ( see dali constants, e.g. dali.PIXEL_FORMAT_RGB8888)
- * @param {Integer} [options.releasePolicy] optionally release memory when image is not visible on screen.
* @return {Object} Image
*/
Image New( const v8::FunctionCallbackInfo< v8::Value >& args )
return FrameBufferImage();
}
- Image::ReleasePolicy releasePolicy = Dali::Image::NEVER;
- v8::Local<v8::Value> releasePolicyValue = obj->Get( v8::String::NewFromUtf8( isolate, "releasePolicy" ) );
- if( releasePolicyValue->IsUint32() )
- {
- releasePolicy = static_cast<Image::ReleasePolicy>( releasePolicyValue->ToUint32()->Value() );
- }
-
- return FrameBufferImage::New( width, height, pixelFormat, releasePolicy );
+ return FrameBufferImage::New( width, height, pixelFormat );
}
} // FrameBufferImageApi
*/
public";
-%typemap(cscode) Dali::Application %{
-
- private static Application instance; // singleton
-
- public delegate void InitDelegate();
-
- public delegate void TerminateDelegate();
-
- public delegate void PauseDelegate();
-
- public delegate void ResumeDelegate();
-
- public delegate void ResizeDelegate();
-
- public delegate void AppControlDelegate();
-
- public delegate void LanguageChangedDelegate();
-
- public delegate void RegionChangedDelegate();
-
- public delegate void BatteryLowDelegate();
-
- public delegate void MemoryLowDelegate();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void InitDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void TerminateDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void PauseDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void ResumeDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void ResizeDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void AppControlDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void LanguageChangedDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void RegionChangedDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void BatteryLowDelegateInternal();
-
- [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
- internal delegate void MemoryLowDelegateInternal();
-
- static void Initialize()
- {
- // instance.InitDelegate();
- }
-
- public static Application ApplicationFromPtr(global::System.IntPtr cPtr) {
- Application ret = new Application(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- internal void SetupDelegates() {
- InitDelegateInternal initializeCallback = new InitDelegateInternal( Initialize );
- System.Console.WriteLine( "InitSignal connection count");
-
- this.InitSignal().Connect( initializeCallback );
- //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
- }
-
- public static Application NewApplication() {
- Application ret = New(1);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- // we've got an application now connect the signals
- ret.SetupDelegates();
- // set the singleton
-
- return ret;
- }
-
-%}
-
%typemap(in) ( int* argc, char **argv[] ) {
// Todo generate argv data from the C# args
%ignore *::GetExtension();
%ignore *::Initialize(Internal::CustomActor&);
%ignore *::GetOwner() const;
+%ignore *::ParentOrigin::DEFAULT;
+%ignore *::AnchorPoint::DEFAULT;
-%rename(ParentOriginDefault) Dali::ParentOrigin::DEFAULT;
%rename(ParentOriginTop) Dali::ParentOrigin::TOP;
%rename(ParentOriginBottom) Dali::ParentOrigin::BOTTOM;
%rename(ParentOriginLeft) Dali::ParentOrigin::LEFT;
%rename(ParentOriginBottomLeft) Dali::ParentOrigin::BOTTOM_LEFT;
%rename(ParentOriginBottomCenter) Dali::ParentOrigin::BOTTOM_CENTER;
%rename(ParentOriginBottomRight) Dali::ParentOrigin::BOTTOM_RIGHT;
-%rename(AnchorPointDefault) Dali::AnchorPoint::DEFAULT;
%rename(AnchorPointTop) Dali::AnchorPoint::TOP;
%rename(AnchorPointBottom) Dali::AnchorPoint::BOTTOM;
%rename(AnchorPointLeft) Dali::AnchorPoint::LEFT;
%rename(SizeScalePolicyType) Dali::SizeScalePolicy::Type;
%rename(HorizontalAlignmentType) Dali::HorizontalAlignment::Type;
%rename(VerticalAlignmentType) Dali::VerticalAlignment::Type;
+%rename(ClippingModeType) Dali::ClippingMode::Type;
%rename(FilterModeType) Dali::FilterMode::Type;
%rename(WrapModeType) Dali::WrapMode::Type;
%rename(PixelFormat) Dali::Pixel::Format;
%rename(DepthWriteModeType) Dali::DepthWriteMode::Type;
%rename(DepthTestModeType) Dali::DepthTestMode::Type;
%rename(DepthFunctionType) Dali::DepthFunction::Type;
+%rename(RenderModeType) Dali::RenderMode::Type;
%rename(StencilFunctionType) Dali::StencilFunction::Type;
%rename(StencilModeType) Dali::StencilMode::Type;
%rename(StencilOperationType) Dali::StencilOperation::Type;
return ValueOfIndex(index);
}
}
+
+ public static Vector2 GetVector2FromPtr(global::System.IntPtr cPtr) {
+ Vector2 ret = new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
%}
%typemap(cscode) Dali::Vector3 %{
public static Vector3 operator+(Vector3 arg1, Vector3 arg2) {
return arg1.Add(arg2);
}
-
+
public static Vector3 operator-(Vector3 arg1, Vector3 arg2) {
return arg1.Subtract(arg2);
}
return ValueOfIndex(index);
}
}
+
+ public static Vector3 GetVector3FromPtr(global::System.IntPtr cPtr) {
+ Vector3 ret = new Vector3(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
%}
%typemap(cscode) Dali::Vector4 %{
return ValueOfIndex(index);
}
}
+
+ public static Vector4 GetVector4FromPtr(global::System.IntPtr cPtr) {
+ Vector4 ret = new Vector4(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
%}
%typemap(cscode) Dali::Matrix %{
%rename(MeshVisualShadingModeValue) Dali::Toolkit::MeshVisual::ShadingMode::Value;
%rename(PrimitiveVisualShapeType) Dali::Toolkit::PrimitiveVisual::Shape::Type;
%rename(PRIMITIVE_VISUAL_COLOR) Dali::Toolkit::PrimitiveVisual::Property::COLOR;
+%rename(PRIMITIVE_VISUAL_MIX_COLOR) Dali::Toolkit::PrimitiveVisual::Property::MIX_COLOR;
%rename(PRIMITIVE_VISUAL_LIGHT_POSITION) Dali::Toolkit::PrimitiveVisual::Property::LIGHT_POSITION;
%rename(VISUAL_PROPERTY_TYPE) Dali::Toolkit::Visual::Property::TYPE;
%rename(VISUAL_PROPERTY_SHADER) Dali::Toolkit::Visual::Property::SHADER;
%rename(IMAGE_VISUAL_DESIRED_HEIGHT) Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT;
%rename(IMAGE_VISUAL_SYNCHRONOUS_LOADING) Dali::Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING;
%rename(IMAGE_VISUAL_BORDER_ONLY) Dali::Toolkit::ImageVisual::Property::BORDER_ONLY;
+%rename(COLOR_VISUAL_MIX_COLOR) Dali::Toolkit::Color::Visual::Property::MIX_COLOR;
%csconstvalue("PropertyRanges.PROPERTY_REGISTRATION_START_INDEX") PROPERTY_START_INDEX;
%csconstvalue("Control.PropertyRange.PROPERTY_START_INDEX+1000") PROPERTY_END_INDEX;
%include signal-parameters.i
%include signals.i
+
+%include events/actor-event.i
+%include events/accessibilitymanager-event.i
+%include events/application-event.i
+%include events/animation-event.i
+%include events/button-event.i
+%include events/builder-event.i
+%include events/control-event.i
+%include events/gaussian-blur-view-event.i
+%include events/image-event.i
+%include events/itemview-event.i
+%include events/keyboardFocusManager-event.i
+%include events/objectregistry-event.i
+%include events/popup-event.i
+%include events/pinchgesture-event.i
+%include events/pageturnview-event.i
+%include events/pangesture-event.i
+%include events/propertynotification-event.i
+%include events/longpressgesture-event.i
+%include events/resourceimage-event.i
+%include events/scrollable-event.i
+%include events/scrollbar-event.i
+%include events/scrollview-event.i
+%include events/slider-event.i
+%include events/stage-event.i
+%include events/stylemanager-event.i
+%include events/tapgesture-event.i
+%include events/texteditor-event.i
+%include events/textfield-event.i
+%include events/timer-event.i
+%include events/videoview-event.i
+
%include dali-operator.i
%include dali-core.i
%include dali-adaptor.i
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define ACCESSIBILITY_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+ %typemap(csimports) NameSpace::ClassName %{
+ using System;
+ using System.Runtime.InteropServices;
+%}
+
+%enddef
+
+
+%define ACCESSIBILITY_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+ %typemap(cscode) NameSpace::ClassName %{
+
+
+ /**
+ * @brief Event arguments that passed via StatusChanged signal
+ *
+ */
+ public class StatusChangedEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionNext signal
+ *
+ */
+ public class ActionNextEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionPrevious signal
+ *
+ */
+ public class ActionPreviousEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionActivate signal
+ *
+ */
+ public class ActionActivateEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionRead signal
+ *
+ */
+ public class ActionReadEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionOver signal
+ *
+ */
+ public class ActionOverEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionReadNext signal
+ *
+ */
+ public class ActionReadNextEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionReadPrevious signal
+ *
+ */
+ public class ActionReadPreviousEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionUp signal
+ *
+ */
+ public class ActionUpEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionDown signal
+ *
+ */
+ public class ActionDownEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionClearFocus signal
+ *
+ */
+ public class ActionClearFocusEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionBack signal
+ *
+ */
+ public class ActionBackEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionScrollUp signal
+ *
+ */
+ public class ActionScrollUpEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionScrollDown signal
+ *
+ */
+ public class ActionScrollDownEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionPageLeft signal
+ *
+ */
+ public class ActionPageLeftEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionPageRight signal
+ *
+ */
+ public class ActionPageRightEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionPageUp signal
+ *
+ */
+ public class ActionPageUpEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionPageDown signal
+ *
+ */
+ public class ActionPageDownEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionMoveToFirst signal
+ *
+ */
+ public class ActionMoveToFirstEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionMoveToLast signal
+ *
+ */
+ public class ActionMoveToLastEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionReadFromTop signal
+ *
+ */
+ public class ActionReadFromTopEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionReadFromNext signal
+ *
+ */
+ public class ActionReadFromNextEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionZoom signal
+ *
+ */
+ public class ActionZoomEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionReadIndicatorInformation signal
+ *
+ */
+ public class ActionReadIndicatorInformationEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionReadPauseResume signal
+ *
+ */
+ public class ActionReadPauseResumeEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionStartStop signal
+ *
+ */
+ public class ActionStartStopEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionScroll signal
+ *
+ */
+ public class ActionScrollEventArgs : EventArgs
+ {
+ private AccessibilityManager _accessibilityManager;
+ private TouchEvent _touchEvent;
+
+ public AccessibilityManager AccessibilityManager
+ {
+ get
+ {
+ return _accessibilityManager;
+ }
+ set
+ {
+ _accessibilityManager = value;
+ }
+ }
+
+ public TouchEvent TouchEvent
+ {
+ get
+ {
+ return _touchEvent;
+ }
+ set
+ {
+ _touchEvent = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via ActionPageUp signal
+ *
+ */
+ public class FocusChangedEventArgs : EventArgs
+ {
+ private Actor _actorCurrent;
+ private Actor _actorNext;
+
+ public Actor ActorCurrent
+ {
+ get
+ {
+ return _actorCurrent;
+ }
+ set
+ {
+ _actorCurrent = value;
+ }
+ }
+
+ public Actor ActorNext
+ {
+ get
+ {
+ return _actorNext;
+ }
+ set
+ {
+ _actorNext = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via FocusedActorActivated signal
+ *
+ */
+ public class FocusedActorActivatedEventArgs : EventArgs
+ {
+ private Actor _actor;
+
+
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via FocusOvershot signal
+ *
+ */
+ public class FocusOvershotEventArgs : EventArgs
+ {
+ private Actor _currentFocusedActor;
+ private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection;
+
+ public Actor CurrentFocusedActor
+ {
+ get
+ {
+ return _currentFocusedActor;
+ }
+ set
+ {
+ _currentFocusedActor = value;
+ }
+ }
+
+ public AccessibilityManager.FocusOvershotDirection FocusOvershotDirection
+ {
+ get
+ {
+ return _focusOvershotDirection;
+ }
+ set
+ {
+ _focusOvershotDirection = value;
+ }
+ }
+ }
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool StatusChangedEventHandler(object source, StatusChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionNextEventHandler(object source, ActionNextEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionPreviousEventHandler(object source, ActionPreviousEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionActivateEventHandler(object source, ActionActivateEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadEventHandler(object source, ActionReadEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionOverEventHandler(object source, ActionOverEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadNextEventHandler(object source, ActionReadNextEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadPreviousEventHandler(object source, ActionReadPreviousEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionUpEventHandler(object source, ActionUpEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionDownEventHandler(object source, ActionDownEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionClearFocusEventHandler(object source, ActionClearFocusEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionBackEventHandler(object source, ActionBackEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionScrollUpEventHandler(object source, ActionScrollUpEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionScrollDownEventHandler(object source, ActionScrollDownEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionPageLeftEventHandler(object source, ActionPageLeftEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionPageRightEventHandler(object source, ActionPageRightEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionPageUpEventHandler(object source, ActionPageUpEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionPageDownEventHandler(object source, ActionPageDownEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionMoveToFirstEventHandler(object source, ActionMoveToFirstEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionMoveToLastEventHandler(object source, ActionMoveToLastEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadFromTopEventHandler(object source, ActionReadFromTopEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadFromNextEventHandler(object source, ActionReadFromNextEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionZoomEventHandler(object source, ActionZoomEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadIndicatorInformationEventHandler(object source, ActionReadIndicatorInformationEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionReadPauseResumeEventHandler(object source, ActionReadPauseResumeEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionStartStopEventHandler(object source, ActionStartStopEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ActionScrollEventHandler(object source, ActionScrollEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FocusChangedEventHandler(object source, FocusChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FocusedActorActivatedEventHandler(object source, FocusedActorActivatedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FocusOvershotEventHandler(object source, FocusOvershotEventArgs e);
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager);
+ private StatusChangedEventHandler _accessibilityManagerStatusChangedEventHandler;
+ private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionNextEventHandler _accessibilityManagerActionNextEventHandler;
+ private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionPreviousEventHandler _accessibilityManagerActionPreviousEventHandler;
+ private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionActivateEventHandler _accessibilityManagerActionActivateEventHandler;
+ private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadEventHandler _accessibilityManagerActionReadEventHandler;
+ private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionOverEventHandler _accessibilityManagerActionOverEventHandler;
+ private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadNextEventHandler _accessibilityManagerActionReadNextEventHandler;
+ private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadPreviousEventHandler _accessibilityManagerActionReadPreviousEventHandler;
+ private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionUpEventHandler _accessibilityManagerActionUpEventHandler;
+ private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionDownEventHandler _accessibilityManagerActionDownEventHandler;
+ private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionClearFocusEventHandler _accessibilityManagerActionClearFocusEventHandler;
+ private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionBackEventHandler _accessibilityManagerActionBackEventHandler;
+ private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionScrollUpEventHandler _accessibilityManagerActionScrollUpEventHandler;
+ private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionScrollDownEventHandler _accessibilityManagerActionScrollDownEventHandler;
+ private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionPageLeftEventHandler _accessibilityManagerActionPageLeftEventHandler;
+ private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionPageRightEventHandler _accessibilityManagerActionPageRightEventHandler;
+ private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionPageUpEventHandler _accessibilityManagerActionPageUpEventHandler;
+ private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionPageDownEventHandler _accessibilityManagerActionPageDownEventHandler;
+ private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionMoveToFirstEventHandler _accessibilityManagerActionMoveToFirstEventHandler;
+ private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionMoveToLastEventHandler _accessibilityManagerActionMoveToLastEventHandler;
+ private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadFromTopEventHandler _accessibilityManagerActionReadFromTopEventHandler;
+ private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadFromNextEventHandler _accessibilityManagerActionReadFromNextEventHandler;
+ private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionZoomEventHandler _accessibilityManagerActionZoomEventHandler;
+ private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadIndicatorInformationEventHandler _accessibilityManagerActionReadIndicatorInformationEventHandler;
+ private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionReadPauseResumeEventHandler _accessibilityManagerActionReadPauseResumeEventHandler;
+ private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager);
+ private ActionStartStopEventHandler _accessibilityManagerActionStartStopEventHandler;
+ private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent);
+ private ActionScrollEventHandler _accessibilityManagerActionScrollEventHandler;
+ private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FocusChangedEventCallbackDelegate(IntPtr actor1, IntPtr actor2);
+ private FocusChangedEventHandler _accessibilityManagerFocusChangedEventHandler;
+ private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FocusedActorActivatedEventCallbackDelegate(IntPtr actor);
+ private FocusedActorActivatedEventHandler _accessibilityManagerFocusedActorActivatedEventHandler;
+ private FocusedActorActivatedEventCallbackDelegate _accessibilityManagerFocusedActorActivatedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedActor, AccessibilityManager.FocusOvershotDirection direction);
+ private FocusOvershotEventHandler _accessibilityManagerFocusOvershotEventHandler;
+ private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate;
+
+ public event StatusChangedEventHandler StatusChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerStatusChangedEventHandler == null)
+ {
+ _accessibilityManagerStatusChangedEventHandler += value;
+
+ _accessibilityManagerStatusChangedEventCallbackDelegate = new StatusChangedEventCallbackDelegate(OnStatusChanged);
+ this.StatusChangedSignal().Connect(_accessibilityManagerStatusChangedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerStatusChangedEventHandler != null)
+ {
+ this.StatusChangedSignal().Disconnect(_accessibilityManagerStatusChangedEventCallbackDelegate);
+ }
+
+ _accessibilityManagerStatusChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager StatusChangedSignal
+ private bool OnStatusChanged(IntPtr data)
+ {
+ StatusChangedEventArgs e = new StatusChangedEventArgs();
+
+ // Populate all members of "e" (StatusChangedEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerStatusChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerStatusChangedEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionNextEventHandler ActionNext
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionNextEventHandler == null)
+ {
+ _accessibilityManagerActionNextEventHandler += value;
+
+ _accessibilityManagerActionNextEventCallbackDelegate = new ActionNextEventCallbackDelegate(OnActionNext);
+ this.ActionNextSignal().Connect(_accessibilityManagerActionNextEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionNextEventHandler != null)
+ {
+ this.ActionNextSignal().Disconnect(_accessibilityManagerActionNextEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionNextEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionNextSignal
+ private bool OnActionNext(IntPtr data)
+ {
+ ActionNextEventArgs e = new ActionNextEventArgs();
+
+ // Populate all members of "e" (ActionNextEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionNextEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionNextEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionPreviousEventHandler ActionPrevious
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionPreviousEventHandler == null)
+ {
+ _accessibilityManagerActionPreviousEventHandler += value;
+
+ _accessibilityManagerActionPreviousEventCallbackDelegate = new ActionPreviousEventCallbackDelegate(OnActionPrevious);
+ this.ActionPreviousSignal().Connect(_accessibilityManagerActionPreviousEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionPreviousEventHandler != null)
+ {
+ this.ActionPreviousSignal().Disconnect(_accessibilityManagerActionPreviousEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionPreviousEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionPreviousSignal
+ private bool OnActionPrevious(IntPtr data)
+ {
+ ActionPreviousEventArgs e = new ActionPreviousEventArgs();
+
+ // Populate all members of "e" (ActionPreviousEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionPreviousEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionPreviousEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionActivateEventHandler ActionActivate
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionActivateEventHandler == null)
+ {
+ _accessibilityManagerActionActivateEventHandler += value;
+
+ _accessibilityManagerActionActivateEventCallbackDelegate = new ActionActivateEventCallbackDelegate(OnActionActivate);
+ this.ActionActivateSignal().Connect(_accessibilityManagerActionActivateEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionActivateEventHandler != null)
+ {
+ this.ActionActivateSignal().Disconnect(_accessibilityManagerActionActivateEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionActivateEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionActivateSignal
+ private bool OnActionActivate(IntPtr data)
+ {
+ ActionActivateEventArgs e = new ActionActivateEventArgs();
+
+ // Populate all members of "e" (ActionActivateEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionActivateEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionActivateEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionReadEventHandler ActionRead
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadEventHandler == null)
+ {
+ _accessibilityManagerActionReadEventHandler += value;
+
+ _accessibilityManagerActionReadEventCallbackDelegate = new ActionReadEventCallbackDelegate(OnActionRead);
+ this.ActionReadSignal().Connect(_accessibilityManagerActionReadEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadEventHandler != null)
+ {
+ this.ActionReadSignal().Disconnect(_accessibilityManagerActionReadEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadSignal
+ private bool OnActionRead(IntPtr data)
+ {
+ ActionReadEventArgs e = new ActionReadEventArgs();
+
+ // Populate all members of "e" (ActionReadEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionOverEventHandler ActionOver
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionOverEventHandler == null)
+ {
+ _accessibilityManagerActionOverEventHandler += value;
+
+ _accessibilityManagerActionOverEventCallbackDelegate = new ActionOverEventCallbackDelegate(OnActionOver);
+ this.ActionOverSignal().Connect(_accessibilityManagerActionOverEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionOverEventHandler != null)
+ {
+ this.ActionOverSignal().Disconnect(_accessibilityManagerActionOverEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionOverEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionOverSignal
+ private bool OnActionOver(IntPtr data)
+ {
+ ActionOverEventArgs e = new ActionOverEventArgs();
+
+ // Populate all members of "e" (ActionOverEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionOverEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionOverEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionReadNextEventHandler ActionReadNext
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadNextEventHandler == null)
+ {
+ _accessibilityManagerActionReadNextEventHandler += value;
+
+ _accessibilityManagerActionReadNextEventCallbackDelegate = new ActionReadNextEventCallbackDelegate(OnActionReadNext);
+ this.ActionReadNextSignal().Connect(_accessibilityManagerActionReadNextEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadNextEventHandler != null)
+ {
+ this.ActionReadNextSignal().Disconnect(_accessibilityManagerActionReadNextEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadNextEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadNextSignal
+ private bool OnActionReadNext(IntPtr data)
+ {
+ ActionReadNextEventArgs e = new ActionReadNextEventArgs();
+
+ // Populate all members of "e" (ActionReadNextEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadNextEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadNextEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event ActionReadPreviousEventHandler ActionReadPrevious
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadPreviousEventHandler == null)
+ {
+ _accessibilityManagerActionReadPreviousEventHandler += value;
+
+ _accessibilityManagerActionReadPreviousEventCallbackDelegate = new ActionReadPreviousEventCallbackDelegate(OnActionReadPrevious);
+ this.ActionReadPreviousSignal().Connect(_accessibilityManagerActionReadPreviousEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadPreviousEventHandler != null)
+ {
+ this.ActionReadPreviousSignal().Disconnect(_accessibilityManagerActionReadPreviousEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadPreviousEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadPreviousSignal
+ private bool OnActionReadPrevious(IntPtr data)
+ {
+ ActionReadPreviousEventArgs e = new ActionReadPreviousEventArgs();
+
+ // Populate all members of "e" (ActionReadPreviousEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadPreviousEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadPreviousEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionUpEventHandler ActionUp
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionUpEventHandler == null)
+ {
+ _accessibilityManagerActionUpEventHandler += value;
+
+ _accessibilityManagerActionUpEventCallbackDelegate = new ActionUpEventCallbackDelegate(OnActionUp);
+ this.ActionUpSignal().Connect(_accessibilityManagerActionUpEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionUpEventHandler != null)
+ {
+ this.ActionUpSignal().Disconnect(_accessibilityManagerActionUpEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionUpEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionUpSignal
+ private bool OnActionUp(IntPtr data)
+ {
+ ActionUpEventArgs e = new ActionUpEventArgs();
+
+ // Populate all members of "e" (ActionUpEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionUpEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionUpEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionDownEventHandler ActionDown
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionDownEventHandler == null)
+ {
+ _accessibilityManagerActionDownEventHandler += value;
+
+ _accessibilityManagerActionDownEventCallbackDelegate = new ActionDownEventCallbackDelegate(OnActionDown);
+ this.ActionDownSignal().Connect(_accessibilityManagerActionDownEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionDownEventHandler != null)
+ {
+ this.ActionDownSignal().Disconnect(_accessibilityManagerActionDownEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionDownEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionDownSignal
+ private bool OnActionDown(IntPtr data)
+ {
+ ActionDownEventArgs e = new ActionDownEventArgs();
+
+ // Populate all members of "e" (ActionDownEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionDownEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionDownEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionClearFocusEventHandler ActionClearFocus
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionClearFocusEventHandler == null)
+ {
+ _accessibilityManagerActionClearFocusEventHandler += value;
+
+ _accessibilityManagerActionClearFocusEventCallbackDelegate = new ActionClearFocusEventCallbackDelegate(OnActionClearFocus);
+ this.ActionClearFocusSignal().Connect(_accessibilityManagerActionClearFocusEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionClearFocusEventHandler != null)
+ {
+ this.ActionClearFocusSignal().Disconnect(_accessibilityManagerActionClearFocusEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionClearFocusEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionClearFocusSignal
+ private bool OnActionClearFocus(IntPtr data)
+ {
+ ActionClearFocusEventArgs e = new ActionClearFocusEventArgs();
+
+ // Populate all members of "e" (ActionClearFocusEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionClearFocusEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionClearFocusEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionBackEventHandler ActionBack
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionBackEventHandler == null)
+ {
+ _accessibilityManagerActionBackEventHandler += value;
+
+ _accessibilityManagerActionBackEventCallbackDelegate = new ActionBackEventCallbackDelegate(OnActionBack);
+ this.ActionBackSignal().Connect(_accessibilityManagerActionBackEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionBackEventHandler != null)
+ {
+ this.ActionBackSignal().Disconnect(_accessibilityManagerActionBackEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionBackEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionBackSignal
+ private bool OnActionBack(IntPtr data)
+ {
+ ActionBackEventArgs e = new ActionBackEventArgs();
+
+ // Populate all members of "e" (ActionBackEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionBackEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionBackEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionScrollUpEventHandler ActionScrollUp
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionScrollUpEventHandler == null)
+ {
+ _accessibilityManagerActionScrollUpEventHandler += value;
+
+ _accessibilityManagerActionScrollUpEventCallbackDelegate = new ActionScrollUpEventCallbackDelegate(OnActionScrollUp);
+ this.ActionScrollUpSignal().Connect(_accessibilityManagerActionScrollUpEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionScrollUpEventHandler != null)
+ {
+ this.ActionScrollUpSignal().Disconnect(_accessibilityManagerActionScrollUpEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionScrollUpEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionScrollUpSignal
+ private bool OnActionScrollUp(IntPtr data)
+ {
+ ActionScrollUpEventArgs e = new ActionScrollUpEventArgs();
+
+ // Populate all members of "e" (ActionScrollUpEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionScrollUpEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionScrollUpEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionScrollDownEventHandler ActionScrollDown
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionScrollDownEventHandler == null)
+ {
+ _accessibilityManagerActionScrollDownEventHandler += value;
+
+ _accessibilityManagerActionScrollDownEventCallbackDelegate = new ActionScrollDownEventCallbackDelegate(OnActionScrollDown);
+ this.ActionScrollDownSignal().Connect(_accessibilityManagerActionScrollDownEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionScrollDownEventHandler != null)
+ {
+ this.ActionScrollDownSignal().Disconnect(_accessibilityManagerActionScrollDownEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionScrollDownEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionScrollDownSignal
+ private bool OnActionScrollDown(IntPtr data)
+ {
+ ActionScrollDownEventArgs e = new ActionScrollDownEventArgs();
+
+ // Populate all members of "e" (ActionScrollDownEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionScrollDownEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionScrollDownEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event ActionPageLeftEventHandler ActionPageLeft
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionPageLeftEventHandler == null)
+ {
+ _accessibilityManagerActionPageLeftEventHandler += value;
+
+ _accessibilityManagerActionPageLeftEventCallbackDelegate = new ActionPageLeftEventCallbackDelegate(OnActionPageLeft);
+ this.ActionPageLeftSignal().Connect(_accessibilityManagerActionPageLeftEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionPageLeftEventHandler != null)
+ {
+ this.ActionPageLeftSignal().Disconnect(_accessibilityManagerActionPageLeftEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionPageLeftEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionPageLeftSignal
+ private bool OnActionPageLeft(IntPtr data)
+ {
+ ActionPageLeftEventArgs e = new ActionPageLeftEventArgs();
+
+ // Populate all members of "e" (ActionPageLeftEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionPageLeftEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionPageLeftEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionPageRightEventHandler ActionPageRight
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionPageRightEventHandler == null)
+ {
+ _accessibilityManagerActionPageRightEventHandler += value;
+
+ _accessibilityManagerActionPageRightEventCallbackDelegate = new ActionPageRightEventCallbackDelegate(OnActionPageRight);
+ this.ActionPageRightSignal().Connect(_accessibilityManagerActionPageRightEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionPageRightEventHandler != null)
+ {
+ this.ActionPageRightSignal().Disconnect(_accessibilityManagerActionPageRightEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionPageRightEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionPageRightSignal
+ private bool OnActionPageRight(IntPtr data)
+ {
+ ActionPageRightEventArgs e = new ActionPageRightEventArgs();
+
+ // Populate all members of "e" (ActionPageRightEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionPageRightEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionPageRightEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionPageUpEventHandler ActionPageUp
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionPageUpEventHandler == null)
+ {
+ _accessibilityManagerActionPageUpEventHandler += value;
+
+ _accessibilityManagerActionPageUpEventCallbackDelegate = new ActionPageUpEventCallbackDelegate(OnActionPageUp);
+ this.ActionPageUpSignal().Connect(_accessibilityManagerActionPageUpEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionPageUpEventHandler != null)
+ {
+ this.ActionPageUpSignal().Disconnect(_accessibilityManagerActionPageUpEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionPageUpEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionPageUpSignal
+ private bool OnActionPageUp(IntPtr data)
+ {
+ ActionPageUpEventArgs e = new ActionPageUpEventArgs();
+
+ // Populate all members of "e" (ActionPageUpEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionPageUpEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionPageUpEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event ActionPageDownEventHandler ActionPageDown
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionPageDownEventHandler == null)
+ {
+ _accessibilityManagerActionPageDownEventHandler += value;
+
+ _accessibilityManagerActionPageDownEventCallbackDelegate = new ActionPageDownEventCallbackDelegate(OnActionPageDown);
+ this.ActionPageDownSignal().Connect(_accessibilityManagerActionPageDownEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionPageDownEventHandler != null)
+ {
+ this.ActionPageDownSignal().Disconnect(_accessibilityManagerActionPageDownEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionPageDownEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionPageDownSignal
+ private bool OnActionPageDown(IntPtr data)
+ {
+ ActionPageDownEventArgs e = new ActionPageDownEventArgs();
+
+ // Populate all members of "e" (ActionPageDownEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionPageDownEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionPageDownEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event ActionMoveToFirstEventHandler ActionMoveToFirst
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionMoveToFirstEventHandler == null)
+ {
+ _accessibilityManagerActionMoveToFirstEventHandler += value;
+
+ _accessibilityManagerActionMoveToFirstEventCallbackDelegate = new ActionMoveToFirstEventCallbackDelegate(OnActionMoveToFirst);
+ this.ActionMoveToFirstSignal().Connect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionMoveToFirstEventHandler != null)
+ {
+ this.ActionMoveToFirstSignal().Disconnect(_accessibilityManagerActionMoveToFirstEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionMoveToFirstEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionMoveToFirstSignal
+ private bool OnActionMoveToFirst(IntPtr data)
+ {
+ ActionMoveToFirstEventArgs e = new ActionMoveToFirstEventArgs();
+
+ // Populate all members of "e" (ActionMoveToFirstEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionMoveToFirstEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionMoveToFirstEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionMoveToLastEventHandler ActionMoveToLast
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionMoveToLastEventHandler == null)
+ {
+ _accessibilityManagerActionMoveToLastEventHandler += value;
+
+ _accessibilityManagerActionMoveToLastEventCallbackDelegate = new ActionMoveToLastEventCallbackDelegate(OnActionMoveToLast);
+ this.ActionMoveToLastSignal().Connect(_accessibilityManagerActionMoveToLastEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionMoveToLastEventHandler != null)
+ {
+ this.ActionMoveToLastSignal().Disconnect(_accessibilityManagerActionMoveToLastEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionMoveToLastEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionMoveToLastSignal
+ private bool OnActionMoveToLast(IntPtr data)
+ {
+ ActionMoveToLastEventArgs e = new ActionMoveToLastEventArgs();
+
+ // Populate all members of "e" (ActionMoveToLastEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionMoveToLastEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionMoveToLastEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionReadFromTopEventHandler ActionReadFromTop
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadFromTopEventHandler == null)
+ {
+ _accessibilityManagerActionReadFromTopEventHandler += value;
+
+ _accessibilityManagerActionReadFromTopEventCallbackDelegate = new ActionReadFromTopEventCallbackDelegate(OnActionReadFromTop);
+ this.ActionReadFromTopSignal().Connect(_accessibilityManagerActionReadFromTopEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadFromTopEventHandler != null)
+ {
+ this.ActionReadFromTopSignal().Disconnect(_accessibilityManagerActionReadFromTopEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadFromTopEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadFromTopSignal
+ private bool OnActionReadFromTop(IntPtr data)
+ {
+ ActionReadFromTopEventArgs e = new ActionReadFromTopEventArgs();
+
+ // Populate all members of "e" (ActionReadFromTopEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadFromTopEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadFromTopEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionReadFromNextEventHandler ActionReadFromNext
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadFromNextEventHandler == null)
+ {
+ _accessibilityManagerActionReadFromNextEventHandler += value;
+
+ _accessibilityManagerActionReadFromNextEventCallbackDelegate = new ActionReadFromNextEventCallbackDelegate(OnActionReadFromNext);
+ this.ActionReadFromNextSignal().Connect(_accessibilityManagerActionReadFromNextEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadFromNextEventHandler != null)
+ {
+ this.ActionReadFromNextSignal().Disconnect(_accessibilityManagerActionReadFromNextEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadFromNextEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadFromNextSignal
+ private bool OnActionReadFromNext(IntPtr data)
+ {
+ ActionReadFromNextEventArgs e = new ActionReadFromNextEventArgs();
+
+ // Populate all members of "e" (ActionReadFromNextEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadFromNextEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadFromNextEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionZoomEventHandler ActionZoom
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionZoomEventHandler == null)
+ {
+ _accessibilityManagerActionZoomEventHandler += value;
+
+ _accessibilityManagerActionZoomEventCallbackDelegate = new ActionZoomEventCallbackDelegate(OnActionZoom);
+ this.ActionZoomSignal().Connect(_accessibilityManagerActionZoomEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionZoomEventHandler != null)
+ {
+ this.ActionZoomSignal().Disconnect(_accessibilityManagerActionZoomEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionZoomEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionZoomSignal
+ private bool OnActionZoom(IntPtr data)
+ {
+ ActionZoomEventArgs e = new ActionZoomEventArgs();
+
+ // Populate all members of "e" (ActionZoomEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionZoomEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionZoomEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionReadIndicatorInformationEventHandler ActionReadIndicatorInformation
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadIndicatorInformationEventHandler == null)
+ {
+ _accessibilityManagerActionReadIndicatorInformationEventHandler += value;
+
+ _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate = new ActionReadIndicatorInformationEventCallbackDelegate(OnActionReadIndicatorInformation);
+ this.ActionReadIndicatorInformationSignal().Connect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null)
+ {
+ this.ActionReadIndicatorInformationSignal().Disconnect(_accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadIndicatorInformationEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadIndicatorInformationSignal
+ private bool OnActionReadIndicatorInformation(IntPtr data)
+ {
+ ActionReadIndicatorInformationEventArgs e = new ActionReadIndicatorInformationEventArgs();
+
+ // Populate all members of "e" (ActionReadIndicatorInformationEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadIndicatorInformationEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadIndicatorInformationEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionReadPauseResumeEventHandler ActionReadPauseResume
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionReadPauseResumeEventHandler == null)
+ {
+ _accessibilityManagerActionReadPauseResumeEventHandler += value;
+
+ _accessibilityManagerActionReadPauseResumeEventCallbackDelegate = new ActionReadPauseResumeEventCallbackDelegate(OnActionReadPauseResume);
+ this.ActionReadPauseResumeSignal().Connect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionReadPauseResumeEventHandler != null)
+ {
+ this.ActionReadPauseResumeSignal().Disconnect(_accessibilityManagerActionReadPauseResumeEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionReadPauseResumeEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionReadPauseResumeSignal
+ private bool OnActionReadPauseResume(IntPtr data)
+ {
+ ActionReadPauseResumeEventArgs e = new ActionReadPauseResumeEventArgs();
+
+ // Populate all members of "e" (ActionReadPauseResumeEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionReadPauseResumeEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionReadPauseResumeEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionStartStopEventHandler ActionStartStop
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionStartStopEventHandler == null)
+ {
+ _accessibilityManagerActionStartStopEventHandler += value;
+
+ _accessibilityManagerActionStartStopEventCallbackDelegate = new ActionStartStopEventCallbackDelegate(OnActionStartStop);
+ this.ActionStartStopSignal().Connect(_accessibilityManagerActionStartStopEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionStartStopEventHandler != null)
+ {
+ this.ActionStartStopSignal().Disconnect(_accessibilityManagerActionStartStopEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionStartStopEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionStartStopSignal
+ private bool OnActionStartStop(IntPtr data)
+ {
+ ActionStartStopEventArgs e = new ActionStartStopEventArgs();
+
+ // Populate all members of "e" (ActionStartStopEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(data);
+
+ if (_accessibilityManagerActionStartStopEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionStartStopEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event ActionScrollEventHandler ActionScroll
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerActionScrollEventHandler == null)
+ {
+ _accessibilityManagerActionScrollEventHandler += value;
+
+ _accessibilityManagerActionScrollEventCallbackDelegate = new ActionScrollEventCallbackDelegate(OnActionScroll);
+ this.ActionScrollSignal().Connect(_accessibilityManagerActionScrollEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerActionScrollEventHandler != null)
+ {
+ this.ActionScrollSignal().Disconnect(_accessibilityManagerActionScrollEventCallbackDelegate);
+ }
+
+ _accessibilityManagerActionScrollEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager ActionScrollSignal
+ private bool OnActionScroll(IntPtr accessibilityManager, IntPtr touchEvent)
+ {
+ ActionScrollEventArgs e = new ActionScrollEventArgs();
+
+ // Populate all members of "e" (ActionScrollEventArgs) with real data
+ e.AccessibilityManager = AccessibilityManager.GetAccessibilityManagerFromPtr(accessibilityManager);
+ e.TouchEvent = TouchEvent.GetTouchEventFromPtr(touchEvent);
+
+ if (_accessibilityManagerActionScrollEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _accessibilityManagerActionScrollEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event FocusChangedEventHandler FocusChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerFocusChangedEventHandler == null)
+ {
+ _accessibilityManagerFocusChangedEventHandler += value;
+
+ _accessibilityManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged);
+ this.FocusChangedSignal().Connect(_accessibilityManagerFocusChangedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerFocusChangedEventHandler != null)
+ {
+ this.FocusChangedSignal().Disconnect(_accessibilityManagerFocusChangedEventCallbackDelegate);
+ }
+
+ _accessibilityManagerFocusChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager FocusChangedSignal
+ private void OnFocusChanged(IntPtr actor1, IntPtr actor2)
+ {
+ FocusChangedEventArgs e = new FocusChangedEventArgs();
+
+ // Populate all members of "e" (FocusChangedEventArgs) with real data
+ e.ActorCurrent = Actor.GetActorFromPtr(actor1);
+ e.ActorNext = Actor.GetActorFromPtr(actor2);
+
+ if (_accessibilityManagerFocusChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _accessibilityManagerFocusChangedEventHandler(this, e);
+ }
+ }
+
+ public event FocusedActorActivatedEventHandler FocusedActorActivated
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerFocusedActorActivatedEventHandler == null)
+ {
+ _accessibilityManagerFocusedActorActivatedEventHandler += value;
+
+ _accessibilityManagerFocusedActorActivatedEventCallbackDelegate = new FocusedActorActivatedEventCallbackDelegate(OnFocusedActorActivated);
+ this.FocusedActorActivatedSignal().Connect(_accessibilityManagerFocusedActorActivatedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerFocusedActorActivatedEventHandler != null)
+ {
+ this.FocusedActorActivatedSignal().Disconnect(_accessibilityManagerFocusedActorActivatedEventCallbackDelegate);
+ }
+
+ _accessibilityManagerFocusedActorActivatedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager FocusedActorActivatedSignal
+ private void OnFocusedActorActivated(IntPtr actor)
+ {
+ FocusedActorActivatedEventArgs e = new FocusedActorActivatedEventArgs();
+
+ // Populate all members of "e" (FocusedActorActivatedEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+
+ if (_accessibilityManagerFocusedActorActivatedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _accessibilityManagerFocusedActorActivatedEventHandler(this, e);
+ }
+ }
+
+
+ public event FocusOvershotEventHandler FocusOvershot
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_accessibilityManagerFocusOvershotEventHandler == null)
+ {
+ _accessibilityManagerFocusOvershotEventHandler += value;
+
+ _accessibilityManagerFocusOvershotEventCallbackDelegate = new FocusOvershotEventCallbackDelegate(OnFocusOvershot);
+ this.FocusOvershotSignal().Connect(_accessibilityManagerFocusOvershotEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_accessibilityManagerFocusOvershotEventHandler != null)
+ {
+ this.FocusOvershotSignal().Disconnect(_accessibilityManagerFocusOvershotEventCallbackDelegate);
+ }
+
+ _accessibilityManagerFocusOvershotEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for AccessibilityManager FocusOvershotSignal
+ private void OnFocusOvershot(IntPtr currentFocusedActor, AccessibilityManager.FocusOvershotDirection direction)
+ {
+ FocusOvershotEventArgs e = new FocusOvershotEventArgs();
+
+ // Populate all members of "e" (FocusOvershotEventArgs) with real data
+ e.CurrentFocusedActor = Actor.GetActorFromPtr(currentFocusedActor);
+ e.FocusOvershotDirection = direction;
+
+ if (_accessibilityManagerFocusOvershotEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _accessibilityManagerFocusOvershotEventHandler(this, e);
+ }
+ }
+
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ %}
+ %enddef
+
+%define DALI_ACCESSIBILITY_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ ACCESSIBILITY_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ ACCESSIBILITY_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+ %enddef
+
+ namespace Dali
+{
+ DALI_ACCESSIBILITY_EVENTHANDLER_PARAM( Dali::Toolkit, AccessibilityManager);
+}
+
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+ using System;
+ using System.Runtime.InteropServices;
+%}
+
+%enddef
+
+%define ACTOR_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+ %typemap(cscode) NameSpace::ClassName %{
+
+
+ /**
+ * @brief Event arguments that passed via Touch signal
+ *
+ */
+ public class TouchEventArgs : EventArgs
+ {
+ private Actor _actor;
+ private TouchData _touchData;
+
+ /**
+ * @brief Actor - is the actor that is being touched
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ /**
+ * @brief TouchData - contains the information of touch points
+ *
+ */
+ public TouchData TouchData
+ {
+ get
+ {
+ return _touchData;
+ }
+ set
+ {
+ _touchData = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via Hover signal
+ *
+ */
+ public class HoverEventArgs : EventArgs
+ {
+ private Actor _actor;
+ private HoverEvent _hoverEvent;
+
+ /**
+ * @brief Actor - is the actor that is being hovered
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ /**
+ * @brief HoverEvent - contains touch points that represent the points
+ * that are currently being hovered or the points where a hover has stopped
+ *
+ */
+ public HoverEvent HoverEvent
+ {
+ get
+ {
+ return _hoverEvent;
+ }
+ set
+ {
+ _hoverEvent = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via Wheel signal
+ *
+ */
+ public class WheelEventArgs : EventArgs
+ {
+ private Actor _actor;
+ private WheelEvent _wheelEvent;
+
+ /**
+ * @brief Actor - is the actor that is being wheeled
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ /**
+ * @brief WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
+ *
+ */
+ public WheelEvent WheelEvent
+ {
+ get
+ {
+ return _wheelEvent;
+ }
+ set
+ {
+ _wheelEvent = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via OnStage signal
+ *
+ */
+ public class OnStageEventArgs : EventArgs
+ {
+ private Actor _actor;
+
+ /**
+ * @brief Actor - is the actor that is being connected to the stage
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via OffStage signal
+ *
+ */
+ public class OffStageEventArgs : EventArgs
+ {
+ private Actor _actor;
+
+ /**
+ * @brief Actor - is the actor that is being disconnected from the stage
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via OnRelayout signal
+ *
+ */
+ public class OnRelayoutEventArgs : EventArgs
+ {
+ private Actor _actor;
+
+ /**
+ * @brief Actor - is the actor that is being resized upon relayout
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+ }
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool TouchEventHandler(object source, TouchEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool HoverEventHandler(object source, HoverEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool WheelEventHandler(object source, WheelEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void OnStageEventHandler(object source, OnStageEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void OffStageEventHandler(object source, OffStageEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void OnRelayoutEventHandler(object source, OnRelayoutEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool TouchCallbackDelegate(IntPtr actor, IntPtr touchData);
+ private TouchEventHandler _actorTouchDataEventHandler;
+ private TouchCallbackDelegate _actorTouchDataCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool HoverEventCallbackDelegate(IntPtr actor, IntPtr hoverEvent);
+ private HoverEventHandler _actorHoverEventHandler;
+ private HoverEventCallbackDelegate _actorHoverEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool WheelEventCallbackDelegate(IntPtr actor, IntPtr wheelEvent);
+ private WheelEventHandler _actorWheelEventHandler;
+ private WheelEventCallbackDelegate _actorWheelEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void OnStageEventCallbackDelegate(IntPtr actor);
+ private OnStageEventHandler _actorOnStageEventHandler;
+ private OnStageEventCallbackDelegate _actorOnStageEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void OffStageEventCallbackDelegate(IntPtr actor);
+ private OffStageEventHandler _actorOffStageEventHandler;
+ private OffStageEventCallbackDelegate _actorOffStageEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void OnRelayoutEventCallbackDelegate(IntPtr actor);
+ private OnRelayoutEventHandler _actorOnRelayoutEventHandler;
+ private OnRelayoutEventCallbackDelegate _actorOnRelayoutEventCallbackDelegate;
+
+ /**
+ * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of TouchEventHandler) provided by the user.
+ * Touched signal is emitted when touch input is received.
+ */
+ public event TouchEventHandler Touched
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_actorTouchDataEventHandler == null)
+ {
+ _actorTouchDataEventHandler += value;
+
+ _actorTouchDataCallbackDelegate = new TouchCallbackDelegate(OnTouch);
+ this.TouchSignal().Connect(_actorTouchDataCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_actorTouchDataEventHandler != null)
+ {
+ this.TouchSignal().Disconnect(_actorTouchDataCallbackDelegate);
+ }
+
+ _actorTouchDataEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Actor TouchSignal
+ private bool OnTouch(IntPtr actor, IntPtr touchData)
+ {
+ TouchEventArgs e = new TouchEventArgs();
+
+ // Populate all members of "e" (TouchEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.TouchData = Dali.TouchData.GetTouchDataFromPtr(touchData);
+
+ if (_actorTouchDataEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _actorTouchDataEventHandler(this, e);
+ }
+
+ return false;
+ }
+
+ /**
+ * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of HoverEventHandler) provided by the user.
+ * Hovered signal is emitted when hover input is received.
+ */
+ public event HoverEventHandler Hovered
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_actorHoverEventHandler == null)
+ {
+ _actorHoverEventHandler += value;
+
+ _actorHoverEventCallbackDelegate = new HoverEventCallbackDelegate(OnHoverEvent);
+ this.HoveredSignal().Connect(_actorHoverEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_actorHoverEventHandler != null)
+ {
+ this.HoveredSignal().Disconnect(_actorHoverEventCallbackDelegate);
+ }
+
+ _actorHoverEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Actor Hover signal
+ private bool OnHoverEvent(IntPtr actor, IntPtr hoverEvent)
+ {
+ HoverEventArgs e = new HoverEventArgs();
+
+ // Populate all members of "e" (HoverEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.HoverEvent = Dali.HoverEvent.GetHoverEventFromPtr(hoverEvent);
+
+ if (_actorHoverEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _actorHoverEventHandler(this, e);
+ }
+
+ return false;
+ }
+
+ /**
+ * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of WheelEventHandler) provided by the user.
+ * WheelMoved signal is emitted when wheel event is received.
+ */
+ public event WheelEventHandler WheelMoved
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_actorWheelEventHandler == null)
+ {
+ _actorWheelEventHandler += value;
+
+ _actorWheelEventCallbackDelegate = new WheelEventCallbackDelegate(OnWheelEvent);
+ this.WheelEventSignal().Connect(_actorWheelEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_actorWheelEventHandler != null)
+ {
+ this.WheelEventSignal().Disconnect(_actorWheelEventCallbackDelegate);
+ }
+
+ _actorWheelEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Actor Wheel signal
+ private bool OnWheelEvent(IntPtr actor, IntPtr wheelEvent)
+ {
+ WheelEventArgs e = new WheelEventArgs();
+
+ // Populate all members of "e" (WheelEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr(wheelEvent);
+
+ if (_actorWheelEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _actorWheelEventHandler(this, e);
+ }
+
+ return false;
+ }
+
+ /**
+ * @brief Event for OnStage signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of OnStageEventHandler) provided by the user.
+ * OnStage signal is emitted after the actor has been connected to the stage.
+ */
+ public event OnStageEventHandler OnStageEvent
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_actorOnStageEventHandler == null)
+ {
+ _actorOnStageEventHandler += value;
+
+ _actorOnStageEventCallbackDelegate = new OnStageEventCallbackDelegate(OnStage);
+ this.OnStageSignal().Connect(_actorOnStageEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_actorOnStageEventHandler != null)
+ {
+ this.OnStageSignal().Disconnect(_actorOnStageEventCallbackDelegate);
+ }
+
+ _actorOnStageEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Actor OnStage signal
+ private void OnStage(IntPtr data)
+ {
+ OnStageEventArgs e = new OnStageEventArgs();
+
+ // Populate all members of "e" (OnStageEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(data);
+
+ if (_actorOnStageEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _actorOnStageEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for OffStage signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of OffStageEventHandler) provided by the user.
+ * OffStage signal is emitted after the actor has been disconnected from the stage.
+ */
+ public event OffStageEventHandler OffStageEvent
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_actorOffStageEventHandler == null)
+ {
+ _actorOffStageEventHandler += value;
+
+ _actorOffStageEventCallbackDelegate = new OffStageEventCallbackDelegate(OffStage);
+ this.OnStageSignal().Connect(_actorOffStageEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_actorOffStageEventHandler != null)
+ {
+ this.OnStageSignal().Disconnect(_actorOffStageEventCallbackDelegate);
+ }
+
+ _actorOffStageEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Actor OffStage signal
+ private void OffStage(IntPtr data)
+ {
+ OffStageEventArgs e = new OffStageEventArgs();
+
+ // Populate all members of "e" (OffStageEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(data);
+
+ if (_actorOffStageEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _actorOffStageEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of OnRelayoutEventHandler) provided by the user.
+ * OnRelayout signal is emitted after the size has been set on the actor during relayout.
+ */
+ public event OnRelayoutEventHandler OnRelayoutEvent
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_actorOnRelayoutEventHandler == null)
+ {
+ _actorOnRelayoutEventHandler += value;
+
+ _actorOnRelayoutEventCallbackDelegate = new OnRelayoutEventCallbackDelegate(OnRelayout);
+ this.OnRelayoutSignal().Connect(_actorOnRelayoutEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_actorOnRelayoutEventHandler != null)
+ {
+ this.OnRelayoutSignal().Disconnect(_actorOnRelayoutEventCallbackDelegate);
+ }
+
+ _actorOnRelayoutEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Actor OnRelayout signal
+ private void OnRelayout(IntPtr data)
+ {
+ OnRelayoutEventArgs e = new OnRelayoutEventArgs();
+
+ // Populate all members of "e" (OnRelayoutEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(data);
+
+ if (_actorOnRelayoutEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _actorOnRelayoutEventHandler(this, e);
+ }
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ public IntPtr GetPtrfrom ## ClassName ()
+ {
+ return (IntPtr)swigCPtr;
+ }
+ %}
+
+ %enddef
+
+%define DALI_ACTOR_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ ACTOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+ %enddef
+
+ namespace Dali
+{
+ DALI_ACTOR_EVENTHANDLER_PARAM( Dali, Actor);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define Animation_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+ %typemap(csimports) NameSpace::ClassName %{
+ using System;
+ using System.Runtime.InteropServices;
+
+ %}
+ %enddef
+
+%define Animation_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+ %typemap(cscode) NameSpace::ClassName %{
+
+
+ /**
+ * @brief Event arguments that passed via Finished signal
+ *
+ */
+ public class FinishedEventArgs : EventArgs
+ {
+ private Animation _animation;
+
+ /**
+ * @brief Animation - is the Animation which has finished with the animation.
+ *
+ */
+ public Animation Animation
+ {
+ get
+ {
+ return _animation;
+ }
+ set
+ {
+ _animation = value;
+ }
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FinishedEventHandler(object source, FinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FinishedEventCallbackDelegate(IntPtr Animation);
+ private FinishedEventHandler _animationFinishedEventHandler;
+ private FinishedEventCallbackDelegate _animationFinishedEventCallbackDelegate;
+
+ /**
+ * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of FinishedEventHandler) provided by the user.
+ * Finished signal is emitted when an Animation's animations have finished.
+ */
+ public event FinishedEventHandler Finished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_animationFinishedEventHandler == null)
+ {
+ _animationFinishedEventHandler += value;
+
+ _animationFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
+ this.FinishedSignal().Connect(_animationFinishedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_animationFinishedEventHandler != null)
+ {
+ this.FinishedSignal().Disconnect(_animationFinishedEventCallbackDelegate);
+ }
+
+ _animationFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Animation FinishedSignal
+ private void OnFinished(IntPtr data)
+ {
+ FinishedEventArgs e = new FinishedEventArgs();
+
+ // Populate all members of "e" (FinishedEventArgs) with real data
+ e.Animation = Animation.GetAnimationFromPtr(data);
+
+ if (_animationFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _animationFinishedEventHandler(this, e);
+ }
+ }
+
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ %}
+
+ %enddef
+
+
+%define DALI_animation_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ Animation_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ Animation_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+ %enddef
+
+ namespace Dali
+{
+ DALI_animation_EVENTHANDLER_PARAM( Dali, Animation);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+ %typemap(csimports) NameSpace::ClassName %{
+ using System;
+ using System.Runtime.InteropServices;
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationInit signal
+ *
+ */
+ public class AUIApplicationInitEventArgs : EventArgs
+ {
+ private Application _application;
+
+ /**
+ * @brief Application - is the application that is being initialized
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationTerminate signal
+ *
+ */
+ public class AUIApplicationTerminateEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being Terminated
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationPause signal
+ *
+ */
+ public class AUIApplicationPauseEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being Paused
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationResume signal
+ *
+ */
+ public class AUIApplicationResumeEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being Resumed
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationReset signal
+ *
+ */
+ public class AUIApplicationResetEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being Reset
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationResize signal
+ *
+ */
+ public class AUIApplicationResizeEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being Resized
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationLanguageChanged signal
+ *
+ */
+ public class AUIApplicationLanguageChangedEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being affected with Device's language change
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationRegionChanged signal
+ *
+ */
+ public class AUIApplicationRegionChangedEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being affected with Device's region change
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationBatteryLow signal
+ *
+ */
+ public class AUIApplicationBatteryLowEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being affected when the battery level of the device is low
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationMemoryLow signal
+ *
+ */
+ public class AUIApplicationMemoryLowEventArgs : EventArgs
+ {
+ private Application _application;
+ /**
+ * @brief Application - is the application that is being affected when the memory level of the device is low
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ }
+
+ /**
+ * @brief Event arguments that passed via AUIApplicationAppControl signal
+ *
+ */
+ public class AUIApplicationAppControlEventArgs : EventArgs
+ {
+ private Application _application;
+ private IntPtr _voidp;
+ /**
+ * @brief Application - is the application that is receiving the launch request from another application
+ *
+ */
+ public Application Application
+ {
+ get
+ {
+ return _application;
+ }
+ set
+ {
+ _application = value;
+ }
+ }
+ /**
+ * @brief VoidP - contains the information about why the application is launched
+ *
+ */
+ public IntPtr VoidP
+ {
+ get
+ {
+ return _voidp;
+ }
+ set
+ {
+ _voidp = value;
+ }
+ }
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationInitEventHandler(object source, AUIApplicationInitEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationTerminateEventHandler(object source, AUIApplicationTerminateEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationPauseEventHandler(object source, AUIApplicationPauseEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationResumeEventHandler(object source, AUIApplicationResumeEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationResetEventHandler(object source, AUIApplicationResetEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationResizeEventHandler(object source, AUIApplicationResizeEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationLanguageChangedEventHandler(object source, AUIApplicationLanguageChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationRegionChangedEventHandler(object source, AUIApplicationRegionChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationBatteryLowEventHandler(object source, AUIApplicationBatteryLowEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationMemoryLowEventHandler(object source, AUIApplicationMemoryLowEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void AUIApplicationAppControlEventHandler(object source, AUIApplicationAppControlEventArgs e);
+
+%}
+
+%enddef
+
+
+%define APPLICATION_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+ %typemap(cscode) NameSpace::ClassName %{
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationInitEventCallbackDelegate(IntPtr application);
+ private AUIApplicationInitEventHandler _applicationInitEventHandler;
+ private AUIApplicationInitEventCallbackDelegate _applicationInitEventCallbackDelegate;
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationTerminateEventCallbackDelegate(IntPtr application);
+ private AUIApplicationTerminateEventHandler _applicationTerminateEventHandler;
+ private AUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate;
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationPauseEventCallbackDelegate(IntPtr application);
+ private AUIApplicationPauseEventHandler _applicationPauseEventHandler;
+ private AUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationResumeEventCallbackDelegate(IntPtr application);
+ private AUIApplicationResumeEventHandler _applicationResumeEventHandler;
+ private AUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationResetEventCallbackDelegate(IntPtr application);
+ private AUIApplicationResetEventHandler _applicationResetEventHandler;
+ private AUIApplicationResetEventCallbackDelegate _applicationResetEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationResizeEventCallbackDelegate(IntPtr application);
+ private AUIApplicationResizeEventHandler _applicationResizeEventHandler;
+ private AUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationLanguageChangedEventCallbackDelegate(IntPtr application);
+ private AUIApplicationLanguageChangedEventHandler _applicationLanguageChangedEventHandler;
+ private AUIApplicationLanguageChangedEventCallbackDelegate _applicationLanguageChangedEventCallbackDelegate;
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationRegionChangedEventCallbackDelegate(IntPtr application);
+ private AUIApplicationRegionChangedEventHandler _applicationRegionChangedEventHandler;
+ private AUIApplicationRegionChangedEventCallbackDelegate _applicationRegionChangedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationBatteryLowEventCallbackDelegate(IntPtr application);
+ private AUIApplicationBatteryLowEventHandler _applicationBatteryLowEventHandler;
+ private AUIApplicationBatteryLowEventCallbackDelegate _applicationBatteryLowEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationMemoryLowEventCallbackDelegate(IntPtr application);
+ private AUIApplicationMemoryLowEventHandler _applicationMemoryLowEventHandler;
+ private AUIApplicationMemoryLowEventCallbackDelegate _applicationMemoryLowEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void AUIApplicationAppControlEventCallbackDelegate(IntPtr application, IntPtr voidp);
+ private AUIApplicationAppControlEventHandler _applicationAppControlEventHandler;
+ private AUIApplicationAppControlEventCallbackDelegate _applicationAppControlEventCallbackDelegate;
+
+ /**
+ * @brief Event for Initialized signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationInitEventHandler) provided by the user.
+ * Initialized signal is emitted when application is initialised
+ */
+ public event AUIApplicationInitEventHandler Initialized
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationInitEventHandler == null)
+ {
+ _applicationInitEventHandler += value;
+
+ _applicationInitEventCallbackDelegate = new AUIApplicationInitEventCallbackDelegate(OnApplicationInit);
+ this.InitSignal().Connect(_applicationInitEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationInitEventHandler != null)
+ {
+ this.InitSignal().Disconnect(_applicationInitEventCallbackDelegate);
+ }
+
+ _applicationInitEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application InitSignal
+ private void OnApplicationInit(IntPtr data)
+ {
+ AUIApplicationInitEventArgs e = new AUIApplicationInitEventArgs();
+
+ // Populate all members of "e" (AUIApplicationInitEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationInitEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationInitEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationTerminateEventHandler) provided by the user.
+ * Terminated signal is emitted when application is terminated
+ */
+ public event AUIApplicationTerminateEventHandler Terminated
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationTerminateEventHandler == null)
+ {
+ _applicationTerminateEventHandler += value;
+
+ _applicationTerminateEventCallbackDelegate = new AUIApplicationTerminateEventCallbackDelegate(OnAUIApplicationTerminate);
+ this.TerminateSignal().Connect(_applicationTerminateEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationTerminateEventHandler != null)
+ {
+ this.TerminateSignal().Disconnect(_applicationTerminateEventCallbackDelegate);
+ }
+
+ _applicationTerminateEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application TerminateSignal
+ private void OnAUIApplicationTerminate(IntPtr data)
+ {
+ AUIApplicationTerminateEventArgs e = new AUIApplicationTerminateEventArgs();
+
+ // Populate all members of "e" (AUIApplicationTerminateEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationTerminateEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationTerminateEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for Paused signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationPauseEventHandler) provided by the user.
+ * Paused signal is emitted when application is paused
+ */
+ public event AUIApplicationPauseEventHandler Paused
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationPauseEventHandler == null)
+ {
+ _applicationPauseEventHandler += value;
+
+ _applicationPauseEventCallbackDelegate = new AUIApplicationPauseEventCallbackDelegate(OnAUIApplicationPause);
+ this.PauseSignal().Connect(_applicationPauseEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationPauseEventHandler != null)
+ {
+ this.PauseSignal().Disconnect(_applicationPauseEventCallbackDelegate);
+ }
+
+ _applicationPauseEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application PauseSignal
+ private void OnAUIApplicationPause(IntPtr data)
+ {
+ AUIApplicationPauseEventArgs e = new AUIApplicationPauseEventArgs();
+
+ // Populate all members of "e" (AUIApplicationPauseEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationPauseEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationPauseEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for Resumed signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationResumeEventHandler) provided by the user.
+ * Resumed signal is emitted when application is resumed
+ */
+ public event AUIApplicationResumeEventHandler Resumed
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationResumeEventHandler == null)
+ {
+ _applicationResumeEventHandler += value;
+
+ _applicationResumeEventCallbackDelegate = new AUIApplicationResumeEventCallbackDelegate(OnAUIApplicationResume);
+ this.ResumeSignal().Connect(_applicationResumeEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationResumeEventHandler != null)
+ {
+ this.ResumeSignal().Disconnect(_applicationResumeEventCallbackDelegate);
+ }
+
+ _applicationResumeEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application ResumeSignal
+ private void OnAUIApplicationResume(IntPtr data)
+ {
+ AUIApplicationResumeEventArgs e = new AUIApplicationResumeEventArgs();
+
+ // Populate all members of "e" (AUIApplicationResumeEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationResumeEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationResumeEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for Reset signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationResetEventHandler) provided by the user.
+ * Reset signal is emitted when application is reset
+ */
+ public event AUIApplicationResetEventHandler Reset
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationResetEventHandler == null)
+ {
+ _applicationResetEventHandler += value;
+
+ _applicationResetEventCallbackDelegate = new AUIApplicationResetEventCallbackDelegate(OnAUIApplicationReset);
+ this.ResetSignal().Connect(_applicationResetEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationResetEventHandler != null)
+ {
+ this.ResetSignal().Disconnect(_applicationResetEventCallbackDelegate);
+ }
+
+ _applicationResetEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application ResetSignal
+ private void OnAUIApplicationReset(IntPtr data)
+ {
+ AUIApplicationResetEventArgs e = new AUIApplicationResetEventArgs();
+
+ // Populate all members of "e" (AUIApplicationResetEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationResetEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationResetEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for Resized signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationResizeEventHandler) provided by the user.
+ * Resized signal is emitted when application is resized
+ */
+ public event AUIApplicationResizeEventHandler Resized
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationResizeEventHandler == null)
+ {
+ _applicationResizeEventHandler += value;
+
+ _applicationResizeEventCallbackDelegate = new AUIApplicationResizeEventCallbackDelegate(OnAUIApplicationResize);
+ this.ResizeSignal().Connect(_applicationResizeEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationResizeEventHandler != null)
+ {
+ this.ResizeSignal().Disconnect(_applicationResizeEventCallbackDelegate);
+ }
+
+ _applicationResizeEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application ResizeSignal
+ private void OnAUIApplicationResize(IntPtr data)
+ {
+ AUIApplicationResizeEventArgs e = new AUIApplicationResizeEventArgs();
+
+ // Populate all members of "e" (AUIApplicationResizeEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationResizeEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationResizeEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for LanguageChanged signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationLanguageChangedEventHandler) provided by the user.
+ * LanguageChanged signal is emitted when the region of the device is changed.
+ */
+ public event AUIApplicationLanguageChangedEventHandler LanguageChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationLanguageChangedEventHandler == null)
+ {
+ _applicationLanguageChangedEventHandler += value;
+
+ _applicationLanguageChangedEventCallbackDelegate = new AUIApplicationLanguageChangedEventCallbackDelegate(OnAUIApplicationLanguageChanged);
+ this.LanguageChangedSignal().Connect(_applicationLanguageChangedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationLanguageChangedEventHandler != null)
+ {
+ this.LanguageChangedSignal().Disconnect(_applicationLanguageChangedEventCallbackDelegate);
+ }
+
+ _applicationLanguageChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application LanguageChangedSignal
+ private void OnAUIApplicationLanguageChanged(IntPtr data)
+ {
+ AUIApplicationLanguageChangedEventArgs e = new AUIApplicationLanguageChangedEventArgs();
+
+ // Populate all members of "e" (AUIApplicationLanguageChangedEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationLanguageChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationLanguageChangedEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for RegionChanged signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationRegionChangedEventHandler) provided by the user.
+ * RegionChanged signal is emitted when the region of the device is changed.
+ */
+ public event AUIApplicationRegionChangedEventHandler RegionChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationRegionChangedEventHandler == null)
+ {
+ _applicationRegionChangedEventHandler += value;
+
+ _applicationRegionChangedEventCallbackDelegate = new AUIApplicationRegionChangedEventCallbackDelegate(OnAUIApplicationRegionChanged);
+ this.RegionChangedSignal().Connect(_applicationRegionChangedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationRegionChangedEventHandler != null)
+ {
+ this.RegionChangedSignal().Disconnect(_applicationRegionChangedEventCallbackDelegate);
+ }
+
+ _applicationRegionChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application RegionChangedSignal
+ private void OnAUIApplicationRegionChanged(IntPtr data)
+ {
+ AUIApplicationRegionChangedEventArgs e = new AUIApplicationRegionChangedEventArgs();
+
+ // Populate all members of "e" (AUIApplicationRegionChangedEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationRegionChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationRegionChangedEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for BatteryLow signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationBatteryLowEventHandler) provided by the user.
+ * BatteryLow signal is emitted when the battery level of the device is low.
+ */
+ public event AUIApplicationBatteryLowEventHandler BatteryLow
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationBatteryLowEventHandler == null)
+ {
+ _applicationBatteryLowEventHandler += value;
+
+ _applicationBatteryLowEventCallbackDelegate = new AUIApplicationBatteryLowEventCallbackDelegate(OnAUIApplicationBatteryLow);
+ this.BatteryLowSignal().Connect(_applicationBatteryLowEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationBatteryLowEventHandler != null)
+ {
+ this.BatteryLowSignal().Disconnect(_applicationBatteryLowEventCallbackDelegate);
+ }
+
+ _applicationBatteryLowEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application BatteryLowSignal
+ private void OnAUIApplicationBatteryLow(IntPtr data)
+ {
+ AUIApplicationBatteryLowEventArgs e = new AUIApplicationBatteryLowEventArgs();
+
+ // Populate all members of "e" (AUIApplicationBatteryLowEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationBatteryLowEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationBatteryLowEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for MemoryLow signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationMemoryLowEventHandler) provided by the user.
+ * MemoryLow signal is emitted when the memory level of the device is low.
+ */
+ public event AUIApplicationMemoryLowEventHandler MemoryLow
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationMemoryLowEventHandler == null)
+ {
+ _applicationMemoryLowEventHandler += value;
+
+ _applicationMemoryLowEventCallbackDelegate = new AUIApplicationMemoryLowEventCallbackDelegate(OnAUIApplicationMemoryLow);
+ this.MemoryLowSignal().Connect(_applicationMemoryLowEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationMemoryLowEventHandler != null)
+ {
+ this.MemoryLowSignal().Disconnect(_applicationMemoryLowEventCallbackDelegate);
+ }
+
+ _applicationMemoryLowEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application MemoryLowSignal
+ private void OnAUIApplicationMemoryLow(IntPtr data)
+ {
+ AUIApplicationMemoryLowEventArgs e = new AUIApplicationMemoryLowEventArgs();
+
+ // Populate all members of "e" (AUIApplicationMemoryLowEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(data);
+
+ if (_applicationMemoryLowEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationMemoryLowEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for AppControl signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of AUIApplicationAppControlEventHandler) provided by the user.
+ * AppControl signal is emitted when another application sends a launch request to the application.
+ */
+ public event AUIApplicationAppControlEventHandler AppControl
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_applicationAppControlEventHandler == null)
+ {
+ _applicationAppControlEventHandler += value;
+
+ _applicationAppControlEventCallbackDelegate = new AUIApplicationAppControlEventCallbackDelegate(OnAUIApplicationAppControl);
+ this.AppControlSignal().Connect(_applicationAppControlEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_applicationAppControlEventHandler != null)
+ {
+ this.AppControlSignal().Disconnect(_applicationAppControlEventCallbackDelegate);
+ }
+
+ _applicationAppControlEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Application AppControlSignal
+ private void OnAUIApplicationAppControl(IntPtr application, IntPtr voidp)
+ {
+ AUIApplicationAppControlEventArgs e = new AUIApplicationAppControlEventArgs();
+
+ // Populate all members of "e" (AUIApplicationAppControlEventArgs) with real data
+ e.Application = Application.GetApplicationFromPtr(application);
+ e.VoidP = voidp;
+
+ if (_applicationAppControlEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _applicationAppControlEventHandler(this, e);
+ }
+ }
+
+ private static Application instance; // singleton
+
+ public delegate void InitDelegate();
+
+ public delegate void TerminateDelegate();
+
+ public delegate void PauseDelegate();
+
+ public delegate void ResumeDelegate();
+
+ public delegate void ResizeDelegate();
+
+ public delegate void AppControlDelegate();
+
+ public delegate void LanguageChangedDelegate();
+
+ public delegate void RegionChangedDelegate();
+
+ public delegate void BatteryLowDelegate();
+
+ public delegate void MemoryLowDelegate();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void InitDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void TerminateDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void PauseDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void ResumeDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void ResizeDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void AppControlDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void LanguageChangedDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void RegionChangedDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void BatteryLowDelegateInternal();
+
+ [System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
+ internal delegate void MemoryLowDelegateInternal();
+
+ static void Initialize()
+ {
+ // instance.InitDelegate();
+ }
+
+ public static Application GetApplicationFromPtr(global::System.IntPtr cPtr) {
+ Application ret = new Application(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ internal void SetupDelegates() {
+ InitDelegateInternal initializeCallback = new InitDelegateInternal( Initialize );
+ System.Console.WriteLine( "InitSignal connection count");
+
+ this.InitSignal().Connect( initializeCallback );
+ //Console.WriteLine( "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
+ }
+
+ public static Application NewApplication() {
+ Application ret = New(1);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ // we've got an application now connect the signals
+ ret.SetupDelegates();
+ // set the singleton
+
+ return ret;
+ }
+
+ %}
+ %enddef
+
+%define DALI_APPLICATION_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ APPLICATION_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ APPLICATION_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+ %enddef
+
+ namespace Dali
+{
+ DALI_APPLICATION_EVENTHANDLER_PARAM( Dali, Application);
+}
+
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define BUILDER_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+ using System;
+ using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+
+%define BUILDER_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+ %typemap(cscode) NameSpace::ClassName %{
+
+ public class QuitEventArgs : EventArgs
+ {
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void QuitEventHandler(object source, QuitEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void QuitEventCallbackDelegate();
+ private QuitEventHandler _builderQuitEventHandler;
+ private QuitEventCallbackDelegate _builderQuitEventCallbackDelegate;
+
+ public event QuitEventHandler Quit
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_builderQuitEventHandler == null)
+ {
+ _builderQuitEventHandler += value;
+
+ _builderQuitEventCallbackDelegate = new QuitEventCallbackDelegate(OnQuit);
+ this.QuitSignal().Connect(_builderQuitEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_builderQuitEventHandler != null)
+ {
+ this.QuitSignal().Disconnect(_builderQuitEventCallbackDelegate);
+ }
+
+ _builderQuitEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Builder QuitSignal
+ private void OnQuit()
+ {
+ QuitEventArgs e = new QuitEventArgs();
+
+ if (_builderQuitEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _builderQuitEventHandler(this, e);
+ }
+ }
+
+ %}
+ %enddef
+
+%define DALI_BUILDER_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ BUILDER_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ BUILDER_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+ %enddef
+
+ namespace Dali
+{
+ DALI_BUILDER_EVENTHANDLER_PARAM( Dali::Toolkit, Builder);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+// Example from Swig MACRO
+
+%define EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class ClickedEventArgs : EventArgs
+{
+ private Button _button;
+
+ public Button Button
+ {
+ get
+ {
+ return _button;
+ }
+ set
+ {
+ _button = value;
+ }
+ }
+}
+
+public class PressedEventArgs : EventArgs
+{
+ private Button _button;
+
+ public Button Button
+ {
+ get
+ {
+ return _button;
+ }
+ set
+ {
+ _button = value;
+ }
+ }
+}
+
+public class ReleasedEventArgs : EventArgs
+{
+ private Button _button;
+
+ public Button Button
+ {
+ get
+ {
+ return _button;
+ }
+ set
+ {
+ _button = value;
+ }
+ }
+}
+
+public class StateChangedEventArgs : EventArgs
+{
+ private Button _button;
+
+ public Button Button
+ {
+ get
+ {
+ return _button;
+ }
+ set
+ {
+ _button = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ClickedEventHandler(object source, ClickedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool PressedEventHandler(object source, PressedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ReleasedEventHandler(object source, ReleasedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool StateChangedEventHandler(object source, StateChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ClickedCallbackDelegate(global::System.IntPtr data);
+ private ClickedEventHandler _buttonClickedEventHandler;
+ private ClickedCallbackDelegate _buttonClickedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool PressedCallbackDelegate(global::System.IntPtr data);
+ private PressedEventHandler _buttonPressedEventHandler;
+ private PressedCallbackDelegate _buttonPressedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ReleasedCallbackDelegate(global::System.IntPtr data);
+ private ReleasedEventHandler _buttonReleasedEventHandler;
+ private ReleasedCallbackDelegate _buttonReleasedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool StateChangedCallbackDelegate(global::System.IntPtr data);
+ private StateChangedEventHandler _buttonStateChangedEventHandler;
+ private StateChangedCallbackDelegate _buttonStateChangedCallbackDelegate;
+
+
+ public event ClickedEventHandler Clicked
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_buttonClickedEventHandler == null)
+ {
+ _buttonClickedEventHandler += value;
+
+ _buttonClickedCallbackDelegate = new ClickedCallbackDelegate(OnClicked);
+ this.ClickedSignal().Connect(_buttonClickedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_buttonClickedEventHandler != null)
+ {
+ this.ClickedSignal().Disconnect(_buttonClickedCallbackDelegate);
+ }
+
+ _buttonClickedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for button click signal
+ private bool OnClicked (IntPtr data)
+ {
+ Button##ClickedEventArgs e = new ClickedEventArgs();
+
+ e.Button = Button.GetButtonFromPtr(data);
+
+ if (_buttonClickedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _buttonClickedEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event PressedEventHandler Pressed
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_buttonPressedEventHandler == null)
+ {
+ _buttonPressedEventHandler += value;
+
+ _buttonPressedCallbackDelegate = new PressedCallbackDelegate(OnPressed);
+ this.PressedSignal().Connect(_buttonPressedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_buttonPressedEventHandler != null)
+ {
+ this.PressedSignal().Disconnect(_buttonPressedCallbackDelegate);
+ }
+
+ _buttonPressedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for button click signal
+ private bool OnPressed (IntPtr data)
+ {
+ Button##PressedEventArgs e = new PressedEventArgs();
+
+ e.Button = Button.GetButtonFromPtr(data);
+
+ if (_buttonPressedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _buttonPressedEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event ReleasedEventHandler Released
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_buttonReleasedEventHandler == null)
+ {
+ _buttonReleasedEventHandler += value;
+
+ _buttonReleasedCallbackDelegate = new ReleasedCallbackDelegate(OnReleased);
+ this.ReleasedSignal().Connect(_buttonReleasedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_buttonReleasedEventHandler != null)
+ {
+ this.ReleasedSignal().Disconnect(_buttonReleasedCallbackDelegate);
+ }
+
+ _buttonReleasedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for button click signal
+ private bool OnReleased (IntPtr data)
+ {
+ Button##ReleasedEventArgs e = new ReleasedEventArgs();
+
+ e.Button = Button.GetButtonFromPtr(data);
+
+ if (_buttonReleasedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _buttonReleasedEventHandler(this, e);
+ }
+ return false;
+ }
+
+
+ public event StateChangedEventHandler StateChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_buttonStateChangedEventHandler == null)
+ {
+ _buttonStateChangedEventHandler += value;
+
+ _buttonStateChangedCallbackDelegate = new StateChangedCallbackDelegate(OnStateChanged);
+ this.StateChangedSignal().Connect(_buttonStateChangedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_buttonStateChangedEventHandler != null)
+ {
+ this.StateChangedSignal().Disconnect(_buttonStateChangedCallbackDelegate);
+ }
+
+ _buttonStateChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for button click signal
+ private bool OnStateChanged (IntPtr data)
+ {
+ Button##StateChangedEventArgs e = new StateChangedEventArgs();
+
+ e.Button = Button.GetButtonFromPtr(data);
+
+ if (_buttonStateChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _buttonStateChangedEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+%enddef
+
+
+%define BUTTON_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ BUTTON_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ BUTTON_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ BUTTON_EVENTHANDLER_PARAM( Dali::Toolkit, Button);
+
+} // namespace DALi
+
+
+
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define CONTROL_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define CONTROL_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+/**
+ * @brief Event arguments that passed via KeyInputFocusGained signal
+ *
+ */
+public class KeyInputFocusGainedEventArgs : EventArgs
+{
+ private Control _control;
+
+ /**
+ * @brief Control - is the control that gets Key Input Focus
+ *
+ */
+ public Control Control
+ {
+ get
+ {
+ return _control;
+ }
+ set
+ {
+ _control = value;
+ }
+ }
+}
+
+/**
+ * @brief Event arguments that passed via KeyInputFocusLost signal
+ *
+ */
+public class KeyInputFocusLostEventArgs : EventArgs
+{
+ private Control _control;
+
+ /**
+ * @brief Control - is the control that loses Key Input Focus
+ *
+ */
+ public Control Control
+ {
+ get
+ {
+ return _control;
+ }
+ set
+ {
+ _control = value;
+ }
+ }
+}
+
+/**
+ * @brief Event arguments that passed via KeyEvent signal
+ *
+ */
+public class KeyEventArgs : EventArgs
+{
+ private Control _control;
+ private KeyEvent _keyEvent;
+
+ /**
+ * @brief Control - is the control that recieves the keyevent.
+ *
+ */
+ public Control Control
+ {
+ get
+ {
+ return _control;
+ }
+ set
+ {
+ _control = value;
+ }
+ }
+
+ /**
+ * @brief KeyEvent - is the keyevent sent to the Control.
+ *
+ */
+ public KeyEvent KeyEvent
+ {
+ get
+ {
+ return _keyEvent;
+ }
+ set
+ {
+ _keyEvent = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void KeyInputFocusGainedEventHandler(object source, KeyInputFocusGainedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void KeyInputFocusLostEventHandler(object source, KeyInputFocusLostEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool KeyEventHandler(object source, KeyEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control);
+ private KeyInputFocusGainedEventHandler _KeyInputFocusGainedEventHandler;
+ private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control);
+ private KeyInputFocusLostEventHandler _KeyInputFocusLostEventHandler;
+ private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent);
+ private KeyEventHandler _KeyEventHandler;
+ private KeyCallbackDelegate _KeyCallbackDelegate;
+
+ /**
+ * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of KeyInputFocusGainedEventHandler) provided by the user.
+ * KeyInputFocusGained signal is emitted when the control gets Key Input Focus.
+ */
+ public event KeyInputFocusGainedEventHandler KeyInputFocusGained
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_KeyInputFocusGainedEventHandler == null)
+ {
+ _KeyInputFocusGainedEventHandler += value;
+
+ _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained);
+ this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_KeyInputFocusGainedEventHandler != null)
+ {
+ this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate);
+ }
+
+ _KeyInputFocusGainedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnKeyInputFocusGained(IntPtr control)
+ {
+ KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs();
+
+ // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data
+ e.Control = Dali.Control.GetControlFromPtr(control);
+
+ if (_KeyInputFocusGainedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _KeyInputFocusGainedEventHandler(this, e);
+ }
+
+ }
+
+ /**
+ * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of KeyInputFocusLostEventHandler) provided by the user.
+ * KeyInputFocusLost signal is emitted when the control loses Key Input Focus.
+ */
+ public event KeyInputFocusLostEventHandler KeyInputFocusLost
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_KeyInputFocusLostEventHandler == null)
+ {
+ _KeyInputFocusLostEventHandler += value;
+
+ _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost);
+ this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_KeyInputFocusLostEventHandler != null)
+ {
+ this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate);
+ }
+
+ _KeyInputFocusLostEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnKeyInputFocusLost(IntPtr control)
+ {
+ KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs();
+
+ // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data
+ e.Control = Dali.Control.GetControlFromPtr(control);
+
+ if (_KeyInputFocusLostEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _KeyInputFocusLostEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of KeyEventEventHandler) provided by the user.
+ * KeyPressed signal is emitted when key event is received.
+ */
+ public event KeyEventHandler KeyPressed
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_KeyEventHandler == null)
+ {
+ _KeyEventHandler += value;
+
+ _KeyCallbackDelegate = new KeyCallbackDelegate(OnKeyEvent);
+ this.KeyEventSignal().Connect(_KeyCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_KeyEventHandler != null)
+ {
+ this.KeyEventSignal().Disconnect(_KeyCallbackDelegate);
+ }
+
+ _KeyEventHandler -= value;
+ }
+ }
+ }
+
+ private bool OnKeyEvent(IntPtr control, IntPtr keyEvent)
+ {
+ KeyEventArgs e = new KeyEventArgs();
+
+ // Populate all members of "e" (KeyEventArgs) with real data
+ e.Control = Dali.Control.GetControlFromPtr(control);
+ e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr(keyEvent);
+
+ if (_KeyEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _KeyEventHandler(this, e);
+ }
+ return false;
+
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_CONTROL_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ CONTROL_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ CONTROL_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_CONTROL_EVENTHANDLER_PARAM( Dali::Toolkit, Control);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class FinishedEventArgs : EventArgs
+{
+ private GaussianBlurView _gaussianBlurView;
+
+ public GaussianBlurView GaussianBlurView
+ {
+ get
+ {
+ return _gaussianBlurView;
+ }
+ set
+ {
+ _gaussianBlurView = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FinishedEventHandler(object source, FinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FinishedEventCallbackDelegate(IntPtr application);
+ private FinishedEventHandler _gaussianFinishedEventHandler;
+ private FinishedEventCallbackDelegate _gaussianFinishedEventCallbackDelegate;
+
+ public event FinishedEventHandler Finished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_gaussianFinishedEventHandler == null)
+ {
+ _gaussianFinishedEventHandler += value;
+
+ _gaussianFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
+ this.FinishedSignal().Connect(_gaussianFinishedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_gaussianFinishedEventHandler != null)
+ {
+ this.FinishedSignal().Disconnect(_gaussianFinishedEventCallbackDelegate);
+ }
+
+ _gaussianFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for GaussianBlurView FinishedSignal
+ private void OnFinished(IntPtr data)
+ {
+ FinishedEventArgs e = new FinishedEventArgs();
+
+ // Populate all members of "e" (FinishedEventArgs) with real data
+ e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data);
+
+ if (_gaussianFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _gaussianFinishedEventHandler(this, e);
+ }
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+%enddef
+
+%define DALI_GAUSSIAN_BLURR_VIEW_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ GAUSSIAN_BLURR_VIEW_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_GAUSSIAN_BLURR_VIEW_EVENTHANDLER_PARAM( Dali::Toolkit, GaussianBlurView);
+}
+
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define IMAGE_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define IMAGE_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+/**
+ * @brief Event arguments that passed via Uploaded signal
+ *
+ */
+public class UploadedEventArgs : EventArgs
+{
+ private Image _image;
+ /**
+ * @brief Image - is the image data that gets uploaded to GL.
+ *
+ */
+ public Image Image
+ {
+ get
+ {
+ return _image;
+ }
+ set
+ {
+ _image = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void UploadedEventHandler(object source, UploadedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void UploadedEventCallbackDelegate(IntPtr image);
+ private UploadedEventHandler _imageUploadedEventHandler;
+ private UploadedEventCallbackDelegate _imageUploadedEventCallbackDelegate;
+
+ /**
+ * @brief Event for Uploaded signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of UploadedEventHandler) provided by the user.
+ * Uploaded signal is emitted when the image data gets uploaded to GL.
+ */
+ public event UploadedEventHandler Uploaded
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_imageUploadedEventHandler == null)
+ {
+ _imageUploadedEventHandler += value;
+
+ _imageUploadedEventCallbackDelegate = new UploadedEventCallbackDelegate(OnUploaded);
+ this.UploadedSignal().Connect(_imageUploadedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_imageUploadedEventHandler != null)
+ {
+ this.UploadedSignal().Disconnect(_imageUploadedEventCallbackDelegate);
+ }
+
+ _imageUploadedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Image UploadedSignal
+ private void OnUploaded(IntPtr data)
+ {
+ UploadedEventArgs e = new UploadedEventArgs();
+
+ // Populate all members of "e" (UploadedEventArgs) with real data
+ e.Image = Image.GetImageFromPtr(data);
+
+ if (_imageUploadedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _imageUploadedEventHandler(this, e);
+ }
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_IMAGE_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ IMAGE_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ IMAGE_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_IMAGE_EVENTHANDLER_PARAM( Dali, Image);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define ITEMVIEW_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+
+%define ITEMVIEW_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+ public class LayoutActivatedEventArgs : EventArgs
+ {
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void LayoutActivatedEventHandler(object source, LayoutActivatedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void LayoutActivatedEventCallbackDelegate();
+ private LayoutActivatedEventHandler _itemViewLayoutActivatedEventHandler;
+ private LayoutActivatedEventCallbackDelegate _itemViewLayoutActivatedEventCallbackDelegate;
+
+ public event LayoutActivatedEventHandler LayoutActivated
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_itemViewLayoutActivatedEventHandler == null)
+ {
+ _itemViewLayoutActivatedEventHandler += value;
+
+ _itemViewLayoutActivatedEventCallbackDelegate = new LayoutActivatedEventCallbackDelegate(OnLayoutActivated);
+ this.LayoutActivatedSignal().Connect(_itemViewLayoutActivatedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_itemViewLayoutActivatedEventHandler != null)
+ {
+ this.LayoutActivatedSignal().Disconnect(_itemViewLayoutActivatedEventCallbackDelegate);
+ }
+
+ _itemViewLayoutActivatedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ItemView LayoutActivatedSignal
+ private void OnLayoutActivated()
+ {
+ LayoutActivatedEventArgs e = new LayoutActivatedEventArgs();
+
+ if (_itemViewLayoutActivatedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _itemViewLayoutActivatedEventHandler(this, e);
+ }
+ }
+
+%}
+%enddef
+
+%define DALI_ITEMVIEW_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ ITEMVIEW_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ ITEMVIEW_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_ITEMVIEW_EVENTHANDLER_PARAM( Dali::Toolkit, ItemView);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define KEYBOARD_FOCUS_MANAGER_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+%}
+
+%enddef
+
+
+%define KEYBOARD_FOCUS_MANAGER_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+/**
+ * @brief Event arguments that passed via FocusChanged signal
+ *
+ */
+public class FocusChangedEventArgs : EventArgs
+{
+ private Actor _actorCurrent;
+ private Actor _actorNext;
+
+ /**
+ * @brief Actor - is the original focused Actor
+ *
+ */
+ public Actor ActorCurrent
+ {
+ get
+ {
+ return _actorCurrent;
+ }
+ set
+ {
+ _actorCurrent = value;
+ }
+ }
+
+ /**
+ * @brief Actor - is the current focused Actor
+ *
+ */
+ public Actor ActorNext
+ {
+ get
+ {
+ return _actorNext;
+ }
+ set
+ {
+ _actorNext = value;
+ }
+ }
+}
+
+/**
+ * @brief Event arguments that passed via FocusGroupChanged signal
+ *
+ */
+public class FocusGroupChangedEventArgs : EventArgs
+{
+ private Actor _currentFocusedActor;
+ private bool _forwardDirection;
+
+ /**
+ * @brief Actor - is the current focused Actor
+ *
+ */
+ public Actor CurrentFocusedActor
+ {
+ get
+ {
+ return _currentFocusedActor;
+ }
+ set
+ {
+ _currentFocusedActor = value;
+ }
+ }
+
+ /**
+ * @brief ForwardDirection - is the direction (forward or backward) in which to move the focus next
+ *
+ */
+ public bool ForwardDirection
+ {
+ get
+ {
+ return _forwardDirection;
+ }
+ set
+ {
+ _forwardDirection = value;
+ }
+ }
+}
+
+/**
+ * @brief Event arguments that passed via FocusedActorEnterKey signal
+ *
+ */
+public class FocusedActorEnterKeyEventArgs : EventArgs
+{
+ private Actor _actor;
+
+ /**
+ * @brief Actor - is the current focused Actor which has the enter key pressed on it.
+ *
+ */
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FocusChangedEventHandler(object source, FocusChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FocusGroupChangedEventHandler(object source, FocusGroupChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FocusedActorEnterKeyEventHandler(object source, FocusedActorEnterKeyEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FocusChangedEventCallbackDelegate(IntPtr actorCurrent, IntPtr actorNext);
+ private FocusChangedEventHandler _keyboardFocusManagerFocusChangedEventHandler;
+ private FocusChangedEventCallbackDelegate _keyboardFocusManagerFocusChangedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FocusGroupChangedEventCallbackDelegate(IntPtr currentFocusedActor, bool forwardDirection);
+ private FocusGroupChangedEventHandler _keyboardFocusManagerFocusGroupChangedEventHandler;
+ private FocusGroupChangedEventCallbackDelegate _keyboardFocusManagerFocusGroupChangedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FocusedActorEnterKeyEventCallbackDelegate(IntPtr actor);
+ private FocusedActorEnterKeyEventHandler _keyboardFocusManagerFocusedActorEnterKeyEventHandler;
+ private FocusedActorEnterKeyEventCallbackDelegate _keyboardFocusManagerFocusedActorEnterKeyEventCallbackDelegate;
+
+ /**
+ * @brief Event for FocusChanged signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of FocusChangedEventHandler) provided by the user.
+ * FocusChanged signal is emitted after the current focused actor has been changed.
+ */
+ public event FocusChangedEventHandler FocusChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_keyboardFocusManagerFocusChangedEventHandler == null)
+ {
+ _keyboardFocusManagerFocusChangedEventHandler += value;
+
+ _keyboardFocusManagerFocusChangedEventCallbackDelegate = new FocusChangedEventCallbackDelegate(OnFocusChanged);
+ this.FocusChangedSignal().Connect(_keyboardFocusManagerFocusChangedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_keyboardFocusManagerFocusChangedEventHandler != null)
+ {
+ this.FocusChangedSignal().Disconnect(_keyboardFocusManagerFocusChangedEventCallbackDelegate);
+ }
+
+ _keyboardFocusManagerFocusChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for KeyboardFocusManager FocusChangedSignal
+ private void OnFocusChanged(IntPtr actorCurrent, IntPtr actorNext)
+ {
+ FocusChangedEventArgs e = new FocusChangedEventArgs();
+
+ // Populate all members of "e" (FocusChangedEventArgs) with real data
+ e.ActorCurrent = Actor.GetActorFromPtr(actorCurrent);
+ e.ActorNext = Actor.GetActorFromPtr(actorNext);
+
+ if (_keyboardFocusManagerFocusChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _keyboardFocusManagerFocusChangedEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for FocusGroupChanged signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of FocusGroupChangedEventHandler) provided by the user.
+ * FocusGroupChanged signal is emitted when the focus group has been changed.
+ */
+ public event FocusGroupChangedEventHandler FocusGroupChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_keyboardFocusManagerFocusGroupChangedEventHandler == null)
+ {
+ _keyboardFocusManagerFocusGroupChangedEventHandler += value;
+
+ _keyboardFocusManagerFocusGroupChangedEventCallbackDelegate = new FocusGroupChangedEventCallbackDelegate(OnFocusGroupChanged);
+ this.FocusGroupChangedSignal().Connect(_keyboardFocusManagerFocusGroupChangedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_keyboardFocusManagerFocusGroupChangedEventHandler != null)
+ {
+ this.FocusGroupChangedSignal().Disconnect(_keyboardFocusManagerFocusGroupChangedEventCallbackDelegate);
+ }
+
+ _keyboardFocusManagerFocusGroupChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for KeyboardFocusManager FocusGroupChangedSignal
+ private void OnFocusGroupChanged(IntPtr currentFocusedActor, bool forwardDirection)
+ {
+ FocusGroupChangedEventArgs e = new FocusGroupChangedEventArgs();
+
+ // Populate all members of "e" (FocusGroupChangedEventArgs) with real data
+ e.CurrentFocusedActor = Actor.GetActorFromPtr(currentFocusedActor);
+ e.ForwardDirection = forwardDirection;
+
+ if (_keyboardFocusManagerFocusGroupChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _keyboardFocusManagerFocusGroupChangedEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for FocusedActorEnterKeyPressed signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of FocusedActorEnterKeyEventHandler) provided by the user.
+ * FocusedActorEnterKeyPressed signal is emitted when the current focused actor has the enter key pressed on it.
+ */
+ public event FocusedActorEnterKeyEventHandler FocusedActorEnterKeyPressed
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_keyboardFocusManagerFocusedActorEnterKeyEventHandler == null)
+ {
+ _keyboardFocusManagerFocusedActorEnterKeyEventHandler += value;
+
+ _keyboardFocusManagerFocusedActorEnterKeyEventCallbackDelegate = new FocusedActorEnterKeyEventCallbackDelegate(OnFocusedActorEnterKey);
+ this.FocusedActorEnterKeySignal().Connect(_keyboardFocusManagerFocusedActorEnterKeyEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_keyboardFocusManagerFocusedActorEnterKeyEventHandler != null)
+ {
+ this.FocusedActorEnterKeySignal().Disconnect(_keyboardFocusManagerFocusedActorEnterKeyEventCallbackDelegate);
+ }
+
+ _keyboardFocusManagerFocusedActorEnterKeyEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for KeyboardFocusManager FocusedActorEnterKeySignal
+ private void OnFocusedActorEnterKey(IntPtr actor)
+ {
+ FocusedActorEnterKeyEventArgs e = new FocusedActorEnterKeyEventArgs();
+
+ // Populate all members of "e" (FocusedActorEnterKeyEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+
+ if (_keyboardFocusManagerFocusedActorEnterKeyEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _keyboardFocusManagerFocusedActorEnterKeyEventHandler(this, e);
+ }
+ }
+
+%}
+%enddef
+
+%define DALI_KEYBOARD_FOCUS_MANAGER_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ KEYBOARD_FOCUS_MANAGER_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ KEYBOARD_FOCUS_MANAGER_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_KEYBOARD_FOCUS_MANAGER_EVENTHANDLER_PARAM( Dali::Toolkit, KeyboardFocusManager);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define LongPressGesture_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+%}
+%enddef
+
+%define LongPressGesture_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class DetectedEventArgs : EventArgs
+{
+ private Actor _actor;
+ private LongPressGesture _longPressGesture;
+
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ public LongPressGesture LongPressGesture
+ {
+ get
+ {
+ return _longPressGesture;
+ }
+ set
+ {
+ _longPressGesture = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void DetectedEventHandler(object source, DetectedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr longPressGesture);
+ private DetectedEventHandler _longPressGestureEventHandler;
+ private DetectedCallbackDelegate _longPressGestureCallbackDelegate;
+
+
+ public event DetectedEventHandler Detected
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_longPressGestureEventHandler == null)
+ {
+ _longPressGestureEventHandler += value;
+
+ _longPressGestureCallbackDelegate = new DetectedCallbackDelegate(OnLongPressGestureDetected);
+ this.DetectedSignal().Connect(_longPressGestureCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_longPressGestureEventHandler != null)
+ {
+ this.DetectedSignal().Disconnect(_longPressGestureCallbackDelegate);
+ }
+
+ _longPressGestureEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnLongPressGestureDetected(IntPtr actor, IntPtr longPressGesture)
+ {
+ DetectedEventArgs e = new DetectedEventArgs();
+
+ // Populate all members of "e" (LongPressGestureEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.LongPressGesture = Dali.LongPressGesture.GetLongPressGestureFromPtr(longPressGesture);
+
+ if (_longPressGestureEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _longPressGestureEventHandler(this, e);
+ }
+
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_longPressGesture_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ LongPressGesture_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ LongPressGesture_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_longPressGesture_EVENTHANDLER_PARAM( Dali, LongPressGestureDetector);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define OBJECT_REGISTRY_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+
+%define OBJECT_REGISTRY_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class ObjectCreatedEventArgs : EventArgs
+{
+ private BaseHandle _baseHandle;
+
+ public BaseHandle BaseHandle
+ {
+ get
+ {
+ return _baseHandle;
+ }
+ set
+ {
+ _baseHandle = value;
+ }
+ }
+}
+
+public class ObjectDestroyedEventArgs : EventArgs
+{
+ private RefObject _refObject;
+
+ public RefObject RefObject
+ {
+ get
+ {
+ return _refObject;
+ }
+ set
+ {
+ _refObject = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ObjectCreatedEventHandler(object source, ObjectCreatedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ObjectDestroyedEventHandler(object source, ObjectDestroyedEventArgs e);
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ObjectCreatedEventCallbackDelegate(IntPtr baseHandle);
+ private ObjectCreatedEventHandler _objectRegistryObjectCreatedEventHandler;
+ private ObjectCreatedEventCallbackDelegate _objectRegistryObjectCreatedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ObjectDestroyedEventCallbackDelegate(IntPtr fefObject);
+ private ObjectDestroyedEventHandler _objectRegistryObjectDestroyedEventHandler;
+ private ObjectDestroyedEventCallbackDelegate _objectRegistryObjectDestroyedEventCallbackDelegate;
+
+ public event ObjectCreatedEventHandler ObjectCreated
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_objectRegistryObjectCreatedEventHandler == null)
+ {
+ _objectRegistryObjectCreatedEventHandler += value;
+
+ _objectRegistryObjectCreatedEventCallbackDelegate = new ObjectCreatedEventCallbackDelegate(OnObjectCreated);
+ this.ObjectCreatedSignal().Connect(_objectRegistryObjectCreatedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_objectRegistryObjectCreatedEventHandler != null)
+ {
+ this.ObjectCreatedSignal().Disconnect(_objectRegistryObjectCreatedEventCallbackDelegate);
+ }
+
+ _objectRegistryObjectCreatedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ObjectRegistry ObjectCreatedSignal
+ private void OnObjectCreated(IntPtr baseHandle)
+ {
+ ObjectCreatedEventArgs e = new ObjectCreatedEventArgs();
+
+ // Populate all members of "e" (ObjectCreatedEventArgs) with real data
+ //e.BaseHandle = BaseHandle.GetBaseHandleFromPtr(baseHandle); //GetBaseHandleFromPtr() is not present in BaseHandle.cs. Not sure what is the reason?
+
+ if (_objectRegistryObjectCreatedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _objectRegistryObjectCreatedEventHandler(this, e);
+ }
+ }
+
+ public event ObjectDestroyedEventHandler ObjectDestroyed
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_objectRegistryObjectDestroyedEventHandler == null)
+ {
+ _objectRegistryObjectDestroyedEventHandler += value;
+
+ _objectRegistryObjectDestroyedEventCallbackDelegate = new ObjectDestroyedEventCallbackDelegate(OnObjectDestroyed);
+ this.ObjectDestroyedSignal().Connect(_objectRegistryObjectDestroyedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_objectRegistryObjectDestroyedEventHandler != null)
+ {
+ this.ObjectDestroyedSignal().Disconnect(_objectRegistryObjectDestroyedEventCallbackDelegate);
+ }
+
+ _objectRegistryObjectDestroyedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ObjectRegistry ObjectDestroyedSignal
+ private void OnObjectDestroyed(IntPtr refObject)
+ {
+ ObjectDestroyedEventArgs e = new ObjectDestroyedEventArgs();
+
+ // Populate all members of "e" (ObjectDestroyedEventArgs) with real data
+ e.RefObject = RefObject.GetRefObjectFromPtr(refObject);
+
+ if (_objectRegistryObjectDestroyedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _objectRegistryObjectDestroyedEventHandler(this, e);
+ }
+ }
+
+%}
+%enddef
+
+%typemap(cscode) Dali::BaseHandle %{
+ public static BaseHandle GetBaseHandleFromPtr(global::System.IntPtr cPtr) {
+ BaseHandle ret = new BaseHandle(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+%}
+
+
+%define DALI_OBJECT_REGISTRY_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ OBJECT_REGISTRY_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ OBJECT_REGISTRY_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_OBJECT_REGISTRY_EVENTHANDLER_PARAM( Dali, ObjectRegistry);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define PAGETURNVIEW_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define PAGETURNVIEW_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class PagePanStartedEventArgs : EventArgs
+{
+ private PageTurnView _pageTurnView;
+
+ public PageTurnView PageTurnView
+ {
+ get
+ {
+ return _pageTurnView;
+ }
+ set
+ {
+ _pageTurnView = value;
+ }
+ }
+}
+
+public class PagePanFinishedEventArgs : EventArgs
+{
+ private PageTurnView _pageTurnView;
+
+ public PageTurnView PageTurnView
+ {
+ get
+ {
+ return _pageTurnView;
+ }
+ set
+ {
+ _pageTurnView = value;
+ }
+ }
+}
+
+public class PageTurnStartedEventArgs : EventArgs
+{
+ private PageTurnView _pageTurnView;
+ private uint _pageIndex;
+ private bool _isTurningForward;
+
+ public PageTurnView PageTurnView
+ {
+ get
+ {
+ return _pageTurnView;
+ }
+ set
+ {
+ _pageTurnView = value;
+ }
+ }
+
+ public uint PageIndex
+ {
+ get
+ {
+ return _pageIndex;
+ }
+ set
+ {
+ _pageIndex = value;
+ }
+ }
+
+ public bool IsTurningForward
+ {
+ get
+ {
+ return _isTurningForward;
+ }
+ set
+ {
+ _isTurningForward = value;
+ }
+ }
+
+}
+
+public class PageTurnFinishedEventArgs : EventArgs
+{
+ private PageTurnView _pageTurnView;
+ private uint _pageIndex;
+ private bool _isTurningForward;
+
+ public PageTurnView PageTurnView
+ {
+ get
+ {
+ return _pageTurnView;
+ }
+ set
+ {
+ _pageTurnView = value;
+ }
+ }
+
+ public uint PageIndex
+ {
+ get
+ {
+ return _pageIndex;
+ }
+ set
+ {
+ _pageIndex = value;
+ }
+ }
+
+ public bool IsTurningForward
+ {
+ get
+ {
+ return _isTurningForward;
+ }
+ set
+ {
+ _isTurningForward = value;
+ }
+ }
+
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void PagePanStartedEventHandler(object source, PagePanStartedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void PagePanFinishedEventHandler(object source, PagePanFinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void PageTurnStartedEventHandler(object source, PageTurnStartedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void PageTurnFinishedEventHandler(object source, PageTurnFinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void PagePanStartedCallbackDelegate(IntPtr page);
+ private PagePanStartedEventHandler _pageTurnViewPagePanStartedEventHandler;
+ private PagePanStartedCallbackDelegate _pageTurnViewPagePanStartedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void PagePanFinishedCallbackDelegate(IntPtr page);
+ private PagePanFinishedEventHandler _pageTurnViewPagePanFinishedEventHandler;
+ private PagePanFinishedCallbackDelegate _pageTurnViewPagePanFinishedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void PageTurnStartedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward);
+ private PageTurnStartedEventHandler _pageTurnViewPageTurnStartedEventHandler;
+ private PageTurnStartedCallbackDelegate _pageTurnViewPageTurnStartedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void PageTurnFinishedCallbackDelegate(IntPtr page, uint pageIndex, bool isTurningForward);
+ private PageTurnFinishedEventHandler _pageTurnViewPageTurnFinishedEventHandler;
+ private PageTurnFinishedCallbackDelegate _pageTurnViewPageTurnFinishedCallbackDelegate;
+
+ public event PagePanStartedEventHandler PagePanStarted
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_pageTurnViewPagePanStartedEventHandler == null)
+ {
+ _pageTurnViewPagePanStartedEventHandler += value;
+
+ _pageTurnViewPagePanStartedCallbackDelegate = new PagePanStartedCallbackDelegate(OnPagePanStarted);
+ this.PagePanStartedSignal().Connect(_pageTurnViewPagePanStartedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_pageTurnViewPagePanStartedEventHandler != null)
+ {
+ this.PagePanStartedSignal().Disconnect(_pageTurnViewPagePanStartedCallbackDelegate);
+ }
+
+ _pageTurnViewPagePanStartedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for PageTurnView PagePanStarted signal
+ private void OnPagePanStarted(IntPtr page)
+ {
+ PagePanStartedEventArgs e = new PagePanStartedEventArgs();
+
+ // Populate all members of "e" (PagePanStartedEventArgs) with real page
+ e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page );
+
+ if (_pageTurnViewPagePanStartedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ _pageTurnViewPagePanStartedEventHandler(this, e);
+ }
+ }
+
+ public event PagePanFinishedEventHandler PagePanFinished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_pageTurnViewPagePanFinishedEventHandler == null)
+ {
+ _pageTurnViewPagePanFinishedEventHandler += value;
+
+ _pageTurnViewPagePanFinishedCallbackDelegate = new PagePanFinishedCallbackDelegate(OnPagePanFinished);
+ this.PagePanFinishedSignal().Connect(_pageTurnViewPagePanFinishedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_pageTurnViewPagePanFinishedEventHandler != null)
+ {
+ this.PagePanFinishedSignal().Disconnect(_pageTurnViewPagePanFinishedCallbackDelegate);
+ }
+
+ _pageTurnViewPagePanFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for PageTurnView PagePanFinished signal
+ private void OnPagePanFinished(IntPtr page)
+ {
+ PagePanFinishedEventArgs e = new PagePanFinishedEventArgs();
+
+ // Populate all members of "e" (PagePanFinishedEventArgs) with real page
+ e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page );
+
+ if (_pageTurnViewPagePanFinishedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ _pageTurnViewPagePanFinishedEventHandler(this, e);
+ }
+ }
+
+
+ public event PageTurnStartedEventHandler PageTurnStarted
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_pageTurnViewPageTurnStartedEventHandler == null)
+ {
+ _pageTurnViewPageTurnStartedEventHandler += value;
+
+ _pageTurnViewPageTurnStartedCallbackDelegate = new PageTurnStartedCallbackDelegate(OnPageTurnStarted);
+ this.PageTurnStartedSignal().Connect(_pageTurnViewPageTurnStartedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_pageTurnViewPageTurnStartedEventHandler != null)
+ {
+ this.PageTurnStartedSignal().Disconnect(_pageTurnViewPageTurnStartedCallbackDelegate);
+ }
+
+ _pageTurnViewPageTurnStartedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for PageTurnView PageTurnStarted signal
+ private void OnPageTurnStarted(IntPtr page, uint pageIndex, bool isTurningForward)
+ {
+ PageTurnStartedEventArgs e = new PageTurnStartedEventArgs();
+
+ // Populate all members of "e" (PageTurnStartedEventArgs) with real page
+ e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page );
+ e.PageIndex = pageIndex;
+ e.IsTurningForward = isTurningForward;
+
+
+ if (_pageTurnViewPageTurnStartedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ _pageTurnViewPageTurnStartedEventHandler(this, e);
+ }
+ }
+
+
+ public event PageTurnFinishedEventHandler PageTurnFinished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_pageTurnViewPageTurnFinishedEventHandler == null)
+ {
+ _pageTurnViewPageTurnFinishedEventHandler += value;
+
+ _pageTurnViewPageTurnFinishedCallbackDelegate = new PageTurnFinishedCallbackDelegate(OnPageTurnFinished);
+ this.PageTurnFinishedSignal().Connect(_pageTurnViewPageTurnFinishedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_pageTurnViewPageTurnFinishedEventHandler != null)
+ {
+ this.PageTurnFinishedSignal().Disconnect(_pageTurnViewPageTurnFinishedCallbackDelegate);
+ }
+
+ _pageTurnViewPageTurnFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for PageTurnView PageTurnFinished signal
+ private void OnPageTurnFinished(IntPtr page, uint pageIndex, bool isTurningForward)
+ {
+ PageTurnFinishedEventArgs e = new PageTurnFinishedEventArgs();
+
+ // Populate all members of "e" (PageTurnFinishedEventArgs) with real page
+ e.PageTurnView = PageTurnView.GetPageTurnViewFromPtr( page );
+ e.PageIndex = pageIndex;
+ e.IsTurningForward = isTurningForward;
+
+
+ if (_pageTurnViewPageTurnFinishedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ _pageTurnViewPageTurnFinishedEventHandler(this, e);
+ }
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_PAGETURNVIEW_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ PAGETURNVIEW_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ PAGETURNVIEW_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_PAGETURNVIEW_EVENTHANDLER_PARAM( Dali::Toolkit, PageTurnView);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define PANGESTURE_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define PANGESTURE_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class DetectedEventArgs : EventArgs
+{
+ private Actor _actor;
+ private PanGesture _panGesture;
+
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ public PanGesture PanGesture
+ {
+ get
+ {
+ return _panGesture;
+ }
+ set
+ {
+ _panGesture = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void DetectedEventHandler(object source, DetectedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr panGesture);
+ private DetectedEventHandler _panGestureEventHandler;
+ private DetectedCallbackDelegate _panGestureCallbackDelegate;
+
+
+ public event DetectedEventHandler Detected
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_panGestureEventHandler == null)
+ {
+ _panGestureEventHandler += value;
+
+ _panGestureCallbackDelegate = new DetectedCallbackDelegate(OnPanGestureDetected);
+ this.DetectedSignal().Connect(_panGestureCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_panGestureEventHandler != null)
+ {
+ this.DetectedSignal().Disconnect(_panGestureCallbackDelegate);
+ }
+
+ _panGestureEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnPanGestureDetected(IntPtr actor, IntPtr panGesture)
+ {
+ DetectedEventArgs e = new DetectedEventArgs();
+
+ // Populate all members of "e" (PanGestureEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.PanGesture = Dali.PanGesture.GetPanGestureFromPtr(panGesture);
+
+ if (_panGestureEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _panGestureEventHandler(this, e);
+ }
+
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_PANGESTURE_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ PANGESTURE_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ PANGESTURE_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_PANGESTURE_EVENTHANDLER_PARAM( Dali, PanGestureDetector);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define PINCHGESTURE_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define PINCHGESTURE_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class DetectedEventArgs : EventArgs
+{
+ private Actor _actor;
+ private PinchGesture _pinchGesture;
+
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ public PinchGesture PinchGesture
+ {
+ get
+ {
+ return _pinchGesture;
+ }
+ set
+ {
+ _pinchGesture = value;
+ }
+ }
+}
+
+[UnmanagedFunctionPointer(CallingConvention.StdCall)]
+public delegate void DetectedEventHandler(object source, DetectedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr pinchGesture);
+ private DetectedEventHandler _pinchGestureEventHandler;
+ private DetectedCallbackDelegate _pinchGestureCallbackDelegate;
+
+
+ public event DetectedEventHandler Detected
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_pinchGestureEventHandler == null)
+ {
+ _pinchGestureEventHandler += value;
+
+ _pinchGestureCallbackDelegate = new DetectedCallbackDelegate(OnPinchGestureDetected);
+ this.DetectedSignal().Connect(_pinchGestureCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_pinchGestureEventHandler != null)
+ {
+ this.DetectedSignal().Disconnect(_pinchGestureCallbackDelegate);
+ }
+
+ _pinchGestureEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnPinchGestureDetected(IntPtr actor, IntPtr pinchGesture)
+ {
+ DetectedEventArgs e = new DetectedEventArgs();
+
+ // Populate all members of "e" (DetectedEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.PinchGesture = Dali.PinchGesture.GetPinchGestureFromPtr(pinchGesture);
+
+ if (_pinchGestureEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _pinchGestureEventHandler(this, e);
+ }
+
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_PINCHGESTURE_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ PINCHGESTURE_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ PINCHGESTURE_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_PINCHGESTURE_EVENTHANDLER_PARAM( Dali, PinchGestureDetector);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define POPUP_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+
+%define POPUP_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+ public class OutsideTouchedEventArgs : EventArgs
+ {
+ }
+
+ public class ShowingEventArgs : EventArgs
+ {
+ }
+
+ public class ShownEventArgs : EventArgs
+ {
+ }
+
+ public class HidingEventArgs : EventArgs
+ {
+ }
+
+ public class HiddenEventArgs : EventArgs
+ {
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void OutsideTouchedEventHandler(object source, OutsideTouchedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ShowingEventHandler(object source, ShowingEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ShownEventHandler(object source, ShownEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void HidingEventHandler(object source, HidingEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void HiddenEventHandler(object source, HiddenEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void OutsideTouchedEventCallbackDelegate();
+ private OutsideTouchedEventHandler _popUpOutsideTouchedEventHandler;
+ private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ShowingEventCallbackDelegate();
+ private ShowingEventHandler _popUpShowingEventHandler;
+ private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ShownEventCallbackDelegate();
+ private ShownEventHandler _popUpShownEventHandler;
+ private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void HidingEventCallbackDelegate();
+ private HidingEventHandler _popUpHidingEventHandler;
+ private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void HiddenEventCallbackDelegate();
+ private HiddenEventHandler _popUpHiddenEventHandler;
+ private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate;
+
+ public event OutsideTouchedEventHandler OutsideTouched
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_popUpOutsideTouchedEventHandler == null)
+ {
+ _popUpOutsideTouchedEventHandler += value;
+
+ _popUpOutsideTouchedEventCallbackDelegate = new OutsideTouchedEventCallbackDelegate(OnOutsideTouched);
+ this.OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_popUpOutsideTouchedEventHandler != null)
+ {
+ this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
+ }
+
+ _popUpOutsideTouchedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Popup OutsideTouchedSignal
+ private void OnOutsideTouched()
+ {
+ OutsideTouchedEventArgs e = new OutsideTouchedEventArgs();
+
+ if (_popUpOutsideTouchedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _popUpOutsideTouchedEventHandler(this, e);
+ }
+ }
+
+ public event ShowingEventHandler Showing
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_popUpShowingEventHandler == null)
+ {
+ _popUpShowingEventHandler += value;
+
+ _popUpShowingEventCallbackDelegate = new ShowingEventCallbackDelegate(OnShowing);
+ this.ShowingSignal().Connect(_popUpShowingEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_popUpShowingEventHandler != null)
+ {
+ this.ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
+ }
+
+ _popUpShowingEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ShowingSignal
+ private void OnShowing()
+ {
+ ShowingEventArgs e = new ShowingEventArgs();
+
+ if (_popUpShowingEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _popUpShowingEventHandler(this, e);
+ }
+ }
+
+
+ public event ShownEventHandler Shown
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_popUpShownEventHandler == null)
+ {
+ _popUpShownEventHandler += value;
+
+ _popUpShownEventCallbackDelegate = new ShownEventCallbackDelegate(OnShown);
+ this.ShownSignal().Connect(_popUpShownEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_popUpShownEventHandler != null)
+ {
+ this.ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
+ }
+
+ _popUpShownEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ShownSignal
+ private void OnShown()
+ {
+ ShownEventArgs e = new ShownEventArgs();
+
+ if (_popUpShownEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _popUpShownEventHandler(this, e);
+ }
+ }
+
+ public event HidingEventHandler Hiding
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_popUpHidingEventHandler == null)
+ {
+ _popUpHidingEventHandler += value;
+
+ _popUpHidingEventCallbackDelegate = new HidingEventCallbackDelegate(OnHiding);
+ this.HidingSignal().Connect(_popUpHidingEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_popUpHidingEventHandler != null)
+ {
+ this.HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
+ }
+
+ _popUpHidingEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for HidingSignal
+ private void OnHiding()
+ {
+ HidingEventArgs e = new HidingEventArgs();
+
+ if (_popUpHidingEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _popUpHidingEventHandler(this, e);
+ }
+ }
+
+ public event HiddenEventHandler Hidden
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_popUpHiddenEventHandler == null)
+ {
+ _popUpHiddenEventHandler += value;
+
+ _popUpHiddenEventCallbackDelegate = new HiddenEventCallbackDelegate(OnHidden);
+ this.HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_popUpHiddenEventHandler != null)
+ {
+ this.HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
+ }
+
+ _popUpHiddenEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for HiddenSignal
+ private void OnHidden()
+ {
+ HiddenEventArgs e = new HiddenEventArgs();
+
+ if (_popUpHiddenEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _popUpHiddenEventHandler(this, e);
+ }
+ }
+%}
+%enddef
+
+%define DALI_POPUP_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ POPUP_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ POPUP_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_POPUP_EVENTHANDLER_PARAM( Dali::Toolkit, Popup);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define PROPERTYNOTIFICATION_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+
+%define PROPERTYNOTIFICATION_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+/**
+ * @brief Event arguments that passed via Notify signal
+ *
+ */
+public class NotifyEventArgs : EventArgs
+{
+ private PropertyNotification _propertyNotification;
+
+ /**
+ * @brief PropertyNotification - is the PropertyNotification handle that has the notification properties.
+ *
+ */
+ public PropertyNotification PropertyNotification
+ {
+ get
+ {
+ return _propertyNotification;
+ }
+ set
+ {
+ _propertyNotification = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void NotifyEventHandler(object source, NotifyEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void NotifyEventCallbackDelegate(IntPtr propertyNotification);
+ private NotifyEventHandler _propertyNotificationNotifyEventHandler;
+ private NotifyEventCallbackDelegate _propertyNotificationNotifyEventCallbackDelegate;
+
+ /**
+ * @brief Event for Notified signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of NotifyEventHandler) provided by the user.
+ * Notified signal is emitted when the notification upon a condition of the property being met, has occurred.
+ */
+ public event NotifyEventHandler Notified
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_propertyNotificationNotifyEventHandler == null)
+ {
+ _propertyNotificationNotifyEventHandler += value;
+
+ _propertyNotificationNotifyEventCallbackDelegate = new NotifyEventCallbackDelegate(OnPropertyNotificationNotify);
+ this.NotifySignal().Connect(_propertyNotificationNotifyEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_propertyNotificationNotifyEventHandler != null)
+ {
+ this.NotifySignal().Disconnect(_propertyNotificationNotifyEventCallbackDelegate);
+ }
+
+ _propertyNotificationNotifyEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for PropertyNotification NotifySignal
+ private void OnPropertyNotificationNotify(IntPtr propertyNotification)
+ {
+ NotifyEventArgs e = new NotifyEventArgs();
+ e.PropertyNotification = GetPropertyNotificationFromPtr(propertyNotification);
+
+ if (_propertyNotificationNotifyEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _propertyNotificationNotifyEventHandler(this, e);
+ }
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+%enddef
+
+%define DALI_PROPERTYNOTIFICATION_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ PROPERTYNOTIFICATION_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ PROPERTYNOTIFICATION_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_PROPERTYNOTIFICATION_EVENTHANDLER_PARAM( Dali, PropertyNotification);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define RenderTask_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define RenderTask_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class FinishedEventArgs : EventArgs
+{
+ private RenderTask _renderTask;
+
+ public RenderTask RenderTask
+ {
+ get
+ {
+ return _renderTask;
+ }
+ set
+ {
+ _renderTask = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void RenderTaskEventHandler(object source, FinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void RenderTaskCallbackDelegate(IntPtr renderTask);
+ private RenderTaskEventHandler _renderTaskEventHandler;
+ private RenderTaskCallbackDelegate _renderTaskCallbackDelegate;
+
+
+ public event RenderTaskEventHandler Finished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_renderTaskEventHandler == null)
+ {
+ _renderTaskEventHandler += value;
+
+ _renderTaskCallbackDelegate = new RenderTaskCallbackDelegate(OnFinished);
+ this.FinishedSignal().Connect(_renderTaskCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_renderTaskEventHandler != null)
+ {
+ this.FinishedSignal().Disconnect(_renderTaskCallbackDelegate);
+ }
+
+ _renderTaskEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnFinished(IntPtr actor, IntPtr renderTask)
+ {
+ FinishedEventArgs e = new FinishedEventArgs();
+
+ // Populate all members of "e" (FinishedEventArgs) with real data
+ e.RenderTask = Dali.RenderTask.GetRenderTaskFromPtr(renderTask);
+
+ if (_renderTaskEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _renderTaskEventHandler(this, e);
+ }
+
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_renderTask_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ RenderTask_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ RenderTask_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_renderTask_EVENTHANDLER_PARAM( Dali, RenderTask);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define ResourceImage_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define ResourceImage_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class LoadingFinishedEventArgs : EventArgs
+{
+ private ResourceImage _resourceImage;
+
+ public ResourceImage ResourceImage
+ {
+ get
+ {
+ return _resourceImage;
+ }
+ set
+ {
+ _resourceImage = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void LoadingFinishedEventHandler(object source, LoadingFinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void LoadingFinishedEventCallbackDelegate(IntPtr ResourceImage);
+ private LoadingFinishedEventHandler _resourceImageLoadingFinishedEventHandler;
+ private LoadingFinishedEventCallbackDelegate _resourceImageLoadingFinishedEventCallbackDelegate;
+
+ public event LoadingFinishedEventHandler LoadingFinished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_resourceImageLoadingFinishedEventHandler == null)
+ {
+ _resourceImageLoadingFinishedEventHandler += value;
+
+ _resourceImageLoadingFinishedEventCallbackDelegate = new LoadingFinishedEventCallbackDelegate(OnLoadingFinished);
+ this.LoadingFinishedSignal().Connect(_resourceImageLoadingFinishedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_resourceImageLoadingFinishedEventHandler != null)
+ {
+ this.LoadingFinishedSignal().Disconnect(_resourceImageLoadingFinishedEventCallbackDelegate);
+ }
+
+ _resourceImageLoadingFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ResourceImage LoadingFinishedSignal
+ private void OnLoadingFinished(IntPtr data)
+ {
+ LoadingFinishedEventArgs e = new LoadingFinishedEventArgs();
+
+ // Populate all members of "e" (LoadingFinishedEventArgs) with real data
+ e.ResourceImage = ResourceImage.GetResourceImageFromPtr(data);
+
+ if (_resourceImageLoadingFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _resourceImageLoadingFinishedEventHandler(this, e);
+ }
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_resourceImage_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ ResourceImage_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ ResourceImage_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_resourceImage_EVENTHANDLER_PARAM( Dali, ResourceImage);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define SCROLLABLE_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define SCROLLABLE_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class StartedEventArgs : EventArgs
+{
+ private Vector2 _vector2;
+
+ public Vector2 Vector2
+ {
+ get
+ {
+ return _vector2;
+ }
+ set
+ {
+ _vector2 = value;
+ }
+ }
+}
+
+public class UpdatedEventArgs : EventArgs
+{
+ private Vector2 _vector2;
+
+ public Vector2 Vector2
+ {
+ get
+ {
+ return _vector2;
+ }
+ set
+ {
+ _vector2 = value;
+ }
+ }
+}
+
+public class CompletedEventArgs : EventArgs
+{
+ private Vector2 _vector2;
+
+ public Vector2 Vector2
+ {
+ get
+ {
+ return _vector2;
+ }
+ set
+ {
+ _vector2 = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void StartedEventHandler(object source, StartedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void UpdatedEventHandler(object source, UpdatedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void CompletedEventHandler(object source, CompletedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void StartedCallbackDelegate(IntPtr vector2);
+ private StartedEventHandler _scrollableStartedEventHandler;
+ private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void UpdatedCallbackDelegate(IntPtr vector2);
+ private UpdatedEventHandler _scrollableUpdatedEventHandler;
+ private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void CompletedCallbackDelegate(IntPtr vector2);
+ private CompletedEventHandler _scrollableCompletedEventHandler;
+ private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
+
+ public event StartedEventHandler ScrollStarted
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_scrollableStartedEventHandler == null)
+ {
+ _scrollableStartedEventHandler += value;
+
+ _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
+ this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_scrollableStartedEventHandler != null)
+ {
+ this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
+ }
+
+ _scrollableStartedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnStarted(IntPtr vector2)
+ {
+ StartedEventArgs e = new StartedEventArgs();
+
+ // Populate all members of "e" (StartedEventArgs) with real data
+ e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
+
+ if (_scrollableStartedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _scrollableStartedEventHandler(this, e);
+ }
+
+ }
+
+ public event UpdatedEventHandler ScrollUpdated
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_scrollableUpdatedEventHandler == null)
+ {
+ _scrollableUpdatedEventHandler += value;
+
+ _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
+ this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_scrollableUpdatedEventHandler != null)
+ {
+ this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
+ }
+
+ _scrollableUpdatedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnUpdated(IntPtr vector2)
+ {
+ UpdatedEventArgs e = new UpdatedEventArgs();
+
+ // Populate all members of "e" (UpdatedEventArgs) with real data
+ e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
+
+ if (_scrollableUpdatedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _scrollableUpdatedEventHandler(this, e);
+ }
+
+ }
+
+ public event CompletedEventHandler ScrollCompleted
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_scrollableCompletedEventHandler == null)
+ {
+ _scrollableCompletedEventHandler += value;
+
+ _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
+ this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_scrollableCompletedEventHandler != null)
+ {
+ this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
+ }
+
+ _scrollableCompletedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnCompleted(IntPtr vector2)
+ {
+ CompletedEventArgs e = new CompletedEventArgs();
+
+ // Populate all members of "e" (CompletedEventArgs) with real data
+ e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
+
+ if (_scrollableCompletedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _scrollableCompletedEventHandler(this, e);
+ }
+
+ }
+
+%}
+
+%enddef
+
+%define DALI_SCROLLABLE_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ SCROLLABLE_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ SCROLLABLE_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_SCROLLABLE_EVENTHANDLER_PARAM( Dali::Toolkit, Scrollable);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define SCROLLBAR_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+
+%define SCROLLBAR_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class PanFinishedEventArgs : EventArgs
+{
+}
+
+public class ScrollPositionIntervalReachedEventArgs : EventArgs
+{
+ private float _currentScrollPosition;
+
+ public float CurrentScrollPosition
+ {
+ get
+ {
+ return _currentScrollPosition;
+ }
+ set
+ {
+ _currentScrollPosition = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void PanFinishedEventHandler(object source, PanFinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ScrollPositionIntervalReachedEventHandler(object source, ScrollPositionIntervalReachedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void PanFinishedEventCallbackDelegate();
+ private PanFinishedEventHandler _scrollBarPanFinishedEventHandler;
+ private PanFinishedEventCallbackDelegate _scrollBarPanFinishedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ScrollPositionIntervalReachedEventCallbackDelegate();
+ private ScrollPositionIntervalReachedEventHandler _scrollBarScrollPositionIntervalReachedEventHandler;
+ private ScrollPositionIntervalReachedEventCallbackDelegate _scrollBarScrollPositionIntervalReachedEventCallbackDelegate;
+
+ public event PanFinishedEventHandler PanFinished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_scrollBarPanFinishedEventHandler == null)
+ {
+ _scrollBarPanFinishedEventHandler += value;
+
+ _scrollBarPanFinishedEventCallbackDelegate = new PanFinishedEventCallbackDelegate(OnScrollBarPanFinished);
+ this.PanFinishedSignal().Connect(_scrollBarPanFinishedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_scrollBarPanFinishedEventHandler != null)
+ {
+ this.PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
+ }
+
+ _scrollBarPanFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ScrollBar PanFinishedSignal
+ private void OnScrollBarPanFinished()
+ {
+ PanFinishedEventArgs e = new PanFinishedEventArgs();
+
+ if (_scrollBarPanFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _scrollBarPanFinishedEventHandler(this, e);
+ }
+ }
+
+
+ public event ScrollPositionIntervalReachedEventHandler ScrollPositionIntervalReached
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_scrollBarScrollPositionIntervalReachedEventHandler == null)
+ {
+ _scrollBarScrollPositionIntervalReachedEventHandler += value;
+
+ _scrollBarScrollPositionIntervalReachedEventCallbackDelegate = new ScrollPositionIntervalReachedEventCallbackDelegate(OnScrollBarScrollPositionIntervalReached);
+ this.ScrollPositionIntervalReachedSignal().Connect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
+ {
+ this.ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
+ }
+
+ _scrollBarScrollPositionIntervalReachedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ScrollBar ScrollPositionIntervalReachedSignal
+ private void OnScrollBarScrollPositionIntervalReached()
+ {
+ ScrollPositionIntervalReachedEventArgs e = new ScrollPositionIntervalReachedEventArgs();
+
+ if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _scrollBarScrollPositionIntervalReachedEventHandler(this, e);
+ }
+ }
+
+%}
+%enddef
+
+%define DALI_SCROLLBAR_EVENTHANDLER_PARAM( NameSpace, ClassName)
+ SCROLLBAR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ SCROLLBAR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+%enddef
+
+namespace Dali
+{
+ DALI_SCROLLBAR_EVENTHANDLER_PARAM( Dali::Toolkit, ScrollBar);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define SCROLLVIEW_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define SCROLLVIEW_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+/**
+ * @brief Event arguments that passed via SnapStarted signal
+ *
+ */
+public class SnapStartedEventArgs : EventArgs
+{
+ private Dali.ScrollView.SnapEvent _snapEvent;
+
+ /**
+ * @brief SnapEvent - is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick).
+ *
+ */
+ public Dali.ScrollView.SnapEvent SnapEventInfo
+ {
+ get
+ {
+ return _snapEvent;
+ }
+ set
+ {
+ _snapEvent = value;
+ }
+ }
+}
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void SnapStartedEventHandler(object source, SnapStartedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void SnapStartedCallbackDelegate(IntPtr data);
+ private SnapStartedEventHandler _scrollViewSnapStartedEventHandler;
+ private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate;
+
+ /**
+ * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of SnapStartedEventHandler) provided by the user.
+ * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target
+ * position, scale, rotation for the snap or flick).
+ *
+ */
+ public event SnapStartedEventHandler SnapStarted
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_scrollViewSnapStartedEventHandler == null)
+ {
+ _scrollViewSnapStartedEventHandler += value;
+
+ _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted);
+ this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_scrollViewSnapStartedEventHandler != null)
+ {
+ this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
+ }
+
+ _scrollViewSnapStartedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for ScrollView SnapStarted signal
+ private void OnSnapStarted(IntPtr data)
+ {
+ SnapStartedEventArgs e = new SnapStartedEventArgs();
+
+ // Populate all members of "e" (SnapStartedEventArgs) with real data
+ e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr( data );
+
+ if (_scrollViewSnapStartedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _scrollViewSnapStartedEventHandler(this, e);
+ }
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_SCROLLVIEW_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ SCROLLVIEW_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ SCROLLVIEW_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_SCROLLVIEW_EVENTHANDLER_PARAM( Dali::Toolkit, ScrollView);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define SLIDER_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define SLIDER_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class ValueChangedEventArgs : EventArgs
+{
+ private Slider _slider;
+ private float _slideValue;
+
+ public Slider Slider
+ {
+ get
+ {
+ return _slider;
+ }
+ set
+ {
+ _slider = value;
+ }
+ }
+
+ public float SlideValue
+ {
+ get
+ {
+ return _slideValue;
+ }
+ set
+ {
+ _slideValue = value;
+ }
+ }
+}
+
+public class SlidingFinishedEventArgs : EventArgs
+{
+ private Slider _slider;
+ private float _slideValue;
+
+ public Slider Slider
+ {
+ get
+ {
+ return _slider;
+ }
+ set
+ {
+ _slider = value;
+ }
+ }
+
+ public float SlideValue
+ {
+ get
+ {
+ return _slideValue;
+ }
+ set
+ {
+ _slideValue = value;
+ }
+ }
+}
+
+public class MarkReachedEventArgs : EventArgs
+{
+ private Slider _slider;
+ private int _slideValue;
+
+ public Slider Slider
+ {
+ get
+ {
+ return _slider;
+ }
+ set
+ {
+ _slider = value;
+ }
+ }
+
+ public int SlideValue
+ {
+ get
+ {
+ return _slideValue;
+ }
+ set
+ {
+ _slideValue = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool ValueChangedEventHandler(object source, ValueChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool SlidingFinishedEventHandler(object source, SlidingFinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool MarkReachedEventHandler(object source, MarkReachedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool ValueChangedCallbackDelegate(IntPtr slider, float slideValue);
+ private ValueChangedEventHandler _sliderValueChangedEventHandler;
+ private ValueChangedCallbackDelegate _sliderValueChangedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool SlidingFinishedCallbackDelegate(IntPtr slider, float slideValue);
+ private SlidingFinishedEventHandler _sliderSlidingFinishedEventHandler;
+ private SlidingFinishedCallbackDelegate _sliderSlidingFinishedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool MarkReachedCallbackDelegate(IntPtr slider, int slideValue);
+ private MarkReachedEventHandler _sliderMarkReachedEventHandler;
+ private MarkReachedCallbackDelegate _sliderMarkReachedCallbackDelegate;
+
+ public event ValueChangedEventHandler ValueChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_sliderValueChangedEventHandler == null)
+ {
+ _sliderValueChangedEventHandler += value;
+
+ _sliderValueChangedCallbackDelegate = new ValueChangedCallbackDelegate(OnValueChanged);
+ this.ValueChangedSignal().Connect(_sliderValueChangedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_sliderValueChangedEventHandler != null)
+ {
+ this.ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate);
+ }
+
+ _sliderValueChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Slider ValueChanged signal
+ private bool OnValueChanged(IntPtr slider, float slideValue)
+ {
+ ValueChangedEventArgs e = new ValueChangedEventArgs();
+
+ // Populate all members of "e" (ValueChangedEventArgs) with real page
+ e.Slider = Slider.GetSliderFromPtr( slider );
+ e.SlideValue = slideValue;
+
+ if (_sliderValueChangedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ return _sliderValueChangedEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event SlidingFinishedEventHandler SlidingFinished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_sliderSlidingFinishedEventHandler == null)
+ {
+ _sliderSlidingFinishedEventHandler += value;
+
+ _sliderSlidingFinishedCallbackDelegate = new SlidingFinishedCallbackDelegate(OnSlidingFinished);
+ this.SlidingFinishedSignal().Connect(_sliderSlidingFinishedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_sliderSlidingFinishedEventHandler != null)
+ {
+ this.SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate);
+ }
+
+ _sliderSlidingFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Slider SlidingFinished signal
+ private bool OnSlidingFinished(IntPtr slider, float slideValue)
+ {
+ SlidingFinishedEventArgs e = new SlidingFinishedEventArgs();
+
+ // Populate all members of "e" (SlidingFinishedEventArgs) with real page
+ e.Slider = Slider.GetSliderFromPtr( slider );
+ e.SlideValue = slideValue;
+
+ if (_sliderSlidingFinishedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ return _sliderSlidingFinishedEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public event MarkReachedEventHandler MarkReached
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_sliderMarkReachedEventHandler == null)
+ {
+ _sliderMarkReachedEventHandler += value;
+
+ _sliderMarkReachedCallbackDelegate = new MarkReachedCallbackDelegate(OnMarkReached);
+ this.MarkReachedSignal().Connect(_sliderMarkReachedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_sliderMarkReachedEventHandler != null)
+ {
+ this.MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate);
+ }
+
+ _sliderMarkReachedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Slider MarkReached signal
+ private bool OnMarkReached(IntPtr slider, int slideValue)
+ {
+ MarkReachedEventArgs e = new MarkReachedEventArgs();
+
+ // Populate all members of "e" (MarkReachedEventArgs) with real page
+ e.Slider = Slider.GetSliderFromPtr( slider );
+ e.SlideValue = slideValue;
+
+ if (_sliderMarkReachedEventHandler != null)
+ {
+ //here we send all page to user event handlers
+ return _sliderMarkReachedEventHandler(this, e);
+ }
+ return false;
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_SLIDER_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ SLIDER_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ SLIDER_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_SLIDER_EVENTHANDLER_PARAM( Dali::Toolkit, Slider);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define STAGE_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define STAGE_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+/**
+ * @brief Event arguments that passed via Touch signal
+ *
+ */
+public class TouchEventArgs : EventArgs
+{
+ private TouchData _touchData;
+
+ /**
+ * @brief TouchData - contains the information of touch points
+ *
+ */
+ public TouchData TouchData
+ {
+ get
+ {
+ return _touchData;
+ }
+ set
+ {
+ _touchData = value;
+ }
+ }
+}
+
+
+/**
+ * @brief Event arguments that passed via Wheel signal
+ *
+ */
+public class WheelEventArgs : EventArgs
+{
+ private WheelEvent _wheelEvent;
+
+ /**
+ * @brief WheelEvent - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
+ *
+ */
+ public WheelEvent WheelEvent
+ {
+ get
+ {
+ return _wheelEvent;
+ }
+ set
+ {
+ _wheelEvent = value;
+ }
+ }
+}
+
+/**
+ * @brief Event arguments that passed via KeyEvent signal
+ *
+ */
+public class KeyEventArgs : EventArgs
+{
+ private KeyEvent _keyEvent;
+
+ /**
+ * @brief KeyEvent - is the keyevent sent to Stage.
+ *
+ */
+ public KeyEvent KeyEvent
+ {
+ get
+ {
+ return _keyEvent;
+ }
+ set
+ {
+ _keyEvent = value;
+ }
+ }
+}
+
+/**
+ * @brief Event arguments that passed via EventProcessingFinished signal
+ *
+ */
+public class EventProcessingFinishedEventArgs : EventArgs
+{
+}
+
+/**
+ * @brief Event arguments that passed via ContextLost signal
+ *
+ */
+public class ContextLostEventArgs : EventArgs
+{
+}
+
+/**
+ * @brief Event arguments that passed via ContextRegained signal
+ *
+ */
+public class ContextRegainedEventArgs : EventArgs
+{
+}
+
+/**
+ * @brief Event arguments that passed via SceneCreated signal
+ *
+ */
+public class SceneCreatedEventArgs : EventArgs
+{
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void TouchEventHandler(object source, TouchEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void WheelEventHandler(object source, WheelEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void KeyEventHandler(object source, KeyEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void EventProcessingFinishedEventHandler(object source, EventProcessingFinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ContextLostEventHandler(object source, ContextLostEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void ContextRegainedEventHandler(object source, ContextRegainedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void SceneCreatedEventHandler(object source, SceneCreatedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void StageTouchCallbackDelegate(IntPtr data);
+ private TouchEventHandler _stageTouchEventHandler;
+ private StageTouchCallbackDelegate _stageTouchCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void WheelCallbackDelegate(IntPtr data);
+ private WheelEventHandler _stageWheelEventHandler;
+ private WheelCallbackDelegate _stageWheelCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void KeyCallbackDelegate(IntPtr data);
+ private KeyEventHandler _stageKeyEventHandler;
+ private KeyCallbackDelegate _stageKeyCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void EventProcessingFinishedEventCallbackDelegate();
+ private EventProcessingFinishedEventHandler _stageEventProcessingFinishedEventHandler;
+ private EventProcessingFinishedEventCallbackDelegate _stageEventProcessingFinishedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ContextLostEventCallbackDelegate();
+ private ContextLostEventHandler _stageContextLostEventHandler;
+ private ContextLostEventCallbackDelegate _stageContextLostEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void ContextRegainedEventCallbackDelegate();
+ private ContextRegainedEventHandler _stageContextRegainedEventHandler;
+ private ContextRegainedEventCallbackDelegate _stageContextRegainedEventCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void SceneCreatedEventCallbackDelegate();
+ private SceneCreatedEventHandler _stageSceneCreatedEventHandler;
+ private SceneCreatedEventCallbackDelegate _stageSceneCreatedEventCallbackDelegate;
+
+ /**
+ * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of TouchEventHandler) provided by the user.
+ * Touched signal is emitted when the screen is touched and when the touch ends
+ * (i.e. the down & up touch events only).
+ *
+ */
+ public event TouchEventHandler Touched
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageTouchEventHandler == null)
+ {
+ _stageTouchEventHandler += value;
+
+ _stageTouchCallbackDelegate = new StageTouchCallbackDelegate(OnStageTouch);
+ this.TouchSignal().Connect(_stageTouchCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageTouchEventHandler != null)
+ {
+ this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
+ }
+
+ _stageTouchEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage Touch signal
+ private void OnStageTouch(IntPtr data)
+ {
+ TouchEventArgs e = new TouchEventArgs();
+
+ // Populate all members of "e" (TouchEventArgs) with real data
+ e.TouchData = TouchData.GetTouchDataFromPtr( data );
+
+ if (_stageTouchEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageTouchEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of WheelEventHandler) provided by the user.
+ * WheelMoved signal is emitted is emitted when wheel event is received.
+ *
+ */
+ public event WheelEventHandler WheelMoved
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageWheelEventHandler == null)
+ {
+ _stageWheelEventHandler += value;
+
+ _stageWheelCallbackDelegate = new WheelCallbackDelegate(OnStageWheel);
+ this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageWheelEventHandler != null)
+ {
+ this.WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
+ }
+
+ _stageWheelEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage WheelEventsignal
+ private void OnStageWheel(IntPtr data)
+ {
+ WheelEventArgs e = new WheelEventArgs();
+
+ // Populate all members of "e" (WheelEventArgs) with real data
+ e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr( data );
+
+ if (_stageWheelEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageWheelEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of KeyEventHandler) provided by the user.
+ * KeyPressed signal is emitted is emitted when key event is received.
+ *
+ */
+ public event KeyEventHandler KeyPressed
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageKeyEventHandler == null)
+ {
+ _stageKeyEventHandler += value;
+
+ _stageKeyCallbackDelegate = new KeyCallbackDelegate(OnStageKey);
+ this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageKeyEventHandler != null)
+ {
+ this.KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
+ }
+
+ _stageKeyEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage KeyEventsignal
+ private void OnStageKey(IntPtr keyEvent)
+ {
+ KeyEventArgs e = new KeyEventArgs();
+
+ // Populate all members of "e" (KeyEventArgs) with real data
+ e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr( keyEvent );
+
+ if (_stageKeyEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageKeyEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for EventProcessingFinished signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of EventProcessingFinishedEventHandler) provided by the user.
+ * EventProcessingFinished signal is emitted just after the event processing is finished.
+ *
+ */
+ public event EventProcessingFinishedEventHandler EventProcessingFinished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageEventProcessingFinishedEventHandler == null)
+ {
+ _stageEventProcessingFinishedEventHandler += value;
+
+ _stageEventProcessingFinishedEventCallbackDelegate = new EventProcessingFinishedEventCallbackDelegate(OnEventProcessingFinished);
+ this.EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageEventProcessingFinishedEventHandler != null)
+ {
+ this.EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
+ }
+
+ _stageEventProcessingFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage EventProcessingFinishedSignal
+ private void OnEventProcessingFinished()
+ {
+ EventProcessingFinishedEventArgs e = new EventProcessingFinishedEventArgs();
+
+ if (_stageEventProcessingFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageEventProcessingFinishedEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for ContextLost signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of ContextLostEventHandler) provided by the user.
+ * ContextLost signal is emitted when the GL context is lost (Platform specific behaviour).
+ *
+ */
+ public event ContextLostEventHandler ContextLost
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageContextLostEventHandler == null)
+ {
+ _stageContextLostEventHandler += value;
+
+ _stageContextLostEventCallbackDelegate = new ContextLostEventCallbackDelegate(OnContextLost);
+ this.ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageContextLostEventHandler != null)
+ {
+ this.ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
+ }
+
+ _stageContextLostEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage ContextLostSignal
+ private void OnContextLost()
+ {
+ ContextLostEventArgs e = new ContextLostEventArgs();
+
+ if (_stageContextLostEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageContextLostEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for ContextRegained signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of ContextRegainedEventHandler) provided by the user.
+ * ContextRegained signal is emitted when the GL context is regained (Platform specific
+ * behaviour).
+ *
+ */
+ public event ContextRegainedEventHandler ContextRegained
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageContextRegainedEventHandler == null)
+ {
+ _stageContextRegainedEventHandler += value;
+
+ _stageContextRegainedEventCallbackDelegate = new ContextRegainedEventCallbackDelegate(OnContextRegained);
+ this.ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageContextRegainedEventHandler != null)
+ {
+ this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
+ }
+
+ _stageContextRegainedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage ContextRegainedSignal
+ private void OnContextRegained()
+ {
+ ContextRegainedEventArgs e = new ContextRegainedEventArgs();
+
+ if (_stageContextRegainedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageContextRegainedEventHandler(this, e);
+ }
+ }
+
+ /**
+ * @brief Event for SceneCreated signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of SceneCreatedEventHandler) provided by the user.
+ * SceneCreated signal is emitted after the initial scene is created.
+ *
+ */
+ public event SceneCreatedEventHandler SceneCreated
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_stageSceneCreatedEventHandler == null)
+ {
+ _stageSceneCreatedEventHandler += value;
+
+ _stageSceneCreatedEventCallbackDelegate = new SceneCreatedEventCallbackDelegate(OnSceneCreated);
+ this.SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_stageSceneCreatedEventHandler != null)
+ {
+ this.SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
+ }
+
+ _stageSceneCreatedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Stage SceneCreatedSignal
+ private void OnSceneCreated()
+ {
+ SceneCreatedEventArgs e = new SceneCreatedEventArgs();
+
+ if (_stageSceneCreatedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _stageSceneCreatedEventHandler(this, e);
+ }
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_STAGE_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ STAGE_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ STAGE_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_STAGE_EVENTHANDLER_PARAM( Dali, Stage);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define STYLEMANAGER_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+%}
+%enddef
+
+%define STYLEMANAGER_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+/**
+ * @brief Event arguments that passed via StyleChanged signal
+ *
+ */
+public class StyleChangedEventArgs : EventArgs
+{
+ private StyleManager _styleManager;
+ private Dali.StyleChangeType _styleChange;
+
+ /**
+ * @brief StyleManager - is the StyleManager that informs applications of system theme change,
+ * and supports application theme change at runtime.
+ *
+ */
+ public StyleManager StyleManager
+ {
+ get
+ {
+ return _styleManager;
+ }
+ set
+ {
+ _styleManager = value;
+ }
+ }
+
+ /**
+ * @brief StyleChange - contains Style change information (default font changed or
+ * default font size changed or theme has changed)
+ *
+ */
+ public Dali.StyleChangeType StyleChange
+ {
+ get
+ {
+ return _styleChange;
+ }
+ set
+ {
+ _styleChange = value;
+ }
+ }
+
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void StyleChangedEventHandler(object source, StyleChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void StyleChangedCallbackDelegate(IntPtr styleManager, Dali.StyleChangeType styleChange);
+ private StyleChangedEventHandler _styleManagerStyleChangedEventHandler;
+ private StyleChangedCallbackDelegate _styleManagerStyleChangedCallbackDelegate;
+
+ /**
+ * @brief Event for StyleChanged signal which can be used to subscribe/unsubscribe the
+ * event handler (in the type of StyleChangedEventHandler) provided by the user.
+ * StyleChanged signal is is emitted after the style (e.g. theme/font change) has changed
+ * and the controls have been informed.
+ */
+ public event StyleChangedEventHandler StyleChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_styleManagerStyleChangedEventHandler == null)
+ {
+ _styleManagerStyleChangedEventHandler += value;
+
+ _styleManagerStyleChangedCallbackDelegate = new StyleChangedCallbackDelegate(OnStyleChanged);
+ this.StyleChangedSignal().Connect(_styleManagerStyleChangedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_styleManagerStyleChangedEventHandler != null)
+ {
+ this.StyleChangedSignal().Disconnect(_styleManagerStyleChangedCallbackDelegate);
+ }
+
+ _styleManagerStyleChangedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for StyleManager StyleChangedsignal
+ private void OnStyleChanged(IntPtr styleManager, Dali.StyleChangeType styleChange)
+ {
+ StyleChangedEventArgs e = new StyleChangedEventArgs();
+
+ // Populate all members of "e" (StyleChangedEventArgs) with real data
+ e.StyleManager = StyleManager.GetStyleManagerFromPtr( styleManager );
+ e.StyleChange = styleChange;
+
+ if (_styleManagerStyleChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _styleManagerStyleChangedEventHandler(this, e);
+ }
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_STYLEMANAGER_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ STYLEMANAGER_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ STYLEMANAGER_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_STYLEMANAGER_EVENTHANDLER_PARAM( Dali::Toolkit, StyleManager);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define TapGesture_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+%}
+
+%enddef
+
+%define TapGesture_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+
+public class DetectedEventArgs : EventArgs
+{
+ private Actor _actor;
+ private TapGesture _tapGesture;
+
+ public Actor Actor
+ {
+ get
+ {
+ return _actor;
+ }
+ set
+ {
+ _actor = value;
+ }
+ }
+
+ public TapGesture TapGesture
+ {
+ get
+ {
+ return _tapGesture;
+ }
+ set
+ {
+ _tapGesture = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void DetectedEventHandler(object source, DetectedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr TapGesture);
+ private DetectedEventHandler _tapGestureEventHandler;
+ private DetectedCallbackDelegate _tapGestureCallbackDelegate;
+
+
+ public event DetectedEventHandler Detected
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_tapGestureEventHandler == null)
+ {
+ _tapGestureEventHandler += value;
+
+ _tapGestureCallbackDelegate = new DetectedCallbackDelegate(OnTapGestureDetected);
+ this.DetectedSignal().Connect(_tapGestureCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_tapGestureEventHandler != null)
+ {
+ this.DetectedSignal().Disconnect(_tapGestureCallbackDelegate);
+ }
+
+ _tapGestureEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnTapGestureDetected(IntPtr actor, IntPtr tapGesture)
+ {
+ DetectedEventArgs e = new DetectedEventArgs();
+
+ // Populate all members of "e" (DetectedEventArgs) with real data
+ e.Actor = Actor.GetActorFromPtr(actor);
+ e.TapGesture = Dali.TapGesture.GetTapGestureFromPtr(tapGesture);
+
+ if (_tapGestureEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _tapGestureEventHandler(this, e);
+ }
+
+ }
+
+
+public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_tapGesture_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ TapGesture_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ TapGesture_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_tapGesture_EVENTHANDLER_PARAM( Dali, TapGestureDetector);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define TEXTEDITOR_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define TEXTEDITOR_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+/**
+ * @brief Event arguments that passed via TextChanged signal
+ *
+ */
+public class TextChangedEventArgs : EventArgs
+{
+ private TextEditor _textEditor;
+ /**
+ * @brief TextEditor - is the texteditor control which has the text contents changed.
+ *
+ */
+ public TextEditor TextEditor
+ {
+ get
+ {
+ return _textEditor;
+ }
+ set
+ {
+ _textEditor = value;
+ }
+ }
+}
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void TextChangedEventHandler(object source, TextChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void TextChangedCallbackDelegate(IntPtr textEditor);
+ private TextChangedEventHandler _textEditorTextChangedEventHandler;
+ private TextChangedCallbackDelegate _textEditorTextChangedCallbackDelegate;
+
+ /**
+ * @brief Event for TextChanged signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of TextChangedEventHandler) provided by the user.
+ * TextChanged signal is emitted when the text changes.
+ */
+ public event TextChangedEventHandler TextChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_textEditorTextChangedEventHandler == null)
+ {
+ _textEditorTextChangedEventHandler += value;
+
+ _textEditorTextChangedCallbackDelegate = new TextChangedCallbackDelegate(OnTextChanged);
+ this.TextChangedSignal().Connect(_textEditorTextChangedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_textEditorTextChangedEventHandler != null)
+ {
+ this.TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
+ }
+
+ _textEditorTextChangedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnTextChanged(IntPtr textEditor)
+ {
+ TextChangedEventArgs e = new TextChangedEventArgs();
+
+ // Populate all members of "e" (TextChangedEventArgs) with real data
+ e.TextEditor = Dali.TextEditor.GetTextEditorFromPtr(textEditor);
+
+ if (_textEditorTextChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _textEditorTextChangedEventHandler(this, e);
+ }
+
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_TEXTEDITOR_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ TEXTEDITOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ TEXTEDITOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_TEXTEDITOR_EVENTHANDLER_PARAM( Dali::Toolkit, TextEditor);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define TEXTFIELD_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+
+%enddef
+
+%define TEXTFIELD_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+public class TextChangedEventArgs : EventArgs
+{
+ private TextField _textField;
+
+ public TextField TextField
+ {
+ get
+ {
+ return _textField;
+ }
+ set
+ {
+ _textField = value;
+ }
+ }
+}
+
+public class MaxLengthReachedEventArgs : EventArgs
+{
+ private TextField _textField;
+
+ public TextField TextField
+ {
+ get
+ {
+ return _textField;
+ }
+ set
+ {
+ _textField = value;
+ }
+ }
+}
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void TextChangedEventHandler(object source, TextChangedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void MaxLengthReachedEventHandler(object source, MaxLengthReachedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void TextChangedCallbackDelegate(IntPtr textField);
+ private TextChangedEventHandler _textFieldTextChangedEventHandler;
+ private TextChangedCallbackDelegate _textFieldTextChangedCallbackDelegate;
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void MaxLengthReachedCallbackDelegate(IntPtr textField);
+ private MaxLengthReachedEventHandler _textFieldMaxLengthReachedEventHandler;
+ private MaxLengthReachedCallbackDelegate _textFieldMaxLengthReachedCallbackDelegate;
+
+ public event TextChangedEventHandler TextChanged
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_textFieldTextChangedEventHandler == null)
+ {
+ _textFieldTextChangedEventHandler += value;
+
+ _textFieldTextChangedCallbackDelegate = new TextChangedCallbackDelegate(OnTextChanged);
+ this.TextChangedSignal().Connect(_textFieldTextChangedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_textFieldTextChangedEventHandler != null)
+ {
+ this.TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
+ }
+
+ _textFieldTextChangedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnTextChanged(IntPtr textField)
+ {
+ TextChangedEventArgs e = new TextChangedEventArgs();
+
+ // Populate all members of "e" (TextChangedEventArgs) with real data
+ e.TextField = Dali.TextField.GetTextFieldFromPtr(textField);
+
+ if (_textFieldTextChangedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _textFieldTextChangedEventHandler(this, e);
+ }
+
+ }
+
+ public event MaxLengthReachedEventHandler MaxLengthReached
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_textFieldMaxLengthReachedEventHandler == null)
+ {
+ _textFieldMaxLengthReachedEventHandler += value;
+
+ _textFieldMaxLengthReachedCallbackDelegate = new MaxLengthReachedCallbackDelegate(OnMaxLengthReached);
+ this.MaxLengthReachedSignal().Connect(_textFieldMaxLengthReachedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_textFieldMaxLengthReachedEventHandler != null)
+ {
+ this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
+ }
+
+ _textFieldMaxLengthReachedEventHandler -= value;
+ }
+ }
+ }
+
+ private void OnMaxLengthReached(IntPtr textField)
+ {
+ MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
+
+ // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
+ e.TextField = Dali.TextField.GetTextFieldFromPtr(textField);
+
+ if (_textFieldMaxLengthReachedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _textFieldMaxLengthReachedEventHandler(this, e);
+ }
+
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+%define DALI_TEXTFIELD_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ TEXTFIELD_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ TEXTFIELD_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_TEXTFIELD_EVENTHANDLER_PARAM( Dali::Toolkit, TextField);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define TIMER_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define TIMER_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+ /**
+ * @brief Event arguments that passed via Tick signal
+ *
+ */
+ public class TickEventArgs : EventArgs
+ {
+ }
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate bool TickEventHandler(object source, TickEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate bool TickCallbackDelegate(IntPtr data);
+ private TickEventHandler _timerTickEventHandler;
+ private TickCallbackDelegate _timerTickCallbackDelegate;
+
+ /**
+ * @brief Event for Ticked signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of TickEventHandler) provided by the user.
+ * Ticked signal is emitted after specified time interval.
+ */
+ public event TickEventHandler Ticked
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_timerTickEventHandler == null)
+ {
+ _timerTickEventHandler += value;
+
+ _timerTickCallbackDelegate = new TickCallbackDelegate(OnTick);
+ this.TickSignal().Connect(_timerTickCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_timerTickEventHandler != null)
+ {
+ this.TickSignal().Disconnect(_timerTickCallbackDelegate);
+ }
+
+ _timerTickEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for Timer Tick signal
+ private bool OnTick(IntPtr data)
+ {
+ TickEventArgs e = new TickEventArgs();
+
+ if (_timerTickEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ return _timerTickEventHandler(this, e);
+ }
+ return false;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_TIMER_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ TIMER_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ TIMER_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_TIMER_EVENTHANDLER_PARAM( Dali::Adaptor, Timer);
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.
+ *
+ */
+
+%define VIDEOVIEW_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+
+%}
+%enddef
+
+%define VIDEOVIEW_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
+%typemap(cscode) NameSpace::ClassName %{
+
+/**
+ * @brief Event arguments that passed via Finished signal
+ *
+ */
+public class FinishedEventArgs : EventArgs
+{
+ private VideoView _videoView;
+
+ /**
+ * @brief VideoView - VideoView is a control for video playback and display.
+ *
+ */
+ public VideoView VideoView
+ {
+ get
+ {
+ return _videoView;
+ }
+ set
+ {
+ _videoView = value;
+ }
+ }
+}
+
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ public delegate void FinishedEventHandler(object source, FinishedEventArgs e);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void FinishedCallbackDelegate(IntPtr data);
+ private FinishedEventHandler _videoViewFinishedEventHandler;
+ private FinishedCallbackDelegate _videoViewFinishedCallbackDelegate;
+
+ /**
+ * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler
+ * (in the type of FinishedEventHandler) provided by the user.
+ * Finished signal is emitted when a video playback have finished.
+ */
+ public event FinishedEventHandler Finished
+ {
+ add
+ {
+ lock(this)
+ {
+ // Restricted to only one listener
+ if (_videoViewFinishedEventHandler == null)
+ {
+ _videoViewFinishedEventHandler += value;
+
+ _videoViewFinishedCallbackDelegate = new FinishedCallbackDelegate(OnFinished);
+ this.FinishedSignal().Connect(_videoViewFinishedCallbackDelegate);
+ }
+ }
+ }
+
+ remove
+ {
+ lock(this)
+ {
+ if (_videoViewFinishedEventHandler != null)
+ {
+ this.FinishedSignal().Disconnect(_videoViewFinishedCallbackDelegate);
+ }
+
+ _videoViewFinishedEventHandler -= value;
+ }
+ }
+ }
+
+ // Callback for VideoView Finished signal
+ private void OnFinished(IntPtr data)
+ {
+ FinishedEventArgs e = new FinishedEventArgs();
+
+ // Populate all members of "e" (FinishedEventArgs) with real data
+ e.VideoView = VideoView.GetVideoViewFromPtr( data );
+
+ if (_videoViewFinishedEventHandler != null)
+ {
+ //here we send all data to user event handlers
+ _videoViewFinishedEventHandler(this, e);
+ }
+ }
+
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+%}
+
+%enddef
+
+
+%define DALI_VIDEOVIEW_EVENTHANDLER_PARAM( NameSpace, ClassName)
+
+ VIDEOVIEW_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ VIDEOVIEW_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+
+%enddef
+
+namespace Dali
+{
+ DALI_VIDEOVIEW_EVENTHANDLER_PARAM( Dali::Toolkit, VideoView);
+}
DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, TextField );
DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, VideoView );
DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, Slider );
+DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit::ScrollView, SnapEvent );
* so we have make them ourselves
*/
+%define SIGNAL_TEMPLATE_HELPER_0( returnType, returnFunc)
+ template<> class Signal< returnType () >
+ {
+ public:
+ %extend
+ {
+ bool Empty() const
+ {
+ return $self->Empty();
+ }
+ std::size_t GetConnectionCount() const
+ {
+ return $self->GetConnectionCount();
+ }
+ void Connect( returnType ( *func ) () )
+ {
+ $self->Connect( func );
+ }
+ void Disconnect( returnType ( *func ) () )
+ {
+ $self->Disconnect( func );
+ }
+ returnType Emit()
+ {
+ returnFunc $self->Emit();
+ }
+ }
+ };
+%enddef
+
%define SIGNAL_TEMPLATE_HELPER_1( returnType, returnFunc, argumentType )
template<> class Signal< returnType ( argumentType ) >
{
%enddef
// Macro to define a csharp signal.
+// 0 param signals ( no return )
+%define DALI_SIGNAL_0_PARAM()
+
+ SIGNAL_TYPEMAP_HELPER( void (*func) () );
+ SIGNAL_TEMPLATE_HELPER_0( void, NO_RETURN_FUNC);
+%enddef
+
// 1 param signals ( no return )
%define DALI_SIGNAL_1_PARAM( argumentType1 )
namespace Dali
{
+// Signal< void () >
+DALI_SIGNAL_0_PARAM();
+
// Signal< void (Actor) >
DALI_SIGNAL_1_PARAM( Dali::Actor );
DALI_SIGNAL_1_PARAM( const Dali::RenderTask& );
// Signal< bool ( const Dali::Toolkit::AccessibilityManager& ) >
-DALI_SIGNAL_1_PARAM_RETURN( bool ,const Dali::Toolkit::AccessibilityManager& );
+DALI_SIGNAL_1_PARAM_RETURN( bool ,Dali::Toolkit::AccessibilityManager& );
// Signal< bool ( const Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent& ) >
DALI_SIGNAL_2_PARAM_RETURN( bool ,const Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent& );
// void Signal< Dali::Actor, bool >;
DALI_SIGNAL_2_PARAM( Dali::Actor, bool);
+// void Signal< Dali::Actor, Dali::Actor >;
+DALI_SIGNAL_2_PARAM( Dali::Actor, Dali::Actor);
+
// bool Signal< Dali::Toolkit::Button >;
DALI_SIGNAL_1_PARAM_RETURN( bool, Dali::Toolkit::Button);
DALI_SIGNAL_1_PARAM( Dali::Toolkit::TextEditor );
// void Signal< Dali::Toolkit::TextField >;
-DALI_SIGNAL_1_PARAM( Dali::Toolkit::TextField )
+DALI_SIGNAL_1_PARAM( Dali::Toolkit::TextField );
// bool Signal< Dali::Toolkit::Control, const Dali::KeyEvent& >;
DALI_SIGNAL_2_PARAM_RETURN( bool, Dali::Toolkit::Control, const Dali::KeyEvent& );
namespace MyCSharpExample
{
- class Example
+ class Example
+ {
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ delegate void CallbackDelegate(IntPtr appPtr); // void, void delgate
+
+ private Dali.Application _application;
+
+ public Example(Dali.Application application)
+ {
+ _application = application;
+ Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
+
+ _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize);
+ Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
+ }
+
+ public void Initialize(object source, AUIApplicationInitEventArgs e)
{
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- delegate void CallbackDelegate(IntPtr appPtr); // void, void delgate
-
- private Dali.Application _application;
-
- public Example(Dali.Application application)
- {
- _application = application;
-
- CallbackDelegate initializeCallback = new CallbackDelegate( Initialize );
- Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
-
- _application.InitSignal().Connect( initializeCallback );
- Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
- }
-
- private void Initialize(IntPtr appPtr)
- {
- Handle handle = new Handle();
- int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE);
- float myProperty = 0.0f;
- handle.GetProperty(myPropertyIndex).Get(ref myProperty);
- Console.WriteLine( "myProperty value: " + myProperty );
-
- int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new Property.Value(new Vector2(5.0f, 5.0f)), Property.AccessMode.READ_WRITE);
- Vector2 myProperty2 = new Vector2(0.0f, 0.0f);
- handle.GetProperty(myPropertyIndex2).Get(myProperty2);
- Console.WriteLine( "myProperty2 value: " + myProperty2.x + ", " + myProperty2.y );
-
- Actor actor = new Actor();
- actor.Size = new Vector3(200.0f, 200.0f, 0.0f);
- actor.Name = "MyActor";
- actor.Color = new Vector4(1.0f, 0.0f, 1.0f, 0.8f);
- Console.WriteLine("Actor id: {0}", actor.GetId());
- Console.WriteLine("Actor size: " + actor.Size.x + ", " + actor.Size.y);
- Console.WriteLine("Actor name: " + actor.Name);
-
- Stage stage = Stage.GetCurrent();
- stage.SetBackgroundColor( NDalic.WHITE );
-
- Vector2 stageSize = stage.GetSize();
- Console.WriteLine("Stage size: " + stageSize.x + ", " + stageSize.y);
- stage.Add(actor);
-
- TextLabel text = new TextLabel("Hello Mono World");
- text.ParentOrigin = NDalic.ParentOriginCenter;
- text.AnchorPoint = NDalic.AnchorPointCenter;
- text.HorizontalAlignment = "CENTER";
- stage.Add(text);
-
- Console.WriteLine( "Text label text: " + text.Text );
-
- Console.WriteLine( "Text label point size: " + text.PointSize );
- text.PointSize = 32.0f;
- Console.WriteLine( "Text label new point size: " + text.PointSize );
-
- using (RectInteger ri = new RectInteger(02,05,20,30))
- {
- Console.WriteLine( " Created " + ri );
- Console.WriteLine( " IsEmpty() = " + ri.IsEmpty() );
- Console.WriteLine( " Left = " + ri.Left() );
- Console.WriteLine( " Right = " + ri.Right() );
- Console.WriteLine( " Top = " + ri.Top() );
- Console.WriteLine( " Bottom = " + ri.Bottom() );
- Console.WriteLine( " Area = " + ri.Area() );
- }
- Console.WriteLine( " *************************" );
- using (RectInteger ri2 = new RectInteger(02,05,20,30))
- {
- Console.WriteLine( " Created " + ri2 );
- ri2.Set(1,1,40,40);
- Console.WriteLine( " IsEmpty() = " + ri2.IsEmpty() );
- Console.WriteLine( " Left = " + ri2.Left() );
- Console.WriteLine( " Right = " + ri2.Right() );
- Console.WriteLine( " Top = " + ri2.Top() );
- Console.WriteLine( " Bottom = " + ri2.Bottom() );
- Console.WriteLine( " Area = " + ri2.Area() );
- }
- Console.WriteLine( " *************************" );
- using (RectDouble rd = new RectDouble(02,05,20.5,30.5))
- {
- Console.WriteLine( " Created " + rd );
- Console.WriteLine( " IsEmpty() = " + rd.IsEmpty() );
- Console.WriteLine( " Left = " + rd.Left() );
- Console.WriteLine( " Right = " + rd.Right() );
- Console.WriteLine( " Top = " + rd.Top() );
- Console.WriteLine( " Bottom = " + rd.Bottom() );
- Console.WriteLine( " Area = " + rd.Area() );
- }
- Console.WriteLine( " *************************" );
- RectDouble rd2 = new RectDouble();
- rd2.x = 10;
- rd2.y = 10;
- rd2.width = 20;
- rd2.height = 20;
- Console.WriteLine( " Created " + rd2 );
- Console.WriteLine( " IsEmpty() = " + rd2.IsEmpty() );
- Console.WriteLine( " Left = " + rd2.Left() );
- Console.WriteLine( " Right = " + rd2.Right() );
- Console.WriteLine( " Top = " + rd2.Top() );
- Console.WriteLine( " Bottom = " + rd2.Bottom() );
- Console.WriteLine( " Area = " + rd2.Area() );
-
- Console.WriteLine( " *************************" );
- Vector2 vector2 = new Vector2(100, 50);
- Console.WriteLine( " Created " + vector2 );
- Console.WriteLine( " Vector2 x = " + vector2.x + ", y = " + vector2.y );
- vector2 += new Vector2(20, 20);
- Console.WriteLine( " Vector2 x = " + vector2[0] + ", y = " + vector2[1] );
- vector2.x += 10;
- vector2.y += 10;
- Console.WriteLine( " Vector2 width = " + vector2.width + ", height = " + vector2.height );
- vector2 += new Vector2(15, 15);
- Console.WriteLine( " Vector2 width = " + vector2[0] + ", height = " + vector2[1] );
-
- Console.WriteLine( " *************************" );
- Vector3 vector3 = new Vector3(20, 100, 50);
- Console.WriteLine( " Created " + vector3 );
- Console.WriteLine( " Vector3 x = " + vector3.x + ", y = " + vector3.y + ", z = " + vector3.z );
- vector3 += new Vector3(20, 20, 20);
- Console.WriteLine( " Vector3 x = " + vector3[0] + ", y = " + vector3[1] + ", z = " + vector3[2] );
- vector3.x += 10;
- vector3.y += 10;
- vector3.z += 10;
- Console.WriteLine( " Vector3 width = " + vector3.width + ", height = " + vector3.height + ", depth = " + vector3.depth );
- Vector3 parentOrigin = NDalic.ParentOriginBottomRight;
- Console.WriteLine( " parentOrigin x = " + parentOrigin.x + ", y = " + parentOrigin.y + ", z = " + parentOrigin.z );
-
- Console.WriteLine( " *************************" );
- Vector4 vector4 = new Vector4(20, 100, 50, 200);
- Console.WriteLine( " Created " + vector4 );
- Console.WriteLine( " Vector4 x = " + vector4.x + ", y = " + vector4.y + ", z = " + vector4.z + ", w = " + vector4.w );
- vector4 += new Vector4(20, 20, 20, 20);
- Console.WriteLine( " Vector4 x = " + vector4[0] + ", y = " + vector4[1] + ", z = " + vector4[2] + ", w = " + vector4[3] );
- vector4.x += 10;
- vector4.y += 10;
- vector4.z += 10;
- vector4.w += 10;
- Console.WriteLine( " Vector4 r = " + vector4.r + ", g = " + vector4.g + ", b = " + vector4.b + ", a = " + vector4.a );
- }
-
- public void MainLoop()
- {
- _application.MainLoop ();
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main(string[] args)
- {
- Console.WriteLine ("Hello Mono World");
-
- Example example = new Example(Application.NewApplication());
- example.MainLoop ();
- }
+ Handle handle = new Handle();
+ int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE);
+ float myProperty = 0.0f;
+ handle.GetProperty(myPropertyIndex).Get(ref myProperty);
+ Console.WriteLine( "myProperty value: " + myProperty );
+
+ int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new Property.Value(new Vector2(5.0f, 5.0f)), Property.AccessMode.READ_WRITE);
+ Vector2 myProperty2 = new Vector2(0.0f, 0.0f);
+ handle.GetProperty(myPropertyIndex2).Get(myProperty2);
+ Console.WriteLine( "myProperty2 value: " + myProperty2.x + ", " + myProperty2.y );
+
+ Actor actor = new Actor();
+ actor.Size = new Vector3(200.0f, 200.0f, 0.0f);
+ actor.Name = "MyActor";
+ actor.Color = new Vector4(1.0f, 0.0f, 1.0f, 0.8f);
+ Console.WriteLine("Actor id: {0}", actor.GetId());
+ Console.WriteLine("Actor size: " + actor.Size.x + ", " + actor.Size.y);
+ Console.WriteLine("Actor name: " + actor.Name);
+
+ Stage stage = Stage.GetCurrent();
+ stage.SetBackgroundColor( NDalic.WHITE );
+
+ Vector2 stageSize = stage.GetSize();
+ Console.WriteLine("Stage size: " + stageSize.x + ", " + stageSize.y);
+ stage.Add(actor);
+
+ TextLabel text = new TextLabel("Hello Mono World");
+ text.ParentOrigin = NDalic.ParentOriginCenter;
+ text.AnchorPoint = NDalic.AnchorPointCenter;
+ text.HorizontalAlignment = "CENTER";
+ stage.Add(text);
+
+ Console.WriteLine( "Text label text: " + text.Text );
+
+ Console.WriteLine( "Text label point size: " + text.PointSize );
+ text.PointSize = 32.0f;
+ Console.WriteLine( "Text label new point size: " + text.PointSize );
+
+ using (RectInteger ri = new RectInteger(02,05,20,30))
+ {
+ Console.WriteLine( " Created " + ri );
+ Console.WriteLine( " IsEmpty() = " + ri.IsEmpty() );
+ Console.WriteLine( " Left = " + ri.Left() );
+ Console.WriteLine( " Right = " + ri.Right() );
+ Console.WriteLine( " Top = " + ri.Top() );
+ Console.WriteLine( " Bottom = " + ri.Bottom() );
+ Console.WriteLine( " Area = " + ri.Area() );
+ }
+ Console.WriteLine( " *************************" );
+ using (RectInteger ri2 = new RectInteger(02,05,20,30))
+ {
+ Console.WriteLine( " Created " + ri2 );
+ ri2.Set(1,1,40,40);
+ Console.WriteLine( " IsEmpty() = " + ri2.IsEmpty() );
+ Console.WriteLine( " Left = " + ri2.Left() );
+ Console.WriteLine( " Right = " + ri2.Right() );
+ Console.WriteLine( " Top = " + ri2.Top() );
+ Console.WriteLine( " Bottom = " + ri2.Bottom() );
+ Console.WriteLine( " Area = " + ri2.Area() );
+ }
+ Console.WriteLine( " *************************" );
+ using (RectDouble rd = new RectDouble(02,05,20.5,30.5))
+ {
+ Console.WriteLine( " Created " + rd );
+ Console.WriteLine( " IsEmpty() = " + rd.IsEmpty() );
+ Console.WriteLine( " Left = " + rd.Left() );
+ Console.WriteLine( " Right = " + rd.Right() );
+ Console.WriteLine( " Top = " + rd.Top() );
+ Console.WriteLine( " Bottom = " + rd.Bottom() );
+ Console.WriteLine( " Area = " + rd.Area() );
+ }
+ Console.WriteLine( " *************************" );
+ RectDouble rd2 = new RectDouble();
+ rd2.x = 10;
+ rd2.y = 10;
+ rd2.width = 20;
+ rd2.height = 20;
+ Console.WriteLine( " Created " + rd2 );
+ Console.WriteLine( " IsEmpty() = " + rd2.IsEmpty() );
+ Console.WriteLine( " Left = " + rd2.Left() );
+ Console.WriteLine( " Right = " + rd2.Right() );
+ Console.WriteLine( " Top = " + rd2.Top() );
+ Console.WriteLine( " Bottom = " + rd2.Bottom() );
+ Console.WriteLine( " Area = " + rd2.Area() );
+
+ Console.WriteLine( " *************************" );
+ Vector2 vector2 = new Vector2(100, 50);
+ Console.WriteLine( " Created " + vector2 );
+ Console.WriteLine( " Vector2 x = " + vector2.x + ", y = " + vector2.y );
+ vector2 += new Vector2(20, 20);
+ Console.WriteLine( " Vector2 x = " + vector2[0] + ", y = " + vector2[1] );
+ vector2.x += 10;
+ vector2.y += 10;
+ Console.WriteLine( " Vector2 width = " + vector2.width + ", height = " + vector2.height );
+ vector2 += new Vector2(15, 15);
+ Console.WriteLine( " Vector2 width = " + vector2[0] + ", height = " + vector2[1] );
+
+ Console.WriteLine( " *************************" );
+ Vector3 vector3 = new Vector3(20, 100, 50);
+ Console.WriteLine( " Created " + vector3 );
+ Console.WriteLine( " Vector3 x = " + vector3.x + ", y = " + vector3.y + ", z = " + vector3.z );
+ vector3 += new Vector3(20, 20, 20);
+ Console.WriteLine( " Vector3 x = " + vector3[0] + ", y = " + vector3[1] + ", z = " + vector3[2] );
+ vector3.x += 10;
+ vector3.y += 10;
+ vector3.z += 10;
+ Console.WriteLine( " Vector3 width = " + vector3.width + ", height = " + vector3.height + ", depth = " + vector3.depth );
+ Vector3 parentOrigin = NDalic.ParentOriginBottomRight;
+ Console.WriteLine( " parentOrigin x = " + parentOrigin.x + ", y = " + parentOrigin.y + ", z = " + parentOrigin.z );
+
+ Console.WriteLine( " *************************" );
+ Vector4 vector4 = new Vector4(20, 100, 50, 200);
+ Console.WriteLine( " Created " + vector4 );
+ Console.WriteLine( " Vector4 x = " + vector4.x + ", y = " + vector4.y + ", z = " + vector4.z + ", w = " + vector4.w );
+ vector4 += new Vector4(20, 20, 20, 20);
+ Console.WriteLine( " Vector4 x = " + vector4[0] + ", y = " + vector4[1] + ", z = " + vector4[2] + ", w = " + vector4[3] );
+ vector4.x += 10;
+ vector4.y += 10;
+ vector4.z += 10;
+ vector4.w += 10;
+ Console.WriteLine( " Vector4 r = " + vector4.r + ", g = " + vector4.g + ", b = " + vector4.b + ", a = " + vector4.a );
}
+
+ public void MainLoop()
+ {
+ _application.MainLoop ();
+ }
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ Console.WriteLine ("Hello Mono World");
+
+ Example example = new Example(Application.NewApplication());
+ example.MainLoop ();
+ }
+ }
}
public Example(Dali.Application application)
{
_application = application;
-
- CallbackDelegate initializeCallback = new CallbackDelegate( Initialize );
- _application.InitSignal().Connect( initializeCallback );
+ _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize);
}
- private void Initialize(IntPtr appPtr)
+ public void Initialize(object source, AUIApplicationInitEventArgs e)
{
+ Console.WriteLine("Customized Application Initialize event handler");
Stage stage = Stage.GetCurrent();
stage.SetBackgroundColor( NDalic.WHITE );
- // Connect the signal callback for stage touched signal
- TouchCallbackDelegate stageTouchedCallback = new TouchCallbackDelegate( OnStageTouched );
- stage.TouchSignal().Connect( stageTouchedCallback );
+ stage.Touched += new Dali.Stage.TouchEventHandler(OnStageTouched);
// Add a _text label to the stage
_text = new TextLabel("Hello Mono World");
}
// Callback for _animation finished signal handling
- private void AnimationFinished(IntPtr data)
+ public void AnimationFinished(object source, Animation.FinishedEventArgs e)
{
- Animation _animation = Animation.GetAnimationFromPtr( data );
- Console.WriteLine("Animation finished: duration = " + _animation.GetDuration());
+ Console.WriteLine("Customized Animation Finished Event handler");
+ Console.WriteLine("Animation finished: duration = " + e.Animation.GetDuration());
}
// Callback for stage touched signal handling
- private void OnStageTouched(IntPtr data)
+ public void OnStageTouched(object source, Stage.TouchEventArgs e)
{
- TouchData touchData = TouchData.GetTouchDataFromPtr( data );
+ //TouchData touchData = TouchData.GetTouchDataFromPtr( data );
// Only animate the _text label when touch down happens
- if( touchData.GetState(0) == PointStateType.DOWN )
+ if( e.TouchData.GetState(0) == PointStateType.DOWN )
{
+ Console.WriteLine("Customized Stage Touch event handler");
// Create a new _animation
if( _animation )
{
_animation.AnimateTo(new Property(_text, Actor.Property.ORIENTATION), new Property.Value(new Quaternion( new Radian( new Degree( 0.0f ) ), Vector3.XAXIS )), new AlphaFunction(AlphaFunction.BuiltinFunction.LINEAR), new TimePeriod(0.5f, 0.5f));
// Connect the signal callback for animaiton finished signal
- AnimationCallbackDelegate animFinishedDelegate = new AnimationCallbackDelegate( AnimationFinished );
- _animation.FinishedSignal().Connect( animFinishedDelegate );
+ _animation.Finished += new Dali.Animation.FinishedEventHandler(AnimationFinished);
// Play the _animation
_animation.Play();
public Example(Dali.Application application)
{
_application = application;
-
- CallbackDelegate initializeCallback = new CallbackDelegate( Initialize );
- _application.InitSignal().Connect( initializeCallback );
+ _application.Initialized += new Dali.AUIApplicationInitEventHandler(Initialize);
}
- private void Initialize(IntPtr appPtr)
+
+ public void Initialize(object source, AUIApplicationInitEventArgs e)
{
CreateScrollView();
}
_scrollView.Add(_scrollBar);
// Connect to the OnRelayout signal
- ActorCallbackDelegate ScrollViewRelayoutCallback = new ActorCallbackDelegate( OnScrollViewRelayout );
- _scrollView.OnRelayoutSignal().Connect( ScrollViewRelayoutCallback );
+ _scrollView.OnRelayoutEvent += new Dali.Actor.OnRelayoutEventHandler(OnScrollViewRelayout);
}
- private void OnScrollViewRelayout(IntPtr data)
+ private void OnScrollViewRelayout(object source, Actor.OnRelayoutEventArgs e)
{
// Set the correct scroll bar size after size negotiation of scroll view is done
_scrollBar.Size = new Vector3(0.0f, _scrollView.GetRelayoutSize(DimensionType.WIDTH), 0.0f);