2 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
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.
18 * @brief Set text to the part
19 * @param[in] parent Object has part to which you want to set text
20 * @param[in] part_name Part name to which you want to set the text
21 * @param[in] text Text you want to set to the part
23 void view_set_text(Evas_Object *parent, const char *part_name, const char *text)
26 dlog_print(DLOG_ERROR, LOG_TAG, "parent is NULL.");
30 /* Set text of target part object */
31 elm_object_part_text_set(parent, part_name, text);
35 * @brief Make a layout to target parent object with edje file
36 * @param[in] parent The object to which you want to add this layout
37 * @param[in] file_path File path of EDJ file will be used
38 * @param[in] group_name Name of group in EDJ you want to set to
39 * @param[in] user_data The user data to be passed to the callback functions
41 Evas_Object *view_create_layout(Evas_Object *parent, const char *file_path, const char *group_name, void *user_data)
43 Evas_Object *layout = NULL;
46 dlog_print(DLOG_ERROR, LOG_TAG, "parent is NULL.");
50 /* Create layout by EDC(edje file) */
51 layout = elm_layout_add(parent);
52 elm_layout_file_set(layout, file_path, group_name);
54 /* Layout size setting */
55 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
57 evas_object_show(layout);