2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/integration-api/processor-interface.h>
25 * @brief Implements a Integration::Processor interface so can be registered with dali-core as
26 * a Processor. Enables the setting of a callback so dali-core can execute this callback when
29 class LayoutController : public Dali::Integration::Processor
33 // Function pointer matching delegate in C# LayoutController
34 using LayoutControllerProcessCallback = void (SWIGSTDCALL*)(int);
38 * @brief Constructor - creates a LayoutController and registers it with dali-core.
44 * @brief Destructor - Unregisters itself from dali-core.
49 * @brief Gets the id of the LayoutController that was initialised during construction.
50 * @return the id of the LayoutController.
51 * @note Useful for debugging when multiple LayoutControllers are registered with dali-core.
56 * @copydoc Dali::Integration::Processor::Process()
58 void Process() override;
61 * @brief Set the callback to be executed when dali-core calls the overriden Process() api.
62 * @param[in] callback, function to be called
64 void SetCallback( LayoutControllerProcessCallback callback );
68 LayoutControllerProcessCallback handler;