summaryrefslogtreecommitdiff
path: root/main/src/util/ivug-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/util/ivug-widget.c')
-rwxr-xr-xmain/src/util/ivug-widget.c209
1 files changed, 0 insertions, 209 deletions
diff --git a/main/src/util/ivug-widget.c b/main/src/util/ivug-widget.c
deleted file mode 100755
index fd43992..0000000
--- a/main/src/util/ivug-widget.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright 2012 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://www.tizenopensource.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.
- */
-
-
-#include "ivug-common.h"
-#include "ivug-widget.h"
-#include <ui-gadget-module.h>
-
-#include <Elementary.h>
-
-static void _on_obj_deleted(void * data, Evas * e, Evas_Object * obj, void * event_info)
-{
- char *szMsg = (char *)data;
- IV_ASSERT(szMsg != NULL);
-
- MSG_MAIN_HIGH("On Object deleted. %s", szMsg);
-
- free(szMsg);
-}
-
-void ivug_on_obj_deleted(Evas_Object* obj, char *msg, const char *func, int line)
-{
- static char buf[1024];
-
- sprintf(buf, "%s(L%d):%s", func, line, msg);
-
- evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _on_obj_deleted, strdup(buf));
-}
-
-Evas_Object* ivug_bg_add(Evas_Object* parent, int r, int g, int b)
-{
- IV_ASSERT(parent != NULL);
-
- Evas_Object *bg = elm_bg_add(parent);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
-// elm_win_resize_object_add(parent, bg);
-
- elm_bg_color_set(bg, r, g, b);
-
- evas_object_show(bg);
-
- return bg;
-}
-
-Evas_Object *
-ivug_layout_add(Evas_Object *win, const char *edj, const char *group)
-{
- IV_ASSERT(win != NULL);
-
- Evas_Object *layout;
-
- layout = elm_layout_add(win);
-
- if ( layout == NULL )
- {
- MSG_SETAS_ERROR("Cannot create layout");
- return NULL;
- }
-
- if (elm_layout_file_set(layout, edj, group) == EINA_FALSE)
- {
- MSG_SETAS_ERROR("edj loading fail, filepath=%s Group=%s", edj, group);
- evas_object_del(layout);
- return NULL;
- }
-
- evas_object_size_hint_expand_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
-#ifdef USE_WIN_AS_PARENT
- elm_win_resize_object_add( ug_get_window(), layout);
-#else
- Evas_Coord x, y, w, h;
- evas_object_geometry_get(win, &x, &y, &w, &h);
-
- evas_object_move(layout, x, y);
- evas_object_resize(layout, w, h);
-#endif
-
- evas_object_show(layout);
- return layout;
-}
-
-Evas_Object*
-ivug_default_layout_add( Evas_Object *win)
-{
- IV_ASSERT(win != NULL);
-
- Evas_Object *layout;
- layout = elm_layout_add(win);
-
- if ( layout == NULL )
- {
- MSG_SETAS_ERROR("Cannot create layout");
- return NULL;
- }
-
- if ( elm_layout_theme_set( layout, "layout", "application", "default") == EINA_FALSE)
- {
- MSG_SETAS_ERROR("theme set fail, layout/application/defaulty");
- evas_object_del(layout);
- return NULL;
- }
-
- evas_object_size_hint_expand_set( layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_fill_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL );
-
-#ifdef USE_WIN_AS_PARENT
- elm_win_resize_object_add( ug_get_window(), layout);
-#else
- Evas_Coord x, y, w, h;
- evas_object_geometry_get(parent, &x, &y, &w, &h);
-
- evas_object_move(layout, x, y);
- evas_object_resize(layout, w, h);
-#endif
-
- evas_object_show(layout);
- return layout;
-}
-
-
-Evas_Object *ivug_button_add(Evas_Object *parent, char *style, char *caption, Evas_Object *icon, OnClickCB pFunc, const void * data )
-{
- IV_ASSERT(parent != NULL);
-
- Evas_Object *btn;
-
- btn = elm_button_add(parent);
- if ( btn == NULL )
- {
- return NULL;
- }
-
- if ( style )
- elm_object_style_set(btn, style);
-
- if ( caption )
- elm_object_text_set(btn, caption);
-
- if ( icon )
- elm_object_part_content_set(btn, "icon", icon);
-
- elm_object_focus_allow_set(btn, EINA_FALSE);
- evas_object_propagate_events_set(btn, EINA_FALSE);
-
- evas_object_smart_callback_add(btn, "clicked", pFunc, (void*)data);
-
- return btn;
-}
-
-Evas_Object *ivug_icon_add(Evas_Object *parent, char *edjname, char *groupname)
-{
- Evas_Object *icon;
-
- icon = elm_icon_add(parent);
-
- if ( elm_icon_file_set(icon, edjname, groupname) == EINA_FALSE)
- {
- MSG_IVUG_ERROR("Cannot file set. EDJ=%s Group=%s", edjname, groupname);
- evas_object_del(icon);
- return NULL;
- }
-
- evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
- elm_icon_resizable_set(icon, EINA_TRUE, EINA_TRUE);
- evas_object_size_hint_expand_set(icon, 1, 1);
-
- return icon;
-}
-
-Evas_Object *ivug_controlbar_add(Evas_Object *parent, const char *style)
-{
- Evas_Object *toolbar = elm_toolbar_add(parent);
- if (!toolbar)
- {
- MSG_MAIN_ERROR("create tool bar failed");
- return NULL;
- }
- elm_toolbar_shrink_mode_set(toolbar, ELM_TOOLBAR_SHRINK_EXPAND);
- elm_object_style_set(toolbar, style);
-
- return toolbar;
-}
-
-
-
-void
-ivug_object_del(Evas_Object *obj)
-{
- evas_object_del(obj);
-}
-
-