2 * Copyright (c) 2018 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/devel-api/adaptor-framework/application-devel.h>
20 #include <dali/internal/adaptor/common/application-impl.h>
25 namespace DevelApplication
28 void PreInitialize( int* argc, char** argv[] )
30 Internal::Adaptor::Application::PreInitialize( argc, argv );
33 bool AddIdleWithReturnValue( Application application, CallbackBase* callback )
35 return Internal::Adaptor::GetImplementation( application ).AddIdle( callback, true );
38 Dali::Window CreateWindow( Application application, PositionSize childPosSize, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
40 auto& adaptor = Internal::Adaptor::GetImplementation( application ).GetAdaptor();
42 Dali::Window childWindow = Dali::Window::New( childPosSize, childWindowName, childWindowClassName, childWindowMode );
43 Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( &childWindow, childWindowName, childWindowClassName, childWindowMode );
47 bool DestroyWindow( Application application, Dali::Window* childWindow )
49 auto& adaptor = Internal::Adaptor::GetImplementation( application ).GetAdaptor();
51 return Internal::Adaptor::Adaptor::GetImplementation( adaptor ).RemoveWindow( childWindow );
54 bool DestroyWindow( Application application, const std::string& childWindowName )
56 auto& adaptor = Internal::Adaptor::GetImplementation( application ).GetAdaptor();
58 return Internal::Adaptor::Adaptor::GetImplementation( adaptor ).RemoveWindow( childWindowName );
61 } // namespace DevelApplication