1 #ifndef __DALI_INTERNAL_IMAGE_CONNECTOR_H__
2 #define __DALI_INTERNAL_IMAGE_CONNECTOR_H__
5 * Copyright (c) 2014 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.
25 #include <dali/internal/event/images/image-impl.h>
34 * Wrapper class which helps managing intrusive pointer assignments and Connect / Disconnect.
41 * Constructor. Takes no parameters.
51 * Returns a smart pointer to the image
52 * @return a smart pointer to the image
57 * Assigns image, calling Connect and Disconnect methods accordingly, taking onStage into account.
58 * @param [in] image smart pointer to new Image
59 * @param [in] onStage whether Image is used on stage or not
61 void Set( ImagePtr image, bool onStage );
64 * Manages connection reference count.
65 * Must be called from owner when connected to stage.
67 void OnStageConnect();
70 * Manages connection reference count.
71 * Must be called from owner when disconnecting from stage.
73 void OnStageDisconnect();
77 ImageConnector( const ImageConnector& ptr ); ///< copy constructor, not defined
78 const ImageConnector& operator=( const ImageConnector& ptr ); ///< copy assignment operator, not defined
80 ImagePtr mImage; ///< intrusive pointer to the Image. ImageConnector owns this.
84 } // namespace Internal
88 #endif // __DALI_INTERNAL_IMAGE_CONNECTOR_H__