Example #1
0
/* local subsystem functions */
static E_Layout_Item *
_e_layout_smart_adopt(E_Smart_Data *sd, Evas_Object *obj)
{
   E_Layout_Item *li;

   li = evas_object_data_get(obj, "e_layout_data");
   if (li) e_layout_unpack(obj);
   li = calloc(1, sizeof(E_Layout_Item));
   if (!li) return NULL;
   li->sd = sd;
   li->obj = obj;
   /* defaults */
   li->x = 0;
   li->y = 0;
   li->w = 0;
   li->h = 0;
   evas_object_clip_set(obj, sd->clip);
   evas_object_smart_member_add(obj, li->sd->obj);
   evas_object_data_set(obj, "e_layout_data", li);
   evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE,
				  _e_layout_smart_item_del_hook, NULL);
   if ((!evas_object_visible_get(sd->clip)) &&
       (evas_object_visible_get(sd->obj)))
     evas_object_show(sd->clip);
   return li;
}
Example #2
0
/* Updates the position of the cursor
 * It also updates automatically the text position and the selection */
static void
_e_editable_cursor_update(Evas_Object *editable)
{
   E_Editable_Smart_Data *sd;
   const Evas_Object *text_obj;
   Evas_Coord tx, ty;
   Evas_Coord cx, cy, ch;

   if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
     return;
   if (!(text_obj = edje_object_part_object_get(sd->text_object, "e.text.text")))
     return;

   evas_object_geometry_get(text_obj, &tx, &ty, NULL, NULL);
   _e_editable_char_geometry_get_from_pos(editable, sd->cursor_pos,
                                          &cx, &cy, NULL, &ch);

   evas_object_move(sd->cursor_object, tx + cx, ty + cy);
   evas_object_resize(sd->cursor_object, sd->cursor_width, ch);

   if (sd->cursor_visible && evas_object_visible_get(editable))
     {
        evas_object_show(sd->cursor_object);
        edje_object_signal_emit(sd->cursor_object, "e,action,show,cursor", "e");
     }

   _e_editable_selection_update(editable);
   _e_editable_text_position_update(editable, -1);
}
Example #3
0
static void
libclouseau_item_add(Evas_Object *o, Clouseau_Tree_Item *parent)
{
   Clouseau_Tree_Item *treeit;
   Eina_List *children;
   Evas_Object *child;

   treeit = calloc(1, sizeof(Clouseau_Tree_Item));
   if (!treeit) return ;

   treeit->ptr = (uintptr_t) o;
   treeit->is_obj = EINA_TRUE;

   treeit->name = eina_stringshare_add(evas_object_type_get(o));
   treeit->is_clipper = !!evas_object_clipees_get(o);
   treeit->is_visible = evas_object_visible_get(o);
   treeit->info = clouseau_object_information_get(treeit);

   parent->children = eina_list_append(parent->children, treeit);

   /* if (!evas_object_smart_data_get(o)) return ; */

   /* Do this only for smart object */
   children = evas_object_smart_members_get(o);
   EINA_LIST_FREE(children, child)
     libclouseau_item_add(child, treeit);
}
Example #4
0
EAPI void
e_icon_object_set(Evas_Object *obj, Evas_Object *o)
{
   E_Smart_Data *sd;
   const char *str;

   if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR();
   if (!(sd = evas_object_smart_data_get(obj))) return;
   str = evas_object_type_get(o);
   if ((!str) || strcmp(str, "image"))
     CRI(EINA_COLOR_RED"******************\ntrying to set an image object of type '%s'! this is not what you want!\n******************\n"EINA_COLOR_RESET, str);

   if (sd->timer) ecore_timer_del(sd->timer);
   sd->timer = NULL;
   if (sd->guessing_animation) ecore_timer_del(sd->guessing_animation);
   sd->guessing_animation = NULL;
   sd->frame = 0;
   sd->frame_count = 0;
   sd->edje = EINA_FALSE;

   /* smart code here */
   if (sd->obj) evas_object_del(sd->obj);
   sd->loading = 0;
   sd->obj = o;
   evas_object_smart_member_add(sd->obj, obj);
   if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
   _e_icon_smart_reconfigure(sd);
}
Example #5
0
EAPI Eina_Bool
e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
{
   E_Smart_Data *sd;

   if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
   if (!(sd = evas_object_smart_data_get(obj)))
     return EINA_FALSE;

   /* smart code here */
   if (sd->obj) evas_object_del(sd->obj);
   sd->loading = 0;
   if (sd->fdo)
     {
        eina_stringshare_del(sd->fdo);
        sd->fdo = NULL;
     }

   if (sd->timer) ecore_timer_del(sd->timer);
   sd->timer = NULL;
   if (sd->guessing_animation) ecore_timer_del(sd->guessing_animation);
   sd->guessing_animation = NULL;
   sd->frame = 0;
   sd->frame_count = 0;
   sd->edje = EINA_TRUE;

   sd->obj = edje_object_add(evas_object_evas_get(obj));
   edje_object_file_set(sd->obj, file, part);
   if (edje_object_load_error_get(sd->obj) != EDJE_LOAD_ERROR_NONE)
     return EINA_FALSE;
   if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
   evas_object_smart_member_add(sd->obj, obj);
   _e_icon_smart_reconfigure(sd);
   return EINA_TRUE;
}
Example #6
0
EAPI void
e_icon_edje_object_set(Evas_Object *obj, Evas_Object *edje)
{
   E_Smart_Data *sd;

   if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR();
   if (!(sd = evas_object_smart_data_get(obj))) return;

   /* smart code here */
   if (sd->obj) evas_object_del(sd->obj);
   sd->loading = 0;
   if (sd->fdo)
     {
        eina_stringshare_del(sd->fdo);
        sd->fdo = NULL;
     }

   if (sd->timer) ecore_timer_del(sd->timer);
   sd->timer = NULL;
   if (sd->guessing_animation) ecore_timer_del(sd->guessing_animation);
   sd->guessing_animation = NULL;
   sd->frame = 0;
   sd->frame_count = 0;
   sd->edje = EINA_TRUE;
   sd->obj = edje;

   if (evas_object_visible_get(obj)) evas_object_show(sd->obj);
   evas_object_smart_member_add(sd->obj, obj);
   _e_icon_smart_reconfigure(sd);
}
Example #7
0
File: agent.c Project: Limsik/e17
static void
_dialog_ok_cb(void *data, E_Dialog *dialog)
{
   E_Connman_Agent *agent = data;
   E_Connman_Agent_Input *input;
   Evas_Object *toolbook, *list;
   DBusMessageIter iter, dict;
   Eina_List *input_list, *l;
   DBusMessage *reply;

   toolbook = agent->dialog->content_object;

   /* fugly - no toolbook page get */
   list = evas_object_data_get(toolbook, "mandatory");
   if ((!list) || (!evas_object_visible_get(list)))
     {
        list = evas_object_data_get(toolbook, "alternate");
        if ((!list) || (!evas_object_visible_get(list)))
          {
             ERR("Couldn't get user input.");
             e_object_del(E_OBJECT(dialog));
             return;
          }
     }

   agent->canceled = EINA_FALSE;
   input_list = evas_object_data_get(list, "input_list");

   reply = dbus_message_new_method_return(agent->msg);
   dbus_message_iter_init_append(reply, &iter);

   dbus_message_iter_open_container(
      &iter, DBUS_TYPE_ARRAY,
      DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
      DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
      DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);

   EINA_LIST_FOREACH(input_list, l, input)
      _dict_append_basic(&dict, input->key, input->value);

   dbus_message_iter_close_container(&iter, &dict);

   dbus_message_set_no_reply(reply, EINA_TRUE);
   e_dbus_message_send(agent->conn, reply, NULL, -1, NULL);

   e_object_del(E_OBJECT(dialog));
}
Example #8
0
/* Mini Player */
bool
intf_mini_player_visible_get(interface *intf)
{
    if(intf->mini_player_layout == NULL) {
        LOGE("Mini Player not existant!");
        return false;
    }

    return evas_object_visible_get(intf->mini_player_layout);
}
Example #9
0
/**
 * Shows the selection of the editable object
 *
 * @param editable an editable object
 */
EAPI void
e_editable_selection_show(Evas_Object *editable)
{
   E_Editable_Smart_Data *sd;

   if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
     return;
   if (sd->selection_visible) return;
   sd->selection_visible = 1;
   if ((evas_object_visible_get(editable)) &&
       (sd->cursor_pos != sd->selection_pos))
     evas_object_show(sd->selection_object);
}
Example #10
0
static void
intf_scan_progress_set_cb(void *p_data, uint8_t percentage)
{
    interface* intf = (interface*)p_data;
    if ( percentage < 100 )
    {
        if (evas_object_visible_get(intf->scan_progress) == EINA_FALSE)
        {
            elm_box_pack_after(intf->main_box, intf->scan_progress, intf->nf_content);
            evas_object_show(intf->scan_progress);
        }
        elm_progressbar_value_set(intf->scan_progress, (double)percentage / 100);
    }
    else
    {
        if (evas_object_visible_get(intf->scan_progress) == EINA_TRUE)
        {
            evas_object_hide(intf->scan_progress);
            elm_box_unpack(intf->main_box, intf->scan_progress);
        }
    }
}
Example #11
0
EAPI Eina_Bool
e_icon_fdo_icon_set(Evas_Object *obj, const char *icon)
{
   E_Smart_Data *sd;
   const char *path;
   int len;

   if (!icon) return EINA_FALSE;
   if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
   if (icon[0] == '/') return e_icon_file_set(obj, icon);

   if (!(sd = evas_object_smart_data_get(obj)))
     return EINA_FALSE;

   if (sd->timer) ecore_timer_del(sd->timer);
   sd->timer = NULL;
   if (sd->guessing_animation) ecore_timer_del(sd->guessing_animation);
   sd->guessing_animation = NULL;
   sd->frame = 0;
   sd->frame_count = 0;
   sd->edje = EINA_FALSE;

   eina_stringshare_replace(&sd->fdo, icon);
   if (!sd->fdo) return EINA_FALSE;

   path = efreet_icon_path_find(e_config->icon_theme, sd->fdo, sd->size);
   if (!path) return EINA_FALSE;

   len = strlen(icon);
   if ((len > 4) && (!strcasecmp(icon + len - 4, ".edj")))
     return e_icon_file_edje_set(obj, path, "icon");

   /* smart code here */
   _e_icon_obj_prepare(obj, sd);
   sd->loading = 0;
   if (sd->size != 0)
     evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
   if (sd->preload) evas_object_hide(sd->obj);
   evas_object_image_file_set(sd->obj, path, NULL);
   if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
     return EINA_FALSE;
   if (sd->preload)
     {
        sd->loading = 1;
        evas_object_image_preload(sd->obj, 0);
     }
   else if (evas_object_visible_get(obj))
     evas_object_show(sd->obj);
   _e_icon_smart_reconfigure(sd);
   return EINA_TRUE;
}
static void _item_sel_cb(void *data, Evas_Object *obj, void *event_info)
{
    Evas_Coord x = 0, y = 0, w = 0, h = 0;
    Eina_Bool visible;
    Elm_Object_Item *it = event_info;
    Evas_Object *track = elm_object_item_track(it);
    evas_object_geometry_get(track, &x, &y, &w, &h);

    visible = evas_object_visible_get(track);
    printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n",
            data, obj, event_info);
    printf("track geometry = (%d %d %d %d) visible(%d)\n",
           x, y, w, h, visible);
    elm_object_item_untrack(it);
}
Example #13
0
/* local subsystem functions */
static E_Table_Item *
_e_table_smart_adopt(E_Smart_Data *sd, Evas_Object *obj)
{
   E_Table_Item *ti;

   ti = calloc(1, sizeof(E_Table_Item));
   if (!ti) return NULL;
   ti->sd = sd;
   ti->obj = obj;
   /* defaults */
   ti->col = 0;
   ti->row = 0;
   ti->colspan = 1;
   ti->rowspan = 1;
   ti->fill_w = 0;
   ti->fill_h = 0;
   ti->expand_w = 0;
   ti->expand_h = 0;
   ti->align.x = 0.5;
   ti->align.y = 0.5;
   ti->min.w = 0;
   ti->min.h = 0;
   ti->max.w = 0;
   ti->max.h = 0;
   evas_object_clip_set(obj, sd->clip);
//   evas_object_stack_above(obj, sd->obj);
   evas_object_smart_member_add(obj, ti->sd->obj);
   evas_object_data_set(obj, "e_table_data", ti);
   evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE,
                                  _e_table_smart_item_del_hook, NULL);
//   evas_object_stack_below(obj, sd->obj);
   if ((!evas_object_visible_get(sd->clip)) &&
       (evas_object_visible_get(sd->obj)))
     evas_object_show(sd->clip);
   return ti;
}
Example #14
0
/**
 * Shows the cursor of the editable object
 *
 * @param editable the editable object whose cursor should be shown
 */
EAPI void
e_editable_cursor_show(Evas_Object *editable)
{
   E_Editable_Smart_Data *sd;

   if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
     return;
   if (sd->cursor_visible) return;

   sd->cursor_visible = 1;
   if (evas_object_visible_get(editable))
     {
        evas_object_show(sd->cursor_object);
        edje_object_signal_emit(sd->cursor_object, "e,action,show,cursor", "e");
     }
}
Example #15
0
static void
_del_pre_hook(Evas_Object *obj)
{
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd)
        return;

    if (evas_object_visible_get(obj))
        evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
    elm_hover_target_set(obj, NULL);
    elm_hover_parent_set(obj, NULL);
    evas_object_event_callback_del_full(wd->hov, EVAS_CALLBACK_MOVE, _hov_move, obj);
    evas_object_event_callback_del_full(wd->hov, EVAS_CALLBACK_RESIZE, _hov_resize, obj);
    evas_object_event_callback_del_full(wd->hov, EVAS_CALLBACK_SHOW, _hov_show, obj);
    evas_object_event_callback_del_full(wd->hov, EVAS_CALLBACK_HIDE, _hov_hide, obj);
}
Example #16
0
/**
 * @brief 'release' action callback
 *
 * @param action AtkAction instance
 * @param data user data passed to callback
 *
 * @returns TRUE if action was successfull, FALSE otherwise
 */
static gboolean
eail_button_action_release_cb(AtkAction *action, void *data)
{
   Evas_Object *widget;

   widget = eail_widget_get_widget(EAIL_WIDGET(action));
   if (!widget) return FALSE;

   if ((elm_object_disabled_get(widget)) || (!evas_object_visible_get(widget)))
     return FALSE;

   evas_object_smart_callback_call(widget, "unpressed", NULL);
   eail_button_atk_notify_release(action, NULL, NULL);

   return TRUE;
}
Example #17
0
/**
 * @brief Implementation of do action from AtkAction interface
 *
 * @param action EailSlideshow instance
 * @param i action index
 *
 * @returns TRUE on success, FALSE otherwise
 */
static gboolean
eail_slideshow_do_action(AtkAction *action, gint i)
{
   Evas_Object *widget;
   gboolean result;
   double slideshow_timeout;

   g_return_val_if_fail(EAIL_IS_SLIDESHOW(action), FALSE);

   widget = eail_widget_get_widget(EAIL_WIDGET(action));
   if (!widget) return FALSE;

   if ((elm_object_disabled_get(widget)) || (!evas_object_visible_get(widget)))
     return FALSE;

   switch (i)
     {
       case 0:
           elm_slideshow_next(widget);
           result = TRUE;
           break;
       case 1:
           elm_slideshow_previous(widget);
           result = TRUE;
           break;
       case 2:
           elm_slideshow_timeout_set(widget, 0.0);
           result = TRUE;
           break;
       case 3:
           slideshow_timeout = elm_slideshow_timeout_get(widget);
           if (_double_cmp(slideshow_timeout, 0.0, 1))
             {
                result = TRUE;
                elm_slideshow_timeout_set(widget, SLIDESHOW_DEFAULT_TIMEOUT);
                break;
             }
           result = FALSE;
           break;
       default:
           result = FALSE;
           break;
     }

   return result;
}
Example #18
0
EAPI void
emotion_object_bg_color_set(Evas_Object *obj, int r, int g, int b, int a)
{
   Smart_Data *sd;

   E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);

   evas_object_color_set(sd->bg, r, g, b, a);

   if (!evas_object_visible_get(obj))
     return;

   if (a > 0)
     evas_object_show(sd->bg);
   else
     evas_object_hide(sd->bg);
}
Example #19
0
EAPI Eina_Bool
e_icon_file_key_set(Evas_Object *obj, const char *file, const char *key)
{
   E_Smart_Data *sd;

   if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
   if (!(sd = evas_object_smart_data_get(obj)))
     return EINA_FALSE;

   /* smart code here */
   sd->loading = 0;
   if (sd->fdo)
     {
        eina_stringshare_del(sd->fdo);
        sd->fdo = NULL;
     }

   if (sd->timer) ecore_timer_del(sd->timer);
   sd->timer = NULL;
   if (sd->guessing_animation) ecore_timer_del(sd->guessing_animation);
   sd->guessing_animation = NULL;
   sd->frame = 0;
   sd->frame_count = 0;
   sd->edje = EINA_FALSE;

   _e_icon_obj_prepare(obj, sd);
   if (sd->size != 0)
     evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
   if (sd->preload) evas_object_hide(sd->obj);
   evas_object_image_file_set(sd->obj, file, key);
   if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
     return EINA_FALSE;
   if (!_handle_anim(sd))
     {
        if (sd->preload)
          {
             sd->loading = 1;
             evas_object_image_preload(sd->obj, 0);
          }
        else if (evas_object_visible_get(obj))
          evas_object_show(sd->obj);
     }
   _e_icon_smart_reconfigure(sd);
   return EINA_TRUE;
}
Example #20
0
/**
 * @brief Shrink action callback
 *
 * @param action an AtkAction
 * @param data user data passed to callback
 *
 * @returns TRUE on action success, FALSE otherwise
 */
static gboolean
eail_multibuttonentry_action_shrink_cb(AtkAction *action, void *data)
{
   Evas_Object *widget;

   widget = eail_widget_get_widget(EAIL_WIDGET(action));
   if (!widget) return FALSE;

   if ((elm_object_disabled_get(widget)) || (!evas_object_visible_get(widget)))
     return FALSE;

   if (!elm_multibuttonentry_expanded_get(widget)) return FALSE;

   elm_multibuttonentry_expanded_set(widget, EINA_FALSE);
   atk_object_notify_state_change(ATK_OBJECT(action), ATK_STATE_EXPANDED, FALSE);

   return TRUE;
}
Example #21
0
static void
_e_layout_smart_disown(Evas_Object *obj)
{
   E_Layout_Item *li;
   
   li = evas_object_data_get(obj, "e_layout_data");
   if (!li) return;
   if (!li->sd->items)
     {
	if (evas_object_visible_get(li->sd->clip))
	  evas_object_hide(li->sd->clip);
     }
   evas_object_event_callback_del(obj,
				  EVAS_CALLBACK_FREE,
				  _e_layout_smart_item_del_hook);
   evas_object_smart_member_del(obj);
   evas_object_data_del(obj, "e_layout_data");
   free(li);
}
Example #22
0
/**
 * @brief Action handler for 'click'
 *
 * @param action an AtkAction object (EailCheck)
 * @param data additional data (unused here)
 *
 * @returns TRUE on success, FALSE otherwise
 */
static gboolean
eail_check_action_click_cb(AtkAction *action, void *data)
{
   Evas_Object *widget;
   Eina_Bool state;

   widget = eail_widget_get_widget(EAIL_WIDGET(action));
   if (!widget) return FALSE;

   if ((elm_object_disabled_get(widget)) || (!evas_object_visible_get(widget)))
     return FALSE;

   state = elm_check_state_get(widget);
   elm_check_state_set(widget, !state);

   evas_object_smart_callback_call(widget, "changed", NULL);
   eail_check_atk_notify_change(action, widget, NULL);

   return TRUE;
}
/* externally accessible functions */
EINTERN Eina_Bool
e_mod_comp_pixmap_rotation_handler_update(E_Comp_Win *cw)
{
   Evas_Object *o;
   Eina_Bool r;
   E_CHECK_RETURN(cw, 0);
   E_CHECK_RETURN(cw->pixrot, 0);

   if (cw->needpix)
     {
        cw->needpix = 0;
        cw->pw = cw->w;
        cw->ph = cw->h;
     }

   if (cw->resize_hide)
     cw->resize_hide = EINA_FALSE;

   r = e_mod_comp_pixmap_rotation_update
         (cw->pixrot, cw->up, cw->x, cw->y,
         cw->w, cw->h, cw->border);
   E_CHECK_RETURN(r, 0);
   E_CHECK_RETURN(cw->visible, 0);
   E_CHECK_RETURN(cw->dmg_updates > 0, 0);

   o = e_mod_comp_pixmap_rotation_shobj_get(cw->pixrot);
   E_CHECK_RETURN(o, 0);

   if (!evas_object_visible_get(o))
     {
        evas_object_show(cw->obj);
        evas_object_show(o);
        e_mod_comp_pixmap_rotation_effect_show(cw->pixrot);
     }
   else if (e_mod_comp_pixmap_rotation_angle_check(cw->pixrot))
     {
        e_mod_comp_pixmap_rotation_effect_request(cw->pixrot);
     }
   return EINA_TRUE;
}
Example #24
0
/**
 * @brief Performs the specified action on the object
 *
 * Implementation of do_action from AtkAction interface.
 *
 * @param action AtkAction instance
 * @param i action index
 *
 * @return TRUE on success, FALSE otherwise
 */
static gboolean
eail_ctxpopup_do_action(AtkAction *action,
                        int i)
{
   Evas_Object *widget;

   widget = eail_widget_get_widget(EAIL_WIDGET(action));
   if (!widget) return FALSE;

   if ((elm_object_disabled_get(widget)) || (!evas_object_visible_get(widget)))
     return FALSE;

   const char *action_name = atk_action_get_name(action, i);
   if (!action_name) return FALSE;

   if (!g_strcmp0(action_name, "dismiss"))
     elm_ctxpopup_dismiss(widget);
   else
     return FALSE;

   return TRUE;
}
Example #25
0
static void
_emotion_aspect_borders_apply(Evas_Object *obj, Smart_Data *sd, int w, int h, int iw, int ih)
{
   int x, y;

   evas_object_geometry_get(obj, &x, &y, NULL, NULL);

   /* applying calculated borders */
   if (sd->crop.l == 0 && sd->crop.r == 0 &&
       sd->crop.t == 0 && sd->crop.b == 0)
     {
	Evas_Object *old_clipper;
	if (sd->crop.clipper)
	  {
	     old_clipper = evas_object_clip_get(sd->crop.clipper);
	     evas_object_clip_unset(sd->obj);
	     evas_object_clip_set(sd->obj, old_clipper);
	     evas_object_del(sd->crop.clipper);
	     sd->crop.clipper = NULL;
	  }
     }
   else
     {
	if (!sd->crop.clipper)
	  {
	     Evas_Object *old_clipper;
	     sd->crop.clipper = evas_object_rectangle_add(
		evas_object_evas_get(obj));
	     evas_object_color_set(sd->crop.clipper, 255, 255, 255, 255);
	     evas_object_smart_member_add(sd->crop.clipper, obj);
	     old_clipper = evas_object_clip_get(sd->obj);
	     evas_object_clip_set(sd->obj, sd->crop.clipper);
	     evas_object_clip_set(sd->crop.clipper, old_clipper);
	     if (evas_object_visible_get(sd->obj))
	       evas_object_show(sd->crop.clipper);
	  }
     }
   _clipper_position_size_update(obj, x, y, w, h, iw, ih);
}
Example #26
0
bool PageClientImpl::isViewVisible()
{
    return evas_object_visible_get(m_viewWidget);
}
bool Object::isVisible() const
{
  return evas_object_visible_get( o );
}
Example #28
0
/**
 * @param pdf: the pdf to change the scale
 * @return 1 if the text is found, 0 otherwise.
 * @brief Set the case of the search
 *
 * Start the search of text in the @p pdf document. The
 * text to search should have been set by ewl_pdf_search_text_set().
 * It is @c NULL by default. The first page from which the search
 * starts is set by ewl_pdf_search_first_page_set(). It is 0 by default.
 * The search can be case sensitive or not. It is set by
 * ewl_pdf_search_is_case_sensitive() and it is case insensitive by
 * default.
 *
 * Several call of that function can be done to search several occurences
 * of the text in the document. When a text is found,
 * epdf_page_page_set() is called.
 */
int
ewl_pdf_search_next(Ewl_Pdf *pdf)
{
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(pdf, FALSE);
        DCHECK_TYPE_RET(pdf, EWL_PDF_TYPE, FALSE);

        if (!pdf->search.text)
                DRETURN_INT(FALSE, DLEVEL_STABLE);

        if (!pdf->search.o) {
                Ewl_Embed *emb;

                emb = ewl_embed_widget_find(EWL_WIDGET(pdf));
                pdf->search.o = evas_object_rectangle_add(emb->canvas);
                if (!pdf->search.o)
                        DRETURN_INT(FALSE, DLEVEL_STABLE);
                evas_object_color_set(pdf->search.o, 0, 128, 0, 128);
                evas_object_hide(pdf->search.o);
        }

 next_page:
        /* no list, we search one */
        while (!pdf->search.list &&
               pdf->search.page < epdf_document_page_count_get(pdf->pdf_document)) {
                Epdf_Page *page;

                pdf->search.page++;
                printf("page : %d\n", pdf->search.page);
                epdf_page_page_set(pdf->pdf_page, pdf->search.page);
                pdf->search.list = epdf_page_text_find(page,
                                                       pdf->search.text,
                                                       pdf->search.is_case_sensitive);
                if (pdf->search.list)
                        ecore_list_first_goto(pdf->search.list);
                epdf_page_delete(page);
        }

        /* an already existing list or a newly one */
        if (pdf->search.list) {
                Epdf_Rectangle *rect;

                if ((rect = (Epdf_Rectangle *)ecore_list_next(pdf->search.list))) {
                  if (pdf->search.page != epdf_page_page_get(pdf->pdf_page)) {
                          ewl_pdf_page_set(pdf, pdf->search.page);
                          ewl_callback_call(EWL_WIDGET(pdf), EWL_CALLBACK_REVEAL);
                  }
                        evas_object_move(pdf->search.o,
                                         CURRENT_X(EWL_WIDGET(pdf)) + round(rect->x1 - 1),
                                         CURRENT_Y(EWL_WIDGET(pdf)) + round(rect->y1 - 1));
                        evas_object_resize(pdf->search.o,
                                           round(rect->x2 - rect->x1 + 1),
                                           round(rect->y2 - rect->y1));
                        if (!evas_object_visible_get(pdf->search.o))
                                evas_object_show(pdf->search.o);
                        /* we leave... */
                        DRETURN_INT(TRUE, DLEVEL_STABLE);
                }
                else { /* no more word to find. We destroy the list */
                        ecore_list_destroy(pdf->search.list);
                        pdf->search.list = NULL;
                        /* we search a new one */
                printf("page0 : %d\n", pdf->search.page);
                        goto next_page;
                }
        }
        evas_object_hide(pdf->search.o);

        if (pdf->search.is_circular) {
                pdf->search.page = -1;
                DRETURN_INT(TRUE, DLEVEL_STABLE);
        }
        else
                DRETURN_INT(FALSE, DLEVEL_STABLE);
}
Example #29
0
PREFIX value ml_evas_object_visible_get(value v_obj)
{
        return Val_Eina_Bool(evas_object_visible_get((Evas_Object*) v_obj));
}
Example #30
0
Eina_Bool EvasObject::isVisible() const
{
	return evas_object_visible_get(*this);
}