Optimization to reduce Handle size by 50%
[platform/core/uifw/dali-toolkit.git] / capi / dali-toolkit / public-api / controls / control.h
index 26baa51..36e4635 100644 (file)
@@ -1,21 +1,22 @@
 #ifndef __DALI_TOOLKIT_CONTROL_H__
 #define __DALI_TOOLKIT_CONTROL_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
+/*
+ * Copyright (c) 2014 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.
+ *
+ */
 
 /**
  * @addtogroup CAPI_DALI_TOOLKIT_CONTROLS_MODULE
@@ -33,15 +34,18 @@ namespace Toolkit
 
 //Forward declarations.
 
-class ControlImpl;
+namespace Internal
+{
+class Control;
+}
 
 /**
  * @brief Control is the base class for all controls.
  *
- * The implementation of the control must be supplied; see ControlImpl for more details.
- * @see ControlImpl
+ * The implementation of the control must be supplied; see Internal::Control for more details.
+ * @see Internal::Control
  */
-class Control : public CustomActor, public ConnectionTrackerInterface
+class Control : public CustomActor
 {
 public:
 
@@ -130,11 +134,11 @@ public: // Creation & Destruction
   Control(const Control& uiControl);
 
   /**
-   * @brief Virtual destructor.
+   * @brief Dali::Control is intended as a base class
    *
-   * Dali::Object derived classes do not contain member data.
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
    */
-  virtual ~Control();
+  ~Control();
 
 public: // operators
 
@@ -165,14 +169,14 @@ public:
    *
    * @return The implementation.
    */
-  ControlImpl& GetImplementation();
+  Internal::Control& GetImplementation();
 
   /**
    * @brief Retrieve the Control implementation.
    *
    * @return The implementation.
    */
-  const ControlImpl& GetImplementation() const;
+  const Internal::Control& GetImplementation() const;
 
   // Size Negotiation
 
@@ -368,23 +372,6 @@ public:
    */
   KeyEventSignalV2& KeyEventSignal();
 
-protected:
-
-  /**
-   * @copydoc ConnectionTrackerInterface::SignalConnected
-   */
-  virtual void SignalConnected( SlotObserver* slotObserver, CallbackBase* callback );
-
-  /**
-   * @copydoc ConnectionTrackerInterface::SignalDisconnected
-   */
-  virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback );
-
-  /**
-   * @copydoc ConnectionTrackerInterface::GetConnectionCount
-   */
-  virtual std::size_t GetConnectionCount() const;
-
 public: // Not intended for application developers
 
   /**
@@ -393,7 +380,7 @@ public: // Not intended for application developers
    * @param[in] implementation The implementation for this control.
    * @return A handle to a newly allocated Dali resource.
    */
-  Control(ControlImpl& implementation);
+  Control(Internal::Control& implementation);
 
   /**
    * @brief This constructor is used by CustomActor within Dali core to create additional Control handles