aboutsummaryrefslogblamecommitdiffstats
path: root/src/lib/evas/canvas/evas_object_main.c
blob: ea824aca86dc5594dff739c8ad724cacf95b37a2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                   
                                   
 
                                
                         
                  
 

                     
                                        


                                   
                    
                                
 
                                          
                                        

 
                         
                                                     
                                          
  


                                                                    
                                                          
                       
                                                         
                         
                                                                                       
  
                                                   
                                                            
  
                                                       
                        
  

                                       
                                     
                                       
                                    
                                      
                                        
 


                
                                                                                                                     
 


                                                                                                                                   
                                                                                                                   
                                                                                                                      
                                                                                                                              
 
                                                                                 
                                                                               


                                            
                                            
                                         
                                           
                                             
 

                                     
                                     
                                  
                                    
                                      
 


                          

                    
 





                                                               
                                                         









                                                                                                


                                                    

                                   
 


                                                           

                                             


           

                                                              
 
                                                                        
                                                                    
                                                           
                                          
                                                                                                            
                                                                    
                                                            



                                                                                               




                                                            
                                                              





                                                           
                                  




                                                                                             
                                                                      
                                                                
                                                                     




                                                            
                                                              


                                   

                                                                    

                                                 
                                                           


                
                  
                                                                                      
 
                     
              
 
                                                         
                                                     
                                          
 
                                   
                                       
 
                                     
      
                                                                 
                    

      
                              
                        
                                                      
                                                  

                                                     
                                                     
                                                    
                                                        
 
                                         
                                          
 
                 

 







                                                                                   


                                                    


                                                     












                                                                        
    
                                                         

                             
                                  
                                   
                                     
                                         
                                        

 





                        
    
                                                                                                
 


                                      
 
                                               
 
                                                                                    











                                                  

                                                                          





























                                                                               


                                                                     


















                                                                                   
                                                  
























                                                                 


                                               
































                                                                   








                                               
    
                                                     
 
                                                       
      








                                                                                            
      
 
                                               
      






                                                                                            
                                                   



                                                                                            
      
                                                      
                                                                                         


    
                                                            
 
                                                                          
                    
                                    
 
                           
 
                                              
                                                        
                                     
                                     


                                                               
      

                       
                                                                               
           


                                                                                            
      





                                                                                          
                                

                            

                              
                                                                                  

                                         


                                                                  

                                          
                                              


                                     
                                                        

                                                                            
                         
                                                           
                                                                                   
                                       

                                              
                       
      





                                                                                            
      

                       
                                                  
      



                                                                             
                                                                            
                                                                           
                                                                               
                                             
                            


                                                                          

                                              


    
                                                                                    
 
                
                                    
                        
                                
                                  
 
                                                    

                                          
 

                         
                          
                                       
      
                                            
 
                            
 
                                  
                                                           

                                           
                                                     
           
                                                    

           
                                                     
      
                                                     
 
                            
                                          
      

                                                            
                                                                                     
      
                         
      
                                                                                                   
                                  
                                                            
      

 
    










                                                                                
                                                                                






                                                                     
                                                                                                  
 
                                                                          
 
                    
                             
                             

            
                            



                                              


       
                            



                                               
      

 
    
                                                                             
 
                                                                          
 
                    
                             

                                                       
      

                                                   







                                                                                   
      
                              
      
                                                 













                                                                                 
      
                                              











                                                                                
      

 
    
                                                                                                                        
 

                    
                       



                                         
                       



                                          
  
                            







                                            
                            







                                             
  
 

    
                                                               
 
                     
 
                                                               

 
    
                                                                                                              
 
                                                                          
                     
                
                  
                          
                  
 
                    
                           
 
                               
                                        

                          

                             







                                                       



                                                        
                                    
                                                                          


                                                                                          





                                                        



                                                         
                                    
                                                                          


                                                                                          



                                                                             

                                                 
                                         
                            





                                                                 



                                                                  
                                              
                                                                                    


                                                                                                    


                                                                  



                                                                   
                                              
                                                                                    


                                                                                                    
                     
                                                  

                


       

                                                                   
                                            


                                                                      
      

     
                                        
                            
                           

 
   
                                                                                                                            
 
                                                                                

                                          



                                                  




              
                                                                            
 
                               
                                      
      
                                  
                                                                       
                 



            
   
                                                                                                       
 
                               
                            
                                                                       



            
                                                                                                        
 
                               
                             
                                                                        

            

                             
         
                                    
 
                                               

                     
 
                   
 
                                                                          
                    
              

 
         
                                      
 
                                               

                     
 
                                                                          
                    
 

                             
                     

                                                                  

 
        
                                              
 
                                               

                     
 
                                                                          
                      


                   
         
                                    
 

                                               

                     
 
                                                                          
 
                    
                                
                                                     

                    
                                 

               
                            
                                   
 
                   

 




                                                                                             

                                                      
                      
                                                                    






                                                                      




                                                                                             









                                                                                             
                                                                             

                                          

           
                                                                             

                                                                       
                                                                                   







                                                        
                                                                    


                                                                  



                                                                                                  




                                                                        
                                                       



                                                                                                  




                                                                        
















































                                                                                                     
                  
                                                                                     



                                               

                      
                                  

                           
                                   
                
 
                                                                               
                            
 
                                                                                                              

















                                                                                                  

                                                                                         
                                          
                                                                                        
                                                     






                                                                    
      
                                                

                             
      
                                          
                         
      









                                                                             
      

                                                     
                                                            
      
                                                            
                                                
                                                     
                                                         
      
 


                                                                                
      



                                                               
                                                               

                                                                         
      
 
                                                         
                                                       
 

                                                    

                                                                                          
                                          
                                                                                        
                                     
                      

                                   

                                              
 
                                               

 
                  

                                                                                            




                                   
         




                                                                                                     
                                            




                                                              
                                                  

 
                  

                                                                                    
 

                                                    
                         
                 
 
                                                                                     
            
 
                           






                                                           
                                      
      

                                                         

                                                                        

                                                                             
      
                        
 

                                                                                
 

                                                    

                                    

                                                   
 
                                                      
 
                                             
                                 

                                       
                        
                                      
      
                                         

                                                                                                                        
      
                       
                                             

 


                                                                
                                              

 

                                                                                      
                                                                                         
 
                                               














                                                                               
                  

                                                                                
 
                                                    
                                           
                         
 

                    
 
                                                                                       
            
 
                                      
      

                                                         

                                                                        

                                                                        
      
                          
 

                                                                                  
 





                                                    
 
                                                      
 
                                             

                                       
                          
                                                                            
                                      
      
                                                                                
                                         
 
                                                                            

                                                                                                                        
      
                       
                                          

 
           

                                                                                            




                                   
         
                                                                                                               
 
                                               



                 

                     
                                            

 
                  


                                                                       
 
                                       
      

                      
               
      
 

                                   

 
                  


                                                                   
 
                     
      

                      


               

                                   

 
           
                                                                                              

                               
 
                                                                       


                                                                 



                                  


                                                      


                                                                 
 


                                                                       


                                    


                                                                              
 

                                                                       
                                




                                                       


                                                     
                                                      
 
 
                  
                                                                                                                                                   
 
                                            
      

                      
               
      

                                      

 
                  
                                                                                                                                     
 

                      
                                




                                                  
                                                                              

                              
 
                                                      

 
                  
                                                                                                                                                 






                                            

                                                                        


                  
                                                                                                                                        
 
                                            
      

                       
               
      

                                      

 
                  
                                                                                                                          
 

                      
                                




                                                  
                                                                              

                              
 
                                                      

 

                                                                                 
 


                                                                       
                                            
      

                      
               
      

                                          

 

                                                                         
 


                                                                       
                                




                                                  
                                                                                      

                                  
 
                                                      

 
                  
                                                                                                                                        











                                            
                                                                                                                          



                                




                                                  







                                                                                        
                                                                                                                                                                             
 
                                            
      
                                                       

                      
               
      


                                                      

 
                  
                                                                                                                                                              
 

                      
                                




                                                  
                                                                                                                                          


                                         
 
                                                      

 
                  
                                                                                                                                  
 

                                            

                        
               




                                        
                  
                                                                                                                    
 

                      
                                
                                                         

                                       
                                                               

                                                  

                                                    
            
                                
                                
 
                                                      

 
                  
                                                                                                                                   
 

                                            

                        
               




                                         
                  
                                                                                                                     
 

                      
                                
                                                           

                                       
                                                               

                                                  

                                                     
            
                                 
                                 
 
                                                      

 
                  
                                                                                                                                                                         
 

                                            



                      
               






                                          
                  
                                                                                                                                                         
 

                      
                                




                                                  
                                                                                                                                                                
                                  



                                  
                                                      
 
 
         
                                     
 
                                               

                     
                                          





                                     
                                           




                                               
                                                  


           
                                                           
 
                                                                                
      
                                                    
      





                                                    




                                                            
                                         
                                                        

                                                            
           
                                
                




                                                                                      

                
      
                                                      
                                        

 

                                                           
 
                                                                                
      
                                                    
      





                                                    


                                 
                                           





                                                                  
                                     

                                 
                                                                                  





                                                                       

                                       
                                                          

                                                            
                                         
                                                        

                                                            
           
                                    
                                                                                                    
                
                                                      
 
                                                                            
                     
                                                       

                                                                                                     

                                                                                                                       
                     



                                                                           
                                             
                                             
                                                                                  
                                                                  
                                                                                                                        
                                         
                                                  






                                               
 
                                                
 








                                                                     

                                                                       
                                                           
                                                                                                  
                                                                                                    
                     
   

                
      

       
  
                                   
                                                                        
                                                        
                                                                                                              

                               
   
      
                                                      
                                        

 



                                                                                   


                                         
                                                                                       





                               
                       

                                                                       
 

                                                       



                                                                              

                      
                            

 


                                                                   
                                                     

 
                  

                                                                                 
 

              
                              


                                                                            
 
                                                                                                        




                                        
                              




                                                    
                                 


                                                   




                                                                     
 
                                       
                                                                                       
 
                                  
                                   

 
                       


                                                                                  


                               
                                                             


                    


                                                                             
                                                     

 
                  
                                                            

                                                                    
 

                      



                      
               
      



                                 

 
                       



                                                                         


                               
                                                             


                    
                  
                                                                                                    
 
                              
                             

                                                 
                                





                                                    
                                   

 
                       
                                                                                          
 

                                         

 
                  
                                                                                       
 
                              
                                                   
 
                                





                                                    
                                   
                                                                                        

 
                    
                                                                                     
 

                                  

 

                                                                         
 
                                      

                                                
                                





                                                    



                                        
                                                                                                                

                                                    

 







                                                                        
                                                                                         
 





                                                      
                                                                          

 
                  
                                                                                                                       
 

                                                                       
                      
                    





                     
                            




                   
                     




                             

                                           
                                                                

                                        
                                               
                                                              
                                                   
                                                                 

                                                      
                                             
                                         




                                                                    
 
                                                                           

            
                                                                       
 
                                                                   
 


                                                          
 


                                                          
 
                                                                      
 


                                                             
 


                                                             
 


                                                                   
 


                                                                
 


                                                                
 




                                                          
 
                                                                        
 
      















                                                                        
 
                 
                                                                                    
      
 



                                                                                         
 
                               
                                                
                                                                                      
 


                                                          
                                                           
                                                   

                                                                            
                                               
           


                                                                  



                                                                                   




                                                                


                                                                                       
                



           
                  
                                                                                                                            
 




                                                           

                                    
                                                                

 





                                                                                                              
                   
                                                                                                                                                                                 
 
                   
              
 

          

                                                  
                                                                 
      

                                        


                                                                
                                  
                                          
                                                  
                                                                    
                                                                        
                                                                             
                                          
                                                                              




                                                               
           
      
               

 
                  
                                                
 

                                                               
                       


                                                                        
                                                                                                             

 
                   
                                                                                                                                                                                                                    
 
                   
                      
 



          



                                                  

                      
                                                                 
      

                                        


                                                                
                                  
                                          
                                                  
                                                                    
                                                                        
                                                                             
                                          
                                                                                



                                                                              
           
      
               

 
                 
                                                                                                                                                                              
 
                        
                   
              
 

          

                                                  
                                                                 
      

                                        


                                                                

                                                                             
                                          
                                                  
                                                                      
                                                                        
                                                                             
                                          
                                                                              
                                      










                                                                             
           
      
             

 
   
                                                      
                                       








                                                                                          
                 
                                                                                                                                                                                                                 
 
                        
                   
                      
 

          
          
          



                                                  

                      
                                                                 
      

                                        


                                                                

                                                                             
                                          
                                                  
                                                                    
                                                                        
                                                                             
                                          
                                                                                
                                      








                                                             
           
      
             

 
                  
                                                                                          
 
                                 



                                                                  
                                                              
 
 
                  
                                                                                                                    
 
                                


                                    
                       
                                                                                                 
 
                                 

 







































                                                                                                                                 
           
                                                                       
 


                                     









                                                                        
                            
 
                              





                                                         
                  
                                                                                                       
 

                   
                                




                                                        

 
                       
                                                                                                
 
                        

 
                           
                                                                                             
 

                            

 
                  
                                                                                                                                                    




                                 
                                                                                                               



                                      
                  
                                                                           
 
                                                           
                                

 
 

            


                                               

                                                                          


                    
         














                                                                                










                                                                                                                   




                                                                           
 




                                                                                   



                                                                           
                                                   




                                                                                   
                                                   





































                                                                                                                     


                                      
                                                              

 


                                                       
                                                                                            
 
                                     
                                                                                      
                                                                                                                  
                                                                                                    

                                                                                       
 
                                        
#define EFL_CANVAS_OBJECT_PROTECTED
#define EFL_CANVAS_OBJECT_BETA
#define EFL_GFX_SIZE_HINT_PROTECTED

#include "evas_common_private.h"
#include "evas_private.h"
#include <Ecore.h>

EVAS_MEMPOOL(_mp_sh);

#define MY_CLASS EFL_CANVAS_OBJECT_CLASS

#define MY_CLASS_NAME "Evas_Object"

static Eina_Inlist *
get_layer_objects(Evas_Layer *l)
{
   if ((!l) || (!l->objects)) return NULL;
   return (EINA_INLIST_GET(l->objects));
}

/* evas internal stuff */
static const Evas_Object_Proxy_Data default_proxy = {
  NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0
};
static const Evas_Object_Map_Data default_map = {
  { NULL, NULL, 0, 0 }, { NULL, NULL, 0, 0 }, NULL, 0, 0, NULL, NULL
};
static const Evas_Object_Protected_State default_state = {
  NULL, { 0, 0, 0, 0 },
  { { 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } },
  { 255, 255, 255, 255 },
  1.0, 0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
};
static const Evas_Object_Mask_Data default_mask = {
  NULL, 0, 0, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
};
static const Evas_Object_Events_Data default_events = {
  NULL, NULL, NULL, NULL
};

Eina_Cow *evas_object_proxy_cow = NULL;
Eina_Cow *evas_object_map_cow = NULL;
Eina_Cow *evas_object_state_cow = NULL;
Eina_Cow *evas_object_3d_cow = NULL;
Eina_Cow *evas_object_mask_cow = NULL;
Eina_Cow *evas_object_events_cow = NULL;

static Eina_Bool
_init_cow(void)
{
   if (evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow && evas_object_3d_cow) return EINA_TRUE;

   evas_object_proxy_cow = eina_cow_add("Evas Object Proxy", sizeof (Evas_Object_Proxy_Data), 8, &default_proxy, EINA_TRUE);
   evas_object_map_cow = eina_cow_add("Evas Object Map", sizeof (Evas_Object_Map_Data), 8, &default_map, EINA_TRUE);
   evas_object_state_cow = eina_cow_add("Evas Object State", sizeof (Evas_Object_Protected_State), 64, &default_state, EINA_FALSE);
   evas_object_3d_cow = eina_cow_add("Evas Object 3D", sizeof (Evas_Object_3D_Data), 8, &default_proxy, EINA_TRUE);
   evas_object_mask_cow = eina_cow_add("Evas Mask Data", sizeof (Evas_Object_Mask_Data), 8, &default_mask, EINA_TRUE);
   evas_object_events_cow = eina_cow_add("Evas Events Data", sizeof (Evas_Object_Events_Data), 8, &default_events, EINA_TRUE);

   if (!(evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow &&
         evas_object_3d_cow && evas_object_mask_cow && evas_object_events_cow))
     {
        eina_cow_del(evas_object_proxy_cow);
        eina_cow_del(evas_object_map_cow);
        eina_cow_del(evas_object_state_cow);
        eina_cow_del(evas_object_3d_cow);
        eina_cow_del(evas_object_mask_cow);
        eina_cow_del(evas_object_events_cow);

        evas_object_proxy_cow = NULL;
        evas_object_map_cow = NULL;
        evas_object_state_cow = NULL;
        evas_object_3d_cow = NULL;
        evas_object_mask_cow = NULL;
        evas_object_events_cow = NULL;

        return EINA_FALSE;
     }

   return EINA_TRUE;
}

static Evas_Object_Pointer_Data *
_evas_object_pointer_data_find(Evas_Object_Protected_Data *obj,
                               Efl_Input_Device *pointer)
{
   Evas_Object_Pointer_Data *pdata;

   EINA_INLIST_FOREACH(obj->events->pointer_grabs, pdata)
     {
        if (pdata->evas_pdata->pointer == pointer)
          return pdata;
     }
   return NULL;
}

static void
_evas_object_pointer_grab_del(Evas_Object_Protected_Data *obj, Evas_Object_Pointer_Data *pdata);

static void
_evas_device_del_cb(void *data, const Efl_Event *ev)
{
   Evas_Object_Protected_Data *obj;
   Evas_Object_Pointer_Data *pdata;

   obj = efl_data_scope_safe_get(data, MY_CLASS);
   EINA_SAFETY_ON_NULL_RETURN(obj);
   pdata = _evas_object_pointer_data_find(obj, ev->object);
   if (!pdata) return;
   _evas_object_pointer_grab_del(obj, pdata);
}

static void
_evas_object_pointer_grab_del(Evas_Object_Protected_Data *obj,
                              Evas_Object_Pointer_Data *pdata)
{
   if ((pdata->mouse_grabbed > 0) && (obj->layer) && (obj->layer->evas))
     pdata->evas_pdata->seat->mouse_grabbed -= pdata->mouse_grabbed;
   if (((pdata->mouse_in) || (pdata->mouse_grabbed > 0)) &&
       (obj->layer) && (obj->layer->evas))
     pdata->evas_pdata->seat->object.in = eina_list_remove(pdata->evas_pdata->seat->object.in, obj->object);
   efl_event_callback_del(pdata->evas_pdata->pointer, EFL_EVENT_DEL,
                          _evas_device_del_cb, obj->object);
   EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
     events->pointer_grabs = eina_inlist_remove(events->pointer_grabs, EINA_INLIST_GET(pdata));
   EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);

   free(pdata);
}

static Evas_Object_Pointer_Data *
_evas_object_pointer_data_add(Evas_Pointer_Data *evas_pdata,
                              Evas_Object_Protected_Data *obj)
{
   Evas_Object_Pointer_Data *pdata;

   pdata = calloc(1, sizeof(Evas_Object_Pointer_Data));
   EINA_SAFETY_ON_NULL_RETURN_VAL(pdata, NULL);
   pdata->pointer_mode = EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
   pdata->evas_pdata = evas_pdata;
   EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
     events->pointer_grabs = eina_inlist_append(events->pointer_grabs,
                                                EINA_INLIST_GET(pdata));
   EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);

   efl_event_callback_priority_add(evas_pdata->pointer, EFL_EVENT_DEL,
                                   EFL_CALLBACK_PRIORITY_BEFORE,
                                   _evas_device_del_cb, obj->object);
   return pdata;
}

Evas_Object_Pointer_Data *
_evas_object_pointer_data_get(Evas_Pointer_Data *evas_pdata,
                              Evas_Object_Protected_Data *obj)
{
   Evas_Object_Pointer_Data *pdata;

   pdata = _evas_object_pointer_data_find(obj, evas_pdata->pointer);

   //The pointer does not exist yet - create one.
   if (!pdata)
     return _evas_object_pointer_data_add(evas_pdata, obj);
   return pdata;
}

EOLIAN static Eo *
_efl_canvas_object_efl_object_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
   Eo *parent = NULL;
   Evas *evas;

   eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
   efl_canvas_object_type_set(eo_obj, MY_CLASS_NAME);
   efl_manual_free_set(eo_obj, EINA_TRUE);

   parent = efl_parent_get(eo_obj);
   evas = evas_object_evas_get(parent);

   if (!obj || !_init_cow() || !evas)
     {
        ERR("Failed to create a canvas object (evas: %p)", evas);
        return NULL;
     }

   obj->is_frame = EINA_FALSE;
   obj->object = eo_obj;
   obj->proxy = eina_cow_alloc(evas_object_proxy_cow);
   obj->map = eina_cow_alloc(evas_object_map_cow);
   obj->cur = eina_cow_alloc(evas_object_state_cow);
   obj->prev = eina_cow_alloc(evas_object_state_cow);
   obj->data_3d = eina_cow_alloc(evas_object_3d_cow);
   obj->mask = eina_cow_alloc(evas_object_mask_cow);
   obj->events = eina_cow_alloc(evas_object_events_cow);

   evas_object_inject(eo_obj, obj, evas);
   evas_object_callback_init(eo_obj, obj);

   return eo_obj;
}

EOLIAN static Eo *
_efl_canvas_object_efl_object_finalize(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
   Evas_Public_Data *e;

   if (!EVAS_OBJECT_DATA_ALIVE(obj)) goto end;
   if (obj->legacy.ctor) goto end;

   if (!obj->legacy.weight_set)
     efl_gfx_size_hint_weight_set(eo_obj, 1.0, 1.0);

   if (!obj->legacy.align_set)
     efl_gfx_size_hint_align_set(eo_obj, -1.0, -1.0);

   if (obj->legacy.visible_set /* && ... */)
     {
        obj->legacy.finalized = EINA_TRUE;
        goto end;
     }

   e = obj->layer->evas;
   e->finalize_objects = eina_list_prepend(e->finalize_objects, eo_obj);

end:
   return efl_finalize(efl_super(eo_obj, MY_CLASS));
}

void
evas_object_change_reset(Evas_Object_Protected_Data *obj)
{
   obj->changed = EINA_FALSE;
   obj->changed_move = EINA_FALSE;
   obj->changed_color = EINA_FALSE;
   obj->changed_pchange = EINA_FALSE;
   obj->changed_src_visible = EINA_FALSE;
   obj->need_surface_clear = EINA_FALSE;
}

typedef struct _Map_Same
{
   void *p1, *p2;
   Eina_Bool b1;
} Map_Same;

void
evas_object_clip_recalc_do(Evas_Object_Protected_Data *obj, Evas_Object_Protected_Data *clipper)
{
   int cx, cy, cw, ch, cr, cg, cb, ca;
   int nx, ny, nw, nh, nr, ng, nb, na;
   Eina_Bool cvis, nvis;

   evas_object_coords_recalc(obj->object, obj);

   if (EINA_UNLIKELY((!!obj->map) && (obj->map->cur.map) && (obj->map->cur.usemap)))
     {
        cx = obj->map->cur.map->normal_geometry.x;
        cy = obj->map->cur.map->normal_geometry.y;
        cw = obj->map->cur.map->normal_geometry.w;
        ch = obj->map->cur.map->normal_geometry.h;
     }
   else
     {
        if (obj->is_smart)
          {
             Evas_Coord_Rectangle bounding_box;

             evas_object_smart_bounding_box_update(obj);
             evas_object_smart_bounding_box_get(obj, &bounding_box, NULL);
             cx = bounding_box.x;
             cy = bounding_box.y;
             cw = bounding_box.w;
             ch = bounding_box.h;
          }
        else
          {
             cx = obj->cur->geometry.x;
             cy = obj->cur->geometry.y;
             cw = obj->cur->geometry.w;
             ch = obj->cur->geometry.h;
          }
     }

   if (EINA_UNLIKELY((obj->cur->color.a == 0) &&
                     (obj->cur->render_op == EVAS_RENDER_BLEND)))
     cvis = EINA_FALSE;
   else cvis = obj->cur->visible;

   cr = obj->cur->color.r; cg = obj->cur->color.g;
   cb = obj->cur->color.b; ca = obj->cur->color.a;

   if (EVAS_OBJECT_DATA_VALID(clipper))
     {
        // this causes problems... hmmm ?????
        evas_object_clip_recalc(clipper);

        // I don't know why this test was here in the first place. As I have
        // no issue showing up due to this, I keep it and move color out of it.
        // breaks cliping of mapped images!!!
        if (EINA_LIKELY(!!clipper->map) &&
            EINA_LIKELY(!!obj->map) &&
            clipper->map->cur.map_parent == obj->map->cur.map_parent)
          {
             nx = clipper->cur->cache.clip.x;
             ny = clipper->cur->cache.clip.y;
             nw = clipper->cur->cache.clip.w;
             nh = clipper->cur->cache.clip.h;
             RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
          }

        obj->clip.prev_mask = NULL;
        if (EINA_UNLIKELY(clipper->mask->is_mask))
          {
             // Set complex masks the object being clipped (parent)
             obj->clip.mask = clipper;

             // Forward any mask from the parents
             if (EINA_LIKELY(obj->smart.parent != NULL))
               {
                  Evas_Object_Protected_Data *parent =
                    efl_data_scope_get(obj->smart.parent, EFL_CANVAS_OBJECT_CLASS);
                  evas_object_clip_recalc(parent);
                  if (parent->clip.mask)
                    {
                       if (parent->clip.mask != obj->clip.mask)
                         obj->clip.prev_mask = parent->clip.mask;
                    }
               }
          }
        else if (EINA_UNLIKELY(clipper->clip.mask != NULL))
          {
             // Pass complex masks to children
             obj->clip.mask = clipper->clip.mask;
          }
        else obj->clip.mask = NULL;

        nvis = clipper->cur->cache.clip.visible;
        nr = clipper->cur->cache.clip.r;
        ng = clipper->cur->cache.clip.g;
        nb = clipper->cur->cache.clip.b;
        na = clipper->cur->cache.clip.a;
        cvis = (cvis & nvis);
        cr = (cr * (nr + 1)) >> 8;
        cg = (cg * (ng + 1)) >> 8;
        cb = (cb * (nb + 1)) >> 8;
        ca = (ca * (na + 1)) >> 8;
     }
   else obj->clip.mask = NULL;
   if (!EVAS_OBJECT_DATA_VALID(obj->clip.mask))
     obj->clip.mask = NULL;

   if (((ca == 0) && (obj->cur->render_op == EVAS_RENDER_BLEND)) ||
       (cw <= 0) || (ch <= 0))
     cvis = EINA_FALSE;

   if ((obj->cur->cache.clip.dirty == EINA_FALSE) &&
       (obj->cur->cache.clip.visible == cvis) &&
       (obj->cur->cache.clip.x == cx) &&
       (obj->cur->cache.clip.y == cy) &&
       (obj->cur->cache.clip.w == cw) &&
       (obj->cur->cache.clip.h == ch) &&
       (obj->cur->cache.clip.r == cr) &&
       (obj->cur->cache.clip.g == cg) &&
       (obj->cur->cache.clip.b == cb) &&
       (obj->cur->cache.clip.a == ca))
     return;

   EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
     {
        state_write->cache.clip.x = cx;
        state_write->cache.clip.y = cy;
        state_write->cache.clip.w = cw;
        state_write->cache.clip.h = ch;
        state_write->cache.clip.visible = cvis;
        state_write->cache.clip.r = cr;
        state_write->cache.clip.g = cg;
        state_write->cache.clip.b = cb;
        state_write->cache.clip.a = ca;
        state_write->cache.clip.dirty = EINA_FALSE;
     }
   EINA_COW_STATE_WRITE_END(obj, state_write, cur);
}

static inline Eina_Bool
_map_same(const void *map1, const void *map2)
{
   const Map_Same *same1 = map1, *same2 = map2;
   return ((same1->p1 == same2->p1) &&
           (same1->p2 == same2->p2) &&
           (same1->b1 == same2->b1));
}

void
evas_object_cur_prev(Evas_Object_Protected_Data *obj)
{
   if (!obj->map->prev.valid_map && obj->map->prev.map)
     {
        EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
          {
             if (map_write->prev.map != map_write->cur.map)
               evas_map_free(map_write->prev.map);
             if (map_write->cache_map == map_write->prev.map)
               map_write->cache_map = NULL;
             map_write->prev.map = NULL;
          }
        EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
     }

   if (obj->map->cur.map != obj->map->prev.map)
     {
        EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
          {
             if (map_write->cache_map) evas_map_free(map_write->cache_map);
             map_write->cache_map = map_write->prev.map;
          }
        EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
     }
   if (!_map_same(&obj->map->prev, &obj->map->cur))
     {
        EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
          map_write->prev = map_write->cur;
        EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
     }
   _efl_canvas_object_clip_prev_reset(obj, EINA_TRUE);
   eina_cow_memcpy(evas_object_state_cow, (const Eina_Cow_Data **) &obj->prev, obj->cur);
}

void
evas_object_free(Evas_Object *eo_obj, Eina_Bool clean_layer)
{
   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);
   if (!obj) return;
   obj->clean_layer = !!clean_layer;

   int was_smart_child = 0;

   evas_object_callback_shutdown(eo_obj, obj);
   if (efl_isa(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
     _evas_object_image_free(eo_obj);
   evas_object_map_set(eo_obj, NULL);
   if (obj->map->prev.map) evas_map_free(obj->map->prev.map);
   if (obj->map->cache_map) evas_map_free(obj->map->cache_map);
   if (obj->map->surface)
     {
        if (obj->layer)
          {
             obj->layer->evas->engine.func->image_free(ENC, obj->map->surface);
          }
        EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
          map_write->surface = NULL;
        EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
     }
   if (obj->mask->is_mask)
     {
        EINA_COW_WRITE_BEGIN(evas_object_mask_cow, obj->mask, Evas_Object_Mask_Data, mask)
          mask->is_mask = EINA_FALSE;
          mask->redraw = EINA_FALSE;
          mask->is_alpha = EINA_FALSE;
          mask->w = mask->h = 0;
          if (mask->surface)
            {
               if (obj->layer)
                 {
                    obj->layer->evas->engine.func->image_free(ENC, mask->surface);
                    mask->surface = NULL;
                 }
            }
        EINA_COW_WRITE_END(evas_object_mask_cow, obj->mask, mask);
     }
   evas_object_grabs_cleanup(eo_obj, obj);
   evas_object_intercept_cleanup(eo_obj);
   if (obj->smart.parent) was_smart_child = 1;
   evas_object_smart_cleanup(eo_obj);
   if (obj->func->free)
     {
        obj->func->free(eo_obj, obj, obj->private_data);
     }
   if (!was_smart_child) evas_object_release(eo_obj, obj, obj->clean_layer);
   if (obj->clip.clipees)
     obj->clip.clipees = eina_list_free(obj->clip.clipees);
   obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
   evas_object_clip_changes_clean(obj);
   evas_object_event_callback_all_del(eo_obj);
   evas_object_event_callback_cleanup(eo_obj);
   if (obj->map->spans)
     {
        EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
          {
             free(map_write->spans);
             map_write->spans = NULL;
          }
        EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
     }
   if (obj->size_hints)
     {
       EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints);
     }
   eina_cow_free(evas_object_proxy_cow, (const Eina_Cow_Data**) &obj->proxy);
   eina_cow_free(evas_object_map_cow, (const Eina_Cow_Data**) &obj->map);
   eina_cow_free(evas_object_state_cow, (const Eina_Cow_Data**) &obj->cur);
   eina_cow_free(evas_object_state_cow, (const Eina_Cow_Data**) &obj->prev);
   eina_cow_free(evas_object_3d_cow, (const Eina_Cow_Data**) &obj->data_3d);
   eina_cow_free(evas_object_mask_cow, (const Eina_Cow_Data**) &obj->mask);
   eina_cow_free(evas_object_events_cow, (const Eina_Cow_Data**) &obj->events);
   efl_data_unref(eo_obj, obj->private_data);
   obj->private_data = NULL;

   /* Try to manual free, and if it fails, unset it so the next unref will
    * actually free the object. */
   if (!efl_manual_free(eo_obj))
      efl_manual_free_set(eo_obj, EINA_FALSE);
}

void
evas_object_change(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
   Eina_List *l;
   Evas_Object_Protected_Data *obj2;
   Evas_Object *eo_obj2;
   Eina_Bool movch = EINA_FALSE;
   Evas_Canvas3D_Texture *texture;

   if ((!obj->layer) || (!obj->layer->evas)) return;
   if (obj->layer->evas->nochange) return;
   obj->layer->evas->changed = EINA_TRUE;

   if (obj->changed_move)
     {
        movch = EINA_TRUE;
        obj->changed_move = EINA_FALSE;
     }
   else obj->need_surface_clear = EINA_TRUE;

   if (obj->changed) return;

   evas_render_object_recalc(obj);
   /* set changed flag on all objects this one clips too */
   if (!((movch) && (obj->is_static_clip)))
     {
        EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
          {
             evas_object_change(obj2->object, obj2);
          }
     }
   EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_obj2)
     {
        obj2 = efl_data_scope_get(eo_obj2, MY_CLASS);

        if (!obj2) continue;
        evas_object_change(eo_obj2, obj2);
     }
   EINA_LIST_FOREACH(obj->proxy->proxy_textures, l, texture)
     {
        evas_canvas3d_object_change(texture, EVAS_CANVAS3D_STATE_TEXTURE_DATA, NULL);
     }
   if (obj->smart.parent)
     {
        Evas_Object_Protected_Data *smart_parent = efl_data_scope_get(obj->smart.parent, MY_CLASS);
        if (!smart_parent) return;
        evas_object_change(obj->smart.parent, smart_parent);
     }
}

void
evas_object_content_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();

   if ((obj->map) && (obj->map->surface))
     {
        EINA_COW_WRITE_BEGIN(evas_object_map_cow,
                             obj->map, Evas_Object_Map_Data, map_write)
          {
             obj->layer->evas->engine.func->image_free(ENC, map_write->surface);
             map_write->surface = NULL;
          }
        EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
     }
}

void
evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *eo_obj, int is_v, int was_v)
{
   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);

   if (!obj) return;
   if (obj->is_smart) return;
   if (is_v == was_v) return;
   if (is_v)
     {
        evas_add_rect(rects,
                      obj->cur->cache.clip.x,
                      obj->cur->cache.clip.y,
                      obj->cur->cache.clip.w,
                      obj->cur->cache.clip.h);
     }
   else
     {
        evas_add_rect(rects,
                      obj->prev->cache.clip.x,
                      obj->prev->cache.clip.y,
                      obj->prev->cache.clip.w,
                      obj->prev->cache.clip.h);
     }
}

void
evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *eo_obj)
{
   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);

   if (!obj) return;
   if (obj->is_smart) return;
   if (obj->cur->clipper == obj->prev->clipper) return;
   if ((obj->cur->clipper) && (obj->prev->clipper))
     {
        /* get difference rects between clippers */
        evas_rects_return_difference_rects(rects,
                                           obj->cur->clipper->cur->cache.clip.x,
                                           obj->cur->clipper->cur->cache.clip.y,
                                           obj->cur->clipper->cur->cache.clip.w,
                                           obj->cur->clipper->cur->cache.clip.h,
                                           obj->prev->clipper->prev->cache.clip.x,
                                           obj->prev->clipper->prev->cache.clip.y,
                                           obj->prev->clipper->prev->cache.clip.w,
                                           obj->prev->clipper->prev->cache.clip.h);
     }
   else if (obj->cur->clipper)
     {
        evas_rects_return_difference_rects(rects,
                                           obj->cur->geometry.x,
                                           obj->cur->geometry.y,
                                           obj->cur->geometry.w,
                                           obj->cur->geometry.h,
////	rl = evas_rects_return_difference_rects(obj->cur->cache.geometry.x,
////						obj->cur->cache.geometry.y,
////						obj->cur->cache.geometry.w,
////						obj->cur->cache.geometry.h,
                                           obj->cur->clipper->cur->cache.clip.x,
                                           obj->cur->clipper->cur->cache.clip.y,
                                           obj->cur->clipper->cur->cache.clip.w,
                                           obj->cur->clipper->cur->cache.clip.h);
     }
   else if (obj->prev->clipper)
     {
     evas_rects_return_difference_rects(rects,
                                        obj->prev->geometry.x,
                                        obj->prev->geometry.y,
                                        obj->prev->geometry.w,
                                        obj->prev->geometry.h,
////	rl = evas_rects_return_difference_rects(obj->prev->cache.geometry.x,
////						obj->prev->cache.geometry.y,
////						obj->prev->cache.geometry.w,
////						obj->prev->cache.geometry.h,
                                        obj->prev->clipper->prev->cache.clip.x,
                                        obj->prev->clipper->prev->cache.clip.y,
                                        obj->prev->clipper->prev->cache.clip.w,
                                        obj->prev->clipper->prev->cache.clip.h);
     }
}

void
evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
   if (!obj) return;

   evas_add_rect(rects,
                 obj->cur->cache.clip.x,
                 obj->cur->cache.clip.y,
                 obj->cur->cache.clip.w,
                 obj->cur->cache.clip.h);
   evas_add_rect(rects,
                 obj->prev->cache.clip.x,
                 obj->prev->cache.clip.y,
                 obj->prev->cache.clip.w,
                 obj->prev->cache.clip.h);
/*
        evas_add_rect(rects,
                      obj->cur->geometry.x,
                      obj->cur->geometry.y,
                      obj->cur->geometry.w,
                      obj->cur->geometry.h);
////	    obj->cur->cache.geometry.x,
////	    obj->cur->cache.geometry.y,
////	    obj->cur->cache.geometry.w,
////	    obj->cur->cache.geometry.h);
        evas_add_rect(rects,
                      obj->prev->geometry.x,
                      obj->prev->geometry.y,
                      obj->prev->geometry.w,
                      obj->prev->geometry.h);
////	    obj->prev->cache.geometry.x,
////	    obj->prev->cache.geometry.y,
////	    obj->prev->cache.geometry.w,
////	    obj->prev->cache.geometry.h);
*/
}

void
evas_object_clip_changes_clean(Evas_Object_Protected_Data *obj)
{
   Eina_Rectangle *r;

   EINA_LIST_FREE(obj->clip.changes, r) eina_rectangle_free(r);
}

void
evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, int is_v, int was_v EINA_UNUSED)
{
   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);
   Eina_Rectangle *r;
   Eina_List *l;
   unsigned int i;
   Eina_Array_Iterator it;
   int x, y, w, h;

   if (!obj) return;
   if (!obj->layer) return;

   if (obj->is_smart) goto end;
   /* FIXME: was_v isn't used... why? */
   if (!obj->clip.clipees)
     {
        Evas_Public_Data *e;
        e = obj->layer->evas;
        EINA_ARRAY_ITER_NEXT(rects, i, r, it)
          {
             /* get updates and clip to current clip */
             x = r->x;
             y = r->y;
             w = r->w;
             h = r->h;
             RECTS_CLIP_TO_RECT(x, y, w, h,
                                obj->cur->cache.clip.x,
                                obj->cur->cache.clip.y,
                                obj->cur->cache.clip.w,
                                obj->cur->cache.clip.h);
             if ((w > 0) && (h > 0))
               obj->layer->evas->engine.func->output_redraws_rect_add(ENC,
                                                                      x + e->framespace.x,
                                                                      y + e->framespace.y,
                                                                      w, h);
             /* get updates and clip to previous clip */
             x = r->x;
             y = r->y;
             w = r->w;
             h = r->h;
             RECTS_CLIP_TO_RECT(x, y, w, h,
                                obj->prev->cache.clip.x,
                                obj->prev->cache.clip.y,
                                obj->prev->cache.clip.w,
                                obj->prev->cache.clip.h);
             if ((w > 0) && (h > 0))
               obj->layer->evas->engine.func->output_redraws_rect_add(ENC,
                                                                      x + e->framespace.x,
                                                                      y + e->framespace.y,
                                                                      w, h);
          }
        /* if the object is actually visible, take any parent clip changes */
        if (is_v)
          {
             Evas_Object_Protected_Data *clipper;

             clipper = obj->cur->clipper;
             while (clipper)
               {
                  EINA_LIST_FOREACH(clipper->clip.changes, l, r)
                    {
                       /* get updates and clip to current clip */
                       x = r->x; y = r->y; w = r->w; h = r->h;
                       RECTS_CLIP_TO_RECT(x, y, w, h,
                                          obj->cur->cache.clip.x,
                                          obj->cur->cache.clip.y,
                                          obj->cur->cache.clip.w,
                                          obj->cur->cache.clip.h);
                       if ((w > 0) && (h > 0))
                         obj->layer->evas->engine.func->output_redraws_rect_add(ENC,
                                                                                x + e->framespace.x,
                                                                                y + e->framespace.y,
                                                                                w, h);
                       /* get updates and clip to previous clip */
                       x = r->x; y = r->y; w = r->w; h = r->h;
                       RECTS_CLIP_TO_RECT(x, y, w, h,
                                          obj->prev->cache.clip.x,
                                          obj->prev->cache.clip.y,
                                          obj->prev->cache.clip.w,
                                          obj->prev->cache.clip.h);
                       if ((w > 0) && (h > 0))
                         obj->layer->evas->engine.func->output_redraws_rect_add(ENC,
                                                                                x + e->framespace.x,
                                                                                y + e->framespace.y,
                                                                                w, h);
                    }
                  clipper = clipper->cur->clipper;
               }
          }
     }
   else
     {
        /* This is a clipper object: add regions that changed here,
         * See above: EINA_LIST_FOREACH(clipper->clip.changes) */
        evas_object_clip_changes_clean(obj);
        EINA_ARRAY_ITER_NEXT(rects, i, r, it)
           obj->clip.changes = eina_list_append(obj->clip.changes, r);
        eina_array_clean(rects);
     }

 end:
   EINA_ARRAY_ITER_NEXT(rects, i, r, it)
     eina_rectangle_free(r);
   eina_array_clean(rects);
}

int
evas_object_was_in_output_rect(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, int x, int y, int w, int h)
{
   if (obj->is_smart && !obj->map->prev.map && !obj->map->prev.usemap) return 0;
   /* assumes coords have been recalced */
   if ((RECTS_INTERSECT(x, y, w, h,
                        obj->prev->cache.clip.x,
                        obj->prev->cache.clip.y,
                        obj->prev->cache.clip.w,
                        obj->prev->cache.clip.h)))
     return 1;
   return 0;
}

int
evas_object_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
   if (obj->is_smart) return 0;
   if (obj->prev->cache.clip.a == 255)
     {
        if (obj->func->was_opaque)
          return obj->func->was_opaque(eo_obj, obj, obj->private_data);
        return 1;
     }
   return 0;
}

int
evas_object_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
{
   if (obj->is_smart) return 0;
   if (obj->func->is_inside)
     return obj->func->is_inside(eo_obj, obj, obj->private_data, x, y);
   return 0;
}

int
evas_object_was_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
{
   if (obj->is_smart) return 0;
   if (obj->func->was_inside)
     return obj->func->was_inside(eo_obj, obj, obj->private_data, x, y);
   return 0;
}
/* routines apps will call */

EAPI void
evas_object_ref(Evas_Object *eo_obj)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();

   efl_ref(eo_obj);

   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);
   if (!obj) return;
   obj->ref++;
}

EAPI void
evas_object_unref(Evas_Object *eo_obj)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();

   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);
   if (!obj) return;

   if (obj->ref == 0) return;
   obj->ref--;
   efl_unref(eo_obj);
   if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(eo_obj);

}

EAPI int
evas_object_ref_get(const Evas_Object *eo_obj)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return 0;
   MAGIC_CHECK_END();

   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);
   if (!obj) return 0;
   return obj->ref;
}

EAPI void
evas_object_del(Evas_Object *eo_obj)
{
   if (!eo_obj) return;
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();

   Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, MY_CLASS);

   if (!obj) return;
   evas_object_async_block(obj);
   if (obj->delete_me || obj->efl_del_called) return;
   if (obj->ref > 0)
     {
        obj->del_ref = EINA_TRUE;
        return;
     }
   evas_object_hide(eo_obj);
   obj->efl_del_called = EINA_TRUE;

   efl_del(eo_obj);
}

EOLIAN static Eina_Bool
_efl_canvas_object_efl_input_interface_seat_event_filter_get(Eo *eo_obj EINA_UNUSED,
                                                             Evas_Object_Protected_Data *obj,
                                                             Efl_Input_Device *seat)
{
   //It means this object accept events from any seat.
   if (!obj->events_filter_enabled)
     return EINA_TRUE;
   return eina_list_data_find(obj->events->events_whitelist, seat) ?
     EINA_TRUE : EINA_FALSE;
}

static void
_whitelist_events_device_remove_cb(void *data, const Efl_Event *event)
{
   Evas_Object_Protected_Data *obj = data;

   EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
     events->events_whitelist = eina_list_remove(events->events_whitelist,
                                                 event->object);
   EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);
}

EOLIAN static void
_efl_canvas_object_efl_input_interface_seat_event_filter_set(Eo *eo_obj,
                                                             Evas_Object_Protected_Data *obj,
                                                             Efl_Input_Device *seat,
                                                             Eina_Bool add)
{
   EINA_SAFETY_ON_NULL_RETURN(seat);

   if (efl_input_device_type_get(seat) != EFL_INPUT_DEVICE_TYPE_SEAT) return;

   obj->events_filter_enabled = EINA_TRUE;
   if (add)
     {
        if (eina_list_data_find(obj->events->events_whitelist, seat)) return;
        /* remove all previously focused seats, if any - it may happen
           since there wasn't a whitelist in place (no restrictions) */
        if ((!obj->events->events_whitelist) && (obj->layer) && (obj->layer->evas))
          {
             const Eina_List *devices, *l;
             Efl_Input_Device *dev;

             devices = obj->layer->evas->devices;
             EINA_LIST_FOREACH(devices, l, dev)
               {
                  if ((efl_input_device_type_get(dev) ==
                       EFL_INPUT_DEVICE_TYPE_SEAT) && (dev != seat))
                    efl_canvas_object_seat_focus_del(eo_obj, dev);
               }
          }
        EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
          events->events_whitelist = eina_list_append(events->events_whitelist, seat);
        EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);

        efl_event_callback_add(seat, EFL_EVENT_DEL,
                               _whitelist_events_device_remove_cb, obj);
     }
   else
     {
        efl_canvas_object_seat_focus_del(eo_obj, seat);
        EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
          events->events_whitelist = eina_list_remove(events->events_whitelist, seat);
        EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);

        efl_event_callback_del(seat, EFL_EVENT_DEL,
                               _whitelist_events_device_remove_cb, obj);
     }
}

static Eina_Bool
_is_event_blocked(Eo *eo_obj, const Efl_Event_Description *desc,
                  void *event_info)
{
   if ((desc == EFL_EVENT_FOCUS_IN) ||
       (desc == EFL_EVENT_FOCUS_OUT) ||
       (desc == EFL_EVENT_KEY_DOWN) ||
       (desc == EFL_EVENT_KEY_UP) ||
       (desc == EFL_EVENT_HOLD) ||
       (desc == EFL_EVENT_POINTER_IN) ||
       (desc == EFL_EVENT_POINTER_OUT) ||
       (desc == EFL_EVENT_POINTER_DOWN) ||
       (desc == EFL_EVENT_POINTER_UP) ||
       (desc == EFL_EVENT_POINTER_MOVE) ||
       (desc == EFL_EVENT_POINTER_WHEEL) ||
       (desc == EFL_EVENT_POINTER_CANCEL) ||
       (desc == EFL_EVENT_POINTER_AXIS) ||
       (desc == EFL_EVENT_FINGER_MOVE) ||
       (desc == EFL_EVENT_FINGER_DOWN) ||
       (desc == EFL_EVENT_FINGER_UP))
     {
        Efl_Input_Device *seat = efl_input_device_seat_get(efl_input_device_get(event_info));
        return !efl_input_seat_event_filter_get(eo_obj, seat);
     }
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_efl_canvas_object_efl_object_event_callback_call(Eo *eo_obj,
                                                  Evas_Object_Protected_Data *obj EINA_UNUSED,
                                                  const Efl_Event_Description *desc,
                                                  void *event_info)
{
   if (_is_event_blocked(eo_obj, desc, event_info)) return EINA_FALSE;
   return efl_event_callback_call(efl_super(eo_obj, MY_CLASS),
                                  desc, event_info);
}

EOLIAN static Eina_Bool
_efl_canvas_object_efl_object_event_callback_legacy_call(Eo *eo_obj,
                                                         Evas_Object_Protected_Data *obj EINA_UNUSED,
                                                         const Efl_Event_Description *desc,
                                                         void *event_info)
{
   if (_is_event_blocked(eo_obj, desc, event_info)) return EINA_FALSE;
   return efl_event_callback_legacy_call(efl_super(eo_obj, MY_CLASS),
                                         desc, event_info);
}

EOLIAN static void
_efl_canvas_object_efl_object_destructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();
   Evas_Object *proxy;
   Eina_List *l, *l2;
   Evas_Canvas3D_Texture *texture;
   Efl_Input_Device *dev;
   Evas_Public_Data *edata;
   Evas_Object_Pointer_Data *pdata;
   int event_id;

   edata = efl_data_scope_get(evas_object_evas_get(eo_obj), EVAS_CANVAS_CLASS);
   evas_object_hide(eo_obj);

   if (obj->events) EINA_COW_WRITE_BEGIN(evas_object_events_cow, obj->events, Evas_Object_Events_Data, events)
     {
        EINA_LIST_FREE (events->focused_by_seats, dev)
          {
             event_id = _evas_event_counter;
             efl_event_callback_del(dev, EFL_EVENT_DEL,
                                    _evas_focus_device_del_cb, obj);
             eina_hash_del_by_key(edata->focused_objects, &dev);
             _evas_focus_dispatch_event(obj, dev, EINA_FALSE);
             if ((obj->layer) && (obj->layer->evas))
               _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
          }
        EINA_INLIST_FREE(events->pointer_grabs, pdata)
          _evas_object_pointer_grab_del(obj, pdata);
        EINA_LIST_FREE(events->events_whitelist, dev)
          efl_event_callback_del(dev, EFL_EVENT_DEL, _whitelist_events_device_remove_cb, obj);
     }
   EINA_COW_WRITE_END(evas_object_events_cow, obj->events, events);

   event_id = _evas_object_event_new();
   evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_DEL, NULL, event_id, NULL);
   if ((obj->layer) && (obj->layer->evas))
     _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
   if (obj->name) evas_object_name_set(eo_obj, NULL);
   if (obj->layer)
     {
        if (obj->layer->evas)
          if (obj->layer->evas->pending_default_focus_obj == eo_obj)
            obj->layer->evas->pending_default_focus_obj = NULL;
     }
   else
     {
        efl_manual_free_set(eo_obj, EINA_FALSE);
        obj->clean_layer = 1;
        goto end;
     }
   evas_object_grabs_cleanup(eo_obj, obj);
   if (obj->clip.clipees)
     {
        ERR("object %p still has %d clippees after del callback",
            eo_obj, eina_list_count(obj->clip.clipees));
        /* "while" should be used for null check of obj->clip.clipees,
           because evas_objct_clip_unset can set null to obj->clip.clipees */
        while (obj->clip.clipees)
          {
             Evas_Object_Protected_Data *tmp;
             tmp = eina_list_data_get(obj->clip.clipees);
             evas_object_clip_unset(tmp->object);
          }
     }

   /* FIXME: Proxies should listen to source death */
   EINA_LIST_FOREACH_SAFE(obj->proxy->proxies, l, l2, proxy)
     {
        if (efl_isa(proxy, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
          evas_object_image_source_unset(proxy);
        if (efl_isa(proxy, EFL_GFX_FILTER_INTERFACE))
          efl_gfx_filter_source_set(proxy, NULL, eo_obj);
     }

   /* Eina_Cow has no way to know if we are going to really change something
    or not. So before calling the cow, let's check if we want to do something */
   if (obj->proxy->proxy_textures)
     {
        EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy,
                             Evas_Object_Proxy_Data, proxy_src)
          {
             EINA_LIST_FREE(proxy_src->proxy_textures, texture)
               evas_canvas3d_texture_source_set(texture, NULL);
          }
        EINA_COW_WRITE_END(evas_object_proxy_cow, obj->proxy, proxy_src);
     }

   if (obj->cur->clipper) evas_object_clip_unset(eo_obj);
   _efl_canvas_object_clip_prev_reset(obj, EINA_FALSE);

   evas_object_map_set(eo_obj, NULL);
   if (obj->is_smart) evas_object_smart_del(eo_obj);
   event_id = _evas_object_event_new();
   evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_FREE, NULL, event_id, NULL);
   if ((obj->layer) && (obj->layer->evas))
     _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id);
   evas_object_smart_cleanup(eo_obj);
   obj->delete_me = 1;
   evas_object_change(eo_obj, obj);
end:
   evas_object_event_callback_all_del(eo_obj);
   evas_object_event_callback_cleanup(eo_obj);

   efl_destructor(efl_super(eo_obj, MY_CLASS));
}

EOLIAN static void
_efl_canvas_object_efl_gfx_geometry_set(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED,
                                        int x, int y, int w, int h)
{
   efl_gfx_position_set(obj, x, y);
   efl_gfx_size_set(obj, w, h);
}

EAPI void
evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();
   efl_gfx_geometry_set(eo_obj, x, y, w, h);
}

EAPI void
evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
{
   efl_gfx_position_set((Evas_Object *)obj, x, y);
}

EOLIAN static void
_efl_canvas_object_efl_gfx_position_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
                                        Evas_Coord x, Evas_Coord y)
{
   Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
   Eina_Bool source_invisible = EINA_FALSE;
   Eina_List *was = NULL;
   Evas_Map *map;

   if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 1, x, y))
     return;

   map = obj->map->cur.map;
   if (map && map->move_sync.enabled)
     {
        Evas_Coord diff_x = x - obj->cur->geometry.x;
        Evas_Coord diff_y = y - obj->cur->geometry.y;
        evas_map_object_move_diff_set(map, diff_x, diff_y);
     }

   if (!(obj->layer->evas->is_frozen))
     {
        pass = evas_event_passes_through(eo_obj, obj);
        freeze = evas_event_freezes_through(eo_obj, obj);
        source_invisible = evas_object_is_source_invisible(eo_obj, obj);
        if ((!pass) && (!freeze) && (!source_invisible))
          was = _evas_pointer_list_in_rect_get(obj->layer->evas, eo_obj, obj,
                                               1, 1);
     }
   obj->doing.in_move++;

   if (obj->is_smart && obj->smart.smart && obj->smart.smart->smart_class->move)
     obj->smart.smart->smart_class->move(eo_obj, x, y);

   EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
     {
        state_write->geometry.x = x;
        state_write->geometry.y = y;
     }
   EINA_COW_STATE_WRITE_END(obj, state_write, cur);

   evas_object_update_bounding_box(eo_obj, obj, NULL);

////   obj->cur->cache.geometry.validity = 0;
   obj->changed_move = EINA_TRUE;
   evas_object_change(eo_obj, obj);
   evas_object_clip_dirty(eo_obj, obj);
   obj->doing.in_move--;
   if (!(obj->layer->evas->is_frozen))
     {
        evas_object_recalc_clippees(obj);
        if (!pass && !obj->is_smart && obj->cur->visible)
          _evas_canvas_event_pointer_in_list_mouse_move_feed(obj->layer->evas, was, eo_obj, obj, 1, 1, EINA_TRUE, NULL);
     }
   eina_list_free(was);
   evas_object_inform_call_move(eo_obj, obj);
}

EAPI void
evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
   efl_gfx_size_set((Evas_Object *)obj, w, h);
}

Eina_Bool
_efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj,
                                          Evas_Coord w, Evas_Coord h, Eina_Bool internal)
{
   if (!internal && (obj->doing.in_resize > 0))
     {
        WRN("evas_object_resize() called on object %p (%s) when in the middle "
            "of resizing the same object", eo_obj, efl_class_name_get(eo_obj));
        return EINA_TRUE;
     }

   if (w < 0) w = 0;
   if (h < 0) h = 0;

   if ((obj->cur->geometry.w == w) && (obj->cur->geometry.h == h))
     return EINA_TRUE;

   return EINA_FALSE;
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
                                    Evas_Coord w, Evas_Coord h)
{
   Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
   Eina_Bool source_invisible = EINA_FALSE;
   Eina_List *was = NULL;

   if (w < 0) w = 0;
   if (h < 0) h = 0;

   if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 1, w, h))
     return;

   if (!(obj->layer->evas->is_frozen))
     {
        pass = evas_event_passes_through(eo_obj, obj);
        freeze = evas_event_freezes_through(eo_obj, obj);
        source_invisible = evas_object_is_source_invisible(eo_obj, obj);
        if ((!pass) && (!freeze) && (!source_invisible))
          was = _evas_pointer_list_in_rect_get(obj->layer->evas, eo_obj,
                                               obj, 1, 1);
     }
   obj->doing.in_resize++;

   if (obj->is_smart && obj->smart.smart && obj->smart.smart->smart_class->resize)
     obj->smart.smart->smart_class->resize(eo_obj, w, h);

   EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
     {
        state_write->geometry.w = w;
        state_write->geometry.h = h;
     }
   EINA_COW_STATE_WRITE_END(obj, state_write, cur);

   evas_object_update_bounding_box(eo_obj, obj, NULL);

////   obj->cur->cache.geometry.validity = 0;
   evas_object_change(eo_obj, obj);
   evas_object_clip_dirty(eo_obj, obj);
   obj->doing.in_resize--;
   /* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */
   if (!(obj->layer->evas->is_frozen))
     {
        /* NB: If this creates glitches on screen then move to above position */
        evas_object_recalc_clippees(obj);

        //   if (obj->func->coords_recalc) obj->func->coords_recalc(eo_obj);
        if (!pass && !obj->is_smart && obj->cur->visible)
          _evas_canvas_event_pointer_in_list_mouse_move_feed(obj->layer->evas, was, eo_obj, obj, 1, 1, EINA_TRUE, NULL);
     }
   eina_list_free(was);
   evas_object_inform_call_resize(eo_obj);
}

EOLIAN void
_efl_canvas_object_efl_gfx_geometry_get(Eo *obj, Evas_Object_Protected_Data *pd EINA_UNUSED,
                                        int *x, int *y, int *w, int *h)
{
   efl_gfx_position_get(obj, x, y);
   efl_gfx_size_get(obj, w, h);
}

EAPI void
evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
{
   MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
   if (x) *x = 0;
   if (y) *y = 0;
   if (w) *w = 0;
   if (h) *h = 0;
   return;
   MAGIC_CHECK_END();
   efl_gfx_geometry_get(eo_obj, x, y, w, h);
}

EOLIAN static void
_efl_canvas_object_efl_gfx_position_get(Eo *obj EINA_UNUSED,
                                        Evas_Object_Protected_Data *pd,
                                        Evas_Coord *x, Evas_Coord *y)
{
   if ((pd->delete_me) || (!pd->layer))
     {
        if (x) *x = 0;
        if (y) *y = 0;
        return;
     }

   if (x) *x = pd->cur->geometry.x;
   if (y) *y = pd->cur->geometry.y;
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_get(Eo *obj EINA_UNUSED,
                                    Evas_Object_Protected_Data *pd,
                                    Evas_Coord *w, Evas_Coord *h)
{
   if (pd->delete_me)
     {
        if (w) *w = 0;
        if (h) *h = 0;
        return;
     }

   if (w) *w = pd->cur->geometry.w;
   if (h) *h = pd->cur->geometry.h;
}

static void
_evas_object_size_hint_alloc(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
{
   if (obj->size_hints) return;

   EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 32, );
   obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints);
   if (!obj->size_hints) return;
   EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints);
   obj->size_hints->max.w = -1;
   obj->size_hints->max.h = -1;
   obj->size_hints->align.x = 0.5;
   obj->size_hints->align.y = 0.5;
   obj->size_hints->dispmode = EVAS_DISPLAY_MODE_NONE;
}

/* Legacy only */
EAPI Evas_Display_Mode
evas_object_size_hint_display_mode_get(const Evas_Object *eo_obj)
{
   Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
   EVAS_OBJECT_DATA_ALIVE_CHECK(obj, EVAS_DISPLAY_MODE_NONE);
   if (!obj->size_hints) return EVAS_DISPLAY_MODE_NONE;
   return obj->size_hints->dispmode;
}

/* Legacy only */
EAPI void
evas_object_size_hint_display_mode_set(Eo *eo_obj, Evas_Display_Mode dispmode)
{
   Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
   EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
   evas_object_async_block(obj);
   if (EINA_UNLIKELY(!obj->size_hints))
     {
        if (dispmode == EVAS_DISPLAY_MODE_NONE) return;
        _evas_object_size_hint_alloc(eo_obj, obj);
     }
   if (obj->size_hints->dispmode == dispmode) return;
   obj->size_hints->dispmode = dispmode;

   evas_object_inform_call_changed_size_hints(eo_obj);
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
{
   if ((!obj->size_hints) || obj->delete_me)
     {
        if (w) *w = 0;
        if (h) *h = 0;
        return;
     }
   if (w) *w = obj->size_hints->min.w;
   if (h) *h = obj->size_hints->min.h;
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
{
   if (obj->delete_me)
     return;
   evas_object_async_block(obj);
   if (EINA_UNLIKELY(!obj->size_hints))
     {
        if (!w && !h) return;
        _evas_object_size_hint_alloc(eo_obj, obj);
     }
   if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return;
   obj->size_hints->min.w = w;
   obj->size_hints->min.h = h;

   evas_object_inform_call_changed_size_hints(eo_obj);
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_combined_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
{
   if ((!obj->size_hints) || obj->delete_me)
     {
        if (w) *w = 0;
        if (h) *h = 0;
        return;
     }
   if (w) *w = MAX(obj->size_hints->min.w, obj->size_hints->user_min.w);
   if (h) *h = MAX(obj->size_hints->min.h, obj->size_hints->user_min.h);
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_max_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
{
   if ((!obj->size_hints) || obj->delete_me)
     {
        if (w) *w = -1;
        if (h) *h = -1;
        return;
     }
   if (w) *w = obj->size_hints->max.w;
   if (h) *h = obj->size_hints->max.h;
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_max_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
{
   if (obj->delete_me)
     return;
   evas_object_async_block(obj);
   if (EINA_UNLIKELY(!obj->size_hints))
     {
        if ((w == -1) && (h == -1)) return;
        _evas_object_size_hint_alloc(eo_obj, obj);
     }
   if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return;
   obj->size_hints->max.w = w;
   obj->size_hints->max.h = h;

   evas_object_inform_call_changed_size_hints(eo_obj);
}

EAPI void
evas_object_size_hint_request_get(const Eo *eo_obj, Evas_Coord *w, Evas_Coord *h)
{
   Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
   EVAS_OBJECT_DATA_VALID_CHECK(obj);

   if ((!obj->size_hints) || obj->delete_me)
     {
        if (w) *w = 0;
        if (h) *h = 0;
        return;
     }
   if (w) *w = obj->size_hints->request.w;
   if (h) *h = obj->size_hints->request.h;
}

EAPI void
evas_object_size_hint_request_set(Eo *eo_obj, Evas_Coord w, Evas_Coord h)
{
   Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
   EVAS_OBJECT_DATA_ALIVE_CHECK(obj);

   evas_object_async_block(obj);
   if (EINA_UNLIKELY(!obj->size_hints))
     {
        if (!w && !h) return;
        _evas_object_size_hint_alloc(eo_obj, obj);
     }
   if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return;
   obj->size_hints->request.w = w;
   obj->size_hints->request.h = h;

   evas_object_inform_call_changed_size_hints(eo_obj);
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
{
   if ((!obj->size_hints) || obj->delete_me)
     {
        if (w) *w = 0;
        if (h) *h = 0;
        return;
     }
   if (w) *w = obj->size_hints->user_min.w;
   if (h) *h = obj->size_hints->user_min.h;
}

EOLIAN static void
_efl_canvas_object_efl_gfx_size_hint_hint_min_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
{
   if (obj->delete_me)
     return;
   evas_object_async_block(obj);
   if (EINA_UNLIKELY(!obj-></