Control::UnregisterVisual does not remove renderers from actor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / video-view / video-view.cpp
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
18 // CLASS HEADER
19 #include <dali-toolkit/public-api/controls/video-view/video-view.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/property-map.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/internal/controls/video-view/video-view-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 VideoView::VideoView()
34 {
35 }
36
37 VideoView::VideoView( const VideoView& videoView )
38 : Control( videoView )
39 {
40 }
41
42 VideoView& VideoView::operator=( const VideoView& videoView )
43 {
44   if( &videoView != this )
45   {
46     Control::operator=( videoView );
47   }
48
49   return *this;
50 }
51
52 VideoView::~VideoView()
53 {
54 }
55
56 VideoView VideoView::New()
57 {
58   return Internal::VideoView::New();
59 }
60
61 VideoView VideoView::New( const std::string& url )
62 {
63   VideoView videoView = Internal::VideoView::New();
64   Dali::Toolkit::GetImpl( videoView ).SetUrl( url );
65   return videoView;
66 }
67
68 VideoView VideoView::DownCast( BaseHandle handle )
69 {
70   return Control::DownCast< VideoView, Internal::VideoView >( handle );
71 }
72
73 void VideoView::Play()
74 {
75   Dali::Toolkit::GetImpl( *this ).Play();
76 }
77
78 void VideoView::Pause()
79 {
80   Dali::Toolkit::GetImpl( *this ).Pause();
81 }
82
83 void VideoView::Stop()
84 {
85   Dali::Toolkit::GetImpl( *this ).Stop();
86 }
87
88 void VideoView::Forward( int millisecond )
89 {
90   Dali::Toolkit::GetImpl( *this ).Forward( millisecond );
91 }
92
93 void VideoView::Backward( int millisecond )
94 {
95   Dali::Toolkit::GetImpl( *this ).Backward( millisecond );
96 }
97
98 VideoView::VideoViewSignalType& VideoView::FinishedSignal()
99 {
100   return Dali::Toolkit::GetImpl( *this ).FinishedSignal();
101 }
102
103 VideoView::VideoView( Internal::VideoView& implementation )
104 : Control( implementation )
105 {
106 }
107
108 VideoView::VideoView( Dali::Internal::CustomActor* internal )
109 : Control( internal )
110 {
111   VerifyCustomActorPointer< Internal::VideoView >( internal );
112 }
113
114 } // namespace Toolkit
115
116 } // namespace Dali