4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
24 #ifndef __APPCORE_ELF_H__
25 #define __APPCORE_ELF_H__
30 * @brief This file contains APIs of the Appcore EFL library
34 * @addtogroup APPLICATION_FRAMEWORK
37 * @defgroup Appcore_EFL Appcore EFL
39 * @brief A base library for EFL application based on Appcore
44 * @addtogroup Appcore_EFL
49 #include <appcore-common.h>
55 int appcore_efl_init(const char *name, int *argc, char ***argv,
56 struct appcore_ops *ops);
58 void appcore_efl_fini(void);
63 * This is a main function for EFL application on SLP platform. \n
64 * Refer to programming guide for the details.
67 * To develop an application using EFL on this platform.
69 * @par Method of function operation:
70 * Initialize the EFL, internationalization, and notifications
71 * for receiving system events such as rotation, low battery, etc.\n
72 * And, start an ecore mainloop.
74 * @param[in] name Application name
75 * @param[in] argc A count of the arguments
76 * @param[in] argv An array of pointers to the strings which are those arguments
77 * @param[in] ops Appcore operations
79 * @return 0 on success, -1 on error (<I>errno</I> set)
82 * EALREADY - mainloop already started \n
83 * EINVAL - one of parameters is NULL \n
84 * ECANCELED - create() callback returns error (none zero value) \n
86 * @par Corner cases/exceptions:
87 * If <I>ops</I> has no callback function, this function just starts a mainloop.
89 * @par Known issues/bugs:
90 * If <I>errno</I> set another value, check the <I>dlog</I> message.
91 * This doesn't care internal <I>errno</I> set.
100 #include <appcore-efl.h>
102 static int _create(void *);
103 static int _reset(bundle *, void *);
105 int main(int argc, char *argv[])
109 struct appcore_ops ops = {
117 r = appcore_efl_main(name, &argc, &argv, &ops);
119 // add exception handling
120 perror("Appcore EFL main");
126 int appcore_efl_main(const char *name, int *argc, char ***argv,
127 struct appcore_ops *ops);
131 * This API sets system resource reclaiming.
134 * When this is not enabled, the application doesn't reclaim system resource.
136 * @param[in] enable Application name
138 * @return 0 on success, -1 on error (<I>errno</I> set)
148 #include <appcore-efl.h>
150 int _create(void *data)
155 r = appcore_set_system_resource_reclaiming(FALSE);
157 // add exception handling
158 perror("appcore_set_system_resource_reclaiming");
165 int appcore_set_system_resource_reclaiming(bool enable);
176 #endif /* __APPCORE_ELF_H__ */