1 #ifndef __DALI_PEPPER_INTERNAL_OBJECT_VIEW_H__
2 #define __DALI_PEPPER_INTERNAL_OBJECT_VIEW_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <pepper-dali/public-api/object-view/object-view.h>
25 #include <dali/public-api/images/buffer-image.h>
26 #include <dali-toolkit/public-api/controls/control-impl.h>
27 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
39 class ObjectView : public Toolkit::Internal::Control
44 * @copydoc Dali::Pepper::ObjectView::New
46 static Dali::Pepper::ObjectView New();
49 * @copydoc Dali::Pepper::ObjectView::SetImage
51 void SetImage( Image image );
54 * @copydoc Dali::Pepper::ObjectView::GetPid
59 * @copydoc Dali::Pepper::ObjectView::GetTitle
61 std::string GetTitle() const;
64 * @copydoc Dali::Pepper::ObjectView::GetAppId
66 std::string GetAppId() const;
69 * @copydoc Dali::Pepper::ObjectView::CancelTouchEvent
71 bool CancelTouchEvent();
76 void SetSurface( pepper_surface_t* surface );
79 * Set pepper input modules
81 void SetInput( pepper_pointer_t* pointer, pepper_keyboard_t* keyboard, pepper_touch_t* touch );
86 * Construct a new ObjectView.
91 * A reference counted object may only be deleted by calling Unreference()
93 virtual ~ObjectView();
95 private: // From Control
98 * @copydoc Dali::Toolkit::Control::OnInitialize()
100 virtual void OnInitialize();
102 private: // From CustomActorImpl
105 * @copydoc Dali::CustomActorImpl::OnTouchEvent( const TouchEvent& event )
107 virtual bool OnTouchEvent( const TouchEvent& event );
110 * @copydoc CustomActorImpl::OnSizeSet( const Vector3& targetSize )
112 virtual void OnSizeSet( const Vector3& targetSize );
117 ObjectView( const ObjectView& );
120 ObjectView& operator= ( const ObjectView& );
122 static void OnConfigureCallback( void* data, int width, int height );
126 Toolkit::ImageView mImageView;
127 BufferImage mBufferImage;
134 pepper_surface_t* mSurface;
135 pepper_pointer_t* mPointer;
136 pepper_keyboard_t* mKeyboard;
137 pepper_touch_t* mTouch;
140 } // namespace Internal
142 // Helpers for public-api forwarding methods
144 inline Pepper::Internal::ObjectView& GetImplementation( Pepper::ObjectView& objectView )
146 DALI_ASSERT_ALWAYS( objectView );
148 Dali::RefObject& handle = objectView.GetImplementation();
150 return static_cast<Internal::ObjectView&>( handle );
153 inline const Pepper::Internal::ObjectView& GetImplementation( const Pepper::ObjectView& objectView )
155 DALI_ASSERT_ALWAYS( objectView );
157 const Dali::RefObject& handle = objectView.GetImplementation();
159 return static_cast<const Internal::ObjectView&>( handle );
162 } // namespace Pepper
166 #endif // __DALI_PEPPER_INTERNAL_OBJECT_VIEW_H__