From: huiyueun <35286162+huiyueun@users.noreply.github.com> Date: Mon, 14 Oct 2019 08:51:09 +0000 (+0900) Subject: [NUI] Integration from dalihub (#1073) X-Git-Tag: 5.5_M2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d89a94f9c5bd8743660e425dc2ceaefcfbf9cbba;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Integration from dalihub (#1073) * Sync dalihub/TizenFX and Samsung/TizenFX for NUI-XAML related changes Change-Id: Ied6a4e33d462712672e65763572c6aa88065a897 Signed-off-by: dongsug.song * Support multi-cascade property setting for Size2D and Position2D Change-Id: Ibeb9e9ec639742b78054fe8592167170ea0f00d2 Signed-off-by: dongsug.song * Add Mouse button type to identify clicked button kind Change-Id: Id336dacccff8192a17cda552ba8ea2ba01121002 Signed-off-by: dongsug.song * [NUI] Fix dereferenced error Value trans, which has null value, is dereferenced in member access expression trans.Name Change-Id: I5b7fa2a0e96689ff0cc0821f2e931ed3c4001e9d Signed-off-by: huiyu.eun * [NUI]Remove ContentProperty attribute and update sample Change-Id: I0fbb60bf00c609779b6f5ff4d8aff58a26a8819e * [NUI] Fix children count of LayoutGroup bug Change-Id: I73c3b597b161a2dbf4a52d37e6f5a0ab4858c11b Signed-off-by: huiyu.eun * [NUI] Make Layout APIs as internal ones (will be changed as public APIs later) Conflicts: src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapper.cs src/Tizen.NUI/src/internal/Layouting/LayoutItemWrapper.cs Change-Id: Ia64e9216d10ecc986e0e977f2e0633a03813faec Signed-off-by: dongsug.song * Fix View Size2D. We force Size2D by setting fixed width & height specifications. There is no really another way in new layouting without breaking new layouting design. Also MinimumSize will set now Layout.MinimumSize. Change-Id: I65c7eaab8210c83b9097426a14c8877173d11f90 * [NUI] Change Parameter type of KeyboardRepeatInfo APIs - Changed the parameters type of KeyboardRepeatInfo APIs : 'double' type -> 'float' type Change-Id: I3940e44a1a2c116988e8c947ae81d118ac266000 Signed-off-by: Seoyeon Kim * [NUI] Fix getting ClippingMode error Change-Id: I2379ec6adda1442e819d2adbaa9751e5dd154996 * [NUI] Fix animation flickering issue. Change-Id: Idd3e28ac861a6fa33ad316e4bcae6a7b2199c0de Signed-off-by: Feng Jin * [NUI] Remove redundant logs Change-Id: Ic7ec157fe8117b613d0d008f68e74cf7c4bccf64 * [NUI] Fix KeyValue issue Change-Id: I1970a61633fba277379a43035cf84ec2871d1cdd * [NUI]public BindableObject.GetValue and BindableObject.SetValue to enable other modules(EX.Tizen.TV.NUI) to implement data binding. Change-Id: Ibb048e668e765a96f1e8553951e4073b181e9a84 Signed-off-by: Feng Jin * [NUI]Add protect codes in API View::Add 1. Add protect codes, so that if the child is null, this API won't don anything. Change-Id: Icfd7e2cbb08b99ed962660edb88e8797bad2b654 * [NUI] public gesture detector. Change-Id: Ife9902fe77b43f2c422a1a2ebeaf474d13e67589 Signed-off-by: Feng Jin * GridLayout added Change-Id: I67916a0e2a8efde6fd8d28daac79bca39d679d10 * Add PropertyValue.Get function for RelativeVector2, RelativeVector3, and RelativeVector4 type. Change-Id: I181c51a6eea0a94721b28a48d8187673a3f0b88b Signed-off-by: Feng Jin * Explict assigning of Layouts to children Allows legacy GridContainer to display it's children. CustomLayouts children get a LayoutItem and displayed. Change-Id: Ic3f900ae01800de77695b85a57661f886ee060b7 * [NUI] Add DestroyContext call before disposing TextField/TextEditor In order to speed up IME hide, temporarily add DestroyContext call. Change-Id: Id93c99f4d45061d4e406d36ced7a0ec09c8f2c34 * [NUI] VisualMap revising Here are some changes: Add VisualFittingMode property Add Atlasing property Add Shadow,Underline,Outline,Background property Add RenderIfTransparent property Change-Id: I8d85f9d1a438cb6fbb636f79c7438e9134e1df8f * [NUI] Add visual test example Change-Id: I25f41d969f7b98a494a4fa1716b0335c09ab5026 * [NUI] Add friend assembly for Tizen.TV.NUI.Component Change-Id: I2fdc02205c03aa98260035fb81998d68514c030e * View.cs assignement error and logging fix Change-Id: Ic43213bb7e565f03f83d27df153d095b0e9f7143 * [NUI] Add support for changing the Rendering behavior Change-Id: Ibbe3627659132fd40105482761795f62a92d1856 * Size2D set updates measure spec for all Views Previously Size2D set only updated the WIDTH/HEIGHT MEASURESPEC for Views that already had a Layout set. But if the Size2D was set before the View added to it's parent then the set size would not update the measure specs. Change-Id: I28e731e5e6c6318231b5ba25108bf2daa9cd3411 * [NUI] Avoid raising InputMethodContext reference count Change-Id: I25e89f41daa41008c81ae1b46fbb82c75a98a011 * [NUI] Add getter property for VisualFittingMode Change-Id: I1ee389dd4a84f153e4a5d063fe3331a9525757eb * [NUI] VisualMaps revising continue Here are changes: 1. Update VisualFittingMode 2. Remove EditorBrowsable attribute Change-Id: I2f272e822ba227fe255031b3574db325505e90e1 * [NUI] Add LinearLayout Alignment and Weight Change-Id: I0ed3010fd27f8f4cb26126efc5547a301c69cf38 Signed-off-by: Seoyeon Kim * SetLayoutRequired, IsLayoutRequired View API added Change-Id: I6b4351901ad841c04f92b22be62c43f7f20b9263 * Fixes required after https://review.tizen.org/gerrit/#/c/189231/ Removal of dangerous float conversion Change-Id: I6766c8747865c229a1df3ed669a1d9ab90fefdc4 * Update LayoutItem doxygen for Minimum(Width|Height) API. Change-Id: I0ead74f919c73823cb6f4b241bea81cbcdde4c98 * [NUI] Fix LayoutItemWrapperImpl null issue Change-Id: I158533d132eb81c4681d8ff622124ba45bfe0e4b Signed-off-by: huiyu.eun * [NUI] Fix RenderingBehavior issue Change-Id: I35b83e115fd60d2b43ed49c2a35a0f34377e55c2 Signed-off-by: huiyu.eun * [NUI] Support Resource path when using xaml Change-Id: I066c4a6b051bfdcc5fa6b26f9f784a2be5a255a7 * [NUI] Public ChildAdded,ChildRemoved,PropertySet events & properties of TableView.CellPosition Change-Id: I77b58a63e863b16e9eeef8c09da9ae5160f5e735 * [NUI] Public some apis of TableView,Animation,NUIApplication Change-Id: I280e6389cb9d2aa537d72c183b1547ee807fcfd6 * Layer SetLayoutingRequired for added Views Change-Id: I7e9ead91ddec74fee998bdafc0e9249ffe250453 * [NUI] Add comment Add Size, Size2D comment Signed-off-by: huiyu.eun Change-Id: Ic790ea0af14e9aa76314e92ac74a034ab2f7985c * [NUI] Fix ImageLoadThread issue PLM ID : [DF181025-02207],[DF181005-00132],[DF180906-00491] heap-use-after-free issue using ASAN. The application's destructor was not called after terminated. The Join of ImageLoadThread was not called in ImageLoadThread's destructor. The cause is that AnimationImpl is still referenced in C#. Resolve by explicitly calling dispose. Change-Id: Ica66a8a7a17ff305777c173be33e0a196213e566 * All Views in a tree can be layouts Prior to this fix a View with children within a View would not become a layout if the parent View did not have SetLayout explicitly called on it. Change-Id: Ibf9b214f907a0ea8df30f54269626747c50499ca * [NUI] Set LayoutItem Width/Height specification Change-Id: Idec264329f6dc20db4692fba84ac8ee1f95067aa Signed-off-by: huiyu.eun * [NUI] Public some apis for TCT and fix an issue Here are some changes: 1. public ScrollViewPagePathEffect class 2. public TypeRegistry class 3. public PinchGesture constructor 4. public SetScrollPropertySource api 5. Fix ScrollInterval event issue Change-Id: I649f0fc464a5af0453475b7ef0dcf4df614eb34e * [NUI] Modify since_tizen tag Change-Id: Ib9ee882177d2372b8f132542cb235a3fcae5e734 * [NUI] Fix build error Change-Id: Ib1ff4dcb142ce09539dbef3b567f649e40459527 Signed-off-by: huiyu.eun * LayoutGroup to layout children Change-Id: Idff81189013e4cb0e85a8bbf13e268170b8aad31 * [NUI] Add reverse support for parse Change-Id: Ia6f55508e34cf5adbf23d0f9acd4f69da7b6d3c5 * Disable layouting until set Layout Added a (static) flag that is set once a Layout is set on any View. Until this flag is set automatic Layout setting will not occur Change-Id: Ieff5ed12df75a062a899831681f138c5aa3b6e1f * [NUI] Fix ParentOrigin doesn't work when using XAML Change-Id: I53e4b18b6c24db79c16c75b758613113152c5b25 * Remove build warnings Change-Id: I8744e8f690a4e93b199dc762c14607bd8b191718 * VisualFactory Instance to retreive from native VisualFactory.Get() is deprecated whilst Instance just gets the C# class. Added call to native to return the native VisualFactory when Instance used. Change-Id: I3be36e8f6cb70a2a1b2128c7d934fa45fe5bf570 * [NUI] Fix State issue of View Change-Id: Ide87c43406e55b9399f191dd76f8fb0b68b0cae9 * Map non dependant ResizePolicies to Specs. Maps NaturalSize, FillToParent and FitToChildren to the new layouting specifications. NaturalSize is mapped to a fixed value. Parent relative mappings not done here, need to be done in the measure once parent sizes known. Change-Id: I1f11a9dca126541cd534a386583fc36f97646ed4 * [NUI] Clean NUI codes from Adaptor.cs to Window.cs Change-Id: Ic1e5458dd1b3b4ac43cff028204254ac378d2f86 * [NUI] Add test sample for C# binding of MatchSystemLanguageDirection Change-Id: I0ac4e82c0e026ee1c5074ec00fb4677c4690ddfe * Remove StereoMode Change-Id: If19a2e403114bf5375e914584e1e7fa513f7d889 * Sync dalihub and Samsung's TizenFX codes Change-Id: I634fbe56ff9772c05f5ba59736289b3eca7d3def Signed-off-by: dongsug.song * [NUI] Remove deprecated APIs in native DALi Change-Id: Icc5d90e6e5752fc3b24ce3ea29cd11a89280b4b7 Signed-off-by: Seoyeon Kim * [NUI] Clean code: BaseComponents,UIComponents,CustomView Change-Id: I6fbd47154f179ba3a908d140f0cfb267c1e76c2d * [NUI] Manual merge from tizen50 Merged patches from tizenfx tizen_50 branch - [NUI] Fix Svace issue (#534), Add to check Null value (View.cs) - [NUI] Fix SizeWidth/Height issue (#555) (View.cs) - [NUI] ResizePolicy UseNaturalSize mapped to WrapContent (#613) (View.cs) - Improve the performance when firstly create the View (#642) (ImageView.cs, Scrollable.cs, TableView.cs, TextEditor.cs, TextField.cs, TextLabel.cs, VideoView.cs, View.cs) - [NUI] Remove GL/VK if-else, reduce dll size (#649) (LayoutPINVOKE.cs, ManualPINVOKE.cs, NDalicPINVOKE.cs, NUIApplication.cs) Change-Id: I846ad3353dd7d6ef78ec096565e491d7a6eef44a Signed-off-by: dongsug.song * [NUI] Sync dalihub and Samsung's TizenFX codes. Change-Id: I8278896c39209e076cc7e1cce3fee63a6e3a53ad Signed-off-by: huiyu.eun * [NUI] modify GetHashCode() Change-Id: Ib642ba64e746fb811be7a5e7e2cb4e82d5c6eb8a Signed-off-by: huiyu.eun * [NUI] Fix VD svace issue - add null check - add lock Change-Id: I706d1b0314e1e9096597eedc01593932945286e1 Signed-off-by: huiyu.eun * [NUI] Fix VD Svace issue Change-Id: I032ed4e562603441be4d26be68e29e0081e8c917 Signed-off-by: huiyu.eun * [NUI] Remove all warnings Change-Id: I399e6395c83664040999f4f204f51970de1dc5df * [NUI] Add API for get the original size of image * [NUI] Codacy error fix Change-Id: Ib407c7be01ad4e42913bf7896edc050e9b4bd370 Signed-off-by: dongsug.song * Make some apis as inhouse, will be internal later Change-Id: I0fc398a3b33eaab5fd12df5e8f183d9c94ab7049 * Adding LayoutController LayoutController from C# exclusive Layouting (LayoutingEx) where all layouting in processed in the NUI side. Change-Id: Ic97166e51cd2ef173f6685659f53f53253c93b21 * [NUI] Fix NUI Manual TCT issue Add Null Checker Change-Id: If07ebc246bad5a55f5614a10fb2f63f4bdd4115e Signed-off-by: huiyu.eun * [NUI] Fix PropertyMap setting issue Change-Id: I90548287836a4e4338c3a6d2dd5c1802ef24f876 Signed-off-by: huiyu.eun * [NUI] Fix svace issue Change-Id: I014294612530f600c14c237484f95dfff0c5ec96 Signed-off-by: huiyu.eun * [NUI] Update comments of ImfManager and InputMethodContext Change-Id: I72cdb3665f2e6ee3d2e355c7d18e41f74c09bba6 * Override Equals function for Color. Signed-off-by: Feng Jin * [NUI] Remove unuseful ApplicationExtensions Change-Id: Iba33bce373883d5f049e6d4e146d9e3dd33fdf44 * Fix ImageView issues: (1)Cannot get the correct ResourceUrl after seting the Border. (2)The ImageView with empty url will show the default picture after seting the Border(Actualy it should show nothing). Signed-off-by: Feng Jin * add support for CustomView OnTouch callback Change-Id: I713a91e931e58b38a09c4838a2a3fd0ace5de749 * Adding MeasureSpecification class Class for C# exclusive layouting Change-Id: I189fcf297c098e0b0446466de3aa0f4dadb26448 * Adding LayoutLengthEx class Change-Id: Ic12e7d33eaa50f66bdcd55a058f1562ad42ab4ad * Adding LayoutSizeEx class Change-Id: I15738a2fc8c40da90ebe89888cf1779b9124b98e * Adding MeasuredSizeEx Change-Id: Ia8fc53d8c1700e90d00870eef22fea9b6a0b1169 * Fix svace issue Signed-off-by: Feng Jin * [NUI] Fixed some warnings Change-Id: Id8e1c1502370f600276b30f13607b387270d7ece * [NUI] Sync Xaml code to newest (#795) * C# exclusive layouting Squashed commit of the following: updated TizenFX layouting tests GridLayout change columns bug Replacing EX class suffixes Removing existing Layout code Remove fix, Margin fix and other fixes 1) Ensure removing a View from a container removes the LayoutItem from the LayoutGroup. 2) Setting fixed specs also sets size of View. 3) LayoutController to MATCH_PARENT on height not just width. 4) Margin support added although bug raised for toolkit error/ Nested Layout support LayoutController multiple roots 1) Layouting can now starts from the first View assigned at Layout. 2) Previously had to start from the Window and then all Views would need a layout. 3) Multiple starting roots are supported. Remove AbsoluteLayout from Layer, Child removal fixed. Changing Layouts bug Pure C# Grid Layout Updating unmanaged GridLayout to a Pure C# implementation Ensure RequestLayout is called when layout dirty 1) When a child is added to a Layout the ForceLayout flag needs setting. 2) Also changing parameters of a Layout can require a ForceLayout. LayoutParamsPolices now a class 1) Previous an enum which required casting to an int when comparing. 2) Now a class with defined ints. AbsoluteLayout updated to pure C# Adding LinearLayoutEx Adding Layout base classes and updates to View, Window Added ILayoutParent,LayoutGroupEx and LayoutItemEx and LayoutData Ex classes will replace the existing classes before this branch is merged. Change-Id: I5da5b7853d1a19194f8a390f7913cf1ace1146fa * [NUI] Sync with Samsung/TizenFX master branch (tizen_5.5) Change-Id: I604d42cfb21e97199e81dcdd5b3957b8f40660fb Signed-off-by: dongsug.song * [NUI] select the whole text of text-field. In some cases, the whole text of text-field need be selected, and grab_handle and its popup need be disabled. Change-Id: I6533842ba4742e356f770734d543ace63490a8e9 * Gesture event refactor This work moved the set minimum pinch distance and can no longer be accessed from here Change-Id: I3a1d26f1e024170bd4a5829dd7937ded6246105f * LayoutItem to store View's Margin || Padding if Layout set Prevents the legacy size negotiation repositioning View with Margins or Padding.. Control-impl Resets position and size if Margin or Padding set. Solution here is to move Margin and Padding storage from View to LayoutItem so native code will not find a margin or padding hence not try to reset positions. Change-Id: I1d874fa854b0f229059ddfa3476b1426014d075e * [NUI] Fix build warnings Signed-off-by: dongsug.song Change-Id: Id9956349222ca215fde7034f65c99482a3898286 * Removal of Layouting Logs Change-Id: Ifafe4960d6d0cf4f2490025f50bdd9dc34804639 * [NUI] Remove internal DragAndDropDetector Change-Id: I87bcaf612c922a8c24cdb0b107cc99d66bb64e54 * Size2D to resize LayoutItems Change-Id: I86e40ea8e07533ddc301e082323b4683646f8a55 * Removing View Properties LayoutWidthSpecification and LayoutHeightSpecification Layouting provides WidthSpecification and HeightSpecification which replaced the LayoutWidthSpecification and LayoutHeightSpecification. Change-Id: Ia5bfeac95e32520bec298149ad5ccfbeed2dee19 * View not to use Size2D internally Change-Id: I14efea23af86c0695d729dc383992757ab699d9c * [VoiceControlManager][TCSACR-213] Add VoiceControlManager APIs (#841) * Add Tizen.Uix.VoiceControlManager Signed-off-by: sungrae jo * [VoiceControlManager] Modified code by API review * [MediaContent] Deprecate filter keyword (#832) * Fix API reference for RPC port (#864) Signed-off-by: SukHyung, Kang * [Build] Update APITool * [MediaContent] Fix description of Delete method (#866) * [NUI] Split NUI Assemblies (#865) * Split Tizen.NUI (#848) * Split Tizen.NUI (#848) (#854) * Fix compile error (#857) * Split Tizen.NUI (#848) * [NUI]Fix compile error * Fix API break (#859) * Split Tizen.NUI (#848) * [NUI]Fix compile error * [NUI]Fix API break * [NUI]Fix API break * [Build] Update APITool * Fix build error of Tizen.NUI.Design (#863) * [NUI] Fix NUI version (#842) Signed-off-by: huiyu.eun * [NUI] Add Registry return (#831) Signed-off-by: huiyu.eun * [NUI] Xaml intellisense support (#853) * [NUI] Add XAML intellisense support (#834) I merge this PR to xaml-support branch first to fix some build and packaging files with other commits. After works in xaml-support branch, I will merge it to master later. * [Build] Add Tizen.NUI.Design and dependent runtime assemblies to nuget * [Build] Add dummy assemblies to nuget instead of reference assemblies * Update .travis.yml * [VoiceControlManager][TCSACR-213] Add VoiceControlManager APIs (#841) * Add Tizen.Uix.VoiceControlManager Signed-off-by: sungrae jo * [VoiceControlManager] Modified code by API review * [MediaContent] Deprecate filter keyword (#832) * [Build] Resolve conflict APITool with master branch * [NUI]Fix the API break (Tizen.NUI.BaseHandle) * [NUI]Fix PR check warning * [OAuth2] Remove reference to AuthorizeAsync method from documentation (#852) * [OAuth2] Remove reference to AuthorizeAsync method from documentation * Update src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/CodeGrantAuthorizer.cs Co-Authored-By: WonYoung Choi * Update src/Tizen.Account.OAuth2/Tizen.Account.OAuth2/ImplicitGrantAuthorizer.cs Co-Authored-By: WonYoung Choi * [NUI] Add NUI.Xaml into Platform binary (#867) * [Doc] Fix documentation warnings (#868) * Delete .gitmodules * [Build] Suppress CS0618 warnings due to internal reference (#869) Suppress CS0618(Type or member is obsolete) warnings due to internal reference * [NUI] Fixed some bad comments Change-Id: I1e84556f03fc0541baec2149a52f836e95e27096 * Add API for NUI Multi Window * [NUI] fix GetSize() for multi window * Adding Weight feature to LinearLayout Uses the View Weight property to define how free space is allocated between child Views. Weight 0 is the default. With Views A, B, C Giving A.Weight = 1 would mean 1 takes up excess space in the parent. Also giving A.C = 1 would mean A and C divide the excess space between them. B remains it's original measured size. Change-Id: I6cd13085a5713794789ee61027e371974be3fa32 * [NUI] FlexLayout support added Flex layout using the new layouting system. Uses natural size of the items. Supports: Wrap, Alignment, Direction and justrification. Currently unsupported: Explict sized items, item padding. Change-Id: Id966f11c8ececcb07e2ecc528f876787129d54b9 * [NUI] Fix Multi-window bug Change-Id: Ie945d7997d58c72ad70e1cf09fdab56c9519c67a Signed-off-by: huiyu.eun * Re-layout TextLabel when text changes size When View's change size like TextLabel setting new text it should be laid out again Change-Id: I790b2fbaab8a8869c36d9d10c3760205815627f7 * Layouting to iterate all Layers Change-Id: I005b7da027b351624c27abc56336538180907168 * Added Alignment.Center for LinearLayout Change-Id: If6d0ac3d2602bb1e399cd579337c204fab268de1 * Remove unused and dangling interops Change-Id: I005d40a5eec2d2a98adb4405b3a505ad955f3be6 * Remove unused SetUseHardwareVSync Adaptor API. Change-Id: I373643c8cdfedd126c6652337c7d3bf467f69ead * Remove layouting fixed specification API Change-Id: I37b6948337bf3bca4a9811259bf6e8ff1b1e008f * [NUI] Add GetDefaultWindow() this api for get Default Window. * [NUI] Add API for GetWindowList() After apply MultiWindow, Developer need to know list of window. * [NUI] change API for GetWindowList() change API for using native API. * Apply GaussianBlurView Devel API changes Change-Id: I98dae108ad5e50f2844f347a69d934b11fe36462 * Rename PAGE_SIZE property to VIEW_PAGE_SIZE. Change-Id: Ifd31b9ac50969a24543868127f2c09a10e65f329 * Remove Builder GetFrameBufferImage unused method Change-Id: I2dedaad5dc53c0a2ec61af005fc91d4275ccda06 * [NUI]Change GetWindowList() to static * Add method to destroy a window Change-Id: I9b9b34a8a7aa1fb1da576cab98b1495f7c998a4c * [NUI] Change API for Window Creation * Layout transitions support Change-Id: I66558d54a865544b123f2ad91554b9146f480118 * Remove APIs deprecated in Tizen 3.0 Change-Id: I3a61a27e4c9d7a9790d8457c9a60459205d1d372 * [NUI] Make public-API as Hidden-API before ACR - no logic changed, but only "[EditorBrowsable(EditorBrowsableState.Never)]" is added - before ACR is completed, we need to make new added public-API as hidden-API which is usually considered as Inhouse-API - when adding new API, need to add this "[EditorBrowsable(EditorBrowsableState.Never)]", otherwise not accepted in Samsung/TizenFX because API checker gives API break error - comment also required to be added, such as like this. "Hidden-API which is usually used as Inhouse-API. If required to be opened as Public-API, ACR process is needed." Signed-off-by: dongsug.song Change-Id: I8a707efd4c5ebb637f2928b123eabd9f702d2151 * [NUI] Add documentation for ItemView related classes to remove build warnings Change-Id: I33accb4297a936223e83745683c68a37b2d2e41a * Custom Size transition, defaults to Instant Size transition initially instant but configurable via animator. Fixed Removal issue in LayoutGroup, condition was not reset. Change-Id: Ibae03ed0c8c1b7b5935ad54dee61063945b2cdb7 * [NUI] Remove redundant lines Change-Id: I2ae14858e134286f3668db1dbaad636ca52c69e7 * [NUI] sync with samsung-tizenfx - This has been existed from 3, so ACR is required to be changed - If there is API to be changed, please put a notice on GRE-1442 (http://suprem.sec.samsung.net/jira/browse/GRE-1442) Signed-off-by: dongsug.song * [NUI] Enable cascade-property-set for Size, Position - in View.cs public Size2D Size2D : done public Size2D CurrentSize : only get, no need to fix public Size2D CurrentSize : only get, no need to fix public Size2D NaturalSize2D : only get, no need to fix public Size2D MinimumSize : done public Size2D MaximumSize : done public Position2D Position2D : done public Size Size : done public Position ParentOrigin : done public Position PivotPoint : done public Position Position : done public Position AnchorPoint : obsoleted, no need to fix public Position CurrentPosition : only get, no need to fix Signed-off-by: dongsug.song * [NUI] Add shown parameter constructor Signed-off-by: dongsug.song * Use WindowSize API instead of window.size. Change-Id: Ia6e04c5f7504f7fdc78b5a533e51a4ab448deae9 * Allow NUIApplication to create main window with given size and position * [NUI] Deprecate Layer2D enum Signed-off-by: dongsug.song * [NUI] Add TotalFrame in VectorAnimationView * [NUI] Clean up useless disposable codes * [NUI] Make CropToMask as public * [NUI] Deprecated useless property class * [NUI] Fix SynchronosLoading issue Signed-off-by: huiyu.eun * [NUI] Add UPATE_SIZE_HINT property Signed-off-by: huiyu.eun * [NUI] Make public-API as Hidden-API before ACR -View::RotateBy -Touch::GetAngle Required for handling rotation of objects. Signed-off-by: huiyu.eun * [NUI] Modify BackgroundImageSynchronosLoading issue Signed-off-by: huiyu.eun * [NUI]Fix UPDATE_SIZE_HINT crash issue Signed-off-by: huiyu.eun * [NUI]Fix UPDATE_SIZE_HINT crash issue Signed-off-by: huiyu.eun * Fix transition inheritance from parent Change of logic so if child has a transition for the condition then don't copy parents. Previously only checked if transitions list was empty. Change-Id: If168d493b70e236fc22845bb0a09e4e6ff5ca77a * Overriding Animation API Change-Id: Ief7d52b1108729f0216c11d495770be2af2920d1 * Layout Animation fix Change-Id: I85fbb7af0e86860d3d2d667796b89ba29944b384 * sync from samsung into dalihub (#32) * [NUI] Deprecate Tizen.NUI.UIComponents (#30) * [NUI] Hide public things of Tizen.NUI.UIComponents * [NUI] Hide the class ScrollView * [NUI] Enable View.ScaleBy (#33) Signed-off-by: Jiyun Yang * sync from samsung into dalihub (#34) * [NUI] Add to set the position of input panel (#1034) * [NUI] Add to set the input panel position Signed-off-by: Seoyeon Kim * [NUI] Update the version because of the hidden API Signed-off-by: Seoyeon Kim * Update the description - Changed 'tizen_6.0' in the description to 'tizen_next' Signed-off-by: Seoyeon Kim * [STC] Add C# API wrapper for Stc CAPIs (#984) * Add C# API wrapper for Stc CAPIs Signed-off-by: Lokesh * Changes according to comments of STC PR Signed-off-by: Lokesh * Further changes done as per suggestions Signed-off-by: Lokesh * Change in Callback Delegate for network statistics Signed-off-by: Lokesh * Resolution of ACR review comments and Addition of Newly created and updated APIs Signed-off-by: Lokesh * Change in csproj file Signed-off-by: Lokesh * Resolution of PR review comments Signed-off-by: Lokesh * Resolution of Codacy warnings and PR comments. Some properties are changed to methods, because getters should not throw exceptions. Signed-off-by: Lokesh * Removed GetTotalStatisticsAsync() as stc_get_total_stats API is deprecated. Signed-off-by: Lokesh * Removed unused variable 'StcManagerImpl._getTotalStatsCb' Left out in last commit: Removed GetTotalStatisticsAsync() as stc_get_total_stats API is deprecated Signed-off-by: Lokesh * Correction in descriptions of properties and methods Removed exception throw comments of property getters. Signed-off-by: Lokesh * Changed Handle storage from 'IntPtr' to 'Safehandle' As per the comment of Mr. Wonyoung Choi on PR. Signed-off-by: Lokesh * Add support to handle multiple requests for GetStatisticsAsync and GetAllStatisticsAsync. The implementation is referenced from WiFi C# package and Microsoft documentation. Callback delegates are now stored in map. 'Task' is not needed to be stored according to: 'https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions#variable-scope-in-lambda-expressions' Signed-off-by: Lokesh * Dispose infoHandle and ruleHandle properly (as managed resources) Signed-off-by: Lokesh * Made InterfaceType and TimePeriod of Rule as nullable type to replace the default Unknown value. Decription of timePeriod is improved. Getter and Setter methods 'InterfaceType and TimePeriod' are changed to properties. Signed-off-by: Lokesh * Fix of build fail due to typecast in conditional expression Signed-off-by: Lokesh * Removed appId parameter(public) from StcRule class GetStatisticsAsync() will receive appId as a separate parameter. Signed-off-by: Lokesh * Make pure C# StcRule class Signed-off-by: Lokesh * 'Unknown' NetworkInterfaceType is now passed to app as 'Others' (uncategorized). Removed throw exception from this case. Same is done with 'NetworkProtocolType' and 'NetworkProtocol'. Signed-off-by: Lokesh * Rename 'StcRule' as 'StatisticsFilter' and 'rule' as 'filter'. And, use of 'using' to release SafeFilterHandle after use. Signed-off-by: Lokesh * Rename 'ProcessState' to 'ApplicationState' And, make it a property. Signed-off-by: Lokesh * Rename files as per their class name: 'info' as 'statistics' and 'Rule' as 'filter' Files: renamed: Tizen.Network.Stc/StcInfo.cs -> Tizen.Network.Stc/StcStatistics.cs renamed: Tizen.Network.Stc/StcRule.cs -> Tizen.Network.Stc/StcStatsFilter.cs Signed-off-by: Lokesh * Removed 'GetStatisticsAsync' and added public property for AppId in StatsFilter. Now there is only one API to get Statistics and application specific statistics will be provided if appId is set in filter. Fix for this comment: https://github.com/Samsung/TizenFX/pull/802/#discussion_r288860344 Signed-off-by: Lokesh * Now, 'GetStatisticsAsync' is the only API to get statistics of one/many apps based on filter provided to it. It internally used 'stc_get_all_stats' and 'stc_foreach_all_stats' CAPIs. Incorporated: 1/ http://suprem.sec.samsung.net/jira/browse/ACR-1358 2/ https://review.tizen.org/gerrit/#/c/platform/core/connectivity/stc-manager/+/209639/ 3/ https://review.tizen.org/gerrit/#/c/platform/core/connectivity/stc-manager/+/209617/ 4/ https://review.tizen.org/gerrit/#/c/platform/core/api/smart-traffic-control/+/209616/ Signed-off-by: Lokesh * Corrected feature tag in public methods of 'StcManager' Signed-off-by: Lokesh * [Fix] Conversion methods for DateTime to timestamp and vice-versa Signed-off-by: Lokesh * [Fix] Use 'IntPtr' instead of 'SafeStatsHandle' As the handle is receieved in callback, we have to use IntPtr(unmanaged). While after we have cloned it, we used SafeStatsHandle(managed) to destroy it. Signed-off-by: Lokesh * [IoTConnectivity] Fix wrong callback management (#1041) * [IoTConnectivity] Fix wrong callback management Change-Id: I5f9ba403661e32f2f6ed807318cc937b8137cfc9 Signed-off-by: Semun Lee * Change id to static Change-Id: Ib6dd29d64f0c9b991c0a0bfe28f62d187b0fbd61 Signed-off-by: Semun Lee * [NUI] Layouting API made public (#1026) * [NUI] Layouting API made public View.cs Layouting API public LayoutItem Measure API made public Moving Layouting files to public folder Change-Id: I78b0a54c07d69496a666740fd6e09ade1dd6bc9b * [NUI] Removing API not needed Change-Id: Id80cd22237a92c601839b8da388923d77e9b9617 * [ComponentBased][TCSACR-282] Add Release method to IWindowInfo interface (#1040) * Modify native api name Signed-off-by: hyunho * Add argument check logic SendLaunchRequestAsync control parameter should not be null Signed-off-by: hyunho * Add argument check logic SendLaunchRequestAsync control parameter should not be null Signed-off-by: hyunho * Add Release method to IWindowInfo interface Signed-off-by: hyunho * Use IDisposable to release window resource Signed-off-by: hyunho * Fix indention Signed-off-by: hyunho * Fix dispose method Signed-off-by: hyunho * [MediaVision] Add APIs for inference detectors and classifier (#985) * [MediaVision] Add APIs for inference detectors and classifier * [NUI] Fix Bug in GetParent() (#1046) good to go Signed-off-by: huiyu.eun * Patch for Email Emulator TCT issues (#1045) * Patch for Email Emulator TCT issues * Patch for Email Emulator TCT issues ,indentations were corrected * [MediaPlayer] Fix descriptions (#1042) * [MediaPlayer] Add API for setting audio codec type (#1043) * [MediaPlayer] Add API for setting audio codec type * [SystemSettings][TCSACR-247][Add] Add RotaryEventEnabled (#895) * [SystemSettings][TCSACR-247][Add] Add RotaryEventEnabled Signed-off-by: jinwang.an * Response comment(#1) Signed-off-by: jinwang.an * Response comment(#2) Signed-off-by: jinwang.an * Response comment(#3) Signed-off-by: jinwang.an * [IoTConnectvity] Fix native callback management (#1047) * [IoTConnectivity] Fix native callback management Use one callback for each type of request. Use map for multiplexing task completion. Change-Id: I779d388a6695a405d33264459df7acb75beed806 Signed-off-by: Semun Lee * [IoTConnectivity] Fix to use static native callbacks Change-Id: I8075218091bdfd3978ca66537e5475e57d5f796f Signed-off-by: Semun Lee * [SystemSettings]Add feature RotaryEventEnabled (#1049) Signed-off-by: jinwang.an * [MediaTool] Add missed exception for bitDepth (#1051) * [MediaTool] Add missed exception for bitDepth * [MediaController] Add capability method for subtitle, 360 mode (#1048) * [MediaController] Add capability method for subtitle, 360 mode * [NUI] Deprecate Tizen.NUI.UIComponents (#1044) * [NUI] Hide public things of Tizen.NUI.UIComponents * [NUI] Hide the class ScrollView Signed-off-by: huiyu.eun * Add interop winodw Signed-off-by: huiyu.eun * [NUI] TCSACR-226 code change (#1032) Signed-off-by: huiyu.eun * [NUI] sync from samsung into dalihub (#35) * [NUI] Fix the return value of logicalKey (#1062) - Should return 'ret' value of string type Signed-off-by: Seoyeon Kim * [VoiceControlManager] Add tags for missing feature and privilege (#1031) * [VoiceControlManager] Add tags for missing feature and privilege * [VoiceControlManager] Add tags for missing feature and privilege Signed-off-by: InHong Han * [VoiceControlManager] Add tags for missing feature and privilege Signed-off-by: InHong Han * [VoiceControlManager] Add tags for missing feature and privilege Signed-off-by: InHong Han * [Network.Stc] Fix Build issue and Update PlatformFileList (#1055) * [Network.Stc] Add project dependencies in Solution file Signed-off-by: Nishant Chaprana * [Network.Stc] Update PlatformFileList Signed-off-by: Nishant Chaprana * [NUI] Open public apis of NUI.Components for TCSACR-248 (#1061) * [NUI.Components] Open public apis of Components for ACR * [AudioManager] Changed handle type to marshal from unmanaged (#1027) * [NUI]Changed the APIs related to MultiWIndow to public (#1020) * [ComponentBased] Fix Log Tags (#1030) Currently, the log tag is too long. This patch changes the log tag to "Tizen.Applications". Signed-off-by: Hwankyu Jhun * [NUI.Components] fix Button TextPadding issue * Update Position.cs Set default parameter * Update Size.cs Set Default parameter * Update Position.cs * Update Size.cs * [NUI] Fix gesture callback issue (#22) * [NUI]fix flexible crash when scrolling (#36) * fix layout issue of flexibleview when animation is canceled (#37) * fix layout issue of flexibleview when animation is canceled * fix build error * fix build error * [NUI] sync from samsung int dalihub (#38) * [Build] Fix build script * [MediaController] Fix typo (#1063) * [MediaPlayer] change the error code related with AudioOffload (#1050) * [MediaPlayer] change the error code related with AudioOffload * [AudioManager] Add new exception to the doxygen of ApplyStreamRouting() (#1052) Signed-off-by: Sangchul Lee * [NUI] Add Window.Effect event (#1058) * Update UafClient.cs (#1054) * Update UafClient.cs Changed call back handler to static function * Update UafClient.cs Making call back function static for avoiding crash * Update UafClient.cs distinguished tcs for each request * Update UafClient.cs updated revie comments * Update UafClient.cs * [NUI] Removing PropertyBuffer.SetData()'s obsolete attribute before adding new replacing API (#1065) * [Build] Update Microsoft.NETCore.App.Ref assemblies (#1066) * [NUI] some change in VectorAnimationViewTBD (#1064) Signed-off-by: huiyu.eun * Fix build error Signed-off-by: huiyu.eun * [NUI] Reduce code duplication - refactor dispose codes (#14) * [NUI] Refactor disposable pattern in internal folder * [NUI] Refactor disposable pattern in public folder * [NUI] Update license date * [NUI] Split large files (#21) * [NUI] Split large files * [NUI] Partial class can only need a base class * [NUI] Format Window file * Added Rotation Gesture Support (#40) Change-Id: I48e3d539c7ffaf64540a01748feda16647ce8014 * [EflSharp] Update Circle and efl cs files (#1008) Circle and efl cs files are updated based on the latest efl. Documentation warnings are fixed. Efl.Ui.AnimationView class is included. * [NUI] Change WindowTransitionEffect interface (#1068) Signed-off-by: huiyu.eun * [NUI] Update documentation on View class (#1070) Signed-off-by: Jiyun Yang * [NUI] TCSACR-226 code change (#1032) Signed-off-by: huiyu.eun * Add Window function Signed-off-by: huiyu.eun --- diff --git a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs index d1bca05..2efe861 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityActionSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs index 07f6162..f90f6a1 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityFocusOvershotSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AccessibilityManager.cs b/src/Tizen.NUI/src/internal/AccessibilityManager.cs index 0d92ca1..cb58bfe 100755 --- a/src/Tizen.NUI/src/internal/AccessibilityManager.cs +++ b/src/Tizen.NUI/src/internal/AccessibilityManager.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. @@ -14,15 +14,12 @@ * limitations under the License. * */ +using System; +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { - - using System; - using System.Runtime.InteropServices; - using Tizen.NUI.BaseComponents; - - internal class AccessibilityManager : BaseHandle + internal partial class AccessibilityManager : BaseHandle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -60,920 +57,6 @@ namespace Tizen.NUI base.Dispose(type); } - /** - * @brief Event arguments that passed via StatusChanged signal - * - */ - /// 3 - public class StatusChangedEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionNext signal - * - */ - /// 3 - public class ActionNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPrevious signal - * - */ - /// 3 - public class ActionPreviousEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionActivate signal - * - */ - /// 3 - public class ActionActivateEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionRead signal - * - */ - /// 3 - public class ActionReadEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionOver signal - * - */ - /// 3 - public class ActionOverEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadNext signal - * - */ - /// 3 - public class ActionReadNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadPrevious signal - * - */ - /// 3 - public class ActionReadPreviousEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionUp signal - * - */ - /// 3 - public class ActionUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionDown signal - * - */ - /// 3 - public class ActionDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionClearFocus signal - * - */ - /// 3 - public class ActionClearFocusEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionBack signal - * - */ - /// 3 - public class ActionBackEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionScrollUp signal - * - */ - /// 3 - public class ActionScrollUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionScrollDown signal - * - */ - /// 3 - public class ActionScrollDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageLeft signal - * - */ - /// 3 - public class ActionPageLeftEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageRight signal - * - */ - /// 3 - public class ActionPageRightEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageUp signal - * - */ - /// 3 - public class ActionPageUpEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionPageDown signal - * - */ - /// 3 - public class ActionPageDownEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionMoveToFirst signal - * - */ - /// 3 - public class ActionMoveToFirstEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionMoveToLast signal - * - */ - /// 3 - public class ActionMoveToLastEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadFromTop signal - * - */ - /// 3 - public class ActionReadFromTopEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadFromNext signal - * - */ - /// 3 - public class ActionReadFromNextEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionZoom signal - * - */ - /// 3 - public class ActionZoomEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadIndicatorInformation signal - * - */ - /// 3 - public class ActionReadIndicatorInformationEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionReadPauseResume signal - * - */ - /// 3 - public class ActionReadPauseResumeEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /** - * @brief Event arguments that passed via ActionStartStop signal - * - */ - /// 3 - public class ActionStartStopEventArgs : EventArgs - { - private AccessibilityManager _accessibilityManager; - - /// 3 - public AccessibilityManager AccessibilityManager - { - get - { - return _accessibilityManager; - } - set - { - _accessibilityManager = value; - } - } - } - - /* - // To be replaced by a new event that takes Touch - 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 - * - */ - /// 3 - public class FocusChangedEventArgs : EventArgs - { - private View _viewCurrent; - private View _viewNext; - - /// 3 - public View ViewCurrent - { - get - { - return _viewCurrent; - } - set - { - _viewCurrent = value; - } - } - - /// 3 - public View ViewNext - { - get - { - return _viewNext; - } - set - { - _viewNext = value; - } - } - } - - /** - * @brief Event arguments that passed via FocusedViewActivated signal - * - */ - /// 3 - public class FocusedViewActivatedEventArgs : EventArgs - { - private View _view; - - - /// 3 - public View View - { - get - { - return _view; - } - set - { - _view = value; - } - } - } - - /** - * @brief Event arguments that passed via FocusOvershot signal - * - */ - /// 3 - public class FocusOvershotEventArgs : EventArgs - { - private View _currentFocusedView; - private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection; - - /// 3 - public View CurrentFocusedView - { - get - { - return _currentFocusedView; - } - set - { - _currentFocusedView = value; - } - } - - /// 3 - public AccessibilityManager.FocusOvershotDirection FocusOvershotDirection - { - get - { - return _focusOvershotDirection; - } - set - { - _focusOvershotDirection = value; - } - } - } - - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; - private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; - private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; - private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; - private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; - private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; - private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; - private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; - private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; - private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; - private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; - private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; - private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; - private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; - private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; - private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; - private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; - private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; - private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; - private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; - private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; - private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; - private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; - private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadIndicatorInformationEventHandler; - private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; - private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); - private DaliEventHandlerWithReturnType _accessibilityManagerActionStartStopEventHandler; - private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate; - - /* - // To be replaced by a new event that takes Touch - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent); - private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; - private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; - */ - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2); - private DaliEventHandler _accessibilityManagerFocusChangedEventHandler; - private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view); - private DaliEventHandler _accessibilityManagerFocusedViewActivatedEventHandler; - private FocusedViewActivatedEventCallbackDelegate _accessibilityManagerFocusedViewActivatedEventCallbackDelegate; - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction); - private DaliEventHandler _accessibilityManagerFocusOvershotEventHandler; - private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate; - - public event DaliEventHandlerWithReturnType 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) { @@ -990,37 +73,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1037,37 +89,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1084,37 +105,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1131,37 +121,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1178,37 +137,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1225,37 +153,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1273,37 +170,6 @@ namespace Tizen.NUI } - public event DaliEventHandlerWithReturnType 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) { @@ -1320,37 +186,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1367,37 +202,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1406,43 +210,12 @@ namespace Tizen.NUI // 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 DaliEventHandlerWithReturnType 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; - } + if (_accessibilityManagerActionDownEventHandler != null) + { + //here we send all data to user event handlers + return _accessibilityManagerActionDownEventHandler(this, e); } + return false; } // Callback for AccessibilityManager ActionClearFocusSignal @@ -1461,37 +234,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1508,37 +250,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1555,37 +266,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1603,37 +283,6 @@ namespace Tizen.NUI } - public event DaliEventHandlerWithReturnType 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) { @@ -1650,37 +299,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1697,37 +315,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1745,37 +332,6 @@ namespace Tizen.NUI } - public event DaliEventHandlerWithReturnType 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) { @@ -1793,37 +349,6 @@ namespace Tizen.NUI } - public event DaliEventHandlerWithReturnType 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) { @@ -1840,37 +365,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1887,37 +381,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1934,37 +397,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -1981,37 +413,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -2028,37 +429,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -2075,37 +445,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -2122,37 +461,6 @@ namespace Tizen.NUI return false; } - public event DaliEventHandlerWithReturnType 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) { @@ -2169,88 +477,6 @@ namespace Tizen.NUI return false; } - /* - // To be replaced by a new event that takes Touch - public event DaliEventHandlerWithReturnType 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 DaliEventHandler 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 view1, IntPtr view2) { @@ -2267,37 +493,6 @@ namespace Tizen.NUI } } - public event DaliEventHandler FocusedViewActivated - { - add - { - lock (this) - { - // Restricted to only one listener - if (_accessibilityManagerFocusedViewActivatedEventHandler == null) - { - _accessibilityManagerFocusedViewActivatedEventHandler += value; - - _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); - this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); - } - } - } - - remove - { - lock (this) - { - if (_accessibilityManagerFocusedViewActivatedEventHandler != null) - { - this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); - } - - _accessibilityManagerFocusedViewActivatedEventHandler -= value; - } - } - } - // Callback for AccessibilityManager FocusedViewActivatedSignal private void OnFocusedViewActivated(IntPtr view) { @@ -2313,38 +508,6 @@ namespace Tizen.NUI } } - - public event DaliEventHandler 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 currentFocusedView, AccessibilityManager.FocusOvershotDirection direction) { diff --git a/src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs b/src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs new file mode 100755 index 0000000..802dd76 --- /dev/null +++ b/src/Tizen.NUI/src/internal/AccessibilityManagerEvent.cs @@ -0,0 +1,1128 @@ +/* + * Copyright(c) 2019 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. + * + */ + +using System; +using System.Runtime.InteropServices; + +namespace Tizen.NUI +{ + internal partial class AccessibilityManager + { + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool StatusChangedEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerStatusChangedEventHandler; + private StatusChangedEventCallbackDelegate _accessibilityManagerStatusChangedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionNextEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionNextEventHandler; + private ActionNextEventCallbackDelegate _accessibilityManagerActionNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPreviousEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPreviousEventHandler; + private ActionPreviousEventCallbackDelegate _accessibilityManagerActionPreviousEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionActivateEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionActivateEventHandler; + private ActionActivateEventCallbackDelegate _accessibilityManagerActionActivateEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadEventHandler; + private ActionReadEventCallbackDelegate _accessibilityManagerActionReadEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionOverEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionOverEventHandler; + private ActionOverEventCallbackDelegate _accessibilityManagerActionOverEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadNextEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadNextEventHandler; + private ActionReadNextEventCallbackDelegate _accessibilityManagerActionReadNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadPreviousEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPreviousEventHandler; + private ActionReadPreviousEventCallbackDelegate _accessibilityManagerActionReadPreviousEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionUpEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionUpEventHandler; + private ActionUpEventCallbackDelegate _accessibilityManagerActionUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionDownEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionDownEventHandler; + private ActionDownEventCallbackDelegate _accessibilityManagerActionDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionClearFocusEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionClearFocusEventHandler; + private ActionClearFocusEventCallbackDelegate _accessibilityManagerActionClearFocusEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionBackEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionBackEventHandler; + private ActionBackEventCallbackDelegate _accessibilityManagerActionBackEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollUpEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollUpEventHandler; + private ActionScrollUpEventCallbackDelegate _accessibilityManagerActionScrollUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollDownEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollDownEventHandler; + private ActionScrollDownEventCallbackDelegate _accessibilityManagerActionScrollDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageLeftEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageLeftEventHandler; + private ActionPageLeftEventCallbackDelegate _accessibilityManagerActionPageLeftEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageRightEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageRightEventHandler; + private ActionPageRightEventCallbackDelegate _accessibilityManagerActionPageRightEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageUpEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageUpEventHandler; + private ActionPageUpEventCallbackDelegate _accessibilityManagerActionPageUpEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionPageDownEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionPageDownEventHandler; + private ActionPageDownEventCallbackDelegate _accessibilityManagerActionPageDownEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionMoveToFirstEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToFirstEventHandler; + private ActionMoveToFirstEventCallbackDelegate _accessibilityManagerActionMoveToFirstEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionMoveToLastEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionMoveToLastEventHandler; + private ActionMoveToLastEventCallbackDelegate _accessibilityManagerActionMoveToLastEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadFromTopEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromTopEventHandler; + private ActionReadFromTopEventCallbackDelegate _accessibilityManagerActionReadFromTopEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadFromNextEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadFromNextEventHandler; + private ActionReadFromNextEventCallbackDelegate _accessibilityManagerActionReadFromNextEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionZoomEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionZoomEventHandler; + private ActionZoomEventCallbackDelegate _accessibilityManagerActionZoomEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadIndicatorInformationEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadIndicatorInformationEventHandler; + private ActionReadIndicatorInformationEventCallbackDelegate _accessibilityManagerActionReadIndicatorInformationEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionReadPauseResumeEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionReadPauseResumeEventHandler; + private ActionReadPauseResumeEventCallbackDelegate _accessibilityManagerActionReadPauseResumeEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionStartStopEventCallbackDelegate(IntPtr accessibilityManager); + private DaliEventHandlerWithReturnType _accessibilityManagerActionStartStopEventHandler; + private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate; + + /* + // To be replaced by a new event that takes Touch + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent); + private DaliEventHandlerWithReturnType _accessibilityManagerActionScrollEventHandler; + private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate; + */ + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusChangedEventCallbackDelegate(IntPtr view1, IntPtr view2); + private DaliEventHandler _accessibilityManagerFocusChangedEventHandler; + private FocusChangedEventCallbackDelegate _accessibilityManagerFocusChangedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusedViewActivatedEventCallbackDelegate(IntPtr view); + private DaliEventHandler _accessibilityManagerFocusedViewActivatedEventHandler; + private FocusedViewActivatedEventCallbackDelegate _accessibilityManagerFocusedViewActivatedEventCallbackDelegate; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusOvershotEventCallbackDelegate(IntPtr currentFocusedView, AccessibilityManager.FocusOvershotDirection direction); + private DaliEventHandler _accessibilityManagerFocusOvershotEventHandler; + private FocusOvershotEventCallbackDelegate _accessibilityManagerFocusOvershotEventCallbackDelegate; + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + public event DaliEventHandlerWithReturnType 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; + } + } + } + + /* + // To be replaced by a new event that takes Touch + public event DaliEventHandlerWithReturnType 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 DaliEventHandler 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; + } + } + } + + public event DaliEventHandler FocusedViewActivated + { + add + { + lock (this) + { + // Restricted to only one listener + if (_accessibilityManagerFocusedViewActivatedEventHandler == null) + { + _accessibilityManagerFocusedViewActivatedEventHandler += value; + + _accessibilityManagerFocusedViewActivatedEventCallbackDelegate = new FocusedViewActivatedEventCallbackDelegate(OnFocusedViewActivated); + this.FocusedViewActivatedSignal().Connect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_accessibilityManagerFocusedViewActivatedEventHandler != null) + { + this.FocusedViewActivatedSignal().Disconnect(_accessibilityManagerFocusedViewActivatedEventCallbackDelegate); + } + + _accessibilityManagerFocusedViewActivatedEventHandler -= value; + } + } + } + + public event DaliEventHandler 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; + } + } + } + } +} diff --git a/src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs b/src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs new file mode 100755 index 0000000..28cf77e --- /dev/null +++ b/src/Tizen.NUI/src/internal/AccessibilityManagerEventArgs.cs @@ -0,0 +1,754 @@ +/* + * Copyright(c) 2019 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. + * + */ + +using System; +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI +{ + internal partial class AccessibilityManager + { + /** + * @brief Event arguments that passed via StatusChanged signal + * + */ + /// 3 + public class StatusChangedEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionNext signal + * + */ + /// 3 + public class ActionNextEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPrevious signal + * + */ + /// 3 + public class ActionPreviousEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionActivate signal + * + */ + /// 3 + public class ActionActivateEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionRead signal + * + */ + /// 3 + public class ActionReadEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionOver signal + * + */ + /// 3 + public class ActionOverEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadNext signal + * + */ + /// 3 + public class ActionReadNextEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadPrevious signal + * + */ + /// 3 + public class ActionReadPreviousEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionUp signal + * + */ + /// 3 + public class ActionUpEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionDown signal + * + */ + /// 3 + public class ActionDownEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionClearFocus signal + * + */ + /// 3 + public class ActionClearFocusEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionBack signal + * + */ + /// 3 + public class ActionBackEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionScrollUp signal + * + */ + /// 3 + public class ActionScrollUpEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionScrollDown signal + * + */ + /// 3 + public class ActionScrollDownEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageLeft signal + * + */ + /// 3 + public class ActionPageLeftEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageRight signal + * + */ + /// 3 + public class ActionPageRightEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageUp signal + * + */ + /// 3 + public class ActionPageUpEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionPageDown signal + * + */ + /// 3 + public class ActionPageDownEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionMoveToFirst signal + * + */ + /// 3 + public class ActionMoveToFirstEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionMoveToLast signal + * + */ + /// 3 + public class ActionMoveToLastEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadFromTop signal + * + */ + /// 3 + public class ActionReadFromTopEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadFromNext signal + * + */ + /// 3 + public class ActionReadFromNextEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionZoom signal + * + */ + /// 3 + public class ActionZoomEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadIndicatorInformation signal + * + */ + /// 3 + public class ActionReadIndicatorInformationEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionReadPauseResume signal + * + */ + /// 3 + public class ActionReadPauseResumeEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /** + * @brief Event arguments that passed via ActionStartStop signal + * + */ + /// 3 + public class ActionStartStopEventArgs : EventArgs + { + private AccessibilityManager _accessibilityManager; + + /// 3 + public AccessibilityManager AccessibilityManager + { + get + { + return _accessibilityManager; + } + set + { + _accessibilityManager = value; + } + } + } + + /* + // To be replaced by a new event that takes Touch + 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 + * + */ + /// 3 + public class FocusChangedEventArgs : EventArgs + { + private View _viewCurrent; + private View _viewNext; + + /// 3 + public View ViewCurrent + { + get + { + return _viewCurrent; + } + set + { + _viewCurrent = value; + } + } + + /// 3 + public View ViewNext + { + get + { + return _viewNext; + } + set + { + _viewNext = value; + } + } + } + + /** + * @brief Event arguments that passed via FocusedViewActivated signal + * + */ + /// 3 + public class FocusedViewActivatedEventArgs : EventArgs + { + private View _view; + + + /// 3 + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + /** + * @brief Event arguments that passed via FocusOvershot signal + * + */ + /// 3 + public class FocusOvershotEventArgs : EventArgs + { + private View _currentFocusedView; + private AccessibilityManager.FocusOvershotDirection _focusOvershotDirection; + + /// 3 + public View CurrentFocusedView + { + get + { + return _currentFocusedView; + } + set + { + _currentFocusedView = value; + } + } + + /// 3 + public AccessibilityManager.FocusOvershotDirection FocusOvershotDirection + { + get + { + return _focusOvershotDirection; + } + set + { + _focusOvershotDirection = value; + } + } + } + } +} diff --git a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs index 1f8dfb6..1b91647 100755 --- a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs +++ b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AdaptorSignalType.cs b/src/Tizen.NUI/src/internal/AdaptorSignalType.cs index 585d0e6..d87f5b5 100755 --- a/src/Tizen.NUI/src/internal/AdaptorSignalType.cs +++ b/src/Tizen.NUI/src/internal/AdaptorSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Alignment.cs b/src/Tizen.NUI/src/internal/Alignment.cs index 08e4ef2..ab86470 100755 --- a/src/Tizen.NUI/src/internal/Alignment.cs +++ b/src/Tizen.NUI/src/internal/Alignment.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AngleAxis.cs b/src/Tizen.NUI/src/internal/AngleAxis.cs index 0d35be4..2c638e4 100755 --- a/src/Tizen.NUI/src/internal/AngleAxis.cs +++ b/src/Tizen.NUI/src/internal/AngleAxis.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AngleThresholdPair.cs b/src/Tizen.NUI/src/internal/AngleThresholdPair.cs index e4a6bbe..d1712b8 100755 --- a/src/Tizen.NUI/src/internal/AngleThresholdPair.cs +++ b/src/Tizen.NUI/src/internal/AngleThresholdPair.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs b/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs index 9177bc5..7f48a42 100755 --- a/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs +++ b/src/Tizen.NUI/src/internal/AnimatablePropertyComponentRegistration.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs b/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs index 71956fb..500c40e 100755 --- a/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/AnimatablePropertyRegistration.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/AnimationSignal.cs b/src/Tizen.NUI/src/internal/AnimationSignal.cs index 2fa28f8..2ace69c 100755 --- a/src/Tizen.NUI/src/internal/AnimationSignal.cs +++ b/src/Tizen.NUI/src/internal/AnimationSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Any.cs b/src/Tizen.NUI/src/internal/Any.cs index 68db9c8..6ebf8ba 100755 --- a/src/Tizen.NUI/src/internal/Any.cs +++ b/src/Tizen.NUI/src/internal/Any.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs b/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs index 8e36d1b..448ab0d 100755 --- a/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs +++ b/src/Tizen.NUI/src/internal/ApplicationControlSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ApplicationSignal.cs b/src/Tizen.NUI/src/internal/ApplicationSignal.cs index 2473a54..a96f8a1 100755 --- a/src/Tizen.NUI/src/internal/ApplicationSignal.cs +++ b/src/Tizen.NUI/src/internal/ApplicationSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ButtonSignal.cs b/src/Tizen.NUI/src/internal/ButtonSignal.cs index 73d834a..59a479e 100755 --- a/src/Tizen.NUI/src/internal/ButtonSignal.cs +++ b/src/Tizen.NUI/src/internal/ButtonSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs b/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs index e54ad5a..e1175b3 100755 --- a/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/ChildPropertyRegistration.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ControlKeySignal.cs b/src/Tizen.NUI/src/internal/ControlKeySignal.cs index 011c83c..22961d2 100755 --- a/src/Tizen.NUI/src/internal/ControlKeySignal.cs +++ b/src/Tizen.NUI/src/internal/ControlKeySignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs index a9be735..a9c8e49 100755 --- a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs +++ b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/DaliException.cs b/src/Tizen.NUI/src/internal/DaliException.cs index 8e257cf..ea3dddc 100755 --- a/src/Tizen.NUI/src/internal/DaliException.cs +++ b/src/Tizen.NUI/src/internal/DaliException.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Disposable.cs b/src/Tizen.NUI/src/internal/Disposable.cs index c4627af..521bcf7 100755 --- a/src/Tizen.NUI/src/internal/Disposable.cs +++ b/src/Tizen.NUI/src/internal/Disposable.cs @@ -1,4 +1,20 @@ -using System; +/* + * Copyright(c) 2019 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. + * + */ +using System; using System.Collections.Generic; using System.Text; diff --git a/src/Tizen.NUI/src/internal/EventThreadCallback.cs b/src/Tizen.NUI/src/internal/EventThreadCallback.cs index fa8c731..2da11a6 100755 --- a/src/Tizen.NUI/src/internal/EventThreadCallback.cs +++ b/src/Tizen.NUI/src/internal/EventThreadCallback.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/FloatSignal.cs b/src/Tizen.NUI/src/internal/FloatSignal.cs index 7db553d..ff141bd 100755 --- a/src/Tizen.NUI/src/internal/FloatSignal.cs +++ b/src/Tizen.NUI/src/internal/FloatSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/FocusChangedSignal.cs b/src/Tizen.NUI/src/internal/FocusChangedSignal.cs index 780286f..99cb3eb 100755 --- a/src/Tizen.NUI/src/internal/FocusChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/FocusChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs b/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs index 7fa01a8..58a4682 100755 --- a/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/FocusGroupChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/FontDescription.cs b/src/Tizen.NUI/src/internal/FontDescription.cs index 6d54d54..5e2dbb7 100755 --- a/src/Tizen.NUI/src/internal/FontDescription.cs +++ b/src/Tizen.NUI/src/internal/FontDescription.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/FontMetrics.cs b/src/Tizen.NUI/src/internal/FontMetrics.cs index e209d50..ff79bcc 100755 --- a/src/Tizen.NUI/src/internal/FontMetrics.cs +++ b/src/Tizen.NUI/src/internal/FontMetrics.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs b/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs index 17bc0e2..4a31fe7 100755 --- a/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs +++ b/src/Tizen.NUI/src/internal/GaussianBlurViewSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/GlyphInfo.cs b/src/Tizen.NUI/src/internal/GlyphInfo.cs index 2f0f1b3..01c6c99 100755 --- a/src/Tizen.NUI/src/internal/GlyphInfo.cs +++ b/src/Tizen.NUI/src/internal/GlyphInfo.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/HoverSignal.cs b/src/Tizen.NUI/src/internal/HoverSignal.cs index 06e940e..799335d 100755 --- a/src/Tizen.NUI/src/internal/HoverSignal.cs +++ b/src/Tizen.NUI/src/internal/HoverSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ImageSignal.cs b/src/Tizen.NUI/src/internal/ImageSignal.cs index 7b97aa5..e7c00ce 100755 --- a/src/Tizen.NUI/src/internal/ImageSignal.cs +++ b/src/Tizen.NUI/src/internal/ImageSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/InputMethodOptions.cs b/src/Tizen.NUI/src/internal/InputMethodOptions.cs index ca9d805..67080f1 100755 --- a/src/Tizen.NUI/src/internal/InputMethodOptions.cs +++ b/src/Tizen.NUI/src/internal/InputMethodOptions.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.RotationGesture.cs b/src/Tizen.NUI/src/internal/Interop/Interop.RotationGesture.cs new file mode 100755 index 0000000..7a02180 --- /dev/null +++ b/src/Tizen.NUI/src/internal/Interop/Interop.RotationGesture.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tizen.NUI +{ + internal static partial class Interop + { + internal static partial class RotationGesture + { + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_RotationGestureDetector__SWIG_0")] + public static extern global::System.IntPtr new_RotationGestureDetector__SWIG_0(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetector_New")] + public static extern global::System.IntPtr RotationGestureDetector_New(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetector_DownCast")] + public static extern global::System.IntPtr RotationGestureDetector_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_RotationGestureDetector")] + public static extern void delete_RotationGestureDetector(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_RotationGestureDetector__SWIG_1")] + public static extern global::System.IntPtr new_RotationGestureDetector__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetector_Assign")] + public static extern global::System.IntPtr RotationGestureDetector_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetector_DetectedSignal")] + public static extern global::System.IntPtr RotationGestureDetector_DetectedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_RotationGesture__SWIG_0")] + public static extern global::System.IntPtr new_RotationGesture__SWIG_0(int jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_RotationGesture__SWIG_1")] + public static extern global::System.IntPtr new_RotationGesture__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_Assign")] + public static extern global::System.IntPtr RotationGesture_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_RotationGesture")] + public static extern void delete_RotationGesture(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_rotation_set")] + public static extern void RotationGesture_rotation_set(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_rotation_get")] + public static extern float RotationGesture_rotation_get(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_screenCenterPoint_set")] + public static extern void RotationGesture_screenCenterPoint_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_screenCenterPoint_get")] + public static extern global::System.IntPtr RotationGesture_screenCenterPoint_get(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_localCenterPoint_set")] + public static extern void RotationGesture_localCenterPoint_set(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_localCenterPoint_get")] + public static extern global::System.IntPtr RotationGesture_localCenterPoint_get(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetectedSignal_Empty")] + public static extern bool RotationGestureDetectedSignal_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetectedSignal_GetConnectionCount")] + public static extern uint RotationGestureDetectedSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetectedSignal_Connect")] + public static extern void RotationGestureDetectedSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetectedSignal_Disconnect")] + public static extern void RotationGestureDetectedSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetectedSignal_Emit")] + public static extern void RotationGestureDetectedSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_RotationGestureDetectedSignal")] + public static extern global::System.IntPtr new_RotationGestureDetectedSignal(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_RotationGestureDetectedSignal")] + public static extern void delete_RotationGestureDetectedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGestureDetector_SWIGUpcast")] + public static extern global::System.IntPtr RotationGestureDetector_SWIGUpcast(global::System.IntPtr jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_RotationGesture_SWIGUpcast")] + public static extern global::System.IntPtr RotationGesture_SWIGUpcast(global::System.IntPtr jarg1); + } + } +} diff --git a/src/Tizen.NUI/src/internal/Item.cs b/src/Tizen.NUI/src/internal/Item.cs index 0b3ce74..89c86a7 100755 --- a/src/Tizen.NUI/src/internal/Item.cs +++ b/src/Tizen.NUI/src/internal/Item.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ItemContainer.cs b/src/Tizen.NUI/src/internal/ItemContainer.cs index c7ef5eb..0a0835a 100755 --- a/src/Tizen.NUI/src/internal/ItemContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemContainer.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ItemFactory.cs b/src/Tizen.NUI/src/internal/ItemFactory.cs index 129f296..c9b4636 100755 --- a/src/Tizen.NUI/src/internal/ItemFactory.cs +++ b/src/Tizen.NUI/src/internal/ItemFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ItemIdContainer.cs b/src/Tizen.NUI/src/internal/ItemIdContainer.cs index 55f30d5..ce4a2bc 100755 --- a/src/Tizen.NUI/src/internal/ItemIdContainer.cs +++ b/src/Tizen.NUI/src/internal/ItemIdContainer.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ItemRange.cs b/src/Tizen.NUI/src/internal/ItemRange.cs index 90074d2..e6d5dcf 100755 --- a/src/Tizen.NUI/src/internal/ItemRange.cs +++ b/src/Tizen.NUI/src/internal/ItemRange.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/KeyEventSignal.cs b/src/Tizen.NUI/src/internal/KeyEventSignal.cs index 82717e6..292af32 100755 --- a/src/Tizen.NUI/src/internal/KeyEventSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyEventSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs b/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs index 9268f43..84d1cf7 100755 --- a/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs +++ b/src/Tizen.NUI/src/internal/KeyInputFocusSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs index cd4fe6b..46a18f4 100755 --- a/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs index 559483c..1c5e96d 100755 --- a/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardResizedSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs b/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs index b6a70ab..d2390a5 100755 --- a/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs +++ b/src/Tizen.NUI/src/internal/LanguageChangedSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs index 8b3017e..7a5cfe1 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutController.cs @@ -113,21 +113,6 @@ namespace Tizen.NUI public bool OverrideCoreAnimation {get;set;} = false; /// - /// Destructor which adds LayoutController to the Dispose queue. - /// - ~LayoutController() - { - } - - /// - /// Explict Dispose. - /// - public void Dispose() - { - Dispose(DisposeTypes.Explicit); - } - - /// /// Add transition data for a LayoutItem to the transition stack. /// /// Transition data for a LayoutItem. diff --git a/src/Tizen.NUI/src/internal/ListEventSignalType.cs b/src/Tizen.NUI/src/internal/ListEventSignalType.cs index 220ac44..111c2a8 100755 --- a/src/Tizen.NUI/src/internal/ListEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/ListEventSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs index c15dcf0..61f044a 100755 --- a/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/LongPressGestureDetectedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/LowBatterySignalType.cs b/src/Tizen.NUI/src/internal/LowBatterySignalType.cs index 1e1b3f7..ec9e559 100755 --- a/src/Tizen.NUI/src/internal/LowBatterySignalType.cs +++ b/src/Tizen.NUI/src/internal/LowBatterySignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/LowMemorySignalType.cs b/src/Tizen.NUI/src/internal/LowMemorySignalType.cs index 61b3571..b9f9e04 100755 --- a/src/Tizen.NUI/src/internal/LowMemorySignalType.cs +++ b/src/Tizen.NUI/src/internal/LowMemorySignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Matrix.cs b/src/Tizen.NUI/src/internal/Matrix.cs index 0f692d5..cacca9a 100755 --- a/src/Tizen.NUI/src/internal/Matrix.cs +++ b/src/Tizen.NUI/src/internal/Matrix.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Matrix3.cs b/src/Tizen.NUI/src/internal/Matrix3.cs index 733f31e..4c85a66 100755 --- a/src/Tizen.NUI/src/internal/Matrix3.cs +++ b/src/Tizen.NUI/src/internal/Matrix3.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs b/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs index 9ad5cbf..61a7a6c 100755 --- a/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs +++ b/src/Tizen.NUI/src/internal/ObjectCreatedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs b/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs index 2c68569..9856490 100755 --- a/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs +++ b/src/Tizen.NUI/src/internal/ObjectDestroyedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PageFactory.cs b/src/Tizen.NUI/src/internal/PageFactory.cs index 8a14b78..6ff9e7b 100755 --- a/src/Tizen.NUI/src/internal/PageFactory.cs +++ b/src/Tizen.NUI/src/internal/PageFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PagePanSignal.cs b/src/Tizen.NUI/src/internal/PagePanSignal.cs index 53bf25b..17c3bf2 100755 --- a/src/Tizen.NUI/src/internal/PagePanSignal.cs +++ b/src/Tizen.NUI/src/internal/PagePanSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PageTurnSignal.cs b/src/Tizen.NUI/src/internal/PageTurnSignal.cs index 3bf1c29..224e90c 100755 --- a/src/Tizen.NUI/src/internal/PageTurnSignal.cs +++ b/src/Tizen.NUI/src/internal/PageTurnSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs index f96c3d9..f77ff70 100755 --- a/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/PanGestureDetectedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs index f98f7de..024f34f 100755 --- a/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/PinchGestureDetectedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs b/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs index 838d6e8..c699780 100755 --- a/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs +++ b/src/Tizen.NUI/src/internal/PreFocusChangeSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs index 6c7b618..34aff93 100755 --- a/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ProgressBarValueChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/PropertyRegistration.cs b/src/Tizen.NUI/src/internal/PropertyRegistration.cs index 585d1da..67b5712 100755 --- a/src/Tizen.NUI/src/internal/PropertyRegistration.cs +++ b/src/Tizen.NUI/src/internal/PropertyRegistration.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/RefObject.cs b/src/Tizen.NUI/src/internal/RefObject.cs index 30f069b..8ed5bd0 100755 --- a/src/Tizen.NUI/src/internal/RefObject.cs +++ b/src/Tizen.NUI/src/internal/RefObject.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/RenderTaskSignal.cs b/src/Tizen.NUI/src/internal/RenderTaskSignal.cs index e8e3d85..3ffd1d1 100755 --- a/src/Tizen.NUI/src/internal/RenderTaskSignal.cs +++ b/src/Tizen.NUI/src/internal/RenderTaskSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ResizedSignal.cs b/src/Tizen.NUI/src/internal/ResizedSignal.cs index 0be79b4..e943f5b 100755 --- a/src/Tizen.NUI/src/internal/ResizedSignal.cs +++ b/src/Tizen.NUI/src/internal/ResizedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/RotationGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/RotationGestureDetectedSignal.cs new file mode 100755 index 0000000..5346c73 --- /dev/null +++ b/src/Tizen.NUI/src/internal/RotationGestureDetectedSignal.cs @@ -0,0 +1,148 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + using Tizen.NUI.BaseComponents; + internal class RotationGestureDetectedSignal : global::System.IDisposable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + protected bool swigCMemOwn; + + internal RotationGestureDetectedSignal(global::System.IntPtr cPtr, bool cMemoryOwn) + { + swigCMemOwn = cMemoryOwn; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RotationGestureDetectedSignal obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + //A Flag to check who called Dispose(). (By User or DisposeQueue) + private bool isDisposeQueued = false; + //A Flat to check if it is already disposed. + protected bool disposed = false; + + + ~RotationGestureDetectedSignal() + { + if (!isDisposeQueued) + { + isDisposeQueued = true; + DisposeQueue.Instance.Add(this); + } + } + + public void Dispose() + { + //Throw excpetion if Dispose() is called in separate thread. + if (!Window.IsInstalled()) + { + throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread."); + } + + if (isDisposeQueued) + { + Dispose(DisposeTypes.Implicit); + } + else + { + Dispose(DisposeTypes.Explicit); + System.GC.SuppressFinalize(this); + } + } + + protected virtual void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + Interop.RotationGesture.delete_RotationGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + disposed = true; + } + + public bool Empty() + { + bool ret = Interop.RotationGesture.RotationGestureDetectedSignal_Empty(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public uint GetConnectionCount() + { + uint ret = Interop.RotationGesture.RotationGestureDetectedSignal_GetConnectionCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + public void Connect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + Interop.RotationGesture.RotationGestureDetectedSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Disconnect(System.Delegate func) + { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + { + Interop.RotationGesture.RotationGestureDetectedSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + } + + public void Emit(View arg1, RotationGesture arg2) + { + Interop.RotationGesture.RotationGestureDetectedSignal_Emit(swigCPtr, View.getCPtr(arg1), RotationGesture.getCPtr(arg2)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + public RotationGestureDetectedSignal() : this(Interop.RotationGesture.new_RotationGestureDetectedSignal(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + } + +} diff --git a/src/Tizen.NUI/src/internal/RulerDomain.cs b/src/Tizen.NUI/src/internal/RulerDomain.cs index 5d3b5cd..300c02e 100755 --- a/src/Tizen.NUI/src/internal/RulerDomain.cs +++ b/src/Tizen.NUI/src/internal/RulerDomain.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/RulerPtr.cs b/src/Tizen.NUI/src/internal/RulerPtr.cs index a10b99c..6583ac9 100755 --- a/src/Tizen.NUI/src/internal/RulerPtr.cs +++ b/src/Tizen.NUI/src/internal/RulerPtr.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs b/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs index cf1328e..1189968 100755 --- a/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollStateChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs b/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs index 5c593f8..ea30bec 100755 --- a/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollViewSnapStartedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ScrollableSignal.cs b/src/Tizen.NUI/src/internal/ScrollableSignal.cs index 831163e..01859ee 100755 --- a/src/Tizen.NUI/src/internal/ScrollableSignal.cs +++ b/src/Tizen.NUI/src/internal/ScrollableSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/SignalConnectorType.cs b/src/Tizen.NUI/src/internal/SignalConnectorType.cs index d042c03..df32f79 100755 --- a/src/Tizen.NUI/src/internal/SignalConnectorType.cs +++ b/src/Tizen.NUI/src/internal/SignalConnectorType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/SignalObserver.cs b/src/Tizen.NUI/src/internal/SignalObserver.cs index 476ee2c..1e70e95 100755 --- a/src/Tizen.NUI/src/internal/SignalObserver.cs +++ b/src/Tizen.NUI/src/internal/SignalObserver.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs b/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs index 89bf545..b12ef90 100755 --- a/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs +++ b/src/Tizen.NUI/src/internal/SliderMarkReachedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs b/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs index 94c2e6a..1cdcd4c 100755 --- a/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/SliderValueChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/SlotObserver.cs b/src/Tizen.NUI/src/internal/SlotObserver.cs index f85fa13..1195405 100755 --- a/src/Tizen.NUI/src/internal/SlotObserver.cs +++ b/src/Tizen.NUI/src/internal/SlotObserver.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/StageWheelSignal.cs b/src/Tizen.NUI/src/internal/StageWheelSignal.cs index da83e24..280a8cd 100755 --- a/src/Tizen.NUI/src/internal/StageWheelSignal.cs +++ b/src/Tizen.NUI/src/internal/StageWheelSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/StateChangedSignalType.cs b/src/Tizen.NUI/src/internal/StateChangedSignalType.cs index a743f70..da3fac4 100755 --- a/src/Tizen.NUI/src/internal/StateChangedSignalType.cs +++ b/src/Tizen.NUI/src/internal/StateChangedSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/StatusSignalType.cs b/src/Tizen.NUI/src/internal/StatusSignalType.cs index 80a196f..ecf9235 100755 --- a/src/Tizen.NUI/src/internal/StatusSignalType.cs +++ b/src/Tizen.NUI/src/internal/StatusSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/StringValuePair.cs b/src/Tizen.NUI/src/internal/StringValuePair.cs index 35e171a..863b73c 100755 --- a/src/Tizen.NUI/src/internal/StringValuePair.cs +++ b/src/Tizen.NUI/src/internal/StringValuePair.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/StyleChangedSignal.cs b/src/Tizen.NUI/src/internal/StyleChangedSignal.cs index 09e9c92..02b3cd7 100755 --- a/src/Tizen.NUI/src/internal/StyleChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/StyleChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs b/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs index 3f450c6..a699707 100755 --- a/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs +++ b/src/Tizen.NUI/src/internal/TapGestureDetectedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TextEditorSignal.cs b/src/Tizen.NUI/src/internal/TextEditorSignal.cs index 2a466e4..469afc3 100755 --- a/src/Tizen.NUI/src/internal/TextEditorSignal.cs +++ b/src/Tizen.NUI/src/internal/TextEditorSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TextFieldSignal.cs b/src/Tizen.NUI/src/internal/TextFieldSignal.cs index 87fbf6a..97f3c84 100755 --- a/src/Tizen.NUI/src/internal/TextFieldSignal.cs +++ b/src/Tizen.NUI/src/internal/TextFieldSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TimePeriod.cs b/src/Tizen.NUI/src/internal/TimePeriod.cs index 775577f..1f9d71a 100755 --- a/src/Tizen.NUI/src/internal/TimePeriod.cs +++ b/src/Tizen.NUI/src/internal/TimePeriod.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TimerSignalType.cs b/src/Tizen.NUI/src/internal/TimerSignalType.cs index 45fffc3..3d40517 100755 --- a/src/Tizen.NUI/src/internal/TimerSignalType.cs +++ b/src/Tizen.NUI/src/internal/TimerSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TouchDataSignal.cs b/src/Tizen.NUI/src/internal/TouchDataSignal.cs index 1a8986a..1a10a3f 100755 --- a/src/Tizen.NUI/src/internal/TouchDataSignal.cs +++ b/src/Tizen.NUI/src/internal/TouchDataSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TouchPoint.cs b/src/Tizen.NUI/src/internal/TouchPoint.cs index a91916f..afed7e4 100755 --- a/src/Tizen.NUI/src/internal/TouchPoint.cs +++ b/src/Tizen.NUI/src/internal/TouchPoint.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TouchPointContainer.cs b/src/Tizen.NUI/src/internal/TouchPointContainer.cs index e2a291b..44ad375 100755 --- a/src/Tizen.NUI/src/internal/TouchPointContainer.cs +++ b/src/Tizen.NUI/src/internal/TouchPointContainer.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TouchSignal.cs b/src/Tizen.NUI/src/internal/TouchSignal.cs index 4a6cb63..875e0cd 100755 --- a/src/Tizen.NUI/src/internal/TouchSignal.cs +++ b/src/Tizen.NUI/src/internal/TouchSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TypeAction.cs b/src/Tizen.NUI/src/internal/TypeAction.cs index 5025d60..6dfcb71 100755 --- a/src/Tizen.NUI/src/internal/TypeAction.cs +++ b/src/Tizen.NUI/src/internal/TypeAction.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/TypeRegistration.cs b/src/Tizen.NUI/src/internal/TypeRegistration.cs index df288e6..dbc548f 100755 --- a/src/Tizen.NUI/src/internal/TypeRegistration.cs +++ b/src/Tizen.NUI/src/internal/TypeRegistration.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/Uint16Pair.cs b/src/Tizen.NUI/src/internal/Uint16Pair.cs index 0b462b1..f983d1e 100755 --- a/src/Tizen.NUI/src/internal/Uint16Pair.cs +++ b/src/Tizen.NUI/src/internal/Uint16Pair.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/VectorBase.cs b/src/Tizen.NUI/src/internal/VectorBase.cs index b0fb7f4..1be2647 100755 --- a/src/Tizen.NUI/src/internal/VectorBase.cs +++ b/src/Tizen.NUI/src/internal/VectorBase.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/VectorBlob.cs b/src/Tizen.NUI/src/internal/VectorBlob.cs index fd7778c..bb1d317 100755 --- a/src/Tizen.NUI/src/internal/VectorBlob.cs +++ b/src/Tizen.NUI/src/internal/VectorBlob.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/VectorUint16Pair.cs b/src/Tizen.NUI/src/internal/VectorUint16Pair.cs index 4d1ee16..213127b 100755 --- a/src/Tizen.NUI/src/internal/VectorUint16Pair.cs +++ b/src/Tizen.NUI/src/internal/VectorUint16Pair.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs b/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs index 26e81b7..089435b 100755 --- a/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs +++ b/src/Tizen.NUI/src/internal/VectorUnsignedChar.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/VideoViewSignal.cs b/src/Tizen.NUI/src/internal/VideoViewSignal.cs index 050953d..9a276c2 100755 --- a/src/Tizen.NUI/src/internal/VideoViewSignal.cs +++ b/src/Tizen.NUI/src/internal/VideoViewSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs b/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs index 8bf3c92..a5cf2cb 100755 --- a/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewLayoutDirectionChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs index 37b8a57..9d68a14 100755 --- a/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs +++ b/src/Tizen.NUI/src/internal/ViewResourceReadySignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ViewSignal.cs b/src/Tizen.NUI/src/internal/ViewSignal.cs index 8b8dc46..5648405 100755 --- a/src/Tizen.NUI/src/internal/ViewSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs index 8d6dd2f..87efb17 100755 --- a/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs +++ b/src/Tizen.NUI/src/internal/ViewVisibilityChangedSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/VoidSignal.cs b/src/Tizen.NUI/src/internal/VoidSignal.cs index 3013dbc..4b8106a 100755 --- a/src/Tizen.NUI/src/internal/VoidSignal.cs +++ b/src/Tizen.NUI/src/internal/VoidSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/WatchBoolSignal.cs b/src/Tizen.NUI/src/internal/WatchBoolSignal.cs index 589823f..4298ddf 100755 --- a/src/Tizen.NUI/src/internal/WatchBoolSignal.cs +++ b/src/Tizen.NUI/src/internal/WatchBoolSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/WatchTimeSignal.cs b/src/Tizen.NUI/src/internal/WatchTimeSignal.cs index 58fcd52..945d174 100755 --- a/src/Tizen.NUI/src/internal/WatchTimeSignal.cs +++ b/src/Tizen.NUI/src/internal/WatchTimeSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/WheelSignal.cs b/src/Tizen.NUI/src/internal/WheelSignal.cs index 0b979af..8f549a8 100755 --- a/src/Tizen.NUI/src/internal/WheelSignal.cs +++ b/src/Tizen.NUI/src/internal/WheelSignal.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/WidgetViewSignal.cs b/src/Tizen.NUI/src/internal/WidgetViewSignal.cs index a114dc9..0b35602 100755 --- a/src/Tizen.NUI/src/internal/WidgetViewSignal.cs +++ b/src/Tizen.NUI/src/internal/WidgetViewSignal.cs @@ -1,12 +1,19 @@ -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.12 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ +/* + * Copyright(c) 2019 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. + * + */ using System; using System.ComponentModel; diff --git a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs index 025d71f..81b5aff 100755 --- a/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs +++ b/src/Tizen.NUI/src/internal/WindowFocusSignalType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/doublep.cs b/src/Tizen.NUI/src/internal/doublep.cs index 131527c..a8d08b1 100755 --- a/src/Tizen.NUI/src/internal/doublep.cs +++ b/src/Tizen.NUI/src/internal/doublep.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/floatp.cs b/src/Tizen.NUI/src/internal/floatp.cs index c3fb0e5..6203064 100755 --- a/src/Tizen.NUI/src/internal/floatp.cs +++ b/src/Tizen.NUI/src/internal/floatp.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/intp.cs b/src/Tizen.NUI/src/internal/intp.cs index f85eac8..0330ad4 100755 --- a/src/Tizen.NUI/src/internal/intp.cs +++ b/src/Tizen.NUI/src/internal/intp.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/uintp.cs b/src/Tizen.NUI/src/internal/uintp.cs index 88e0084..596a3aa 100755 --- a/src/Tizen.NUI/src/internal/uintp.cs +++ b/src/Tizen.NUI/src/internal/uintp.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/internal/ushortp.cs b/src/Tizen.NUI/src/internal/ushortp.cs index d47d4ca..4f02cb2 100755 --- a/src/Tizen.NUI/src/internal/ushortp.cs +++ b/src/Tizen.NUI/src/internal/ushortp.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Adaptor.cs b/src/Tizen.NUI/src/public/Adaptor.cs index ac320a0..032fa59 100755 --- a/src/Tizen.NUI/src/public/Adaptor.cs +++ b/src/Tizen.NUI/src/public/Adaptor.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/AlphaFunction.cs b/src/Tizen.NUI/src/public/AlphaFunction.cs index 57d19ad..09a244a 100755 --- a/src/Tizen.NUI/src/public/AlphaFunction.cs +++ b/src/Tizen.NUI/src/public/AlphaFunction.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/BaseComponents/TableView.cs b/src/Tizen.NUI/src/public/BaseComponents/TableView.cs index ba98516..cd477c6 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TableView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TableView.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 11d4c09..b018716 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -3538,8 +3538,7 @@ namespace Tizen.NUI.BaseComponents if (_widthPolicy >= 0) { _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly ); - //Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value)); - Size2D.Width = _widthPolicy; + Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue(value)); } _layout?.RequestLayout(); } @@ -3562,8 +3561,7 @@ namespace Tizen.NUI.BaseComponents if (_heightPolicy >= 0) { _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly ); - //Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value)); - Size2D.Height = _heightPolicy; + Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue(value)); } _layout?.RequestLayout(); } diff --git a/src/Tizen.NUI/src/public/Color.cs b/src/Tizen.NUI/src/public/Color.cs index e273330..1c2890c 100755 --- a/src/Tizen.NUI/src/public/Color.cs +++ b/src/Tizen.NUI/src/public/Color.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Degree.cs b/src/Tizen.NUI/src/public/Degree.cs index 4f49439..1262515 100755 --- a/src/Tizen.NUI/src/public/Degree.cs +++ b/src/Tizen.NUI/src/public/Degree.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Extents.cs b/src/Tizen.NUI/src/public/Extents.cs index 0836bf2..a6d7f69 100755 --- a/src/Tizen.NUI/src/public/Extents.cs +++ b/src/Tizen.NUI/src/public/Extents.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2017 Samsung Electronics Co., Ltd. +* Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/FontClient.cs b/src/Tizen.NUI/src/public/FontClient.cs index 231f716..3364301 100755 --- a/src/Tizen.NUI/src/public/FontClient.cs +++ b/src/Tizen.NUI/src/public/FontClient.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Gesture.cs b/src/Tizen.NUI/src/public/Gesture.cs index b26540e..6882b9f 100755 --- a/src/Tizen.NUI/src/public/Gesture.cs +++ b/src/Tizen.NUI/src/public/Gesture.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Hover.cs b/src/Tizen.NUI/src/public/Hover.cs index 824f9db..07df49a 100755 --- a/src/Tizen.NUI/src/public/Hover.cs +++ b/src/Tizen.NUI/src/public/Hover.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Key.cs b/src/Tizen.NUI/src/public/Key.cs index 58fd163..483a8f6 100755 --- a/src/Tizen.NUI/src/public/Key.cs +++ b/src/Tizen.NUI/src/public/Key.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/NUIConstants.cs b/src/Tizen.NUI/src/public/NUIConstants.cs index f64ebe0..2f4fd6b 100755 --- a/src/Tizen.NUI/src/public/NUIConstants.cs +++ b/src/Tizen.NUI/src/public/NUIConstants.cs @@ -612,333 +612,6 @@ namespace Tizen.NUI } /// - /// Enumeration for the text horizontal aligning. - /// - /// 3 - public enum HorizontalAlignment - { - /// - /// Texts place at the begin of horizontal direction. - /// - Begin, - /// - /// Texts place at the center of horizontal direction. - /// - Center, - /// - /// Texts place at the end of horizontal direction. - /// - End - } - - /// - /// Enumeration for the text horizontal aligning. - /// - /// 3 - public enum VerticalAlignment - { - /// - /// Texts place at the top of vertical direction. - /// - Top, - /// - /// Texts place at the center of vertical direction. - /// - Center, - /// - /// Texts place at the bottom of vertical direction. - /// - Bottom - } - - /// - /// This specifies wrap mode types.
- /// WrapModeU and WrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0. - ///
- /// 3 - public enum WrapModeType - { - /// - /// The default value. - /// - Default = 0, - /// - /// Clamp to edge. - /// - ClampToEdge, - /// - /// Repeat. - /// - Repeat, - /// - /// Mirrored repeat. - /// - MirroredRepeat - } - - /// - /// Specifies the release policy types.
- /// Decides if the image should be cached in different conditions. - ///
- /// 5 - public enum ReleasePolicyType - { - /// - /// Image is released when visual detached from scene. - /// - Detached = 0, - /// - /// Image is only released when visual is destroyed. - /// - Destroyed, - /// - /// Image is not released. - /// - Never - } - - /// - /// Specifies the load policy types.
- /// Decides when the image texture should be loaded. - ///
- /// 5 - public enum LoadPolicyType - { - /// - /// Load texture once the image source has been provided. Even if not being used yet. - /// - Immediate = 0, - /// - /// Only load texture once the visual is attached, when the image needs to be shown. - /// - Attached - } - - /// - /// The type of coordinate system for certain attributes of the points in a gradient. - /// - /// 3 - public enum GradientVisualUnitsType - { - /// - /// Uses the normals for the start, end, and center points, i.e., top-left is (-0.5, -0.5) and bottom-right is (0.5, 0.5). - /// - ObjectBoundingBox, - /// - /// Uses the user coordinates for the start, end, and center points, i.e., in a 200 by 200 control, top-left is (0, 0) and bottom-right is (200, 200). - /// - UserSpace - } - - /// - /// This specifies SpreadMethod types.
- /// SpreadMethod defines what happens if the gradient starts or ends inside the bounds of the target rectangle.
- ///
- /// 3 - public enum GradientVisualSpreadMethodType - { - /// - /// Uses the terminal colors of the gradient to fill the remainder of the quad. - /// - Pad, - /// - /// Reflects the gradient pattern start-to-end, end-to-start, start-to-end, etc. until the quad is filled. - /// - Reflect, - /// - /// Repeats the gradient pattern start-to-end, start-to-end, start-to-end, etc. until the quad is filled. - /// - Repeat - } - - /// - /// The shading mode used by the mesh visual. - /// - /// 3 - public enum MeshVisualShadingModeValue - { - /// - /// *Simplest*. One color that is lit by ambient and diffuse lighting. - /// - TexturelessWithDiffuseLighting, - /// - /// Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting. - /// - TexturedWithSpecularLighting, - /// - /// Uses all textures provided including gloss, normal, and texture map along with specular, ambient, and diffuse lighting. - /// - TexturedWithDetailedSpecularLighting - } - - /// - /// The primitive shape to render as a primitive visual. - /// - /// 3 - public enum PrimitiveVisualShapeType - { - /// - /// A perfectly round geometrical object in the three-dimensional space. - /// - Sphere, - /// - /// The area bound between two circles, i.e., a cone with the tip removed. - /// - ConicalFrustrum, - /// - /// Equivalent to a conical frustrum with the top radius of zero. - /// Equivalent to a conical frustrum with the top radius of zero. - Cone, - /// - /// Equivalent to a conical frustrum with the top radius of zero. - /// - Cylinder, - /// - /// Equivalent to a conical frustrum with equal radii for the top and bottom circles. - /// - Cube, - /// - /// Equivalent to a bevelled cube with a bevel percentage of zero. - /// - Octahedron, - /// - /// Equivalent to a bevelled cube with a bevel percentage of one. - /// - BevelledCube - } - - /// - /// This specifies fitting mode types. Fitting options, used when resizing images to fit desired dimensions.
- /// A fitting mode controls the region of a loaded image to be mapped to the desired image rectangle.
- /// All fitting modes preserve the aspect ratio of the image contents.
- ///
- /// 3 - public enum FittingModeType - { - /// - /// Full-screen image display: Limit loaded image resolution to device resolution using the ShrinkToFit mode. - /// - ShrinkToFit, - /// - /// Thumbnail gallery grid: Limit loaded image resolution to screen tile using the ScaleToFill mode. - /// - ScaleToFill, - /// - /// Image columns: Limit loaded image resolution to column width using the FitWidth mode. - /// - FitWidth, - /// - /// Image rows: Limit loaded image resolution to row height using the FitHeight mode. - /// - FitHeight - } - - /// - /// The values of this enum determine how the visual should fit into the view. - /// - /// 5 - public enum VisualFittingModeType - { - /// - /// The visual should be scaled to fit, preserving aspect ratio. - /// - FitKeepAspectRatio, - /// - /// The visual should be stretched to fill, not preserving aspect ratio. - /// - Fill - } - - /// - /// This specifies sampling mode types. Filtering options are used when resizing images to sample original pixels.
- /// A SamplingMode controls how pixels in an input image are sampled and combined to generate each pixel of a destination image during scaling.
- /// NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and the FittingMode,
- /// but all other filter modes do if the desired dimensions are not more than the raw dimensions of the input image file.
- ///
- /// 3 - public enum SamplingModeType - { - /// - /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc. width and height and approximately the desired size.
- /// This is the default. - ///
- Box, - /// - /// For each output pixel, read one input pixel. - /// - Nearest, - /// - /// For each output pixel, read a quad of four input pixels and write a weighted average of them. - /// - Linear, - /// - /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc. width and height and approximately the desired size,
- /// then for each output pixel, read one pixel from the last level of box filtering.
- ///
- BoxThenNearest, - /// - /// Iteratively box filter to almost the right size, then for each output pixel, read four pixels from the last level of box filtering and write their weighted average. - /// - BoxThenLinear, - /// - /// No filtering is performed. If the SCALE_TO_FILL scaling mode is enabled, the borders of the image may be trimmed to match the aspect ratio of the desired dimensions. - /// - NoFilter, - /// - /// For caching algorithms where a client strongly prefers a cache-hit to reuse a cached image. - /// - DontCare - } - - /// - /// This specifies policy types that could be used by the transform for the offset or size. - /// - /// 3 - public enum VisualTransformPolicyType - { - /// - /// Relative to the control (percentage [0.0f to 1.0f] of the control). - /// - Relative = 0, - /// - /// Absolute value in world units. - /// - Absolute = 1 - } - - /// - /// This specifies all the transform property types. - /// - /// 3 - public enum VisualTransformPropertyType - { - /// - /// Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). - /// - Offset, - /// - /// Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). - /// - Size, - /// - /// The origin of the visual within its control area. - /// - Origin, - /// - /// The anchor-point of the visual. - /// - AnchorPoint, - /// - /// Whether the x or y offset values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). - /// - OffsetPolicy, - /// - /// Whether the width or the height size values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). - /// - SizePolicy - } - - /// /// The type for HiddenInput mode. /// /// 3 @@ -1378,751 +1051,6 @@ namespace Tizen.NUI } /// - /// This specifies visual types. - /// - /// 3 - public struct Visual - { - /// - /// The index for the visual type. - /// - /// 3 - public enum Type - { - /// - /// Renders a solid color as an internal border to the control's quad. - /// - Border, - /// - /// Renders a solid color to the control's quad. - /// - Color, - /// - /// Renders a smooth transition of colors to the control's quad. - /// - Gradient, - /// - /// Renders an image into the control's quad. - /// - Image, - /// - /// Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. - /// - Mesh, - /// - /// Renders a simple 3D shape, such as a cube or a sphere. - /// - Primitive, - /// - /// Renders a simple wire-frame outlining a quad. - /// - Wireframe, - /// - /// Renders text. - /// - Text, - /// - /// Renders an NPatch image. - /// - NPatch, - /// - /// Renders an SVG image. - /// - SVG, - /// - /// Renders a animated image (animated GIF). - /// - AnimatedImage - } - - /// - /// This specifies visual properties. - /// - /// 3 - public struct Property - { - /// - /// Type. - /// - /// 3 - public static readonly int Type = NDalic.VISUAL_PROPERTY_TYPE; - /// - /// Shader. - /// - /// 3 - public static readonly int Shader = NDalic.VISUAL_PROPERTY_SHADER; - /// - /// Transform. - /// - /// 3 - public static readonly int Transform = NDalic.VISUAL_PROPERTY_TRANSFORM; - /// - /// PremultipliedAlpha. - /// - /// 3 - public static readonly int PremultipliedAlpha = NDalic.VISUAL_PROPERTY_PREMULTIPLIED_ALPHA; - /// - /// MixColor. - /// - /// 3 - public static readonly int MixColor = NDalic.VISUAL_PROPERTY_MIX_COLOR; - /// - /// Opacity. - /// - /// 3 - public static readonly int Opacity = NDalic.VISUAL_PROPERTY_MIX_COLOR + 1; - /// - /// The fitting mode of the visual. - /// - /// 5 - public static readonly int VisualFittingMode = NDalic.VISUAL_PROPERTY_MIX_COLOR + 2; - } - - /// - /// This specifies shader properties. - /// - /// 3 - public struct ShaderProperty - { - /// - /// Vertex shader code - /// - /// 3 - public static readonly int VertexShader = NDalic.VISUAL_SHADER_VERTEX; - /// - /// Fragment shader code - /// - /// 3 - public static readonly int FragmentShader = NDalic.VISUAL_SHADER_FRAGMENT; - /// - /// How to subdivide the grid along X - /// - /// 3 - public static readonly int ShaderSubdivideGridX = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_X; - /// - /// How to subdivide the grid along Y - /// - /// 3 - public static readonly int ShaderSubdivideGridY = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_Y; - /// - /// Bitmask of hints - /// - /// 3 - public static readonly int ShaderHints = NDalic.VISUAL_SHADER_HINTS; - } - - /// - /// This specifies visaul align types. - /// - /// 3 - public enum AlignType - { - /// - /// TopBegin - /// - /// 3 - TopBegin = 0, - /// - /// TopCenter - /// - /// 3 - TopCenter, - /// - /// TopEnd - /// - /// 3 - TopEnd, - /// - /// CenterBegin - /// - /// 3 - CenterBegin, - /// - /// Center - /// - /// 3 - Center, - /// - /// CenterEnd - /// - /// 3 - CenterEnd, - /// - /// BottomBegin - /// - /// 3 - BottomBegin, - /// - /// BottomCenter - /// - /// 3 - BottomCenter, - /// - /// BottomEnd - /// - /// 3 - BottomEnd - } - } - - /// - /// This specifies properties of the BorderVisual. - /// - /// 3 - public struct BorderVisualProperty - { - /// - /// The color of the border. - /// - /// 3 - public static readonly int Color = NDalic.BORDER_VISUAL_COLOR; - /// - /// The width of the border (in pixels). - /// - /// 3 - public static readonly int Size = NDalic.BORDER_VISUAL_SIZE; - /// - /// Whether anti-aliasing of the border is required. - /// - /// 3 - public static readonly int AntiAliasing = NDalic.BORDER_VISUAL_ANTI_ALIASING; - } - - /// - /// This specifies properties of the ColorVisual. - /// - /// 3 - public struct ColorVisualProperty - { - /// - /// The solid color required. - /// - /// 3 - public static readonly int MixColor = NDalic.COLOR_VISUAL_MIX_COLOR; - /// - /// Whether to render if the MixColor is transparent. - /// - /// 5 - public static readonly int RenderIfTransparent = NDalic.COLOR_VISUAL_MIX_COLOR + 1; - } - - /// - /// This specifies properties of the GradientVisual. - /// - /// 3 - public struct GradientVisualProperty - { - /// - /// The start position of a linear gradient. - /// - /// 3 - public static readonly int StartPosition = NDalic.GRADIENT_VISUAL_START_POSITION; - /// - /// The end position of a linear gradient. - /// - /// 3 - public static readonly int EndPosition = NDalic.GRADIENT_VISUAL_END_POSITION; - /// - /// The center point of a radial gradient. - /// - /// 3 - public static readonly int Center = NDalic.GRADIENT_VISUAL_CENTER; - /// - /// The size of the radius of a radial gradient. - /// - /// 3 - public static readonly int Radius = NDalic.GRADIENT_VISUAL_RADIUS; - /// - /// All the stop offsets. - /// - /// 3 - public static readonly int StopOffset = NDalic.GRADIENT_VISUAL_STOP_OFFSET; - /// - /// The color at the stop offsets. - /// - /// 3 - public static readonly int StopColor = NDalic.GRADIENT_VISUAL_STOP_COLOR; - /// - /// Defines the coordinate system for certain attributes of the points in a gradient. - /// - /// 3 - public static readonly int Units = NDalic.GRADIENT_VISUAL_UNITS; - /// - /// Indicates what happens if the gradient starts or ends inside the bounds of the target rectangle. - /// - /// 3 - public static readonly int SpreadMethod = NDalic.GRADIENT_VISUAL_SPREAD_METHOD; - } - - /// - /// This specifies properties of the ImageVisual. - /// - /// 3 - public struct ImageVisualProperty - { - /// - /// The URL of the image. - /// - /// 3 - public static readonly int URL = NDalic.IMAGE_VISUAL_URL; - - /// - /// Fitting options, used when resizing images to fit desired dimensions. - /// - /// 3 - public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; - - /// - /// Filtering options, used when resizing images to sample original pixels. - /// - /// 3 - public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; - - /// - /// The desired image width. - /// - /// 3 - public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; - - /// - /// The desired image height. - /// - /// 3 - public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; - - /// - /// Whether to load the image synchronously. - /// - /// 3 - public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; - - /// - /// If true, only draws the borders. - /// - /// 3 - public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; - - /// - /// The image area to be displayed. - /// - /// 3 - public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; - - /// - /// The wrap mode for u coordinate. - /// - /// 3 - public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; - - /// - /// The wrap mode for v coordinate. - /// - /// 3 - public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; - - /// - /// The border of the image. - /// - /// 3 - public static readonly int Border = NDalic.IMAGE_VISUAL_BORDER; - - /// - /// Whether to use the texture atlas. - /// - /// 5 - public static readonly int Atlasing = NDalic.IMAGE_VISUAL_BORDER + 1; - - /// - /// The URL of the alpha mask image. - /// - /// 3 - public static readonly int AlphaMaskURL = NDalic.IMAGE_VISUAL_ALPHA_MASK_URL; - - /// - /// Defines the batch size for pre-loading images in the AnimatedImageVisual - /// - /// 4 - public static readonly int BatchSize = NDalic.IMAGE_VISUAL_BATCH_SIZE; - - /// - /// Defines the cache size for loading images in the AnimatedImageVisual - /// - /// 4 - public static readonly int CacheSize = NDalic.IMAGE_VISUAL_CACHE_SIZE; - - /// - /// The number of milliseconds between each frame in the AnimatedImageVisual - /// - /// 4 - public static readonly int FrameDelay = NDalic.IMAGE_VISUAL_FRAME_DELAY; - - /// - /// The scale factor to apply to the content image before masking. - /// - /// 4 - public static readonly int MaskContentScale = NDalic.IMAGE_VISUAL_MASK_CONTENT_SCALE; - - /// - /// Whether to crop image to mask or scale mask to fit image - /// - /// 4 - public static readonly int CropToMask = NDalic.IMAGE_VISUAL_CROP_TO_MASK; - - /// - /// The policy to determine when an image should be loaded. - /// - /// 5 - public static readonly int LoadPolicy = NDalic.IMAGE_VISUAL_LOAD_POLICY; - - /// - /// The policy to determine when an image should no longer be cached. - /// - /// 5 - public static readonly int ReleasePolicy = NDalic.IMAGE_VISUAL_RELEASE_POLICY; - - /// - /// Determines if image orientation should be corrected so that the image displays as it was intended. - /// - /// 5 - public static readonly int OrientationCorrection = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION; - - /// - /// Overlays the auxiliary image on top of an NPatch image. - /// - /// 5 - public static readonly int AuxiliaryImageURL = NDalic.IMAGE_VISUAL_AUXILIARY_IMAGE_URL; - - /// - /// Alpha value for the auxiliary image, without affecting the underlying NPatch image - /// - /// 5 - public static readonly int AuxiliaryImageAlpha = NDalic.IMAGE_VISUAL_AUXILIARY_IMAGE_ALPHA; - - /// - /// The number of times the AnimatedImageVisual will be looped. - /// The default is -1. If the value is less than 0, loop unlimited. Otherwise, loop loopCount times. - /// - /// 5 - public static readonly int LoopCount = NDalic.IMAGE_VISUAL_LOOP_COUNT; - - /// - /// @brief The playing range the AnimatedVectorImageVisual will use. - /// Animation will play between the values specified.The array can only have two values, and more will be ignored. - /// Both values should be between 0 and the total frame number, otherwise they will be ignored. - /// If the range provided is not in proper order (minimum, maximum), it will be reordered. - /// @details Name "playRange", Type Property::ARRAY of Property::INTEGER - /// @note Default 0 and the total frame number. - /// - /// - /// Hidden API (Inhouse API) - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly int PlayRange = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 4; - - /// - /// @brief The playing state the AnimatedVectorImageVisual will use. - /// @details Name "playState", type PlayState (Property::INTEGER) - /// @note This property is read-only. - /// - /// - /// Hidden API (Inhouse API) - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly int PlayState = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 5; - - /// - /// @brief The current frame number the AnimatedVectorImageVisual will use. - /// @details Name "currentFrameNumber", Type Property::INTEGER, between[0, the maximum frame number] or between the play range if specified - /// @note This property is read-only. - /// - /// - /// Inhouse API - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly int CurrentFrameNumber = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 6; - - /// - /// @brief The total frame number the AnimatedVectorImageVisual will use. - /// @details Name "totalFrameNumber", Type Property::INTEGER. - /// @note This property is read-only. - /// - /// - /// Inhouse API - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly int TotalFrameNumber = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 7; - - /// - /// @brief The stop behavior the AnimatedVectorImageVisual will use. - /// @details Name "stopBehavior", Type StopBehavior::Type (Property::INTEGER) - /// @note Default value is StopBehavior::CURRENT_FRAME. - /// - /// - /// Inhouse API - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly int StopBehavior = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 8; - - /// - /// @brief The looping mode the AnimatedVectorImageVisual will use. - /// @details Name "loopingMode", Type LoopingMode::Type (Property::INTEGER) - /// @note Default value is LoopingMode::RESTART. - /// - /// - /// Inhouse API - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly int LoopingMode = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 9; - } - - /// - /// This specifies properties of the MeshVisual. - /// - /// 3 - public struct MeshVisualProperty - { - /// - /// The location of the ".obj" file. - /// - /// 3 - public static readonly int ObjectURL = NDalic.MESH_VISUAL_OBJECT_URL; - /// - /// The location of the ".mtl" file. - /// - /// 3 - public static readonly int MaterialtURL = NDalic.MESH_VISUAL_MATERIAL_URL; - /// - /// Path to the directory the textures (including gloss and normal) are stored in. - /// - /// 3 - public static readonly int TexturesPath = NDalic.MESH_VISUAL_TEXTURES_PATH; - /// - /// Sets the type of shading mode that the mesh will use. - /// - /// 3 - public static readonly int ShadingMode = NDalic.MESH_VISUAL_SHADING_MODE; - /// - /// Whether to use mipmaps for textures or not. - /// - /// 3 - public static readonly int UseMipmapping = NDalic.MESH_VISUAL_USE_MIPMAPPING; - /// - /// Whether to average normals at each point to smooth textures or not. - /// - /// 3 - public static readonly int UseSoftNormals = NDalic.MESH_VISUAL_USE_SOFT_NORMALS; - /// - /// The position, in stage space, of the point light that applies lighting to the model. - /// - /// 3 - public static readonly int LightPosition = NDalic.MESH_VISUAL_LIGHT_POSITION; - } - - /// - /// This specifies properties of the PrimitiveVisual. - /// - /// 3 - public struct PrimitiveVisualProperty - { - /// - /// The specific shape to render. - /// - /// 3 - public static readonly int Shape = NDalic.PRIMITIVE_VISUAL_SHAPE; - /// - /// The color of the shape. - /// - /// 3 - public static readonly int MixColor = NDalic.PRIMITIVE_VISUAL_MIX_COLOR; - /// - /// The number of slices as you go around the shape. - /// - /// 3 - public static readonly int Slices = NDalic.PRIMITIVE_VISUAL_SLICES; - /// - /// The number of stacks as you go down the shape. - /// - /// 3 - public static readonly int Stacks = NDalic.PRIMITIVE_VISUAL_STACKS; - /// - /// The scale of the radius of the top circle of a conical frustrum. - /// - /// 3 - public static readonly int ScaleTopRadius = NDalic.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS; - /// - /// The scale of the radius of the bottom circle of a conical frustrum. - /// - /// 3 - public static readonly int ScaleBottomRadius = NDalic.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS; - /// - /// The scale of the height of a conic. - /// - /// 3 - public static readonly int ScaleHeight = NDalic.PRIMITIVE_VISUAL_SCALE_HEIGHT; - /// - /// The scale of the radius of a cylinder. - /// - /// 3 - public static readonly int ScaleRadius = NDalic.PRIMITIVE_VISUAL_SCALE_RADIUS; - /// - /// The dimensions of a cuboid. Scales in the same fashion as a 9-patch image. - /// - /// 3 - public static readonly int ScaleDimensions = NDalic.PRIMITIVE_VISUAL_SCALE_DIMENSIONS; - /// - /// Determines how bevelled the cuboid should be, based off the smallest dimension. - /// - /// 3 - public static readonly int BevelPercentage = NDalic.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE; - /// - /// Defines how smooth the bevelled edges should be. - /// - /// 3 - public static readonly int BevelSmoothness = NDalic.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS; - /// - /// The position, in stage space, of the point light that applies lighting to the model. - /// - /// 3 - public static readonly int LightPosition = NDalic.PRIMITIVE_VISUAL_LIGHT_POSITION; - } - - /// - /// This specifies properties of the TextVisual. - /// - /// 3 - public struct TextVisualProperty - { - /// - /// The text to display in UTF-8 format. - /// - /// 3 - public static readonly int Text = NDalic.TEXT_VISUAL_TEXT; - /// - /// The requested font family to use. - /// - /// 3 - public static readonly int FontFamily = NDalic.TEXT_VISUAL_FONT_FAMILY; - /// - /// The requested font style to use. - /// - /// 3 - public static readonly int FontStyle = NDalic.TEXT_VISUAL_FONT_STYLE; - /// - /// The size of font in points. - /// - /// 3 - public static readonly int PointSize = NDalic.TEXT_VISUAL_POINT_SIZE; - /// - /// The single-line or multi-line layout option. - /// - /// 3 - public static readonly int MultiLine = NDalic.TEXT_VISUAL_MULTI_LINE; - /// - /// The line horizontal alignment. - /// - /// 3 - public static readonly int HorizontalAlignment = NDalic.TEXT_VISUAL_HORIZONTAL_ALIGNMENT; - /// - /// The line vertical alignment. - /// - /// 3 - public static readonly int VerticalAlignment = NDalic.TEXT_VISUAL_VERTICAL_ALIGNMENT; - /// - /// The color of the text. - /// - /// 3 - public static readonly int TextColor = NDalic.TEXT_VISUAL_TEXT_COLOR; - /// - /// Whether the mark-up processing is enabled. - /// - /// 3 - public static readonly int EnableMarkup = NDalic.TEXT_VISUAL_ENABLE_MARKUP; - /// - /// The shadow parameters. - /// - /// 5 - public static readonly int Shadow = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 1; - /// - /// The default underline parameters. - /// - /// 5 - public static readonly int Underline = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 2; - /// - /// The default outline parameters. - /// - /// 5 - public static readonly int Outline = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 3; - /// - /// The default text background parameters. - /// - /// 5 - public static readonly int Background = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 4; - } - - /// - /// This specifies properties of the NpatchImageVisual. - /// - /// 3 - public struct NpatchImageVisualProperty - { - /// - /// The URL of the image. - /// - /// 3 - public static readonly int URL = NDalic.IMAGE_VISUAL_URL; - /// - /// Fitting options, used when resizing images to fit desired dimensions. - /// - /// 3 - public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; - /// - /// Filtering options, used when resizing images to sample original pixels. - /// - /// 3 - public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; - /// - /// The desired image width. - /// - /// 3 - public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; - /// - /// The desired image height. - /// - /// 3 - public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; - /// - /// Whether to load the image synchronously. - /// - /// 3 - public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; - /// - /// If true, only draws the borders. - /// - /// 3 - public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; - /// - /// The image area to be displayed. - /// - /// 3 - public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; - /// - /// The wrap mode for u coordinate. - /// - /// 3 - public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; - /// - /// The wrap mode for v coordinate. - /// - /// 3 - public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; - /// - /// The border of the image. - /// - /// 3 - public static readonly int Border = NDalic.IMAGE_VISUAL_WRAP_MODE_V + 1; - } - - /// /// The HiddenInput property. /// /// 3 diff --git a/src/Tizen.NUI/src/public/PaddingType.cs b/src/Tizen.NUI/src/public/PaddingType.cs index 35a324d..276090b 100755 --- a/src/Tizen.NUI/src/public/PaddingType.cs +++ b/src/Tizen.NUI/src/public/PaddingType.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Position.cs b/src/Tizen.NUI/src/public/Position.cs index 35aae7c..fe4344e 100755 --- a/src/Tizen.NUI/src/public/Position.cs +++ b/src/Tizen.NUI/src/public/Position.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Position2D.cs b/src/Tizen.NUI/src/public/Position2D.cs index e7c9f6f..9ca902d 100755 --- a/src/Tizen.NUI/src/public/Position2D.cs +++ b/src/Tizen.NUI/src/public/Position2D.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Property.cs b/src/Tizen.NUI/src/public/Property.cs index 1ab8c26..e8c81cd 100755 --- a/src/Tizen.NUI/src/public/Property.cs +++ b/src/Tizen.NUI/src/public/Property.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/PropertyBuffer.cs b/src/Tizen.NUI/src/public/PropertyBuffer.cs index 6b23c5a..09a161c 100755 --- a/src/Tizen.NUI/src/public/PropertyBuffer.cs +++ b/src/Tizen.NUI/src/public/PropertyBuffer.cs @@ -54,6 +54,9 @@ namespace Tizen.NUI /// A pointer to the data that will be copied to the buffer. /// Number of elements to expand or contract the buffer. /// 3 + [Obsolete("Deprecated in API6, Will be removed in API9, " + + "Please use PropertyBuffer(PropertyMap bufferFormat) constructor instead!" + + "IntPtr(native integer pointer) is supposed to be not used in Application!")] [EditorBrowsable(EditorBrowsableState.Never)] public void SetData(System.IntPtr data, uint size) { diff --git a/src/Tizen.NUI/src/public/PropertyNotification.cs b/src/Tizen.NUI/src/public/PropertyNotification.cs index 0a24b2b..93b24f4 100755 --- a/src/Tizen.NUI/src/public/PropertyNotification.cs +++ b/src/Tizen.NUI/src/public/PropertyNotification.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. @@ -21,8 +21,6 @@ using System.ComponentModel; namespace Tizen.NUI { - - /// /// Issues a notification upon a condition of the property being met. /// See PropertyCondition for available defined conditions. diff --git a/src/Tizen.NUI/src/public/Radian.cs b/src/Tizen.NUI/src/public/Radian.cs index 61872da..b25593b 100755 --- a/src/Tizen.NUI/src/public/Radian.cs +++ b/src/Tizen.NUI/src/public/Radian.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Rectangle.cs b/src/Tizen.NUI/src/public/Rectangle.cs index 4610e03..f0d1d5e 100755 --- a/src/Tizen.NUI/src/public/Rectangle.cs +++ b/src/Tizen.NUI/src/public/Rectangle.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/RelativeVector2.cs b/src/Tizen.NUI/src/public/RelativeVector2.cs index 74fa825..d4d68af 100755 --- a/src/Tizen.NUI/src/public/RelativeVector2.cs +++ b/src/Tizen.NUI/src/public/RelativeVector2.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/RelativeVector3.cs b/src/Tizen.NUI/src/public/RelativeVector3.cs index 6bf0d0a..66e52ae 100755 --- a/src/Tizen.NUI/src/public/RelativeVector3.cs +++ b/src/Tizen.NUI/src/public/RelativeVector3.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/RelativeVector4.cs b/src/Tizen.NUI/src/public/RelativeVector4.cs index 8b3e9b9..e0dc591 100755 --- a/src/Tizen.NUI/src/public/RelativeVector4.cs +++ b/src/Tizen.NUI/src/public/RelativeVector4.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/RelayoutContainer.cs b/src/Tizen.NUI/src/public/RelayoutContainer.cs index 3c300f8..805cacc 100755 --- a/src/Tizen.NUI/src/public/RelayoutContainer.cs +++ b/src/Tizen.NUI/src/public/RelayoutContainer.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Rotation.cs b/src/Tizen.NUI/src/public/Rotation.cs index dd3cc19..c9ec8b4 100755 --- a/src/Tizen.NUI/src/public/Rotation.cs +++ b/src/Tizen.NUI/src/public/Rotation.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/RotationGesture.cs b/src/Tizen.NUI/src/public/RotationGesture.cs new file mode 100755 index 0000000..7424a4b --- /dev/null +++ b/src/Tizen.NUI/src/public/RotationGesture.cs @@ -0,0 +1,185 @@ +/* + * Copyright(c) 2019 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. + * + */ +using System.ComponentModel; + +namespace Tizen.NUI +{ + + /// + /// A RotationGesture is emitted when the user moves two fingers in a circular motion.
+ /// A rotation gesture will continue to be sent to the actor under the center point of the rotation until the rotation ends.
+ ///
+ /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public class RotationGesture : Gesture + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal RotationGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RotationGesture.RotationGesture_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + + /// + /// The overall rotation (in radians) from the start of the rotation gesture till the latest rotation gesture. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public float Rotation + { + get + { + return rotation; + } + } + + /// + /// The center point of the two points that caused the rotation gesture in screen coordinates. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public Vector2 ScreenCenterPoint + { + get + { + return screenCenterPoint; + } + } + + /// + /// The center point of the two points that caused the rotation gesture in local view coordinates. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public Vector2 LocalCenterPoint + { + get + { + return localCenterPoint; + } + } + + /// + /// The default constructor. + /// + /// The state of the gesture. + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public RotationGesture(Gesture.StateType state) : this(Interop.RotationGesture.new_RotationGesture__SWIG_0((int)state), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private float rotation + { + set + { + Interop.RotationGesture.RotationGesture_rotation_set(swigCPtr, value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + float ret = Interop.RotationGesture.RotationGesture_rotation_get(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private Vector2 screenCenterPoint + { + set + { + Interop.RotationGesture.RotationGesture_screenCenterPoint_set(swigCPtr, Vector2.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = Interop.RotationGesture.RotationGesture_screenCenterPoint_get(swigCPtr); + Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + private Vector2 localCenterPoint + { + set + { + Interop.RotationGesture.RotationGesture_localCenterPoint_set(swigCPtr, Vector2.getCPtr(value)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + global::System.IntPtr cPtr = Interop.RotationGesture.RotationGesture_localCenterPoint_get(swigCPtr); + Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RotationGesture obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal static RotationGesture GetRotationGestureFromPtr(global::System.IntPtr cPtr) + { + RotationGesture ret = new RotationGesture(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Dispose. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + Interop.RotationGesture.delete_RotationGesture(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + } + +} diff --git a/src/Tizen.NUI/src/public/RotationGestureDetector.cs b/src/Tizen.NUI/src/public/RotationGestureDetector.cs new file mode 100755 index 0000000..510bf2c --- /dev/null +++ b/src/Tizen.NUI/src/public/RotationGestureDetector.cs @@ -0,0 +1,246 @@ +/* + * Copyright(c) 2019 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. + * + */ +using System; +using System.Runtime.InteropServices; +using Tizen.NUI.BaseComponents; +using System.ComponentModel; + +namespace Tizen.NUI +{ + /// + /// It tries to detect when the user moves two touch points in a circular motion. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public class RotationGestureDetector : GestureDetector + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + private DaliEventHandler _rotationGestureEventHandler; + private DetectedCallbackDelegate _rotationGestureCallbackDelegate; + + + /// + /// Creates an initialized RotationGestureDetector. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public RotationGestureDetector() : this(Interop.RotationGesture.RotationGestureDetector_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + + /// + /// The copy constructor. + /// + /// A reference to the copied handle + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public RotationGestureDetector(RotationGestureDetector handle) : this(Interop.RotationGesture.new_RotationGestureDetector__SWIG_1(RotationGestureDetector.getCPtr(handle)), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal RotationGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RotationGesture.RotationGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr rotationGesture); + + /// + /// This signal is emitted when the specified rotation is detected on the attached view. + /// + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public event DaliEventHandler Detected + { + add + { + lock (this) + { + // Restricted to only one listener + if (_rotationGestureEventHandler == null) + { + _rotationGestureEventHandler += value; + + _rotationGestureCallbackDelegate = new DetectedCallbackDelegate(OnRotationGestureDetected); + this.DetectedSignal().Connect(_rotationGestureCallbackDelegate); + } + } + } + + remove + { + lock (this) + { + if (_rotationGestureEventHandler != null) + { + this.DetectedSignal().Disconnect(_rotationGestureCallbackDelegate); + } + + _rotationGestureEventHandler -= value; + } + } + } + + + internal static RotationGestureDetector GetRotationGestureDetectorFromPtr(global::System.IntPtr cPtr) + { + RotationGestureDetector ret = new RotationGestureDetector(cPtr, false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal new static RotationGestureDetector DownCast(BaseHandle handle) + { + RotationGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RotationGestureDetector; + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RotationGestureDetector obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal RotationGestureDetector Assign(RotationGestureDetector rhs) + { + RotationGestureDetector ret = new RotationGestureDetector(Interop.RotationGesture.RotationGestureDetector_Assign(swigCPtr, RotationGestureDetector.getCPtr(rhs)), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal RotationGestureDetectedSignal DetectedSignal() + { + RotationGestureDetectedSignal ret = new RotationGestureDetectedSignal(Interop.RotationGesture.RotationGestureDetector_DetectedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Dispose. + /// + /// The dispose type + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //Because the execution order of Finalizes is non-deterministic. + + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + Interop.RotationGesture.delete_RotationGestureDetector(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + private void OnRotationGestureDetected(IntPtr actor, IntPtr rotationGesture) + { + DetectedEventArgs e = new DetectedEventArgs(); + + // Populate all members of "e" (DetectedEventArgs) with real data. + e.View = Registry.GetManagedBaseHandleFromNativePtr(actor) as View; + if (null == e.View) + { + e.View = Registry.GetManagedBaseHandleFromRefObject(actor) as View; + } + + e.RotationGesture = Tizen.NUI.RotationGesture.GetRotationGestureFromPtr(rotationGesture); + + if (_rotationGestureEventHandler != null) + { + //Here we send all data to user event handlers. + _rotationGestureEventHandler(this, e); + } + } + + /// + /// Event arguments that passed via the RotationGestureEvent signal. + /// + /// 5 + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public class DetectedEventArgs : EventArgs + { + private View _view; + private RotationGesture _rotationGesture; + + /// + /// The attached view. + /// + /// 5 + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + + /// + /// The RotationGesture. + /// + /// 5 + /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public RotationGesture RotationGesture + { + get + { + return _rotationGesture; + } + set + { + _rotationGesture = value; + } + } + } + + } + +} diff --git a/src/Tizen.NUI/src/public/Size.cs b/src/Tizen.NUI/src/public/Size.cs index 2175653..9da40f9 100755 --- a/src/Tizen.NUI/src/public/Size.cs +++ b/src/Tizen.NUI/src/public/Size.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Size2D.cs b/src/Tizen.NUI/src/public/Size2D.cs index 6da1c88..02d7d79 100755 --- a/src/Tizen.NUI/src/public/Size2D.cs +++ b/src/Tizen.NUI/src/public/Size2D.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Vector2.cs b/src/Tizen.NUI/src/public/Vector2.cs index 7c7b8c8..a5d2149 100755 --- a/src/Tizen.NUI/src/public/Vector2.cs +++ b/src/Tizen.NUI/src/public/Vector2.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Vector3.cs b/src/Tizen.NUI/src/public/Vector3.cs index 1e5cb08..aa3a0b0 100755 --- a/src/Tizen.NUI/src/public/Vector3.cs +++ b/src/Tizen.NUI/src/public/Vector3.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Vector4.cs b/src/Tizen.NUI/src/public/Vector4.cs index 05706ce..deb7bd6 100755 --- a/src/Tizen.NUI/src/public/Vector4.cs +++ b/src/Tizen.NUI/src/public/Vector4.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/VisualConstants.cs b/src/Tizen.NUI/src/public/VisualConstants.cs new file mode 100755 index 0000000..1e25421 --- /dev/null +++ b/src/Tizen.NUI/src/public/VisualConstants.cs @@ -0,0 +1,1090 @@ +// Copyright (c) 2019 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. + +using System.ComponentModel; + +namespace Tizen.NUI +{ + /// + /// Specifies the release policy types.
+ /// Decides if the image should be cached in different conditions. + ///
+ /// 5 + public enum ReleasePolicyType + { + /// + /// Image is released when visual detached from scene. + /// + Detached = 0, + /// + /// Image is only released when visual is destroyed. + /// + Destroyed, + /// + /// Image is not released. + /// + Never + } + + /// + /// Specifies the load policy types.
+ /// Decides when the image texture should be loaded. + ///
+ /// 5 + public enum LoadPolicyType + { + /// + /// Load texture once the image source has been provided. Even if not being used yet. + /// + Immediate = 0, + /// + /// Only load texture once the visual is attached, when the image needs to be shown. + /// + Attached + } + + /// + /// Enumeration for the text horizontal aligning. + /// + /// 3 + public enum HorizontalAlignment + { + /// + /// Texts place at the begin of horizontal direction. + /// + Begin, + /// + /// Texts place at the center of horizontal direction. + /// + Center, + /// + /// Texts place at the end of horizontal direction. + /// + End + } + + /// + /// Enumeration for the text horizontal aligning. + /// + /// 3 + public enum VerticalAlignment + { + /// + /// Texts place at the top of vertical direction. + /// + Top, + /// + /// Texts place at the center of vertical direction. + /// + Center, + /// + /// Texts place at the bottom of vertical direction. + /// + Bottom + } + + /// + /// This specifies wrap mode types.
+ /// WrapModeU and WrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0. + ///
+ /// 3 + public enum WrapModeType + { + /// + /// The default value. + /// + Default = 0, + /// + /// Clamp to edge. + /// + ClampToEdge, + /// + /// Repeat. + /// + Repeat, + /// + /// Mirrored repeat. + /// + MirroredRepeat + } + + /// + /// This specifies fitting mode types. Fitting options, used when resizing images to fit desired dimensions.
+ /// A fitting mode controls the region of a loaded image to be mapped to the desired image rectangle.
+ /// All fitting modes preserve the aspect ratio of the image contents.
+ ///
+ /// 3 + public enum FittingModeType + { + /// + /// Full-screen image display: Limit loaded image resolution to device resolution using the ShrinkToFit mode. + /// + ShrinkToFit, + /// + /// Thumbnail gallery grid: Limit loaded image resolution to screen tile using the ScaleToFill mode. + /// + ScaleToFill, + /// + /// Image columns: Limit loaded image resolution to column width using the FitWidth mode. + /// + FitWidth, + /// + /// Image rows: Limit loaded image resolution to row height using the FitHeight mode. + /// + FitHeight + } + + /// + /// This specifies sampling mode types. Filtering options are used when resizing images to sample original pixels.
+ /// A SamplingMode controls how pixels in an input image are sampled and combined to generate each pixel of a destination image during scaling.
+ /// NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and the FittingMode,
+ /// but all other filter modes do if the desired dimensions are not more than the raw dimensions of the input image file.
+ ///
+ /// 3 + public enum SamplingModeType + { + /// + /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc. width and height and approximately the desired size.
+ /// This is the default. + ///
+ Box, + /// + /// For each output pixel, read one input pixel. + /// + Nearest, + /// + /// For each output pixel, read a quad of four input pixels and write a weighted average of them. + /// + Linear, + /// + /// Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc. width and height and approximately the desired size,
+ /// then for each output pixel, read one pixel from the last level of box filtering.
+ ///
+ BoxThenNearest, + /// + /// Iteratively box filter to almost the right size, then for each output pixel, read four pixels from the last level of box filtering and write their weighted average. + /// + BoxThenLinear, + /// + /// No filtering is performed. If the SCALE_TO_FILL scaling mode is enabled, the borders of the image may be trimmed to match the aspect ratio of the desired dimensions. + /// + NoFilter, + /// + /// For caching algorithms where a client strongly prefers a cache-hit to reuse a cached image. + /// + DontCare + } + + /// + /// The type of coordinate system for certain attributes of the points in a gradient. + /// + /// 3 + public enum GradientVisualUnitsType + { + /// + /// Uses the normals for the start, end, and center points, i.e., top-left is (-0.5, -0.5) and bottom-right is (0.5, 0.5). + /// + ObjectBoundingBox, + /// + /// Uses the user coordinates for the start, end, and center points, i.e., in a 200 by 200 control, top-left is (0, 0) and bottom-right is (200, 200). + /// + UserSpace + } + + /// + /// This specifies SpreadMethod types.
+ /// SpreadMethod defines what happens if the gradient starts or ends inside the bounds of the target rectangle.
+ ///
+ /// 3 + public enum GradientVisualSpreadMethodType + { + /// + /// Uses the terminal colors of the gradient to fill the remainder of the quad. + /// + Pad, + /// + /// Reflects the gradient pattern start-to-end, end-to-start, start-to-end, etc. until the quad is filled. + /// + Reflect, + /// + /// Repeats the gradient pattern start-to-end, start-to-end, start-to-end, etc. until the quad is filled. + /// + Repeat + } + + /// + /// The shading mode used by the mesh visual. + /// + /// 3 + public enum MeshVisualShadingModeValue + { + /// + /// *Simplest*. One color that is lit by ambient and diffuse lighting. + /// + TexturelessWithDiffuseLighting, + /// + /// Uses only the visual image textures provided with specular lighting in addition to ambient and diffuse lighting. + /// + TexturedWithSpecularLighting, + /// + /// Uses all textures provided including gloss, normal, and texture map along with specular, ambient, and diffuse lighting. + /// + TexturedWithDetailedSpecularLighting + } + + /// + /// The primitive shape to render as a primitive visual. + /// + /// 3 + public enum PrimitiveVisualShapeType + { + /// + /// A perfectly round geometrical object in the three-dimensional space. + /// + Sphere, + /// + /// The area bound between two circles, i.e., a cone with the tip removed. + /// + ConicalFrustrum, + /// + /// Equivalent to a conical frustrum with the top radius of zero. + /// Equivalent to a conical frustrum with the top radius of zero. + Cone, + /// + /// Equivalent to a conical frustrum with the top radius of zero. + /// + Cylinder, + /// + /// Equivalent to a conical frustrum with equal radii for the top and bottom circles. + /// + Cube, + /// + /// Equivalent to a bevelled cube with a bevel percentage of zero. + /// + Octahedron, + /// + /// Equivalent to a bevelled cube with a bevel percentage of one. + /// + BevelledCube + } + + /// + /// The values of this enum determine how the visual should fit into the view. + /// + /// 5 + public enum VisualFittingModeType + { + /// + /// The visual should be scaled to fit, preserving aspect ratio. + /// + FitKeepAspectRatio, + /// + /// The visual should be stretched to fill, not preserving aspect ratio. + /// + Fill + } + + /// + /// This specifies policy types that could be used by the transform for the offset or size. + /// + /// 3 + public enum VisualTransformPolicyType + { + /// + /// Relative to the control (percentage [0.0f to 1.0f] of the control). + /// + Relative = 0, + /// + /// Absolute value in world units. + /// + Absolute = 1 + } + + /// + /// This specifies all the transform property types. + /// + /// 3 + public enum VisualTransformPropertyType + { + /// + /// Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). + /// + Offset, + /// + /// Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). + /// + Size, + /// + /// The origin of the visual within its control area. + /// + Origin, + /// + /// The anchor-point of the visual. + /// + AnchorPoint, + /// + /// Whether the x or y offset values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). + /// + OffsetPolicy, + /// + /// Whether the width or the height size values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). + /// + SizePolicy + } + + /// + /// This specifies visual types. + /// + /// 3 + public struct Visual + { + /// + /// The index for the visual type. + /// + /// 3 + public enum Type + { + /// + /// Renders a solid color as an internal border to the control's quad. + /// + Border, + /// + /// Renders a solid color to the control's quad. + /// + Color, + /// + /// Renders a smooth transition of colors to the control's quad. + /// + Gradient, + /// + /// Renders an image into the control's quad. + /// + Image, + /// + /// Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. + /// + Mesh, + /// + /// Renders a simple 3D shape, such as a cube or a sphere. + /// + Primitive, + /// + /// Renders a simple wire-frame outlining a quad. + /// + Wireframe, + /// + /// Renders text. + /// + Text, + /// + /// Renders an NPatch image. + /// + NPatch, + /// + /// Renders an SVG image. + /// + SVG, + /// + /// Renders a animated image (animated GIF). + /// + AnimatedImage + } + + /// + /// This specifies visual properties. + /// + /// 3 + public struct Property + { + /// + /// Type. + /// + /// 3 + public static readonly int Type = NDalic.VISUAL_PROPERTY_TYPE; + /// + /// Shader. + /// + /// 3 + public static readonly int Shader = NDalic.VISUAL_PROPERTY_SHADER; + /// + /// Transform. + /// + /// 3 + public static readonly int Transform = NDalic.VISUAL_PROPERTY_TRANSFORM; + /// + /// PremultipliedAlpha. + /// + /// 3 + public static readonly int PremultipliedAlpha = NDalic.VISUAL_PROPERTY_PREMULTIPLIED_ALPHA; + /// + /// MixColor. + /// + /// 3 + public static readonly int MixColor = NDalic.VISUAL_PROPERTY_MIX_COLOR; + /// + /// Opacity. + /// + /// 3 + public static readonly int Opacity = NDalic.VISUAL_PROPERTY_MIX_COLOR + 1; + /// + /// The fitting mode of the visual. + /// + /// 5 + public static readonly int VisualFittingMode = NDalic.VISUAL_PROPERTY_MIX_COLOR + 2; + } + + /// + /// This specifies shader properties. + /// + /// 3 + public struct ShaderProperty + { + /// + /// Vertex shader code + /// + /// 3 + public static readonly int VertexShader = NDalic.VISUAL_SHADER_VERTEX; + /// + /// Fragment shader code + /// + /// 3 + public static readonly int FragmentShader = NDalic.VISUAL_SHADER_FRAGMENT; + /// + /// How to subdivide the grid along X + /// + /// 3 + public static readonly int ShaderSubdivideGridX = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_X; + /// + /// How to subdivide the grid along Y + /// + /// 3 + public static readonly int ShaderSubdivideGridY = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_Y; + /// + /// Bitmask of hints + /// + /// 3 + public static readonly int ShaderHints = NDalic.VISUAL_SHADER_HINTS; + } + + /// + /// This specifies visaul align types. + /// + /// 3 + public enum AlignType + { + /// + /// TopBegin + /// + /// 3 + TopBegin = 0, + /// + /// TopCenter + /// + /// 3 + TopCenter, + /// + /// TopEnd + /// + /// 3 + TopEnd, + /// + /// CenterBegin + /// + /// 3 + CenterBegin, + /// + /// Center + /// + /// 3 + Center, + /// + /// CenterEnd + /// + /// 3 + CenterEnd, + /// + /// BottomBegin + /// + /// 3 + BottomBegin, + /// + /// BottomCenter + /// + /// 3 + BottomCenter, + /// + /// BottomEnd + /// + /// 3 + BottomEnd + } + } + + /// + /// This specifies properties of the BorderVisual. + /// + /// 3 + public struct BorderVisualProperty + { + /// + /// The color of the border. + /// + /// 3 + public static readonly int Color = NDalic.BORDER_VISUAL_COLOR; + /// + /// The width of the border (in pixels). + /// + /// 3 + public static readonly int Size = NDalic.BORDER_VISUAL_SIZE; + /// + /// Whether anti-aliasing of the border is required. + /// + /// 3 + public static readonly int AntiAliasing = NDalic.BORDER_VISUAL_ANTI_ALIASING; + } + + /// + /// This specifies properties of the ColorVisual. + /// + /// 3 + public struct ColorVisualProperty + { + /// + /// The solid color required. + /// + /// 3 + public static readonly int MixColor = NDalic.COLOR_VISUAL_MIX_COLOR; + /// + /// Whether to render if the MixColor is transparent. + /// + /// 5 + public static readonly int RenderIfTransparent = NDalic.COLOR_VISUAL_MIX_COLOR + 1; + } + + /// + /// This specifies properties of the GradientVisual. + /// + /// 3 + public struct GradientVisualProperty + { + /// + /// The start position of a linear gradient. + /// + /// 3 + public static readonly int StartPosition = NDalic.GRADIENT_VISUAL_START_POSITION; + /// + /// The end position of a linear gradient. + /// + /// 3 + public static readonly int EndPosition = NDalic.GRADIENT_VISUAL_END_POSITION; + /// + /// The center point of a radial gradient. + /// + /// 3 + public static readonly int Center = NDalic.GRADIENT_VISUAL_CENTER; + /// + /// The size of the radius of a radial gradient. + /// + /// 3 + public static readonly int Radius = NDalic.GRADIENT_VISUAL_RADIUS; + /// + /// All the stop offsets. + /// + /// 3 + public static readonly int StopOffset = NDalic.GRADIENT_VISUAL_STOP_OFFSET; + /// + /// The color at the stop offsets. + /// + /// 3 + public static readonly int StopColor = NDalic.GRADIENT_VISUAL_STOP_COLOR; + /// + /// Defines the coordinate system for certain attributes of the points in a gradient. + /// + /// 3 + public static readonly int Units = NDalic.GRADIENT_VISUAL_UNITS; + /// + /// Indicates what happens if the gradient starts or ends inside the bounds of the target rectangle. + /// + /// 3 + public static readonly int SpreadMethod = NDalic.GRADIENT_VISUAL_SPREAD_METHOD; + } + + /// + /// This specifies properties of the ImageVisual. + /// + /// 3 + public struct ImageVisualProperty + { + /// + /// The URL of the image. + /// + /// 3 + public static readonly int URL = NDalic.IMAGE_VISUAL_URL; + + /// + /// Fitting options, used when resizing images to fit desired dimensions. + /// + /// 3 + public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; + + /// + /// Filtering options, used when resizing images to sample original pixels. + /// + /// 3 + public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; + + /// + /// The desired image width. + /// + /// 3 + public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; + + /// + /// The desired image height. + /// + /// 3 + public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; + + /// + /// Whether to load the image synchronously. + /// + /// 3 + public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; + + /// + /// If true, only draws the borders. + /// + /// 3 + public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; + + /// + /// The image area to be displayed. + /// + /// 3 + public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; + + /// + /// The wrap mode for u coordinate. + /// + /// 3 + public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; + + /// + /// The wrap mode for v coordinate. + /// + /// 3 + public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; + + /// + /// The border of the image. + /// + /// 3 + public static readonly int Border = NDalic.IMAGE_VISUAL_BORDER; + + /// + /// Whether to use the texture atlas. + /// + /// 5 + public static readonly int Atlasing = NDalic.IMAGE_VISUAL_BORDER + 1; + + /// + /// The URL of the alpha mask image. + /// + /// 3 + public static readonly int AlphaMaskURL = NDalic.IMAGE_VISUAL_ALPHA_MASK_URL; + + /// + /// Defines the batch size for pre-loading images in the AnimatedImageVisual + /// + /// 4 + public static readonly int BatchSize = NDalic.IMAGE_VISUAL_BATCH_SIZE; + + /// + /// Defines the cache size for loading images in the AnimatedImageVisual + /// + /// 4 + public static readonly int CacheSize = NDalic.IMAGE_VISUAL_CACHE_SIZE; + + /// + /// The number of milliseconds between each frame in the AnimatedImageVisual + /// + /// 4 + public static readonly int FrameDelay = NDalic.IMAGE_VISUAL_FRAME_DELAY; + + /// + /// The scale factor to apply to the content image before masking. + /// + /// 4 + public static readonly int MaskContentScale = NDalic.IMAGE_VISUAL_MASK_CONTENT_SCALE; + + /// + /// Whether to crop image to mask or scale mask to fit image + /// + /// 4 + public static readonly int CropToMask = NDalic.IMAGE_VISUAL_CROP_TO_MASK; + + /// + /// The policy to determine when an image should be loaded. + /// + /// 5 + public static readonly int LoadPolicy = NDalic.IMAGE_VISUAL_LOAD_POLICY; + + /// + /// The policy to determine when an image should no longer be cached. + /// + /// 5 + public static readonly int ReleasePolicy = NDalic.IMAGE_VISUAL_RELEASE_POLICY; + + /// + /// Determines if image orientation should be corrected so that the image displays as it was intended. + /// + /// 5 + public static readonly int OrientationCorrection = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION; + + /// + /// Overlays the auxiliary image on top of an NPatch image. + /// + /// 5 + public static readonly int AuxiliaryImageURL = NDalic.IMAGE_VISUAL_AUXILIARY_IMAGE_URL; + + /// + /// Alpha value for the auxiliary image, without affecting the underlying NPatch image + /// + /// 5 + public static readonly int AuxiliaryImageAlpha = NDalic.IMAGE_VISUAL_AUXILIARY_IMAGE_ALPHA; + + /// + /// The number of times the AnimatedImageVisual will be looped. + /// The default is -1. If the value is less than 0, loop unlimited. Otherwise, loop loopCount times. + /// + /// 5 + public static readonly int LoopCount = NDalic.IMAGE_VISUAL_LOOP_COUNT; + + /// + /// @brief The playing range the AnimatedVectorImageVisual will use. + /// Animation will play between the values specified.The array can only have two values, and more will be ignored. + /// Both values should be between 0 and the total frame number, otherwise they will be ignored. + /// If the range provided is not in proper order (minimum, maximum), it will be reordered. + /// @details Name "playRange", Type Property::ARRAY of Property::INTEGER + /// @note Default 0 and the total frame number. + /// + /// + /// Hidden API (Inhouse API) + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly int PlayRange = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 4; + + /// + /// @brief The playing state the AnimatedVectorImageVisual will use. + /// @details Name "playState", type PlayState (Property::INTEGER) + /// @note This property is read-only. + /// + /// + /// Hidden API (Inhouse API) + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly int PlayState = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 5; + + /// + /// @brief The current frame number the AnimatedVectorImageVisual will use. + /// @details Name "currentFrameNumber", Type Property::INTEGER, between[0, the maximum frame number] or between the play range if specified + /// @note This property is read-only. + /// + /// + /// Inhouse API + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly int CurrentFrameNumber = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 6; + + /// + /// @brief The total frame number the AnimatedVectorImageVisual will use. + /// @details Name "totalFrameNumber", Type Property::INTEGER. + /// @note This property is read-only. + /// + /// + /// Inhouse API + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly int TotalFrameNumber = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 7; + + /// + /// @brief The stop behavior the AnimatedVectorImageVisual will use. + /// @details Name "stopBehavior", Type StopBehavior::Type (Property::INTEGER) + /// @note Default value is StopBehavior::CURRENT_FRAME. + /// + /// + /// Inhouse API + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly int StopBehavior = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 8; + + /// + /// @brief The looping mode the AnimatedVectorImageVisual will use. + /// @details Name "loopingMode", Type LoopingMode::Type (Property::INTEGER) + /// @note Default value is LoopingMode::RESTART. + /// + /// + /// Inhouse API + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly int LoopingMode = NDalic.IMAGE_VISUAL_ORIENTATION_CORRECTION + 9; + } + + /// + /// This specifies properties of the MeshVisual. + /// + /// 3 + public struct MeshVisualProperty + { + /// + /// The location of the ".obj" file. + /// + /// 3 + public static readonly int ObjectURL = NDalic.MESH_VISUAL_OBJECT_URL; + /// + /// The location of the ".mtl" file. + /// + /// 3 + public static readonly int MaterialtURL = NDalic.MESH_VISUAL_MATERIAL_URL; + /// + /// Path to the directory the textures (including gloss and normal) are stored in. + /// + /// 3 + public static readonly int TexturesPath = NDalic.MESH_VISUAL_TEXTURES_PATH; + /// + /// Sets the type of shading mode that the mesh will use. + /// + /// 3 + public static readonly int ShadingMode = NDalic.MESH_VISUAL_SHADING_MODE; + /// + /// Whether to use mipmaps for textures or not. + /// + /// 3 + public static readonly int UseMipmapping = NDalic.MESH_VISUAL_USE_MIPMAPPING; + /// + /// Whether to average normals at each point to smooth textures or not. + /// + /// 3 + public static readonly int UseSoftNormals = NDalic.MESH_VISUAL_USE_SOFT_NORMALS; + /// + /// The position, in stage space, of the point light that applies lighting to the model. + /// + /// 3 + public static readonly int LightPosition = NDalic.MESH_VISUAL_LIGHT_POSITION; + } + + /// + /// This specifies properties of the PrimitiveVisual. + /// + /// 3 + public struct PrimitiveVisualProperty + { + /// + /// The specific shape to render. + /// + /// 3 + public static readonly int Shape = NDalic.PRIMITIVE_VISUAL_SHAPE; + /// + /// The color of the shape. + /// + /// 3 + public static readonly int MixColor = NDalic.PRIMITIVE_VISUAL_MIX_COLOR; + /// + /// The number of slices as you go around the shape. + /// + /// 3 + public static readonly int Slices = NDalic.PRIMITIVE_VISUAL_SLICES; + /// + /// The number of stacks as you go down the shape. + /// + /// 3 + public static readonly int Stacks = NDalic.PRIMITIVE_VISUAL_STACKS; + /// + /// The scale of the radius of the top circle of a conical frustrum. + /// + /// 3 + public static readonly int ScaleTopRadius = NDalic.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS; + /// + /// The scale of the radius of the bottom circle of a conical frustrum. + /// + /// 3 + public static readonly int ScaleBottomRadius = NDalic.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS; + /// + /// The scale of the height of a conic. + /// + /// 3 + public static readonly int ScaleHeight = NDalic.PRIMITIVE_VISUAL_SCALE_HEIGHT; + /// + /// The scale of the radius of a cylinder. + /// + /// 3 + public static readonly int ScaleRadius = NDalic.PRIMITIVE_VISUAL_SCALE_RADIUS; + /// + /// The dimensions of a cuboid. Scales in the same fashion as a 9-patch image. + /// + /// 3 + public static readonly int ScaleDimensions = NDalic.PRIMITIVE_VISUAL_SCALE_DIMENSIONS; + /// + /// Determines how bevelled the cuboid should be, based off the smallest dimension. + /// + /// 3 + public static readonly int BevelPercentage = NDalic.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE; + /// + /// Defines how smooth the bevelled edges should be. + /// + /// 3 + public static readonly int BevelSmoothness = NDalic.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS; + /// + /// The position, in stage space, of the point light that applies lighting to the model. + /// + /// 3 + public static readonly int LightPosition = NDalic.PRIMITIVE_VISUAL_LIGHT_POSITION; + } + + /// + /// This specifies properties of the TextVisual. + /// + /// 3 + public struct TextVisualProperty + { + /// + /// The text to display in UTF-8 format. + /// + /// 3 + public static readonly int Text = NDalic.TEXT_VISUAL_TEXT; + /// + /// The requested font family to use. + /// + /// 3 + public static readonly int FontFamily = NDalic.TEXT_VISUAL_FONT_FAMILY; + /// + /// The requested font style to use. + /// + /// 3 + public static readonly int FontStyle = NDalic.TEXT_VISUAL_FONT_STYLE; + /// + /// The size of font in points. + /// + /// 3 + public static readonly int PointSize = NDalic.TEXT_VISUAL_POINT_SIZE; + /// + /// The single-line or multi-line layout option. + /// + /// 3 + public static readonly int MultiLine = NDalic.TEXT_VISUAL_MULTI_LINE; + /// + /// The line horizontal alignment. + /// + /// 3 + public static readonly int HorizontalAlignment = NDalic.TEXT_VISUAL_HORIZONTAL_ALIGNMENT; + /// + /// The line vertical alignment. + /// + /// 3 + public static readonly int VerticalAlignment = NDalic.TEXT_VISUAL_VERTICAL_ALIGNMENT; + /// + /// The color of the text. + /// + /// 3 + public static readonly int TextColor = NDalic.TEXT_VISUAL_TEXT_COLOR; + /// + /// Whether the mark-up processing is enabled. + /// + /// 3 + public static readonly int EnableMarkup = NDalic.TEXT_VISUAL_ENABLE_MARKUP; + /// + /// The shadow parameters. + /// + /// 5 + public static readonly int Shadow = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 1; + /// + /// The default underline parameters. + /// + /// 5 + public static readonly int Underline = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 2; + /// + /// The default outline parameters. + /// + /// 5 + public static readonly int Outline = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 3; + /// + /// The default text background parameters. + /// + /// 5 + public static readonly int Background = NDalic.TEXT_VISUAL_ENABLE_MARKUP + 4; + } + + /// + /// This specifies properties of the NpatchImageVisual. + /// + /// 3 + public struct NpatchImageVisualProperty + { + /// + /// The URL of the image. + /// + /// 3 + public static readonly int URL = NDalic.IMAGE_VISUAL_URL; + /// + /// Fitting options, used when resizing images to fit desired dimensions. + /// + /// 3 + public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE; + /// + /// Filtering options, used when resizing images to sample original pixels. + /// + /// 3 + public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE; + /// + /// The desired image width. + /// + /// 3 + public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH; + /// + /// The desired image height. + /// + /// 3 + public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT; + /// + /// Whether to load the image synchronously. + /// + /// 3 + public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING; + /// + /// If true, only draws the borders. + /// + /// 3 + public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY; + /// + /// The image area to be displayed. + /// + /// 3 + public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA; + /// + /// The wrap mode for u coordinate. + /// + /// 3 + public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U; + /// + /// The wrap mode for v coordinate. + /// + /// 3 + public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V; + /// + /// The border of the image. + /// + /// 3 + public static readonly int Border = NDalic.IMAGE_VISUAL_WRAP_MODE_V + 1; + } +} diff --git a/src/Tizen.NUI/src/public/VisualMaps.cs b/src/Tizen.NUI/src/public/VisualMaps.cs index 0dde480..f3daa65 100755 --- a/src/Tizen.NUI/src/public/VisualMaps.cs +++ b/src/Tizen.NUI/src/public/VisualMaps.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2018 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. @@ -14,10 +14,7 @@ * limitations under the License. * */ -using System.Text; -using System.Collections.Generic; using Tizen.NUI.BaseComponents; -using System.ComponentModel; namespace Tizen.NUI { @@ -647,2244 +644,5 @@ namespace Tizen.NUI if (_visualOrigin != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.Origin, new PropertyValue((int)_visualOrigin)); } if (_visualAnchorPoint != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.AnchorPoint, new PropertyValue((int)_visualAnchorPoint)); } } - - } - - /// - /// A class encapsulating the property map of the image visual. - /// - /// 3 - public class ImageVisual : VisualMap - { - private string _url = null; - private string _alphaMaskUrl = null; - private string _auxiliaryImageUrl = null; - private FittingModeType? _fittingMode = null; - private SamplingModeType? _samplingMode = null; - private int? _desiredWidth = null; - private int? _desiredHeight = null; - private bool? _synchronousLoading = false; - private bool? _borderOnly = null; - private Vector4 _pixelArea = null; - private WrapModeType? _wrapModeU = null; - private WrapModeType? _wrapModeV = null; - private float? _auxiliaryImageAlpha = null; - private float? _maskContentScale = null; - private bool? _cropToMask = null; - private ReleasePolicyType? _releasePolicy = null; - private LoadPolicyType? _loadPolicy = null; - private bool? _orientationCorrection = true; - private bool? _atlasing = false; - - /// - /// Constructor. - /// - /// 3 - public ImageVisual() : base() - { - } - - /// - /// Gets or sets the URL of the image.
- /// Mandatory. - ///
- /// 3 - public string URL - { - get - { - return _url; - } - set - { - _url = (value == null ? "" : value); - UpdateVisual(); - } - } - - - /// - /// Gets or sets the URL of the alpha mask.
- /// Optional. - ///
- /// 3 - public string AlphaMaskURL - { - get - { - return _alphaMaskUrl; - } - set - { - _alphaMaskUrl = value; - UpdateVisual(); - } - } - - /// - /// Overlays the auxiliary image on top of an NPatch image. - /// The resulting visual image will be at least as large as the smallest possible n-patch or the auxiliary image, whichever is larger. - /// - /// 5 - public string AuxiliaryImageURL - { - get - { - return _auxiliaryImageUrl; - } - set - { - _auxiliaryImageUrl = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets fitting options used when resizing images to fit the desired dimensions.
- /// If not supplied, the default is FittingModeType.ShrinkToFit.
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public FittingModeType FittingMode - { - get - { - return _fittingMode ?? (FittingModeType.ShrinkToFit); - } - set - { - _fittingMode = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets filtering options used when resizing images to the sample original pixels.
- /// If not supplied, the default is SamplingModeType.Box.
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public SamplingModeType SamplingMode - { - get - { - return _samplingMode ?? (SamplingModeType.Box); - } - set - { - _samplingMode = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the desired image width.
- /// If not specified, the actual image width is used.
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public int DesiredWidth - { - get - { - return _desiredWidth ?? (-1); - } - set - { - _desiredWidth = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the desired image height.
- /// If not specified, the actual image height is used.
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public int DesiredHeight - { - get - { - return _desiredHeight ?? (-1); - } - set - { - _desiredHeight = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to load the image synchronously.
- /// If not specified, the default is false, i.e., the image is loaded asynchronously.
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public bool SynchronousLoading - { - get - { - return _synchronousLoading ?? (false); - } - set - { - _synchronousLoading = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to draw the borders only (If true).
- /// If not specified, the default is false.
- /// For n-patch images only.
- /// Optional. - ///
- /// 3 - public bool BorderOnly - { - get - { - return _borderOnly ?? (false); - } - set - { - _borderOnly = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the image area to be displayed.
- /// It is a rectangular area.
- /// The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
- /// If not specified, the default value is Vector4 (0.0, 0.0, 1.0, 1.0), i.e., the entire area of the image.
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public Vector4 PixelArea - { - get - { - return _pixelArea ?? (new Vector4(0.0f, 0.0f, 1.0f, 1.0f)); - } - set - { - _pixelArea = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the wrap mode for the u coordinate.
- /// It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
- /// If not specified, the default is WrapModeType.Default(CLAMP).
- /// For normal quad images only.
- /// Optional. - ///
- /// 3 - public WrapModeType WrapModeU - { - get - { - return _wrapModeU ?? (WrapModeType.Default); - } - set - { - _wrapModeU = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the wrap mode for the v coordinate.
- /// It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
- /// The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
- /// If not specified, the default is WrapModeType.Default(CLAMP).
- /// For normal quad images only. - /// Optional. - ///
- /// 3 - public WrapModeType WrapModeV - { - get - { - return _wrapModeV ?? (WrapModeType.Default); - } - set - { - _wrapModeV = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets scale factor to apply to the content image before masking. - /// - /// 4 - public float MaskContentScale - { - get - { - return _maskContentScale ?? 1.0f; - } - set - { - _maskContentScale = value; - UpdateVisual(); - } - } - - /// - /// Whether to crop image to mask or scale mask to fit image. - /// - /// 4 - public bool CropToMask - { - get - { - return _cropToMask ?? false; - } - set - { - _cropToMask = value; - UpdateVisual(); - } - } - - /// - /// An alpha value for mixing between the masked main NPatch image and the auxiliary image. - /// - /// 5 - public float AuxiliaryImageAlpha - { - get - { - return _auxiliaryImageAlpha ?? 1.0f; - } - set - { - _auxiliaryImageAlpha = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the Image Visual release policy.
- /// It decides if a texture should be released from the cache or kept to reduce the loading time.
- ///
- /// 5 - public ReleasePolicyType ReleasePolicy - { - get - { - return _releasePolicy ?? (ReleasePolicyType.Destroyed ); - } - set - { - _releasePolicy = value; - UpdateVisual(); - } - } - - - /// - /// Gets or sets the Image Visual image loading policy.
- /// It decides if a texture should be loaded immediately after source set or only after the visual is added to the window.
- ///
- /// 5 - public LoadPolicyType LoadPolicy - { - get - { - return _loadPolicy ?? (LoadPolicyType.Attached); - } - set - { - _loadPolicy = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to automatically correct the orientation based on the Exchangeable Image File (EXIF) data.
- /// If not specified, the default is true.
- /// For JPEG images only.
- /// Optional. - ///
- /// 5 - public bool OrientationCorrection - { - get - { - return _orientationCorrection ?? (true); - } - set - { - _orientationCorrection = value; - UpdateVisual(); - } - } - - /// - /// Whether to use the texture atlas or not. - /// Optional. By default atlasing is off. - /// - /// 5 - public bool Atlasing - { - get - { - return _atlasing ?? (false); - } - set - { - _atlasing = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_url != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image)); - _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); - if (_alphaMaskUrl != null ) { _outputVisualMap.Add(ImageVisualProperty.AlphaMaskURL, new PropertyValue(_alphaMaskUrl)); } - if (_auxiliaryImageUrl != null ) { _outputVisualMap.Add(ImageVisualProperty.AuxiliaryImageURL, new PropertyValue(_auxiliaryImageUrl)); } - if (_fittingMode != null) { _outputVisualMap.Add(ImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode)); } - if (_samplingMode != null) { _outputVisualMap.Add(ImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode)); } - if (_desiredWidth != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredWidth, new PropertyValue((int)_desiredWidth)); } - if (_desiredHeight != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredHeight, new PropertyValue((int)_desiredHeight)); } - if (_synchronousLoading != null) { _outputVisualMap.Add(ImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); } - if (_borderOnly != null) { _outputVisualMap.Add(ImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } - if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); } - if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); } - if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_maskContentScale != null) { _outputVisualMap.Add((int)ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); } - if (_cropToMask != null) { _outputVisualMap.Add((int)ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); } - if (_auxiliaryImageAlpha != null) { _outputVisualMap.Add((int)ImageVisualProperty.AuxiliaryImageAlpha, new PropertyValue((float)_auxiliaryImageAlpha)); } - if (_releasePolicy != null) { _outputVisualMap.Add( ImageVisualProperty.ReleasePolicy , new PropertyValue((int)_releasePolicy)); } - if (_loadPolicy != null) { _outputVisualMap.Add( ImageVisualProperty.LoadPolicy, new PropertyValue((int)_loadPolicy)); } - if (_orientationCorrection != null) { _outputVisualMap.Add( ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); } - if (_atlasing != null) { _outputVisualMap.Add( ImageVisualProperty.Atlasing, new PropertyValue((bool)_atlasing)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the text visual. - /// - /// 3 - public class TextVisual : VisualMap - { - private string _text = null; - private string _fontFamily = null; - private PropertyMap _fontStyle = null; - private float? _pointSize = null; - private bool? _multiLine = null; - private string _horizontalAlignment = null; - private string _verticalAlignment = null; - private Color _textColor = null; - private bool? _enableMarkup = null; - private PropertyMap _shadow = null; - private PropertyMap _underline = null; - private PropertyMap _outline = null; - private PropertyMap _background = null; - - /// - /// Constructor. - /// - /// 3 - public TextVisual() : base() - { - } - - /// - /// Gets or sets the text to display in the UTF-8 format.
- /// Mandatory. - ///
- /// 3 - public string Text - { - get - { - return _text; - } - set - { - _text = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the requested font family to use.
- /// Optional. - ///
- /// 3 - public string FontFamily - { - get - { - return _fontFamily; - } - set - { - _fontFamily = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the requested font style to use.
- /// Optional. - ///
- /// 3 - public PropertyMap FontStyle - { - get - { - return _fontStyle; - } - set - { - _fontStyle = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the size of font in points.
- /// Mandatory. - ///
- /// 3 - public float PointSize - { - get - { - return _pointSize ?? (0.0f); - } - set - { - _pointSize = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the single-line or multi-line layout option.
- /// If not specified, the default is false.
- /// Optional. - ///
- /// 3 - public bool MultiLine - { - get - { - return _multiLine ?? (false); - } - set - { - _multiLine = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the line horizontal alignment.
- /// If not specified, the default is begin.
- /// Optional. - ///
- /// 3 - public HorizontalAlignment HorizontalAlignment - { - get - { - switch (_horizontalAlignment) - { - case "BEGIN": - return HorizontalAlignment.Begin; - case "CENTER": - return HorizontalAlignment.Center; - case "END": - return HorizontalAlignment.End; - default: - return HorizontalAlignment.Begin; - } - } - set - { - switch (value) - { - case HorizontalAlignment.Begin: - { - _horizontalAlignment = "BEGIN"; - break; - } - case HorizontalAlignment.Center: - { - _horizontalAlignment = "CENTER"; - break; - } - case HorizontalAlignment.End: - { - _horizontalAlignment = "END"; - break; - } - default: - { - _horizontalAlignment = "BEGIN"; - break; - } - } - UpdateVisual(); - } - } - - /// - /// Gets or sets the line vertical alignment.
- /// If not specified, the default is top.
- /// Optional. - ///
- /// 3 - public VerticalAlignment VerticalAlignment - { - get - { - switch (_verticalAlignment) - { - case "TOP": - return VerticalAlignment.Top; - case "CENTER": - return VerticalAlignment.Center; - case "BOTTOM": - return VerticalAlignment.Bottom; - default: - return VerticalAlignment.Top; - } - } - set - { - switch (value) - { - case VerticalAlignment.Top: - { - _verticalAlignment = "TOP"; - break; - } - case VerticalAlignment.Center: - { - _verticalAlignment = "CENTER"; - break; - } - case VerticalAlignment.Bottom: - { - _verticalAlignment = "BOTTOM"; - break; - } - default: - { - _verticalAlignment = "TOP"; - break; - } - } - UpdateVisual(); - } - } - - /// - /// Gets or sets the color of the text.
- /// Optional. - ///
- /// 3 - public Color TextColor - { - get - { - return _textColor; - } - set - { - _textColor = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether the mark-up processing is enabled.
- /// Optional. - ///
- /// 3 - public bool EnableMarkup - { - get - { - return _enableMarkup ?? (false); - } - set - { - _enableMarkup = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the shadow parameters. - /// - /// 5 - public PropertyMap Shadow - { - get - { - return _shadow; - } - set - { - _shadow = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the underline parameters. - /// - /// 5 - public PropertyMap Underline - { - get - { - return _underline; - } - set - { - _underline = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the outline parameters. - /// - /// 5 - public PropertyMap Outline - { - get - { - return _outline; - } - set - { - _outline = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the background parameters. - /// - /// 5 - public PropertyMap Background - { - get - { - return _background; - } - set - { - _background = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_text != null && _pointSize != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); - _outputVisualMap.Add(TextVisualProperty.Text, new PropertyValue(_text)); - _outputVisualMap.Add(TextVisualProperty.PointSize, new PropertyValue((float)_pointSize)); - if (_fontFamily != null) { _outputVisualMap.Add(TextVisualProperty.FontFamily, new PropertyValue(_fontFamily)); } - if (_fontStyle != null) { _outputVisualMap.Add(TextVisualProperty.FontStyle, new PropertyValue(_fontStyle)); } - if (_multiLine != null) { _outputVisualMap.Add(TextVisualProperty.MultiLine, new PropertyValue((bool)_multiLine)); } - if (_horizontalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue(_horizontalAlignment)); } - if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); } - if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); } - if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_shadow != null) { _outputVisualMap.Add(TextVisualProperty.Shadow, new PropertyValue(_shadow)); } - if (_underline != null) { _outputVisualMap.Add(TextVisualProperty.Underline, new PropertyValue(_underline)); } - if (_outline != null) { _outputVisualMap.Add(TextVisualProperty.Outline, new PropertyValue(_outline)); } - if (_background != null) { _outputVisualMap.Add(TextVisualProperty.Background, new PropertyValue(_background)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the border visual. - /// - /// 3 - public class BorderVisual : VisualMap - { - private Color _color = null; - private float? _size = null; - private bool? _antiAliasing = null; - - /// - /// Constructor. - /// - /// 3 - public BorderVisual() : base() - { - } - - /// - /// Gets or sets the color of the border.
- /// Mandatory. - ///
- /// 3 - public Color Color - { - get - { - return _color; - } - set - { - _color = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the width of the border (in pixels).
- /// Mandatory. - ///
- /// 3 - public float BorderSize - { - get - { - return _size ?? (-1.0f); - } - set - { - _size = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether the anti-aliasing of the border is required.
- /// If not supplied, the default is false.
- /// Optional. - ///
- /// 3 - public bool AntiAliasing - { - get - { - return _antiAliasing ?? (false); - } - set - { - _antiAliasing = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_color != null && _size != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Border)); - _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size)); - _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color)); - if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the color visual. - /// - /// 3 - public class ColorVisual : VisualMap - { - private Color _mixColorForColorVisual = null; - private bool? _renderIfTransparent = false; - - /// - /// Constructor. - /// - /// 3 - public ColorVisual() : base() - { - } - - /// - /// Gets or sets the solid color required.
- /// Mandatory. - ///
- /// 3 - public Color Color - { - get - { - return _mixColorForColorVisual; - } - set - { - _mixColorForColorVisual = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to render if the MixColor is transparent. - /// By default it is false, which means that the ColorVisual will not render if the MIX_COLOR is transparent. - /// - /// 5 - public bool RenderIfTransparent - { - get - { - return _renderIfTransparent ?? (false); - } - set - { - _renderIfTransparent = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_mixColorForColorVisual != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color)); - _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual)); - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_renderIfTransparent != null) { _outputVisualMap.Add(ColorVisualProperty.RenderIfTransparent, new PropertyValue((bool)_renderIfTransparent)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the gradient visual. - /// - /// 3 - public class GradientVisual : VisualMap - { - private Vector2 _startPosition = null; - private Vector2 _endPosition = null; - private Vector2 _center = null; - private float? _radius = null; - private PropertyArray _stopOffset = null; - private PropertyArray _stopColor = null; - private GradientVisualUnitsType? _units = null; - private GradientVisualSpreadMethodType? _spreadMethod = null; - - /// - /// Constructor. - /// - /// 3 - public GradientVisual() : base() - { - } - - /// - /// Gets or sets the start position of a linear gradient.
- /// Mandatory for linear.
- ///
- /// 3 - public Vector2 StartPosition - { - get - { - return _startPosition; - } - set - { - _startPosition = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the end position of a linear gradient.
- /// Mandatory for linear.
- ///
- /// 3 - public Vector2 EndPosition - { - get - { - return _endPosition; - } - set - { - _endPosition = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the center point of a radial gradient.
- /// Mandatory for radial.
- ///
- /// 3 - public Vector2 Center - { - get - { - return _center; - } - set - { - _center = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the size of the radius of a radial gradient.
- /// Mandatory for radial.
- ///
- /// 3 - public float Radius - { - get - { - return _radius ?? (-1.0f); - } - set - { - _radius = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets all the stop offsets.
- /// A PropertyArray of float.
- /// If not supplied, the default is 0.0f and 1.0f.
- /// Optional. - ///
- /// 3 - public PropertyArray StopOffset - { - get - { - return _stopOffset; - } - set - { - _stopOffset = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the color at the stop offsets.
- /// A PropertyArray of color.
- /// At least 2 values are required to show a gradient.
- /// Mandatory. - ///
- /// 3 - public PropertyArray StopColor - { - get - { - return _stopColor; - } - set - { - _stopColor = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets descriptions of the coordinate system for certain attributes of the points in a gradient.
- /// If not supplied, the default is GradientVisualUnitsType.ObjectBoundingBox.
- /// Optional. - ///
- /// 3 - public GradientVisualUnitsType Units - { - get - { - return _units ?? (GradientVisualUnitsType.ObjectBoundingBox); - } - set - { - _units = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets indications of what happens if the gradient starts or ends inside the bounds of the target rectangle.
- /// If not supplied, the default is GradientVisualSpreadMethodType.Pad.
- /// Optional. - ///
- /// 3 - public GradientVisualSpreadMethodType SpreadMethod - { - get - { - return _spreadMethod ?? (GradientVisualSpreadMethodType.Pad); - } - set - { - _spreadMethod = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (((_startPosition != null && _endPosition != null) || (_center != null && _radius != null)) && _stopColor != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Gradient)); - _outputVisualMap.Add(GradientVisualProperty.StopColor, new PropertyValue(_stopColor)); - if (_startPosition != null) { _outputVisualMap.Add(GradientVisualProperty.StartPosition, new PropertyValue(_startPosition)); } - if (_endPosition != null) { _outputVisualMap.Add(GradientVisualProperty.EndPosition, new PropertyValue(_endPosition)); } - if (_center != null) { _outputVisualMap.Add(GradientVisualProperty.Center, new PropertyValue(_center)); } - if (_radius != null) { _outputVisualMap.Add(GradientVisualProperty.Radius, new PropertyValue((float)_radius)); } - if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); } - if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); } - if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the mesh visual. - /// - /// 3 - public class MeshVisual : VisualMap - { - private string _objectURL = null; - private string _materialtURL = null; - private string _texturesPath = null; - private MeshVisualShadingModeValue? _shadingMode = null; - private bool? _useMipmapping = null; - private bool? _useSoftNormals = null; - private Vector3 _lightPosition = null; - - /// - /// Constructor. - /// - /// 3 - public MeshVisual() : base() - { - } - - /// - /// Gets or sets the location of the ".obj" file.
- /// Mandatory. - ///
- /// 3 - public string ObjectURL - { - get - { - return _objectURL; - } - set - { - _objectURL = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the location of the ".mtl" file.
- /// If not specified, then a textureless object is assumed.
- /// Optional. - ///
- /// 3 - public string MaterialtURL - { - get - { - return _materialtURL; - } - set - { - _materialtURL = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the path to the directory the textures (including gloss and normal) are stored in.
- /// Mandatory if using material.
- ///
- /// 3 - public string TexturesPath - { - get - { - return _texturesPath; - } - set - { - _texturesPath = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the type of shading mode that the mesh will use.
- /// If anything the specified shading mode requires is missing, a simpler mode that can be handled with what has been supplied will be used instead.
- /// If not specified, it will use the best it can support (will try MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting first).
- /// Optional. - ///
- /// 3 - public MeshVisualShadingModeValue ShadingMode - { - get - { - return _shadingMode ?? (MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting); - } - set - { - _shadingMode = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to use mipmaps for textures or not.
- /// If not specified, the default is true.
- /// Optional. - ///
- /// 3 - public bool UseMipmapping - { - get - { - return _useMipmapping ?? (true); - } - set - { - _useMipmapping = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to average normals at each point to smooth textures or not.
- /// If not specified, the default is true.
- /// Optional. - ///
- /// 3 - public bool UseSoftNormals - { - get - { - return _useSoftNormals ?? (true); - } - set - { - _useSoftNormals = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the position, in the stage space, of the point light that applies lighting to the model.
- /// This is based off the stage's dimensions, so using the width and the height of the stage halved will correspond to the center, - /// and using all zeroes will place the light at the top-left corner.
- /// If not specified, the default is an offset outwards from the center of the screen.
- /// Optional. - ///
- /// 3 - public Vector3 LightPosition - { - get - { - return _lightPosition; - } - set - { - _lightPosition = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_objectURL != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Mesh)); - _outputVisualMap.Add(MeshVisualProperty.ObjectURL, new PropertyValue(_objectURL)); - if (_materialtURL != null) { _outputVisualMap.Add(MeshVisualProperty.MaterialtURL, new PropertyValue(_materialtURL)); } - if (_texturesPath != null) { _outputVisualMap.Add(MeshVisualProperty.TexturesPath, new PropertyValue(_texturesPath)); } - if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); } - if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); } - if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the primetive visual. - /// - /// 3 - public class PrimitiveVisual : VisualMap - { - private PrimitiveVisualShapeType? _shape = null; - private Color _mixColorForPrimitiveVisual = null; - private int? _slices = null; - private int? _stacks = null; - private float? _scaleTopRadius = null; - private float? _scaleBottomRadius = null; - private float? _scaleHeight = null; - private float? _scaleRadius = null; - private Vector3 _scaleDimensions = null; - private float? _bevelPercentage = null; - private float? _bevelSmoothness = null; - private Vector3 _lightPosition = null; - - /// - /// Constructor. - /// - /// 3 - public PrimitiveVisual() : base() - { - } - - /// - /// Gets or sets the specific shape to render.
- /// If not specified, the default is PrimitiveVisualShapeType.Sphere.
- /// Optional. - ///
- /// 3 - public PrimitiveVisualShapeType Shape - { - get - { - return _shape ?? (PrimitiveVisualShapeType.Sphere); - } - set - { - _shape = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the color of the shape.
- /// If not specified, the default is Color (0.5, 0.5, 0.5, 1.0).
- /// Applies to all shapes.
- /// Optional. - ///
- /// 3 - public new Color MixColor - { - get - { - return _mixColorForPrimitiveVisual ?? (new Color(0.5f, 0.5f, 0.5f, 1.0f)); - } - set - { - _mixColorForPrimitiveVisual = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the number of slices as you go around the shape.
- /// For spheres and conical frustrums, this determines how many divisions there are as you go around the object.
- /// If not specified, the default is 128.
- /// The range is from 1 to 255.
- /// Optional. - ///
- /// 3 - public int Slices - { - get - { - return _slices ?? (128); - } - set - { - _slices = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the number of stacks as you go down the shape.
- /// For spheres, 'stacks' determines how many layers there are as you go down the object.
- /// If not specified, the default is 128.
- /// The range is from 1 to 255.
- /// Optional. - ///
- /// 3 - public int Stacks - { - get - { - return _stacks ?? (128); - } - set - { - _stacks = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the scale of the radius of the top circle of a conical frustrum.
- /// If not specified, the default is 1.0f.
- /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum
- /// Only values greater than or equal to 0.0f are accepted.
- /// Optional. - ///
- /// 3 - public float ScaleTopRadius - { - get - { - return _scaleTopRadius ?? (1.0f); - } - set - { - _scaleTopRadius = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the scale of the radius of the bottom circle of a conical frustrum.
- /// If not specified, the default is 1.5f.
- /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum
- /// - PrimitiveVisualShapeType.Cone
- /// Only values greater than or equal to 0.0f are accepted.
- /// Optional. - ///
- /// 3 - public float ScaleBottomRadius - { - get - { - return _scaleBottomRadius ?? (1.5f); - } - set - { - _scaleBottomRadius = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the scale of the height of a conic.
- /// If not specified, the default is 3.0f.
- /// Applies to:
- /// - PrimitiveVisualShapeType.ConicalFrustrum
- /// - PrimitiveVisualShapeType.Cone
- /// - PrimitiveVisualShapeType.Cylinder
- /// Only values greater than or equal to 0.0f are accepted.
- /// Optional. - ///
- /// 3 - public float ScaleHeight - { - get - { - return _scaleHeight ?? (3.0f); - } - set - { - _scaleHeight = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the scale of the radius of a cylinder.
- /// If not specified, the default is 1.0f.
- /// Applies to:
- /// - PrimitiveVisualShapeType.Cylinder
- /// Only values greater than or equal to 0.0f are accepted.
- /// Optional. - ///
- /// 3 - public float ScaleRadius - { - get - { - return _scaleRadius ?? (1.0f); - } - set - { - _scaleRadius = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
- /// If not specified, the default is Vector3.One.
- /// Applies to:
- /// - PrimitiveVisualShapeType.Cube
- /// - PrimitiveVisualShapeType.Octahedron
- /// - PrimitiveVisualShapeType.BevelledCube
- /// Each Vector3 parameter should be greater than or equal to 0.0f.
- /// Optional. - ///
- /// 3 - public Vector3 ScaleDimensions - { - get - { - return _scaleDimensions ?? (Vector3.One); - } - set - { - _scaleDimensions = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets determines how bevelled the cuboid should be, based off the smallest dimension.
- /// Bevel percentage ranges from 0.0 to 1.0. It affects the ratio of the outer face widths to the width of the overall cube.
- /// If not specified, the default is 0.0f (no bevel).
- /// Applies to:
- /// - PrimitiveVisualShapeType.BevelledCube
- /// The range is from 0.0f to 1.0f.
- /// Optional. - ///
- /// 3 - public float BevelPercentage - { - get - { - return _bevelPercentage ?? (0.0f); - } - set - { - _bevelPercentage = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets descriptions of how smooth the bevelled edges should be.
- /// If not specified, the default is 0.0f (sharp edges).
- /// Applies to:
- /// - PrimitiveVisualShapeType.BevelledCube
- /// The range is from 0.0f to 1.0f.
- /// Optional. - ///
- /// 3 - public float BevelSmoothness - { - get - { - return _bevelSmoothness ?? (0.0f); - } - set - { - _bevelSmoothness = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets the position, in the stage space, of the point light that applies lighting to the model.
- /// This is based off the stage's dimensions, so using the width and the height of the stage halved will correspond to the center, - /// and using all zeroes will place the light at the top-left corner.
- /// If not specified, the default is an offset outwards from the center of the screen.
- /// Applies to all shapes.
- /// Optional. - ///
- /// 3 - public Vector3 LightPosition - { - get - { - return _lightPosition; - } - set - { - _lightPosition = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - _outputVisualMap = new PropertyMap(); ; - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Primitive)); - if (_shape != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Shape, new PropertyValue((int)_shape)); } - if (_mixColorForPrimitiveVisual != null) { _outputVisualMap.Add(PrimitiveVisualProperty.MixColor, new PropertyValue(_mixColorForPrimitiveVisual)); } - if (_slices != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Slices, new PropertyValue((int)_slices)); } - if (_stacks != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Stacks, new PropertyValue((int)_stacks)); } - if (_scaleTopRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleTopRadius, new PropertyValue((float)_scaleTopRadius)); } - if (_scaleBottomRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleBottomRadius, new PropertyValue((float)_scaleBottomRadius)); } - if (_scaleHeight != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleHeight, new PropertyValue((float)_scaleHeight)); } - if (_scaleRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleRadius, new PropertyValue((float)_scaleRadius)); } - if (_scaleDimensions != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleDimensions, new PropertyValue(_scaleDimensions)); } - if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); } - if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); } - if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - - /// - /// A class encapsulating the property map of the n-patch image visual. - /// - /// 3 - public class NPatchVisual : VisualMap - { - private string _url = null; - private bool? _borderOnly = null; - private Rectangle _border = null; - - /// - /// Constructor. - /// - /// 3 - public NPatchVisual() : base() - { - } - - /// - /// Gets or sets the URL of the image.
- /// Mandatory. - ///
- /// 3 - public string URL - { - get - { - return _url; - } - set - { - _url = value; - UpdateVisual(); - } - } - - /// - /// Gets or sets whether to draw the borders only (If true).
- /// If not specified, the default is false.
- /// For n-patch images only.
- /// Optional. - ///
- /// 3 - public bool BorderOnly - { - get - { - return _borderOnly ?? false; - } - set - { - _borderOnly = value; - UpdateVisual(); - } - } - - /// - /// The border of the image is in the order: left, right, bottom, top.
- /// For n-patch images only.
- /// Optional. - ///
- /// 3 - public Rectangle Border - { - get - { - return _border; - } - set - { - _border = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_url != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch)); - _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url)); - if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } - if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the SVG visual. - /// - /// 3 - public class SVGVisual : VisualMap - { - private string _url = null; - - /// - /// Constructor. - /// - /// 3 - public SVGVisual() : base() - { - } - - /// - /// The url of the svg resource. - /// - /// 3 - public string URL - { - get - { - return _url; - } - set - { - _url = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_url != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG)); - _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - /// - /// A class encapsulating the property map of the animated image (AGIF) visual. - /// - /// 3 - public class AnimatedImageVisual : VisualMap - { - private List _urls = null; - private int? _batchSize = null; - private int? _cacheSize = null; - private float? _frameDelay = null; - private float? _loopCount = null; - - /// - /// Constructor. - /// - /// 3 - public AnimatedImageVisual() : base() - { - } - - /// - /// Gets and Sets the url in the AnimatedImageVisual. - /// - /// 3 - public string URL - { - get - { - if( _urls != null ) - { - return _urls[0]; - } - else - { - return null; - } - } - set - { - if( _urls == null ) - { - _urls = new List(); - _urls.Add(value); - } - else - { - _urls[0] = value; - } - UpdateVisual(); - } - } - - /// - /// Gets and Sets the url list in the AnimatedImageVisual. - /// - /// 4 - public List URLS - { - get - { - return _urls; - } - set - { - _urls = value; - UpdateVisual(); - } - } - - /// - /// Gets and Sets the batch size for pre-loading images in the AnimatedImageVisual. - /// - /// 4 - public int BatchSize - { - get - { - return _batchSize ?? 1; - } - set - { - _batchSize = value; - UpdateVisual(); - } - } - - /// - /// Gets and Sets the cache size for loading images in the AnimatedImageVisual. - /// - /// 4 - public int CacheSize - { - get - { - return _cacheSize ?? 1; - } - set - { - _cacheSize = value; - UpdateVisual(); - } - } - - /// - /// Gets and Sets The number of milliseconds between each frame in the AnimatedImageVisual. - /// - /// 4 - public float FrameDelay - { - get - { - return _frameDelay ?? 0.1f; - } - set - { - _frameDelay = value; - UpdateVisual(); - } - } - - /// - /// Gets and sets the number of times the AnimatedImageVisual will be looped. - /// The default is -1. If the number is less than 0 then it loops unlimited,otherwise loop loopCount times. - /// - /// 5 - public float LoopCount - { - get - { - return _loopCount ?? -1; - } - set - { - _loopCount = value; - UpdateVisual(); - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - if (_urls != null) - { - _outputVisualMap = new PropertyMap(); - _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage)); - if( _urls.Count == 1 ) - { - _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_urls[0])); - } - else - { - var urlArray = new PropertyArray(); - foreach( var url in _urls) - { - urlArray.Add(new PropertyValue(url)); - } - _outputVisualMap.Add( ImageVisualProperty.URL, ( new PropertyValue( urlArray ) ) ); - } - if (_batchSize != null ) {_outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); } - if (_cacheSize != null ) {_outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); } - if (_frameDelay != null ) {_outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); } - if (_loopCount != null ) {_outputVisualMap.Add((int)ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); } - if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } - if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } - if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } - if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } - if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } - } - } - } - - - //temporary fix for TCT - /// - /// A class encapsulating the property map of the transition data. - /// - /// 3 - public class VisualAnimator : VisualMap - { - private string _alphaFunction = null; - private int _startTime = 0; - private int _endTime = 0; - private string _target = null; - private string _propertyIndex = null; - private object _destinationValue = null; - - /// - /// Create VisualAnimator object. - /// - /// 3 - public VisualAnimator() : base() - { - } - - /// - /// Sets and Gets the AlphaFunction of this transition. - /// - /// 3 - public AlphaFunction.BuiltinFunctions AlphaFunction - { - get - { - switch (_alphaFunction) - { - case "LINEAR": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear; - case "REVERSE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse; - case "EASE_IN_SQUARE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare; - case "EASE_OUT_SQUARE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare; - case "EASE_IN": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn; - case "EASE_OUT": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut; - case "EASE_IN_OUT": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut; - case "EASE_IN_SINE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine; - case "EASE_OUT_SINE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine; - case "EASE_IN_OUT_SINE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine; - case "BOUNCE": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce; - case "SIN": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin; - case "EASE_OUT_BACK": - return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack; - default: - return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default; - } - } - set - { - switch (value) - { - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear: - { - _alphaFunction = "LINEAR"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse: - { - _alphaFunction = "REVERSE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare: - { - _alphaFunction = "EASE_IN_SQUARE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare: - { - _alphaFunction = "EASE_OUT_SQUARE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn: - { - _alphaFunction = "EASE_IN"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut: - { - _alphaFunction = "EASE_OUT"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut: - { - _alphaFunction = "EASE_IN_OUT"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine: - { - _alphaFunction = "EASE_IN_SINE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine: - { - _alphaFunction = "EASE_OUT_SINE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine: - { - _alphaFunction = "EASE_IN_OUT_SINE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce: - { - _alphaFunction = "BOUNCE"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin: - { - _alphaFunction = "SIN"; - break; - } - case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack: - { - _alphaFunction = "EASE_OUT_BACK"; - break; - } - default: - { - _alphaFunction = "DEFAULT"; - break; - } - } - } - } - - /// - /// Sets and Gets the StartTime of this transition. - /// - /// 3 - public int StartTime - { - get - { - return _startTime; - } - set - { - _startTime = value; - } - } - - /// - /// Sets and Gets the EndTime of this transition. - /// - /// 3 - public int EndTime - { - get - { - return _endTime; - } - set - { - _endTime = value; - } - } - - /// - /// Sets and Gets the Target of this transition. - /// - /// 3 - public string Target - { - get - { - return _target; - } - set - { - _target = value; - } - } - - /// - /// Sets and Gets the PropertyIndex of this transition. - /// - /// 3 - public string PropertyIndex - { - get - { - return _propertyIndex; - } - set - { - _propertyIndex = value; - } - } - - /// - /// Sets and Gets the DestinationValue of this transition. - /// - /// 3 - public object DestinationValue - { - get - { - return _destinationValue; - } - set - { - _destinationValue = value; - } - } - - /// - /// Compose the out visual map. - /// - /// 3 - protected override void ComposingPropertyMap() - { - PropertyMap _animator = new PropertyMap(); - _animator.Add("alphaFunction", new PropertyValue(_alphaFunction)); - - PropertyMap _timePeriod = new PropertyMap(); - _timePeriod.Add("duration", new PropertyValue((_endTime - _startTime) / 1000.0f)); - _timePeriod.Add("delay", new PropertyValue(_startTime / 1000.0f)); - _animator.Add("timePeriod", new PropertyValue(_timePeriod)); - - StringBuilder sb = new StringBuilder(_propertyIndex); - sb[0] = (char)(sb[0] | 0x20); - string _str = sb.ToString(); - - PropertyValue val = PropertyValue.CreateFromObject(_destinationValue); - - PropertyMap _transition = new PropertyMap(); - _transition.Add("target", new PropertyValue(_target)); - _transition.Add("property", new PropertyValue(_str)); - _transition.Add("targetValue", val); - _transition.Add("animator", new PropertyValue(_animator)); - - _outputVisualMap = _transition; - } } - //temporary fix for TCT - - - } diff --git a/src/Tizen.NUI/src/public/Visuals/AnimatedImageVisual.cs b/src/Tizen.NUI/src/public/Visuals/AnimatedImageVisual.cs new file mode 100755 index 0000000..5589f54 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/AnimatedImageVisual.cs @@ -0,0 +1,194 @@ +/* + * Copyright(c) 2019 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. + * + */ +using System.Collections.Generic; + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the animated image (AGIF) visual. + /// + /// 3 + public class AnimatedImageVisual : VisualMap + { + private List _urls = null; + private int? _batchSize = null; + private int? _cacheSize = null; + private float? _frameDelay = null; + private float? _loopCount = null; + + /// + /// Constructor. + /// + /// 3 + public AnimatedImageVisual() : base() + { + } + + /// + /// Gets and Sets the url in the AnimatedImageVisual. + /// + /// 3 + public string URL + { + get + { + if (_urls != null) + { + return _urls[0]; + } + else + { + return null; + } + } + set + { + if (_urls == null) + { + _urls = new List(); + _urls.Add(value); + } + else + { + _urls[0] = value; + } + UpdateVisual(); + } + } + + /// + /// Gets and Sets the url list in the AnimatedImageVisual. + /// + /// 4 + public List URLS + { + get + { + return _urls; + } + set + { + _urls = value; + UpdateVisual(); + } + } + + /// + /// Gets and Sets the batch size for pre-loading images in the AnimatedImageVisual. + /// + /// 4 + public int BatchSize + { + get + { + return _batchSize ?? 1; + } + set + { + _batchSize = value; + UpdateVisual(); + } + } + + /// + /// Gets and Sets the cache size for loading images in the AnimatedImageVisual. + /// + /// 4 + public int CacheSize + { + get + { + return _cacheSize ?? 1; + } + set + { + _cacheSize = value; + UpdateVisual(); + } + } + + /// + /// Gets and Sets The number of milliseconds between each frame in the AnimatedImageVisual. + /// + /// 4 + public float FrameDelay + { + get + { + return _frameDelay ?? 0.1f; + } + set + { + _frameDelay = value; + UpdateVisual(); + } + } + + /// + /// Gets and sets the number of times the AnimatedImageVisual will be looped. + /// The default is -1. If the number is less than 0 then it loops unlimited,otherwise loop loopCount times. + /// + /// 5 + public float LoopCount + { + get + { + return _loopCount ?? -1; + } + set + { + _loopCount = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_urls != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage)); + if (_urls.Count == 1) + { + _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_urls[0])); + } + else + { + var urlArray = new PropertyArray(); + foreach (var url in _urls) + { + urlArray.Add(new PropertyValue(url)); + } + _outputVisualMap.Add(ImageVisualProperty.URL, (new PropertyValue(urlArray))); + } + if (_batchSize != null) { _outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); } + if (_cacheSize != null) { _outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); } + if (_frameDelay != null) { _outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); } + if (_loopCount != null) { _outputVisualMap.Add((int)ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/BorderVisual.cs b/src/Tizen.NUI/src/public/Visuals/BorderVisual.cs new file mode 100755 index 0000000..ec0c9eb --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/BorderVisual.cs @@ -0,0 +1,114 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the border visual. + /// + /// 3 + public class BorderVisual : VisualMap + { + private Color _color = null; + private float? _size = null; + private bool? _antiAliasing = null; + + /// + /// Constructor. + /// + /// 3 + public BorderVisual() : base() + { + } + + /// + /// Gets or sets the color of the border.
+ /// Mandatory. + ///
+ /// 3 + public Color Color + { + get + { + return _color; + } + set + { + _color = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the width of the border (in pixels).
+ /// Mandatory. + ///
+ /// 3 + public float BorderSize + { + get + { + return _size ?? (-1.0f); + } + set + { + _size = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether the anti-aliasing of the border is required.
+ /// If not supplied, the default is false.
+ /// Optional. + ///
+ /// 3 + public bool AntiAliasing + { + get + { + return _antiAliasing ?? (false); + } + set + { + _antiAliasing = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_color != null && _size != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Border)); + _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size)); + _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color)); + if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/ColorVisual.cs b/src/Tizen.NUI/src/public/Visuals/ColorVisual.cs new file mode 100755 index 0000000..ccfc68c --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/ColorVisual.cs @@ -0,0 +1,92 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the color visual. + /// + /// 3 + public class ColorVisual : VisualMap + { + private Color _mixColorForColorVisual = null; + private bool? _renderIfTransparent = false; + + /// + /// Constructor. + /// + /// 3 + public ColorVisual() : base() + { + } + + /// + /// Gets or sets the solid color required.
+ /// Mandatory. + ///
+ /// 3 + public Color Color + { + get + { + return _mixColorForColorVisual; + } + set + { + _mixColorForColorVisual = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to render if the MixColor is transparent. + /// By default it is false, which means that the ColorVisual will not render if the MIX_COLOR is transparent. + /// + /// 5 + public bool RenderIfTransparent + { + get + { + return _renderIfTransparent ?? (false); + } + set + { + _renderIfTransparent = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_mixColorForColorVisual != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color)); + _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual)); + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_renderIfTransparent != null) { _outputVisualMap.Add(ColorVisualProperty.RenderIfTransparent, new PropertyValue((bool)_renderIfTransparent)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/GradientVisual.cs b/src/Tizen.NUI/src/public/Visuals/GradientVisual.cs new file mode 100755 index 0000000..54275ba --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/GradientVisual.cs @@ -0,0 +1,219 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the gradient visual. + /// + /// 3 + public class GradientVisual : VisualMap + { + private Vector2 _startPosition = null; + private Vector2 _endPosition = null; + private Vector2 _center = null; + private float? _radius = null; + private PropertyArray _stopOffset = null; + private PropertyArray _stopColor = null; + private GradientVisualUnitsType? _units = null; + private GradientVisualSpreadMethodType? _spreadMethod = null; + + /// + /// Constructor. + /// + /// 3 + public GradientVisual() : base() + { + } + + /// + /// Gets or sets the start position of a linear gradient.
+ /// Mandatory for linear.
+ ///
+ /// 3 + public Vector2 StartPosition + { + get + { + return _startPosition; + } + set + { + _startPosition = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the end position of a linear gradient.
+ /// Mandatory for linear.
+ ///
+ /// 3 + public Vector2 EndPosition + { + get + { + return _endPosition; + } + set + { + _endPosition = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the center point of a radial gradient.
+ /// Mandatory for radial.
+ ///
+ /// 3 + public Vector2 Center + { + get + { + return _center; + } + set + { + _center = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the size of the radius of a radial gradient.
+ /// Mandatory for radial.
+ ///
+ /// 3 + public float Radius + { + get + { + return _radius ?? (-1.0f); + } + set + { + _radius = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets all the stop offsets.
+ /// A PropertyArray of float.
+ /// If not supplied, the default is 0.0f and 1.0f.
+ /// Optional. + ///
+ /// 3 + public PropertyArray StopOffset + { + get + { + return _stopOffset; + } + set + { + _stopOffset = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the color at the stop offsets.
+ /// A PropertyArray of color.
+ /// At least 2 values are required to show a gradient.
+ /// Mandatory. + ///
+ /// 3 + public PropertyArray StopColor + { + get + { + return _stopColor; + } + set + { + _stopColor = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets descriptions of the coordinate system for certain attributes of the points in a gradient.
+ /// If not supplied, the default is GradientVisualUnitsType.ObjectBoundingBox.
+ /// Optional. + ///
+ /// 3 + public GradientVisualUnitsType Units + { + get + { + return _units ?? (GradientVisualUnitsType.ObjectBoundingBox); + } + set + { + _units = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets indications of what happens if the gradient starts or ends inside the bounds of the target rectangle.
+ /// If not supplied, the default is GradientVisualSpreadMethodType.Pad.
+ /// Optional. + ///
+ /// 3 + public GradientVisualSpreadMethodType SpreadMethod + { + get + { + return _spreadMethod ?? (GradientVisualSpreadMethodType.Pad); + } + set + { + _spreadMethod = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (((_startPosition != null && _endPosition != null) || (_center != null && _radius != null)) && _stopColor != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Gradient)); + _outputVisualMap.Add(GradientVisualProperty.StopColor, new PropertyValue(_stopColor)); + if (_startPosition != null) { _outputVisualMap.Add(GradientVisualProperty.StartPosition, new PropertyValue(_startPosition)); } + if (_endPosition != null) { _outputVisualMap.Add(GradientVisualProperty.EndPosition, new PropertyValue(_endPosition)); } + if (_center != null) { _outputVisualMap.Add(GradientVisualProperty.Center, new PropertyValue(_center)); } + if (_radius != null) { _outputVisualMap.Add(GradientVisualProperty.Radius, new PropertyValue((float)_radius)); } + if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); } + if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); } + if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/ImageVisual.cs b/src/Tizen.NUI/src/public/Visuals/ImageVisual.cs new file mode 100755 index 0000000..4c03c22 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/ImageVisual.cs @@ -0,0 +1,457 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the image visual. + /// + /// 3 + public class ImageVisual : VisualMap + { + private string _url = null; + private string _alphaMaskUrl = null; + private string _auxiliaryImageUrl = null; + private FittingModeType? _fittingMode = null; + private SamplingModeType? _samplingMode = null; + private int? _desiredWidth = null; + private int? _desiredHeight = null; + private bool? _synchronousLoading = false; + private bool? _borderOnly = null; + private Vector4 _pixelArea = null; + private WrapModeType? _wrapModeU = null; + private WrapModeType? _wrapModeV = null; + private float? _auxiliaryImageAlpha = null; + private float? _maskContentScale = null; + private bool? _cropToMask = null; + private ReleasePolicyType? _releasePolicy = null; + private LoadPolicyType? _loadPolicy = null; + private bool? _orientationCorrection = true; + private bool? _atlasing = false; + + /// + /// Constructor. + /// + /// 3 + public ImageVisual() : base() + { + } + + /// + /// Gets or sets the URL of the image.
+ /// Mandatory. + ///
+ /// 3 + public string URL + { + get + { + return _url; + } + set + { + _url = (value == null ? "" : value); + UpdateVisual(); + } + } + + + /// + /// Gets or sets the URL of the alpha mask.
+ /// Optional. + ///
+ /// 3 + public string AlphaMaskURL + { + get + { + return _alphaMaskUrl; + } + set + { + _alphaMaskUrl = value; + UpdateVisual(); + } + } + + /// + /// Overlays the auxiliary image on top of an NPatch image. + /// The resulting visual image will be at least as large as the smallest possible n-patch or the auxiliary image, whichever is larger. + /// + /// 5 + public string AuxiliaryImageURL + { + get + { + return _auxiliaryImageUrl; + } + set + { + _auxiliaryImageUrl = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets fitting options used when resizing images to fit the desired dimensions.
+ /// If not supplied, the default is FittingModeType.ShrinkToFit.
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public FittingModeType FittingMode + { + get + { + return _fittingMode ?? (FittingModeType.ShrinkToFit); + } + set + { + _fittingMode = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets filtering options used when resizing images to the sample original pixels.
+ /// If not supplied, the default is SamplingModeType.Box.
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public SamplingModeType SamplingMode + { + get + { + return _samplingMode ?? (SamplingModeType.Box); + } + set + { + _samplingMode = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the desired image width.
+ /// If not specified, the actual image width is used.
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public int DesiredWidth + { + get + { + return _desiredWidth ?? (-1); + } + set + { + _desiredWidth = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the desired image height.
+ /// If not specified, the actual image height is used.
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public int DesiredHeight + { + get + { + return _desiredHeight ?? (-1); + } + set + { + _desiredHeight = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to load the image synchronously.
+ /// If not specified, the default is false, i.e., the image is loaded asynchronously.
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public bool SynchronousLoading + { + get + { + return _synchronousLoading ?? (false); + } + set + { + _synchronousLoading = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to draw the borders only (If true).
+ /// If not specified, the default is false.
+ /// For n-patch images only.
+ /// Optional. + ///
+ /// 3 + public bool BorderOnly + { + get + { + return _borderOnly ?? (false); + } + set + { + _borderOnly = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the image area to be displayed.
+ /// It is a rectangular area.
+ /// The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
+ /// If not specified, the default value is Vector4 (0.0, 0.0, 1.0, 1.0), i.e., the entire area of the image.
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public Vector4 PixelArea + { + get + { + return _pixelArea ?? (new Vector4(0.0f, 0.0f, 1.0f, 1.0f)); + } + set + { + _pixelArea = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the wrap mode for the u coordinate.
+ /// It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.
+ /// If not specified, the default is WrapModeType.Default(CLAMP).
+ /// For normal quad images only.
+ /// Optional. + ///
+ /// 3 + public WrapModeType WrapModeU + { + get + { + return _wrapModeU ?? (WrapModeType.Default); + } + set + { + _wrapModeU = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the wrap mode for the v coordinate.
+ /// It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.
+ /// The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.
+ /// If not specified, the default is WrapModeType.Default(CLAMP).
+ /// For normal quad images only. + /// Optional. + ///
+ /// 3 + public WrapModeType WrapModeV + { + get + { + return _wrapModeV ?? (WrapModeType.Default); + } + set + { + _wrapModeV = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets scale factor to apply to the content image before masking. + /// + /// 4 + public float MaskContentScale + { + get + { + return _maskContentScale ?? 1.0f; + } + set + { + _maskContentScale = value; + UpdateVisual(); + } + } + + /// + /// Whether to crop image to mask or scale mask to fit image. + /// + /// 4 + public bool CropToMask + { + get + { + return _cropToMask ?? false; + } + set + { + _cropToMask = value; + UpdateVisual(); + } + } + + /// + /// An alpha value for mixing between the masked main NPatch image and the auxiliary image. + /// + /// 5 + public float AuxiliaryImageAlpha + { + get + { + return _auxiliaryImageAlpha ?? 1.0f; + } + set + { + _auxiliaryImageAlpha = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the Image Visual release policy.
+ /// It decides if a texture should be released from the cache or kept to reduce the loading time.
+ ///
+ /// 5 + public ReleasePolicyType ReleasePolicy + { + get + { + return _releasePolicy ?? (ReleasePolicyType.Destroyed); + } + set + { + _releasePolicy = value; + UpdateVisual(); + } + } + + + /// + /// Gets or sets the Image Visual image loading policy.
+ /// It decides if a texture should be loaded immediately after source set or only after the visual is added to the window.
+ ///
+ /// 5 + public LoadPolicyType LoadPolicy + { + get + { + return _loadPolicy ?? (LoadPolicyType.Attached); + } + set + { + _loadPolicy = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to automatically correct the orientation based on the Exchangeable Image File (EXIF) data.
+ /// If not specified, the default is true.
+ /// For JPEG images only.
+ /// Optional. + ///
+ /// 5 + public bool OrientationCorrection + { + get + { + return _orientationCorrection ?? (true); + } + set + { + _orientationCorrection = value; + UpdateVisual(); + } + } + + /// + /// Whether to use the texture atlas or not. + /// Optional. By default atlasing is off. + /// + /// 5 + public bool Atlasing + { + get + { + return _atlasing ?? (false); + } + set + { + _atlasing = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image)); + _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); + if (_alphaMaskUrl != null) { _outputVisualMap.Add(ImageVisualProperty.AlphaMaskURL, new PropertyValue(_alphaMaskUrl)); } + if (_auxiliaryImageUrl != null) { _outputVisualMap.Add(ImageVisualProperty.AuxiliaryImageURL, new PropertyValue(_auxiliaryImageUrl)); } + if (_fittingMode != null) { _outputVisualMap.Add(ImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode)); } + if (_samplingMode != null) { _outputVisualMap.Add(ImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode)); } + if (_desiredWidth != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredWidth, new PropertyValue((int)_desiredWidth)); } + if (_desiredHeight != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredHeight, new PropertyValue((int)_desiredHeight)); } + if (_synchronousLoading != null) { _outputVisualMap.Add(ImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); } + if (_borderOnly != null) { _outputVisualMap.Add(ImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } + if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); } + if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); } + if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_maskContentScale != null) { _outputVisualMap.Add((int)ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); } + if (_cropToMask != null) { _outputVisualMap.Add((int)ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); } + if (_auxiliaryImageAlpha != null) { _outputVisualMap.Add((int)ImageVisualProperty.AuxiliaryImageAlpha, new PropertyValue((float)_auxiliaryImageAlpha)); } + if (_releasePolicy != null) { _outputVisualMap.Add(ImageVisualProperty.ReleasePolicy, new PropertyValue((int)_releasePolicy)); } + if (_loadPolicy != null) { _outputVisualMap.Add(ImageVisualProperty.LoadPolicy, new PropertyValue((int)_loadPolicy)); } + if (_orientationCorrection != null) { _outputVisualMap.Add(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); } + if (_atlasing != null) { _outputVisualMap.Add(ImageVisualProperty.Atlasing, new PropertyValue((bool)_atlasing)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/MeshVisual.cs b/src/Tizen.NUI/src/public/Visuals/MeshVisual.cs new file mode 100755 index 0000000..209c368 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/MeshVisual.cs @@ -0,0 +1,200 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the mesh visual. + /// + /// 3 + public class MeshVisual : VisualMap + { + private string _objectURL = null; + private string _materialtURL = null; + private string _texturesPath = null; + private MeshVisualShadingModeValue? _shadingMode = null; + private bool? _useMipmapping = null; + private bool? _useSoftNormals = null; + private Vector3 _lightPosition = null; + + /// + /// Constructor. + /// + /// 3 + public MeshVisual() : base() + { + } + + /// + /// Gets or sets the location of the ".obj" file.
+ /// Mandatory. + ///
+ /// 3 + public string ObjectURL + { + get + { + return _objectURL; + } + set + { + _objectURL = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the location of the ".mtl" file.
+ /// If not specified, then a textureless object is assumed.
+ /// Optional. + ///
+ /// 3 + public string MaterialtURL + { + get + { + return _materialtURL; + } + set + { + _materialtURL = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the path to the directory the textures (including gloss and normal) are stored in.
+ /// Mandatory if using material.
+ ///
+ /// 3 + public string TexturesPath + { + get + { + return _texturesPath; + } + set + { + _texturesPath = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the type of shading mode that the mesh will use.
+ /// If anything the specified shading mode requires is missing, a simpler mode that can be handled with what has been supplied will be used instead.
+ /// If not specified, it will use the best it can support (will try MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting first).
+ /// Optional. + ///
+ /// 3 + public MeshVisualShadingModeValue ShadingMode + { + get + { + return _shadingMode ?? (MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting); + } + set + { + _shadingMode = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to use mipmaps for textures or not.
+ /// If not specified, the default is true.
+ /// Optional. + ///
+ /// 3 + public bool UseMipmapping + { + get + { + return _useMipmapping ?? (true); + } + set + { + _useMipmapping = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to average normals at each point to smooth textures or not.
+ /// If not specified, the default is true.
+ /// Optional. + ///
+ /// 3 + public bool UseSoftNormals + { + get + { + return _useSoftNormals ?? (true); + } + set + { + _useSoftNormals = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the position, in the stage space, of the point light that applies lighting to the model.
+ /// This is based off the stage's dimensions, so using the width and the height of the stage halved will correspond to the center, + /// and using all zeroes will place the light at the top-left corner.
+ /// If not specified, the default is an offset outwards from the center of the screen.
+ /// Optional. + ///
+ /// 3 + public Vector3 LightPosition + { + get + { + return _lightPosition; + } + set + { + _lightPosition = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_objectURL != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Mesh)); + _outputVisualMap.Add(MeshVisualProperty.ObjectURL, new PropertyValue(_objectURL)); + if (_materialtURL != null) { _outputVisualMap.Add(MeshVisualProperty.MaterialtURL, new PropertyValue(_materialtURL)); } + if (_texturesPath != null) { _outputVisualMap.Add(MeshVisualProperty.TexturesPath, new PropertyValue(_texturesPath)); } + if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); } + if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); } + if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/NPatchVisual.cs b/src/Tizen.NUI/src/public/Visuals/NPatchVisual.cs new file mode 100755 index 0000000..a1f6e09 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/NPatchVisual.cs @@ -0,0 +1,116 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the n-patch image visual. + /// + /// 3 + public class NPatchVisual : VisualMap + { + private string _url = null; + private bool? _borderOnly = null; + private Rectangle _border = null; + + /// + /// Constructor. + /// + /// 3 + public NPatchVisual() : base() + { + } + + /// + /// Gets or sets the URL of the image.
+ /// Mandatory. + ///
+ /// 3 + public string URL + { + get + { + return _url; + } + set + { + _url = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether to draw the borders only (If true).
+ /// If not specified, the default is false.
+ /// For n-patch images only.
+ /// Optional. + ///
+ /// 3 + public bool BorderOnly + { + get + { + return _borderOnly ?? false; + } + set + { + _borderOnly = value; + UpdateVisual(); + } + } + + /// + /// The border of the image is in the order: left, right, bottom, top.
+ /// For n-patch images only.
+ /// Optional. + ///
+ /// 3 + public Rectangle Border + { + get + { + return _border; + } + set + { + _border = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch)); + _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url)); + if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); } + if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/PrimitiveVisual.cs b/src/Tizen.NUI/src/public/Visuals/PrimitiveVisual.cs new file mode 100755 index 0000000..6690fc7 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/PrimitiveVisual.cs @@ -0,0 +1,334 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the primetive visual. + /// + /// 3 + public class PrimitiveVisual : VisualMap + { + private PrimitiveVisualShapeType? _shape = null; + private Color _mixColorForPrimitiveVisual = null; + private int? _slices = null; + private int? _stacks = null; + private float? _scaleTopRadius = null; + private float? _scaleBottomRadius = null; + private float? _scaleHeight = null; + private float? _scaleRadius = null; + private Vector3 _scaleDimensions = null; + private float? _bevelPercentage = null; + private float? _bevelSmoothness = null; + private Vector3 _lightPosition = null; + + /// + /// Constructor. + /// + /// 3 + public PrimitiveVisual() : base() + { + } + + /// + /// Gets or sets the specific shape to render.
+ /// If not specified, the default is PrimitiveVisualShapeType.Sphere.
+ /// Optional. + ///
+ /// 3 + public PrimitiveVisualShapeType Shape + { + get + { + return _shape ?? (PrimitiveVisualShapeType.Sphere); + } + set + { + _shape = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the color of the shape.
+ /// If not specified, the default is Color (0.5, 0.5, 0.5, 1.0).
+ /// Applies to all shapes.
+ /// Optional. + ///
+ /// 3 + public new Color MixColor + { + get + { + return _mixColorForPrimitiveVisual ?? (new Color(0.5f, 0.5f, 0.5f, 1.0f)); + } + set + { + _mixColorForPrimitiveVisual = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the number of slices as you go around the shape.
+ /// For spheres and conical frustrums, this determines how many divisions there are as you go around the object.
+ /// If not specified, the default is 128.
+ /// The range is from 1 to 255.
+ /// Optional. + ///
+ /// 3 + public int Slices + { + get + { + return _slices ?? (128); + } + set + { + _slices = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the number of stacks as you go down the shape.
+ /// For spheres, 'stacks' determines how many layers there are as you go down the object.
+ /// If not specified, the default is 128.
+ /// The range is from 1 to 255.
+ /// Optional. + ///
+ /// 3 + public int Stacks + { + get + { + return _stacks ?? (128); + } + set + { + _stacks = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the scale of the radius of the top circle of a conical frustrum.
+ /// If not specified, the default is 1.0f.
+ /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum
+ /// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. + ///
+ /// 3 + public float ScaleTopRadius + { + get + { + return _scaleTopRadius ?? (1.0f); + } + set + { + _scaleTopRadius = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the scale of the radius of the bottom circle of a conical frustrum.
+ /// If not specified, the default is 1.5f.
+ /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum
+ /// - PrimitiveVisualShapeType.Cone
+ /// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. + ///
+ /// 3 + public float ScaleBottomRadius + { + get + { + return _scaleBottomRadius ?? (1.5f); + } + set + { + _scaleBottomRadius = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the scale of the height of a conic.
+ /// If not specified, the default is 3.0f.
+ /// Applies to:
+ /// - PrimitiveVisualShapeType.ConicalFrustrum
+ /// - PrimitiveVisualShapeType.Cone
+ /// - PrimitiveVisualShapeType.Cylinder
+ /// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. + ///
+ /// 3 + public float ScaleHeight + { + get + { + return _scaleHeight ?? (3.0f); + } + set + { + _scaleHeight = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the scale of the radius of a cylinder.
+ /// If not specified, the default is 1.0f.
+ /// Applies to:
+ /// - PrimitiveVisualShapeType.Cylinder
+ /// Only values greater than or equal to 0.0f are accepted.
+ /// Optional. + ///
+ /// 3 + public float ScaleRadius + { + get + { + return _scaleRadius ?? (1.0f); + } + set + { + _scaleRadius = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
+ /// If not specified, the default is Vector3.One.
+ /// Applies to:
+ /// - PrimitiveVisualShapeType.Cube
+ /// - PrimitiveVisualShapeType.Octahedron
+ /// - PrimitiveVisualShapeType.BevelledCube
+ /// Each Vector3 parameter should be greater than or equal to 0.0f.
+ /// Optional. + ///
+ /// 3 + public Vector3 ScaleDimensions + { + get + { + return _scaleDimensions ?? (Vector3.One); + } + set + { + _scaleDimensions = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets determines how bevelled the cuboid should be, based off the smallest dimension.
+ /// Bevel percentage ranges from 0.0 to 1.0. It affects the ratio of the outer face widths to the width of the overall cube.
+ /// If not specified, the default is 0.0f (no bevel).
+ /// Applies to:
+ /// - PrimitiveVisualShapeType.BevelledCube
+ /// The range is from 0.0f to 1.0f.
+ /// Optional. + ///
+ /// 3 + public float BevelPercentage + { + get + { + return _bevelPercentage ?? (0.0f); + } + set + { + _bevelPercentage = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets descriptions of how smooth the bevelled edges should be.
+ /// If not specified, the default is 0.0f (sharp edges).
+ /// Applies to:
+ /// - PrimitiveVisualShapeType.BevelledCube
+ /// The range is from 0.0f to 1.0f.
+ /// Optional. + ///
+ /// 3 + public float BevelSmoothness + { + get + { + return _bevelSmoothness ?? (0.0f); + } + set + { + _bevelSmoothness = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the position, in the stage space, of the point light that applies lighting to the model.
+ /// This is based off the stage's dimensions, so using the width and the height of the stage halved will correspond to the center, + /// and using all zeroes will place the light at the top-left corner.
+ /// If not specified, the default is an offset outwards from the center of the screen.
+ /// Applies to all shapes.
+ /// Optional. + ///
+ /// 3 + public Vector3 LightPosition + { + get + { + return _lightPosition; + } + set + { + _lightPosition = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + _outputVisualMap = new PropertyMap(); ; + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Primitive)); + if (_shape != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Shape, new PropertyValue((int)_shape)); } + if (_mixColorForPrimitiveVisual != null) { _outputVisualMap.Add(PrimitiveVisualProperty.MixColor, new PropertyValue(_mixColorForPrimitiveVisual)); } + if (_slices != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Slices, new PropertyValue((int)_slices)); } + if (_stacks != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Stacks, new PropertyValue((int)_stacks)); } + if (_scaleTopRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleTopRadius, new PropertyValue((float)_scaleTopRadius)); } + if (_scaleBottomRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleBottomRadius, new PropertyValue((float)_scaleBottomRadius)); } + if (_scaleHeight != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleHeight, new PropertyValue((float)_scaleHeight)); } + if (_scaleRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleRadius, new PropertyValue((float)_scaleRadius)); } + if (_scaleDimensions != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleDimensions, new PropertyValue(_scaleDimensions)); } + if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); } + if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); } + if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/SVGVisual.cs b/src/Tizen.NUI/src/public/Visuals/SVGVisual.cs new file mode 100755 index 0000000..cbb1e28 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/SVGVisual.cs @@ -0,0 +1,72 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the SVG visual. + /// + /// 3 + public class SVGVisual : VisualMap + { + private string _url = null; + + /// + /// Constructor. + /// + /// 3 + public SVGVisual() : base() + { + } + + /// + /// The url of the svg resource. + /// + /// 3 + public string URL + { + get + { + return _url; + } + set + { + _url = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_url != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG)); + _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url)); + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/TextVisual.cs b/src/Tizen.NUI/src/public/Visuals/TextVisual.cs new file mode 100755 index 0000000..0a423cc --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/TextVisual.cs @@ -0,0 +1,376 @@ +/* + * Copyright(c) 2019 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. + * + */ + +namespace Tizen.NUI +{ + /// + /// A class encapsulating the property map of the text visual. + /// + /// 3 + public class TextVisual : VisualMap + { + private string _text = null; + private string _fontFamily = null; + private PropertyMap _fontStyle = null; + private float? _pointSize = null; + private bool? _multiLine = null; + private string _horizontalAlignment = null; + private string _verticalAlignment = null; + private Color _textColor = null; + private bool? _enableMarkup = null; + private PropertyMap _shadow = null; + private PropertyMap _underline = null; + private PropertyMap _outline = null; + private PropertyMap _background = null; + + /// + /// Constructor. + /// + /// 3 + public TextVisual() : base() + { + } + + /// + /// Gets or sets the text to display in the UTF-8 format.
+ /// Mandatory. + ///
+ /// 3 + public string Text + { + get + { + return _text; + } + set + { + _text = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the requested font family to use.
+ /// Optional. + ///
+ /// 3 + public string FontFamily + { + get + { + return _fontFamily; + } + set + { + _fontFamily = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the requested font style to use.
+ /// Optional. + ///
+ /// 3 + public PropertyMap FontStyle + { + get + { + return _fontStyle; + } + set + { + _fontStyle = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the size of font in points.
+ /// Mandatory. + ///
+ /// 3 + public float PointSize + { + get + { + return _pointSize ?? (0.0f); + } + set + { + _pointSize = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the single-line or multi-line layout option.
+ /// If not specified, the default is false.
+ /// Optional. + ///
+ /// 3 + public bool MultiLine + { + get + { + return _multiLine ?? (false); + } + set + { + _multiLine = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the line horizontal alignment.
+ /// If not specified, the default is begin.
+ /// Optional. + ///
+ /// 3 + public HorizontalAlignment HorizontalAlignment + { + get + { + switch (_horizontalAlignment) + { + case "BEGIN": + return HorizontalAlignment.Begin; + case "CENTER": + return HorizontalAlignment.Center; + case "END": + return HorizontalAlignment.End; + default: + return HorizontalAlignment.Begin; + } + } + set + { + switch (value) + { + case HorizontalAlignment.Begin: + { + _horizontalAlignment = "BEGIN"; + break; + } + case HorizontalAlignment.Center: + { + _horizontalAlignment = "CENTER"; + break; + } + case HorizontalAlignment.End: + { + _horizontalAlignment = "END"; + break; + } + default: + { + _horizontalAlignment = "BEGIN"; + break; + } + } + UpdateVisual(); + } + } + + /// + /// Gets or sets the line vertical alignment.
+ /// If not specified, the default is top.
+ /// Optional. + ///
+ /// 3 + public VerticalAlignment VerticalAlignment + { + get + { + switch (_verticalAlignment) + { + case "TOP": + return VerticalAlignment.Top; + case "CENTER": + return VerticalAlignment.Center; + case "BOTTOM": + return VerticalAlignment.Bottom; + default: + return VerticalAlignment.Top; + } + } + set + { + switch (value) + { + case VerticalAlignment.Top: + { + _verticalAlignment = "TOP"; + break; + } + case VerticalAlignment.Center: + { + _verticalAlignment = "CENTER"; + break; + } + case VerticalAlignment.Bottom: + { + _verticalAlignment = "BOTTOM"; + break; + } + default: + { + _verticalAlignment = "TOP"; + break; + } + } + UpdateVisual(); + } + } + + /// + /// Gets or sets the color of the text.
+ /// Optional. + ///
+ /// 3 + public Color TextColor + { + get + { + return _textColor; + } + set + { + _textColor = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets whether the mark-up processing is enabled.
+ /// Optional. + ///
+ /// 3 + public bool EnableMarkup + { + get + { + return _enableMarkup ?? (false); + } + set + { + _enableMarkup = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the shadow parameters. + /// + /// 5 + public PropertyMap Shadow + { + get + { + return _shadow; + } + set + { + _shadow = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the underline parameters. + /// + /// 5 + public PropertyMap Underline + { + get + { + return _underline; + } + set + { + _underline = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the outline parameters. + /// + /// 5 + public PropertyMap Outline + { + get + { + return _outline; + } + set + { + _outline = value; + UpdateVisual(); + } + } + + /// + /// Gets or sets the background parameters. + /// + /// 5 + public PropertyMap Background + { + get + { + return _background; + } + set + { + _background = value; + UpdateVisual(); + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + if (_text != null && _pointSize != null) + { + _outputVisualMap = new PropertyMap(); + _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text)); + _outputVisualMap.Add(TextVisualProperty.Text, new PropertyValue(_text)); + _outputVisualMap.Add(TextVisualProperty.PointSize, new PropertyValue((float)_pointSize)); + if (_fontFamily != null) { _outputVisualMap.Add(TextVisualProperty.FontFamily, new PropertyValue(_fontFamily)); } + if (_fontStyle != null) { _outputVisualMap.Add(TextVisualProperty.FontStyle, new PropertyValue(_fontStyle)); } + if (_multiLine != null) { _outputVisualMap.Add(TextVisualProperty.MultiLine, new PropertyValue((bool)_multiLine)); } + if (_horizontalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue(_horizontalAlignment)); } + if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); } + if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); } + if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); } + if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); } + if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); } + if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); } + if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); } + if (_shadow != null) { _outputVisualMap.Add(TextVisualProperty.Shadow, new PropertyValue(_shadow)); } + if (_underline != null) { _outputVisualMap.Add(TextVisualProperty.Underline, new PropertyValue(_underline)); } + if (_outline != null) { _outputVisualMap.Add(TextVisualProperty.Outline, new PropertyValue(_outline)); } + if (_background != null) { _outputVisualMap.Add(TextVisualProperty.Background, new PropertyValue(_background)); } + if (_visualFittingMode != null) { _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); } + } + } + } +} diff --git a/src/Tizen.NUI/src/public/Visuals/VisualAnimator.cs b/src/Tizen.NUI/src/public/Visuals/VisualAnimator.cs new file mode 100755 index 0000000..c5d4767 --- /dev/null +++ b/src/Tizen.NUI/src/public/Visuals/VisualAnimator.cs @@ -0,0 +1,271 @@ +/* + * Copyright(c) 2019 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. + * + */ +using System.Text; + +namespace Tizen.NUI +{ + //temporary fix for TCT + /// + /// A class encapsulating the property map of the transition data. + /// + /// 3 + public class VisualAnimator : VisualMap + { + private string _alphaFunction = null; + private int _startTime = 0; + private int _endTime = 0; + private string _target = null; + private string _propertyIndex = null; + private object _destinationValue = null; + + /// + /// Create VisualAnimator object. + /// + /// 3 + public VisualAnimator() : base() + { + } + + /// + /// Sets and Gets the AlphaFunction of this transition. + /// + /// 3 + public AlphaFunction.BuiltinFunctions AlphaFunction + { + get + { + switch (_alphaFunction) + { + case "LINEAR": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear; + case "REVERSE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse; + case "EASE_IN_SQUARE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare; + case "EASE_OUT_SQUARE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare; + case "EASE_IN": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn; + case "EASE_OUT": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut; + case "EASE_IN_OUT": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut; + case "EASE_IN_SINE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine; + case "EASE_OUT_SINE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine; + case "EASE_IN_OUT_SINE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine; + case "BOUNCE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce; + case "SIN": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin; + case "EASE_OUT_BACK": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack; + default: + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default; + } + } + set + { + switch (value) + { + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear: + { + _alphaFunction = "LINEAR"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse: + { + _alphaFunction = "REVERSE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare: + { + _alphaFunction = "EASE_IN_SQUARE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare: + { + _alphaFunction = "EASE_OUT_SQUARE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn: + { + _alphaFunction = "EASE_IN"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut: + { + _alphaFunction = "EASE_OUT"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut: + { + _alphaFunction = "EASE_IN_OUT"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine: + { + _alphaFunction = "EASE_IN_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine: + { + _alphaFunction = "EASE_OUT_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine: + { + _alphaFunction = "EASE_IN_OUT_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce: + { + _alphaFunction = "BOUNCE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin: + { + _alphaFunction = "SIN"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack: + { + _alphaFunction = "EASE_OUT_BACK"; + break; + } + default: + { + _alphaFunction = "DEFAULT"; + break; + } + } + } + } + + /// + /// Sets and Gets the StartTime of this transition. + /// + /// 3 + public int StartTime + { + get + { + return _startTime; + } + set + { + _startTime = value; + } + } + + /// + /// Sets and Gets the EndTime of this transition. + /// + /// 3 + public int EndTime + { + get + { + return _endTime; + } + set + { + _endTime = value; + } + } + + /// + /// Sets and Gets the Target of this transition. + /// + /// 3 + public string Target + { + get + { + return _target; + } + set + { + _target = value; + } + } + + /// + /// Sets and Gets the PropertyIndex of this transition. + /// + /// 3 + public string PropertyIndex + { + get + { + return _propertyIndex; + } + set + { + _propertyIndex = value; + } + } + + /// + /// Sets and Gets the DestinationValue of this transition. + /// + /// 3 + public object DestinationValue + { + get + { + return _destinationValue; + } + set + { + _destinationValue = value; + } + } + + /// + /// Compose the out visual map. + /// + /// 3 + protected override void ComposingPropertyMap() + { + PropertyMap _animator = new PropertyMap(); + _animator.Add("alphaFunction", new PropertyValue(_alphaFunction)); + + PropertyMap _timePeriod = new PropertyMap(); + _timePeriod.Add("duration", new PropertyValue((_endTime - _startTime) / 1000.0f)); + _timePeriod.Add("delay", new PropertyValue(_startTime / 1000.0f)); + _animator.Add("timePeriod", new PropertyValue(_timePeriod)); + + StringBuilder sb = new StringBuilder(_propertyIndex); + sb[0] = (char)(sb[0] | 0x20); + string _str = sb.ToString(); + + PropertyValue val = PropertyValue.CreateFromObject(_destinationValue); + + PropertyMap _transition = new PropertyMap(); + _transition.Add("target", new PropertyValue(_target)); + _transition.Add("property", new PropertyValue(_str)); + _transition.Add("targetValue", val); + _transition.Add("animator", new PropertyValue(_animator)); + + _outputVisualMap = _transition; + } + } + //temporary fix for TCT +} diff --git a/src/Tizen.NUI/src/public/WatchTime.cs b/src/Tizen.NUI/src/public/WatchTime.cs index c157b59..6a9239b 100755 --- a/src/Tizen.NUI/src/public/WatchTime.cs +++ b/src/Tizen.NUI/src/public/WatchTime.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Wheel.cs b/src/Tizen.NUI/src/public/Wheel.cs index fd666a5..27c8cee 100755 --- a/src/Tizen.NUI/src/public/Wheel.cs +++ b/src/Tizen.NUI/src/public/Wheel.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2019 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. diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 1aa11df..1dc79f6 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -1,5 +1,3 @@ - - /* * Copyright(c) 2019 Samsung Electronics Co., Ltd. * @@ -17,10 +15,10 @@ * */ using System; -using System.Runtime.InteropServices; -using Tizen.NUI.BaseComponents; using System.ComponentModel; using System.Collections.Generic; +using System.Runtime.InteropServices; +using Tizen.NUI.BaseComponents; namespace Tizen.NUI { @@ -29,29 +27,14 @@ namespace Tizen.NUI /// The window has an orientation and indicator properties.
///
/// 3 - public class Window : BaseHandle + public partial class Window : BaseHandle { + private static readonly Window instance = Application.Instance?.GetWindow(); private global::System.Runtime.InteropServices.HandleRef swigCPtr; private global::System.Runtime.InteropServices.HandleRef stageCPtr; private Layer _rootLayer; private string _windowTitle; private List _childLayers = new List(); - private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback; - private RootLayerTouchDataCallbackType _rootLayerTouchDataCallback; - private WheelEventCallbackType _wheelEventCallback; - private EventCallbackDelegateType1 _stageKeyCallbackDelegate; - private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate; - private EventHandler _stageContextLostEventHandler; - private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate; - private EventHandler _stageContextRegainedEventHandler; - private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate; - private EventHandler _stageSceneCreatedEventHandler; - private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate; - private WindowResizedEventCallbackType _windowResizedEventCallback; - private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2; - - private static readonly Window instance = Application.Instance?.GetWindow(); - private LayoutController localController; internal Window(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Window.Window_SWIGUpcast(cPtr), cMemoryOwn) @@ -65,7 +48,7 @@ namespace Tizen.NUI NUILog.Debug("layoutController id:" + localController.GetId() ); } } - + /// /// Creates a new Window.
/// This creates an extra window in addition to the default main window
@@ -94,289 +77,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void WindowFocusChangedEventCallbackType(bool focusGained); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool RootLayerTouchDataCallbackType(IntPtr view, IntPtr touchData); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void WindowResizedEventCallbackType(IntPtr windowSize); - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void WindowFocusChangedEventCallbackType2(bool focusGained); - - /// - /// FocusChanged event. - /// - /// 3 - public event EventHandler FocusChanged - { - add - { - if (_windowFocusChangedEventHandler == null) - { - _windowFocusChangedEventCallback = OnWindowFocusedChanged; - WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback); - } - - _windowFocusChangedEventHandler += value; - } - remove - { - _windowFocusChangedEventHandler -= value; - - if (_windowFocusChangedEventHandler == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback != null) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback); - } - } - } - - /// - /// This event is emitted when the screen is touched and when the touch ends.
- /// If there are multiple touch points, then this will be emitted when the first touch occurs and - /// then when the last finger is lifted.
- /// An interrupted event will also be emitted (if it occurs).
- ///
- /// 3 - public event EventHandler TouchEvent - { - add - { - if (_rootLayerTouchDataEventHandler == null) - { - _rootLayerTouchDataCallback = OnWindowTouch; - this.TouchDataSignal().Connect(_rootLayerTouchDataCallback); - } - _rootLayerTouchDataEventHandler += value; - } - remove - { - _rootLayerTouchDataEventHandler -= value; - if (_rootLayerTouchDataEventHandler == null && TouchSignal().Empty() == false) - { - this.TouchDataSignal().Disconnect(_rootLayerTouchDataCallback); - } - } - } - - /// - /// This event is emitted when the wheel event is received. - /// - /// 3 - public event EventHandler WheelEvent - { - add - { - if (_stageWheelHandler == null) - { - _wheelEventCallback = OnStageWheel; - this.StageWheelEventSignal().Connect(_wheelEventCallback); - } - _stageWheelHandler += value; - } - remove - { - _stageWheelHandler -= value; - if (_stageWheelHandler == null && StageWheelEventSignal().Empty() == false) - { - this.StageWheelEventSignal().Disconnect(_wheelEventCallback); - } - } - } - - /// - /// This event is emitted when the key event is received. - /// - /// 3 - public event EventHandler KeyEvent - { - add - { - if (_stageKeyHandler == null) - { - _stageKeyCallbackDelegate = OnStageKey; - KeyEventSignal().Connect(_stageKeyCallbackDelegate); - } - _stageKeyHandler += value; - } - remove - { - _stageKeyHandler -= value; - if (_stageKeyHandler == null && KeyEventSignal().Empty() == false) - { - KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); - } - } - } - - /// - /// This event is emitted when the window resized. - /// - /// 3 - public event EventHandler Resized - { - add - { - if (_windowResizedEventHandler == null) - { - _windowResizedEventCallback = OnResized; - ResizedSignal().Connect(_windowResizedEventCallback); - } - - _windowResizedEventHandler += value; - } - remove - { - _windowResizedEventHandler -= value; - - if (_windowResizedEventHandler == null && ResizedSignal().Empty() == false && _windowResizedEventCallback != null) - { - ResizedSignal().Disconnect(_windowResizedEventCallback); - } - } - } - - /// - /// Please do not use! this will be deprecated. Please use 'FocusChanged' event instead. - /// - /// 3 - /// Please do not use! this will be deprecated! - /// Instead please use FocusChanged. - [Obsolete("Please do not use! This will be deprecated! Please use FocusChanged instead! " + - "Like: " + - "Window.Instance.FocusChanged = OnFocusChanged; " + - "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")] - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler WindowFocusChanged - { - add - { - if (_windowFocusChangedEventHandler2 == null) - { - _windowFocusChangedEventCallback2 = OnWindowFocusedChanged2; - WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback2); - } - - _windowFocusChangedEventHandler2 += value; - } - remove - { - _windowFocusChangedEventHandler2 -= value; - - if (_windowFocusChangedEventHandler2 == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback2 != null) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); - } - } - } - - /// - /// ViewAdded will be triggered when the view added on Window - /// - /// 6 - /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler ViewAdded; - - internal void SendViewAdded(View view) - { - ViewAdded?.Invoke(view, EventArgs.Empty); - } - - internal event EventHandler EventProcessingFinished - { - add - { - if (_stageEventProcessingFinishedEventHandler == null) - { - _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished; - EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate); - } - _stageEventProcessingFinishedEventHandler += value; - - } - remove - { - _stageEventProcessingFinishedEventHandler -= value; - if (_stageEventProcessingFinishedEventHandler == null && EventProcessingFinishedSignal().Empty() == false) - { - EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate); - } - } - } - - internal event EventHandler ContextLost - { - add - { - if (_stageContextLostEventHandler == null) - { - _stageContextLostEventCallbackDelegate = OnContextLost; - ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate); - } - _stageContextLostEventHandler += value; - } - remove - { - _stageContextLostEventHandler -= value; - if (_stageContextLostEventHandler == null && ContextLostSignal().Empty() == false) - { - ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate); - } - } - } - - internal event EventHandler ContextRegained - { - add - { - if (_stageContextRegainedEventHandler == null) - { - _stageContextRegainedEventCallbackDelegate = OnContextRegained; - ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate); - } - _stageContextRegainedEventHandler += value; - } - remove - { - _stageContextRegainedEventHandler -= value; - if (_stageContextRegainedEventHandler == null && ContextRegainedSignal().Empty() == false) - { - this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate); - } - } - } - - internal event EventHandler SceneCreated - { - add - { - if (_stageSceneCreatedEventHandler == null) - { - _stageSceneCreatedEventCallbackDelegate = OnSceneCreated; - SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate); - } - _stageSceneCreatedEventHandler += value; - } - remove - { - _stageSceneCreatedEventHandler -= value; - if (_stageSceneCreatedEventHandler == null && SceneCreatedSignal().Empty() == false) - { - SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate); - } - } - } - - private event EventHandler _windowFocusChangedEventHandler; - private event EventHandler _rootLayerTouchDataEventHandler; - private event EventHandler _stageWheelHandler; - private event EventHandler _stageKeyHandler; - private event EventHandler _stageEventProcessingFinishedEventHandler; - private event EventHandler _windowResizedEventHandler; - private event EventHandler _windowFocusChangedEventHandler2; - /// /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing. /// @@ -430,6 +130,52 @@ namespace Tizen.NUI }; /// + /// Enumeration for transition effect's state. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public enum EffectStates + { + /// + /// None state. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + None = 0, + /// + /// Transition effect is started. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Start, + /// + /// Transition effect is ended. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + End, + } + + /// + /// Enumeration for transition effect's type. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public enum EffectTypes + { + /// + /// None type. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + None = 0, + /// + /// Window show effect. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Show, + /// + /// Window hide effect. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Hide, + } + + /// /// Enumeration for opacity of the indicator. /// internal enum IndicatorBackgroundOpacity @@ -601,6 +347,27 @@ namespace Tizen.NUI SetPosition(value); } } + + /// + /// Sets position and size of the window. This API guarantees that + /// both moving and resizing of window will appear on the screen at once. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Rectangle WindowPositionSize + { + get + { + Position2D position = GetPosition(); + Size2D size = GetSize(); + Rectangle ret = new Rectangle(position.X, position.Y, size.Width, size.Height); + return ret; + } + set + { + SetPositionSize(value); + } + } + internal static Vector4 DEFAULT_BACKGROUND_COLOR { get @@ -1172,28 +939,71 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj) + /// + /// Sets whether the window is transparent or not. + /// + /// Whether the window is transparent or not. + /// 5 + public void SetTransparency(bool transparent) { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + Interop.Window.SetTransparency(swigCPtr, transparent); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + // Setting transparency of the window should request a relayout of the tree in the case the window changes from fully transparent. } - internal static Window GetCurrent() + /// + /// Sets parent window of the window. + /// After setting that, these windows do together when raise-up, lower and iconified/deiconified. + /// Initially, the window is located on top of the parent. The window can go below parent by calling Lower(). + /// If parent's window stack is changed by calling Raise() or Lower(), child windows are located on top of the parent again. + /// + /// The parent window. + /// 6 + public void SetParent(Window parent) { - Window ret = new Window(Interop.Stage.Stage_GetCurrent(), true); + Interop.Window.SetParent(swigCPtr, Window.getCPtr(parent)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } - internal static bool IsInstalled() + /// + /// Unsets parent window of the window. + /// After unsetting, the window is disconnected his parent window. + /// + /// 6 + public void Unparent() { - bool ret = Interop.Stage.Stage_IsInstalled(); + Interop.Window.Unparent(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } - internal WindowFocusSignalType WindowFocusChangedSignal() + /// + /// Gets parent window of the window. + /// + /// The parent window of the window. + /// 6 + public Window GetParent() { - WindowFocusSignalType ret = new WindowFocusSignalType(Interop.Window.FocusChangedSignal(swigCPtr), false); + Window ret = Registry.GetManagedBaseHandleFromNativePtr(Interop.Window.GetParent(swigCPtr)) as Window; + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Window obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + internal static Window GetCurrent() + { + Window ret = new Window(Interop.Stage.Stage_GetCurrent(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal static bool IsInstalled() + { + bool ret = Interop.Stage.Stage_IsInstalled(); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } @@ -1268,13 +1078,6 @@ namespace Tizen.NUI return ret; } - internal WindowFocusSignalType FocusChangedSignal() - { - WindowFocusSignalType ret = new WindowFocusSignalType(Interop.Window.FocusChangedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - internal void Add(Layer layer) { Interop.Window.Add(swigCPtr, Layer.getCPtr(layer)); @@ -1376,63 +1179,6 @@ namespace Tizen.NUI return ret; } - internal KeyEventSignal KeyEventSignal() - { - KeyEventSignal ret = new KeyEventSignal(Interop.Window.KeyEventSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal EventProcessingFinishedSignal() - { - VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_EventProcessingFinishedSignal(stageCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TouchSignal TouchSignal() - { - TouchSignal ret = new TouchSignal(Interop.Window.TouchSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal TouchDataSignal TouchDataSignal() - { - TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(Layer.getCPtr(GetRootLayer())), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal ContextLostSignal() - { - VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_ContextLostSignal(stageCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal ContextRegainedSignal() - { - VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_ContextRegainedSignal(stageCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal VoidSignal SceneCreatedSignal() - { - VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_SceneCreatedSignal(stageCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal ResizedSignal ResizedSignal() - { - ResizedSignal ret = new ResizedSignal(Interop.Window.Window_ResizedSignal(swigCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - internal void SetWindowSize(Size2D size) { var val = new Uint16Pair((uint)size.Width, (uint)size.Height); @@ -1458,9 +1204,7 @@ namespace Tizen.NUI Interop.Window.SetPosition(swigCPtr, Uint16Pair.getCPtr(val)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - // Setting Position of the window should request a relayout of the tree. - } internal Position2D GetPosition() @@ -1479,54 +1223,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); // Setting Position of the window should request a relayout of the tree. - - } - - /// - /// Sets whether the window is transparent or not. - /// - /// Whether the window is transparent or not. - /// 5 - public void SetTransparency(bool transparent) { - Interop.Window.SetTransparency(swigCPtr, transparent); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - // Setting transparency of the window should request a relayout of the tree in the case the window changes from fully transparent. - - } - - /// - /// Sets parent window of the window. - /// After setting that, these windows do together when raise-up, lower and iconified/deiconified. - /// Initially, the window is located on top of the parent. The window can go below parent by calling Lower(). - /// If parent's window stack is changed by calling Raise() or Lower(), child windows are located on top of the parent again. - /// - /// The parent window. - /// 6 - public void SetParent(Window parent) { - Interop.Window.SetParent(swigCPtr, Window.getCPtr(parent)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Unsets parent window of the window. - /// After unsetting, the window is disconnected his parent window. - /// - /// 6 - public void Unparent() { - Interop.Window.Unparent(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Gets parent window of the window. - /// - /// The parent window of the window. - /// 6 - public Window GetParent() { - Window ret = Registry.GetManagedBaseHandleFromNativePtr(Interop.Window.GetParent(swigCPtr)) as Window; - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; } /// @@ -1574,569 +1270,5 @@ namespace Tizen.NUI base.Dispose(type); } - - internal System.IntPtr GetNativeWindowHandler() - { - System.IntPtr ret = Interop.Window.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private void OnWindowFocusedChanged(bool focusGained) - { - FocusChangedEventArgs e = new FocusChangedEventArgs(); - - e.FocusGained = focusGained; - - if (_windowFocusChangedEventHandler != null) - { - _windowFocusChangedEventHandler(this, e); - } - } - - private StageWheelSignal WheelEventSignal() - { - StageWheelSignal ret = new StageWheelSignal(Interop.StageSignal.Stage_WheelEventSignal(stageCPtr), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private WheelSignal StageWheelEventSignal() - { - WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(Layer.getCPtr(this.GetRootLayer())), false); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - private bool OnWindowTouch(IntPtr view, IntPtr touchData) - { - if (touchData == global::System.IntPtr.Zero) - { - NUILog.Error("touchData should not be null!"); - return false; - } - - TouchEventArgs e = new TouchEventArgs(); - - e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData); - - if (_rootLayerTouchDataEventHandler != null) - { - _rootLayerTouchDataEventHandler(this, e); - } - return false; - } - - private bool OnStageWheel(IntPtr rootLayer, IntPtr wheelEvent) - { - if (wheelEvent == global::System.IntPtr.Zero) - { - NUILog.Error("wheelEvent should not be null!"); - return true; - } - - WheelEventArgs e = new WheelEventArgs(); - - e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent); - - if (_stageWheelHandler != null) - { - _stageWheelHandler(this, e); - } - return true; - } - - // Callback for Stage KeyEventsignal - private void OnStageKey(IntPtr data) - { - KeyEventArgs e = new KeyEventArgs(); - e.Key = Tizen.NUI.Key.GetKeyFromPtr(data); - - - if (_stageKeyHandler != null) - { - //here we send all data to user event handlers - _stageKeyHandler(this, e); - } - } - - // Callback for Stage EventProcessingFinishedSignal - private void OnEventProcessingFinished() - { - if (_stageEventProcessingFinishedEventHandler != null) - { - _stageEventProcessingFinishedEventHandler(this, null); - } - } - - // Callback for Stage ContextLostSignal - private void OnContextLost() - { - if (_stageContextLostEventHandler != null) - { - _stageContextLostEventHandler(this, null); - } - } - - // Callback for Stage ContextRegainedSignal - private void OnContextRegained() - { - if (_stageContextRegainedEventHandler != null) - { - _stageContextRegainedEventHandler(this, null); - } - } - - // Callback for Stage SceneCreatedSignal - private void OnSceneCreated() - { - if (_stageSceneCreatedEventHandler != null) - { - _stageSceneCreatedEventHandler(this, null); - } - } - - private void OnResized(IntPtr windowSize) - { - ResizedEventArgs e = new ResizedEventArgs(); - var val = new Uint16Pair(windowSize, false); - e.WindowSize = new Size2D(val.GetWidth(), val.GetHeight()); - val.Dispose(); - - if (_windowResizedEventHandler != null) - { - _windowResizedEventHandler(this, e); - } - } - - private void OnWindowFocusedChanged2(bool focusGained) - { - FocusChangedEventArgs e = new FocusChangedEventArgs(); - - e.FocusGained = focusGained; - - if (_windowFocusChangedEventHandler2 != null) - { - _windowFocusChangedEventHandler2(this, e); - } - } - - /// - /// The focus changed event argument. - /// - /// 3 - public class FocusChangedEventArgs : EventArgs - { - /// - /// FocusGained flag. - /// - /// 3 - public bool FocusGained - { - get; - set; - } - } - - /// - /// The touch event argument. - /// - /// 3 - public class TouchEventArgs : EventArgs - { - private Touch _touch; - - /// - /// Touch. - /// - /// 3 - public Touch Touch - { - get - { - return _touch; - } - set - { - _touch = value; - } - } - } - - /// - /// Wheel event arguments. - /// - /// 3 - public class WheelEventArgs : EventArgs - { - private Wheel _wheel; - - /// - /// Wheel. - /// - /// 3 - public Wheel Wheel - { - get - { - return _wheel; - } - set - { - _wheel = value; - } - } - } - - /// - /// Key event arguments. - /// - /// 3 - public class KeyEventArgs : EventArgs - { - private Key _key; - - /// - /// Key. - /// - /// 3 - public Key Key - { - get - { - return _key; - } - set - { - _key = value; - } - } - } - - /// - /// Sets position and size of the window. This API guarantees that - /// both moving and resizing of window will appear on the screen at once. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public Rectangle WindowPositionSize - { - get - { - Position2D position = GetPosition(); - Size2D size = GetSize(); - Rectangle ret = new Rectangle(position.X, position.Y, size.Width, size.Height); - return ret; - } - set - { - SetPositionSize(value); - } - } - - /// - /// Feeds a key event into the window. - /// This resized event arguments. - /// - /// 3 - public class ResizedEventArgs : EventArgs - { - Size2D _windowSize; - - /// - /// This window size. - /// - /// 4 - public Size2D WindowSize - { - get - { - return _windowSize; - } - set - { - _windowSize = value; - } - } - } - - /// - /// Please do not use! this will be deprecated - /// - /// 3 - [Obsolete("Please do not use! This will be deprecated! Please use FocusChangedEventArgs instead! " + - "Like: " + - "Window.Instance.FocusChanged = OnFocusChanged; " + - "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")] - [EditorBrowsable(EditorBrowsableState.Never)] - public class WindowFocusChangedEventArgs : EventArgs - { - /// - /// Please do not use! this will be deprecated - /// - /// 3 - public bool FocusGained - { - get; - set; - } - } - - /// - /// Contains and encapsulates Native Window handle. - /// - /// 4 - public class SafeNativeWindowHandle : SafeHandle - { - /// - /// Contructor, Native window handle is set to handle. - /// - /// 4 - public SafeNativeWindowHandle() : base(IntPtr.Zero, false) - { - SetHandle(Tizen.NUI.Window.Instance.GetNativeWindowHandler()); - } - /// - /// Null check if the handle is valid or not. - /// - /// 4 - public override bool IsInvalid - { - get - { - return this.handle == IntPtr.Zero; - } - } - /// - /// Release handle itself. - /// - /// true when released successfully. - /// 4 - protected override bool ReleaseHandle() - { - return true; - } - } - - /// - /// Disconnect all native signals - /// - /// 5 - internal void DisconnectNativeSignals() - { - if( _windowFocusChangedEventCallback != null ) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback); - } - - if( _rootLayerTouchDataCallback != null ) - { - TouchDataSignal().Disconnect(_rootLayerTouchDataCallback); - } - - if( _wheelEventCallback != null ) - { - StageWheelEventSignal().Disconnect(_wheelEventCallback); - } - - if( _stageKeyCallbackDelegate != null ) - { - KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); - } - - if( _stageEventProcessingFinishedEventCallbackDelegate != null ) - { - EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate); - } - - if( _stageContextLostEventCallbackDelegate != null ) - { - ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate); - } - - if( _stageContextRegainedEventCallbackDelegate != null ) - { - ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate); - } - - if( _stageSceneCreatedEventCallbackDelegate != null ) - { - SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate); - } - - if( _windowResizedEventCallback != null ) - { - ResizedSignal().Disconnect(_windowResizedEventCallback); - } - - if( _windowFocusChangedEventCallback2 != null ) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); - } - - if(transitionEffectSignal != null) - { - TransitionEffectEventSignal().Disconnect(transitionEffectEventCallback); - } - - } - - private void OnTransitionEffect(IntPtr window, int state, int type) - { - //Tizen.Log.Fatal("NUITEST", $"OnTransitionEffect() called"); - if (window == global::System.IntPtr.Zero) - { - //Tizen.Log.Error("NUI", $"OnTransitionEffect() IntPtr window is null!"); - return; - } - - TransitionEffectArgs e = new TransitionEffectArgs(); - - e.State = (EffectStates)state; - //Tizen.Log.Error("NUITEST", $"e.State={e.State}"); - - e.Type = (EffectTypes)type; - //Tizen.Log.Error("NUITEST", $"e.Type={e.Type}"); - - if (transitionEffectHandler != null) - { - //Tizen.Log.Fatal("NUITEST", $"Execute transitionEffectHandler(this, e)!!!"); - transitionEffectHandler(this, e); - } - return; - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void TransitionEffectEventCallbackType(IntPtr window, int state, int type); - - private TransitionEffectEventCallbackType transitionEffectEventCallback; - - private event EventHandler transitionEffectHandler; - - /// - /// Enumeration for transition effect's state. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public enum EffectStates - { - /// - /// None state. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - None = 0, - /// - /// Transition effect is started. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - Start, - /// - /// Transition effect is ended. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - End, - } - - /// - /// Enumeration for transition effect's type. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public enum EffectTypes - { - /// - /// None type. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - None = 0, - /// - /// Window show effect. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - Show, - /// - /// Window hide effect. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - Hide, - } - - /// - /// TransitionEffectArgs - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public class TransitionEffectArgs : EventArgs - { - private EffectStates state; - /// - /// State - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public EffectStates State - { - get - { - return state; - } - set - { - state = value; - } - } - private EffectTypes type; - /// - /// Type - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public EffectTypes Type - { - get - { - return type; - } - set - { - type = value; - } - } - } - - /// - /// EffectStart - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler TransitionEffect - { - add - { - if (transitionEffectHandler== null) - { - transitionEffectEventCallback = OnTransitionEffect; - TransitionEffectEventSignal().Connect(transitionEffectEventCallback); - } - transitionEffectHandler += value; - } - remove - { - transitionEffectHandler -= value; - if (transitionEffectHandler == null && TransitionEffectEventSignal().Empty() == false) - { - TransitionEffectEventSignal().Disconnect(transitionEffectEventCallback); - } - } - } - - private WindowTransitionEffectSignal transitionEffectSignal; - private WindowTransitionEffectSignal TransitionEffectEventSignal() - { - //Tizen.Log.Fatal("NUITEST", "TransitionEffectEventSignal()!"); - if (transitionEffectSignal == null) - { - transitionEffectSignal = new WindowTransitionEffectSignal(this); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - //Tizen.Log.Fatal("NUITEST", $"transitionEffectSignal is null, new here!"); - } - return transitionEffectSignal; - } - } } diff --git a/src/Tizen.NUI/src/public/WindowEvent.cs b/src/Tizen.NUI/src/public/WindowEvent.cs new file mode 100755 index 0000000..19e330f --- /dev/null +++ b/src/Tizen.NUI/src/public/WindowEvent.cs @@ -0,0 +1,893 @@ +/* + * Copyright(c) 2019 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. + * + */ + +using System; +using System.ComponentModel; +using System.Runtime.InteropServices; +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI +{ + /// + /// The window class is used internally for drawing.
+ /// The window has an orientation and indicator properties.
+ ///
+ /// 3 + public partial class Window + { + private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback; + private RootLayerTouchDataCallbackType _rootLayerTouchDataCallback; + private WheelEventCallbackType _wheelEventCallback; + private EventCallbackDelegateType1 _stageKeyCallbackDelegate; + private EventCallbackDelegateType0 _stageEventProcessingFinishedEventCallbackDelegate; + private EventHandler _stageContextLostEventHandler; + private EventCallbackDelegateType0 _stageContextLostEventCallbackDelegate; + private EventHandler _stageContextRegainedEventHandler; + private EventCallbackDelegateType0 _stageContextRegainedEventCallbackDelegate; + private EventHandler _stageSceneCreatedEventHandler; + private EventCallbackDelegateType0 _stageSceneCreatedEventCallbackDelegate; + private WindowResizedEventCallbackType _windowResizedEventCallback; + private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2; + private TransitionEffectEventCallbackType transitionEffectEventCallback; + private WindowTransitionEffectSignal transitionEffectSignal; + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void WindowFocusChangedEventCallbackType(bool focusGained); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool RootLayerTouchDataCallbackType(IntPtr view, IntPtr touchData); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void WindowResizedEventCallbackType(IntPtr windowSize); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void WindowFocusChangedEventCallbackType2(bool focusGained); + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void TransitionEffectEventCallbackType(IntPtr window, int state, int type); + + /// + /// FocusChanged event. + /// + /// 3 + public event EventHandler FocusChanged + { + add + { + if (_windowFocusChangedEventHandler == null) + { + _windowFocusChangedEventCallback = OnWindowFocusedChanged; + WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback); + } + + _windowFocusChangedEventHandler += value; + } + remove + { + _windowFocusChangedEventHandler -= value; + + if (_windowFocusChangedEventHandler == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback != null) + { + WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback); + } + } + } + + /// + /// This event is emitted when the screen is touched and when the touch ends.
+ /// If there are multiple touch points, then this will be emitted when the first touch occurs and + /// then when the last finger is lifted.
+ /// An interrupted event will also be emitted (if it occurs).
+ ///
+ /// 3 + public event EventHandler TouchEvent + { + add + { + if (_rootLayerTouchDataEventHandler == null) + { + _rootLayerTouchDataCallback = OnWindowTouch; + this.TouchDataSignal().Connect(_rootLayerTouchDataCallback); + } + _rootLayerTouchDataEventHandler += value; + } + remove + { + _rootLayerTouchDataEventHandler -= value; + if (_rootLayerTouchDataEventHandler == null && TouchSignal().Empty() == false) + { + this.TouchDataSignal().Disconnect(_rootLayerTouchDataCallback); + } + } + } + + /// + /// This event is emitted when the wheel event is received. + /// + /// 3 + public event EventHandler WheelEvent + { + add + { + if (_stageWheelHandler == null) + { + _wheelEventCallback = OnStageWheel; + this.StageWheelEventSignal().Connect(_wheelEventCallback); + } + _stageWheelHandler += value; + } + remove + { + _stageWheelHandler -= value; + if (_stageWheelHandler == null && StageWheelEventSignal().Empty() == false) + { + this.StageWheelEventSignal().Disconnect(_wheelEventCallback); + } + } + } + + /// + /// This event is emitted when the key event is received. + /// + /// 3 + public event EventHandler KeyEvent + { + add + { + if (_stageKeyHandler == null) + { + _stageKeyCallbackDelegate = OnStageKey; + KeyEventSignal().Connect(_stageKeyCallbackDelegate); + } + _stageKeyHandler += value; + } + remove + { + _stageKeyHandler -= value; + if (_stageKeyHandler == null && KeyEventSignal().Empty() == false) + { + KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); + } + } + } + + /// + /// This event is emitted when the window resized. + /// + /// 3 + public event EventHandler Resized + { + add + { + if (_windowResizedEventHandler == null) + { + _windowResizedEventCallback = OnResized; + ResizedSignal().Connect(_windowResizedEventCallback); + } + + _windowResizedEventHandler += value; + } + remove + { + _windowResizedEventHandler -= value; + + if (_windowResizedEventHandler == null && ResizedSignal().Empty() == false && _windowResizedEventCallback != null) + { + ResizedSignal().Disconnect(_windowResizedEventCallback); + } + } + } + + /// + /// Please do not use! this will be deprecated. Please use 'FocusChanged' event instead. + /// + /// 3 + /// Please do not use! this will be deprecated! + /// Instead please use FocusChanged. + [Obsolete("Please do not use! This will be deprecated! Please use FocusChanged instead! " + + "Like: " + + "Window.Instance.FocusChanged = OnFocusChanged; " + + "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")] + [EditorBrowsable(EditorBrowsableState.Never)] + public event EventHandler WindowFocusChanged + { + add + { + if (_windowFocusChangedEventHandler2 == null) + { + _windowFocusChangedEventCallback2 = OnWindowFocusedChanged2; + WindowFocusChangedSignal().Connect(_windowFocusChangedEventCallback2); + } + + _windowFocusChangedEventHandler2 += value; + } + remove + { + _windowFocusChangedEventHandler2 -= value; + + if (_windowFocusChangedEventHandler2 == null && WindowFocusChangedSignal().Empty() == false && _windowFocusChangedEventCallback2 != null) + { + WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); + } + } + } + + /// + /// EffectStart + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public event EventHandler TransitionEffect + { + add + { + if (transitionEffectHandler == null) + { + transitionEffectEventCallback = OnTransitionEffect; + TransitionEffectEventSignal().Connect(transitionEffectEventCallback); + } + transitionEffectHandler += value; + } + remove + { + transitionEffectHandler -= value; + if (transitionEffectHandler == null && TransitionEffectEventSignal().Empty() == false) + { + TransitionEffectEventSignal().Disconnect(transitionEffectEventCallback); + } + } + } + + /// + /// ViewAdded will be triggered when the view added on Window + /// + /// 6 + /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public event EventHandler ViewAdded; + private event EventHandler _windowFocusChangedEventHandler; + private event EventHandler _rootLayerTouchDataEventHandler; + private event EventHandler _stageWheelHandler; + private event EventHandler _stageKeyHandler; + private event EventHandler _stageEventProcessingFinishedEventHandler; + private event EventHandler _windowResizedEventHandler; + private event EventHandler _windowFocusChangedEventHandler2; + private event EventHandler transitionEffectHandler; + + internal void SendViewAdded(View view) + { + ViewAdded?.Invoke(view, EventArgs.Empty); + } + + internal event EventHandler EventProcessingFinished + { + add + { + if (_stageEventProcessingFinishedEventHandler == null) + { + _stageEventProcessingFinishedEventCallbackDelegate = OnEventProcessingFinished; + EventProcessingFinishedSignal().Connect(_stageEventProcessingFinishedEventCallbackDelegate); + } + _stageEventProcessingFinishedEventHandler += value; + + } + remove + { + _stageEventProcessingFinishedEventHandler -= value; + if (_stageEventProcessingFinishedEventHandler == null && EventProcessingFinishedSignal().Empty() == false) + { + EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate); + } + } + } + + internal event EventHandler ContextLost + { + add + { + if (_stageContextLostEventHandler == null) + { + _stageContextLostEventCallbackDelegate = OnContextLost; + ContextLostSignal().Connect(_stageContextLostEventCallbackDelegate); + } + _stageContextLostEventHandler += value; + } + remove + { + _stageContextLostEventHandler -= value; + if (_stageContextLostEventHandler == null && ContextLostSignal().Empty() == false) + { + ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate); + } + } + } + + internal event EventHandler ContextRegained + { + add + { + if (_stageContextRegainedEventHandler == null) + { + _stageContextRegainedEventCallbackDelegate = OnContextRegained; + ContextRegainedSignal().Connect(_stageContextRegainedEventCallbackDelegate); + } + _stageContextRegainedEventHandler += value; + } + remove + { + _stageContextRegainedEventHandler -= value; + if (_stageContextRegainedEventHandler == null && ContextRegainedSignal().Empty() == false) + { + this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate); + } + } + } + + internal event EventHandler SceneCreated + { + add + { + if (_stageSceneCreatedEventHandler == null) + { + _stageSceneCreatedEventCallbackDelegate = OnSceneCreated; + SceneCreatedSignal().Connect(_stageSceneCreatedEventCallbackDelegate); + } + _stageSceneCreatedEventHandler += value; + } + remove + { + _stageSceneCreatedEventHandler -= value; + if (_stageSceneCreatedEventHandler == null && SceneCreatedSignal().Empty() == false) + { + SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate); + } + } + } + + internal WindowFocusSignalType WindowFocusChangedSignal() + { + WindowFocusSignalType ret = new WindowFocusSignalType(Interop.Window.FocusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal WindowFocusSignalType FocusChangedSignal() + { + WindowFocusSignalType ret = new WindowFocusSignalType(Interop.Window.FocusChangedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal KeyEventSignal KeyEventSignal() + { + KeyEventSignal ret = new KeyEventSignal(Interop.Window.KeyEventSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal EventProcessingFinishedSignal() + { + VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_EventProcessingFinishedSignal(stageCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal TouchSignal TouchSignal() + { + TouchSignal ret = new TouchSignal(Interop.Window.TouchSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal TouchDataSignal TouchDataSignal() + { + TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(Layer.getCPtr(GetRootLayer())), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal ContextLostSignal() + { + VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_ContextLostSignal(stageCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal ContextRegainedSignal() + { + VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_ContextRegainedSignal(stageCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal VoidSignal SceneCreatedSignal() + { + VoidSignal ret = new VoidSignal(Interop.StageSignal.Stage_SceneCreatedSignal(stageCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal ResizedSignal ResizedSignal() + { + ResizedSignal ret = new ResizedSignal(Interop.Window.Window_ResizedSignal(swigCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal System.IntPtr GetNativeWindowHandler() + { + System.IntPtr ret = Interop.Window.GetNativeWindowHandler(HandleRef.ToIntPtr(this.swigCPtr)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Disconnect all native signals + /// + /// 5 + internal void DisconnectNativeSignals() + { + if (_windowFocusChangedEventCallback != null) + { + WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback); + } + + if (_rootLayerTouchDataCallback != null) + { + TouchDataSignal().Disconnect(_rootLayerTouchDataCallback); + } + + if (_wheelEventCallback != null) + { + StageWheelEventSignal().Disconnect(_wheelEventCallback); + } + + if (_stageKeyCallbackDelegate != null) + { + KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); + } + + if (_stageEventProcessingFinishedEventCallbackDelegate != null) + { + EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate); + } + + if (_stageContextLostEventCallbackDelegate != null) + { + ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate); + } + + if (_stageContextRegainedEventCallbackDelegate != null) + { + ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate); + } + + if (_stageSceneCreatedEventCallbackDelegate != null) + { + SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate); + } + + if (_windowResizedEventCallback != null) + { + ResizedSignal().Disconnect(_windowResizedEventCallback); + } + + if (_windowFocusChangedEventCallback2 != null) + { + WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); + } + + if (transitionEffectSignal != null) + { + TransitionEffectEventSignal().Disconnect(transitionEffectEventCallback); + } + } + + private StageWheelSignal WheelEventSignal() + { + StageWheelSignal ret = new StageWheelSignal(Interop.StageSignal.Stage_WheelEventSignal(stageCPtr), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private WheelSignal StageWheelEventSignal() + { + WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(Layer.getCPtr(this.GetRootLayer())), false); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + private WindowTransitionEffectSignal TransitionEffectEventSignal() + { + //Tizen.Log.Fatal("NUITEST", "TransitionEffectEventSignal()!"); + if (transitionEffectSignal == null) + { + transitionEffectSignal = new WindowTransitionEffectSignal(this); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + //Tizen.Log.Fatal("NUITEST", $"transitionEffectSignal is null, new here!"); + } + return transitionEffectSignal; + } + + private void OnWindowFocusedChanged(bool focusGained) + { + FocusChangedEventArgs e = new FocusChangedEventArgs(); + + e.FocusGained = focusGained; + + if (_windowFocusChangedEventHandler != null) + { + _windowFocusChangedEventHandler(this, e); + } + } + + private bool OnWindowTouch(IntPtr view, IntPtr touchData) + { + if (touchData == global::System.IntPtr.Zero) + { + NUILog.Error("touchData should not be null!"); + return false; + } + + TouchEventArgs e = new TouchEventArgs(); + + e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData); + + if (_rootLayerTouchDataEventHandler != null) + { + _rootLayerTouchDataEventHandler(this, e); + } + return false; + } + + private bool OnStageWheel(IntPtr rootLayer, IntPtr wheelEvent) + { + if (wheelEvent == global::System.IntPtr.Zero) + { + NUILog.Error("wheelEvent should not be null!"); + return true; + } + + WheelEventArgs e = new WheelEventArgs(); + + e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent); + + if (_stageWheelHandler != null) + { + _stageWheelHandler(this, e); + } + return true; + } + + // Callback for Stage KeyEventsignal + private void OnStageKey(IntPtr data) + { + KeyEventArgs e = new KeyEventArgs(); + e.Key = Tizen.NUI.Key.GetKeyFromPtr(data); + + + if (_stageKeyHandler != null) + { + //here we send all data to user event handlers + _stageKeyHandler(this, e); + } + } + + // Callback for Stage EventProcessingFinishedSignal + private void OnEventProcessingFinished() + { + if (_stageEventProcessingFinishedEventHandler != null) + { + _stageEventProcessingFinishedEventHandler(this, null); + } + } + + // Callback for Stage ContextLostSignal + private void OnContextLost() + { + if (_stageContextLostEventHandler != null) + { + _stageContextLostEventHandler(this, null); + } + } + + // Callback for Stage ContextRegainedSignal + private void OnContextRegained() + { + if (_stageContextRegainedEventHandler != null) + { + _stageContextRegainedEventHandler(this, null); + } + } + + // Callback for Stage SceneCreatedSignal + private void OnSceneCreated() + { + if (_stageSceneCreatedEventHandler != null) + { + _stageSceneCreatedEventHandler(this, null); + } + } + + private void OnResized(IntPtr windowSize) + { + ResizedEventArgs e = new ResizedEventArgs(); + var val = new Uint16Pair(windowSize, false); + e.WindowSize = new Size2D(val.GetWidth(), val.GetHeight()); + val.Dispose(); + + if (_windowResizedEventHandler != null) + { + _windowResizedEventHandler(this, e); + } + } + + private void OnWindowFocusedChanged2(bool focusGained) + { + FocusChangedEventArgs e = new FocusChangedEventArgs(); + + e.FocusGained = focusGained; + + if (_windowFocusChangedEventHandler2 != null) + { + _windowFocusChangedEventHandler2(this, e); + } + } + + private void OnTransitionEffect(IntPtr window, int state, int type) + { + //Tizen.Log.Fatal("NUITEST", $"OnTransitionEffect() called"); + if (window == global::System.IntPtr.Zero) + { + //Tizen.Log.Error("NUI", $"OnTransitionEffect() IntPtr window is null!"); + return; + } + + TransitionEffectArgs e = new TransitionEffectArgs(); + + e.State = (EffectStates)state; + //Tizen.Log.Error("NUITEST", $"e.State={e.State}"); + + e.Type = (EffectTypes)type; + //Tizen.Log.Error("NUITEST", $"e.Type={e.Type}"); + + if (transitionEffectHandler != null) + { + //Tizen.Log.Fatal("NUITEST", $"Execute transitionEffectHandler(this, e)!!!"); + transitionEffectHandler(this, e); + } + return; + } + + /// + /// The focus changed event argument. + /// + /// 3 + public class FocusChangedEventArgs : EventArgs + { + /// + /// FocusGained flag. + /// + /// 3 + public bool FocusGained + { + get; + set; + } + } + + /// + /// The touch event argument. + /// + /// 3 + public class TouchEventArgs : EventArgs + { + private Touch _touch; + + /// + /// Touch. + /// + /// 3 + public Touch Touch + { + get + { + return _touch; + } + set + { + _touch = value; + } + } + } + + /// + /// Wheel event arguments. + /// + /// 3 + public class WheelEventArgs : EventArgs + { + private Wheel _wheel; + + /// + /// Wheel. + /// + /// 3 + public Wheel Wheel + { + get + { + return _wheel; + } + set + { + _wheel = value; + } + } + } + + /// + /// Key event arguments. + /// + /// 3 + public class KeyEventArgs : EventArgs + { + private Key _key; + + /// + /// Key. + /// + /// 3 + public Key Key + { + get + { + return _key; + } + set + { + _key = value; + } + } + } + + /// + /// Feeds a key event into the window. + /// This resized event arguments. + /// + /// 3 + public class ResizedEventArgs : EventArgs + { + Size2D _windowSize; + + /// + /// This window size. + /// + /// 4 + public Size2D WindowSize + { + get + { + return _windowSize; + } + set + { + _windowSize = value; + } + } + } + + /// + /// Please do not use! this will be deprecated + /// + /// 3 + [Obsolete("Please do not use! This will be deprecated! Please use FocusChangedEventArgs instead! " + + "Like: " + + "Window.Instance.FocusChanged = OnFocusChanged; " + + "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")] + [EditorBrowsable(EditorBrowsableState.Never)] + public class WindowFocusChangedEventArgs : EventArgs + { + /// + /// Please do not use! this will be deprecated + /// + /// 3 + public bool FocusGained + { + get; + set; + } + } + + /// + /// Contains and encapsulates Native Window handle. + /// + /// 4 + public class SafeNativeWindowHandle : SafeHandle + { + /// + /// Contructor, Native window handle is set to handle. + /// + /// 4 + public SafeNativeWindowHandle() : base(IntPtr.Zero, false) + { + SetHandle(Tizen.NUI.Window.Instance.GetNativeWindowHandler()); + } + /// + /// Null check if the handle is valid or not. + /// + /// 4 + public override bool IsInvalid + { + get + { + return this.handle == IntPtr.Zero; + } + } + /// + /// Release handle itself. + /// + /// true when released successfully. + /// 4 + protected override bool ReleaseHandle() + { + return true; + } + } + + /// + /// TransitionEffectArgs + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public class TransitionEffectArgs : EventArgs + { + private EffectStates state; + private EffectTypes type; + + /// + /// State + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public EffectStates State + { + get + { + return state; + } + set + { + state = value; + } + } + /// + /// Type + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public EffectTypes Type + { + get + { + return type; + } + set + { + type = value; + } + } + } + } +}