Release 4.0.0-preview1-00258
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia / MediaView / MediaView.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using ElmSharp;
19
20 namespace Tizen.Multimedia
21 {
22     /// <summary>
23     /// The MediaView class allows application developers to display the video output on the screen.
24     /// </summary>
25     /// <remarks>
26     /// This view should not be instantiated directly.\n
27     /// Use <see cref="Tizen.Xamarin.Forms.Extension.MediaView"/> to create the view.
28     /// </remarks>
29     /// <example>
30     /// <code>
31     /// Tizen.Xamarin.Forms.Extension.MediaView mediaView = ...
32     /// ...
33     /// var display = new Display((Tizen.Multimedia.MediaView)mediaView.NativeView);
34     /// </code>
35     /// </example>
36     public class MediaView : EvasObject
37     {
38         /// <summary>
39         /// This constructor is used by the infrastructure and is not intended to be used directly from application code.
40         /// </summary>
41         public MediaView(EvasObject parent) : base(parent)
42         {
43         }
44
45         protected override IntPtr CreateHandle(EvasObject parent)
46         {
47             IntPtr evas = Interop.EvasObject.evas_object_evas_get(parent);
48             return Interop.EvasObject.evas_object_image_add(evas);
49         }
50     }
51 }
52