summaryrefslogblamecommitdiff
path: root/src/lib/ecore_evas/Ecore_Evas.h
blob: d484bb1b951e967036ca18cbca3265e3043d7866 (plain) (tree)
1
2
3
4
5
6
7
8
9


                     
                 
                             
 
           
            
      

             
                 



                                     
        

                                    
       
     





                                                       


              
      
 

                     
                                 
  
                                                                                 
                                          
                                       
                                       


                                             




                                   
                                   
  





                                                             



                  

                                                                        
                 
  
                                                                             
                                                                            









                                                                               
                                                 






                                             


     
                                                                                 
                                                                            


                            
                                
                                  
                                    
                               
                               
                             
                                 
                             
                                 

                                     
                             
                                
 
                                    
 
                                     
                                   
                                 
                                

                                                    
                                  

                                    
                                 
                                  
                                  

                                 
                                    

                                       
                                       
                                
                         
                             
                                 
                                 

                               

                         















                                     





                                                                           

                                          


                                                                                                                                                                                                                                                                                                                                                                                                                                             
                               
 



                                               

                                             

                                    

                                 
                                                                                     
 
   
                                      
  
                                                                               




                                                                 
                                       
 
   
                                           
  
                                                                                   




                                                                                
                                           
 









                                                                           
                                                                 



                                                   

                                            

                                                                           
   
                                                    
 
   
                                                   
  
                                                               


                                                                       
                                              
 

                                                        
  
                                        
   
                                                             
 
   
                                                                              
  
                                                
                                                                         
                                                                    
                                                              




                                                                         
                                                                              
                                                                        

                                                                       
                                                             
   
                                                                                                                
 
   
                                                                 

                                    

                                                                          



                                                                         
                                                                        





                                                                          
 
   
                                                             
  
                                     
  

                                                                            
  


                                                            
 
   
                                                                      

                                    

                                                                    








                                                                                   
 
   
                                                       

                                     
                                                                        



                                                                  
 
   
                                             







                                                                            

                                                                              











                                                                                               
 
   
                                                                              







                                                                            
                                                                         
                                                            
                                                           


                                                                             





                                                       
             

                                                                                                       
 
   
                                                                

                           
                                                              
  
                                                                              
                          

                                                                        
                                     

                                                                    
 
   
                                                                    

                                  
                                                                  

                              
                                     

                                                            

   
                                                             














                                                                                            
                                                                  








                                                                                            
 
   
                                                         

                           
                                                                 
  

                                                                               
  
                                           



                                                                        
 
   
                                                                    

                                  
                                                                    
  
                                           



                                                                
 
   
                                                                  

                           
                                                                     
  

                                                                             



                                                                         
 
   
                                                                     

                                  
                                                                     



                                                                 
 
   
                                                                  

                           
                                                        
  

                                                                           



                                                                         
 
   
                                                                     

                                  
                                                                     



                                                                 
 
   
                                                                    



                                         
                                                                              






                                                                          
                                                                                         
 
   
                                    
  
                                                                
  
                                  
                                  



                                     
                                                                         
 
   
                                                   




                                                                            
  


                                                                        
                                                                      
 
   
                                                   
  
                                                         
  





                                  
                                                             
 
   
                                    





                                                                           
  


                                                                        
                                                                         
 
   
                                                     
  
                                                        
  





                                  
                                                             
 
   
                                                         






                                                                       
  


                                                                        
                                                                       
 
   
                              
  
                                                        
  





                                  
                                                            
 
   
                                                                

                           
                                      


                                                                         
  


                                                                        
                                                                                   
 
   
                                             
  
                                                                   
  
                                  
                                        



                                         
                                                                       
 
   
                                     







                                                                        
  


                                                                        
                                                                           
 
   
                                     
  
                                                             
  
                                  
                                



                                   
                                                                 
 
   
                                                        






                                                                                
 
   
                                                            






                                                                           
 
   
                                                                  

                                     
                                                 




                                                                 
 
   
                                                  











                                                                        
 
   
                                                  

                                  
                                         





                                                            
 
   
                                                           

                           
                                                                  
  

                                                                               



                                                                        
 
   
                                                                    

                                  
                                                                    



                                                                
 
   
                                                                                 







                                                                                    
 
   
                                  







                                                                                    
 
   
                                  







                                                                         
 
   
                                                      

                                  
                                                                





                                                                                                                           
 
   
                                                      



                                                                                
                                                                                   




                                                                                                                 
 
   
                                                                                          







                                                                                             
 
   
                                           







                                                                                             
 
   
                                           

                                                                    
                                                         




                                                                                     
 
   
                                                       








                                                                                                                          
 
   
                                                       



                                                                                   
                                                                                    




                                                                                                                            
 
   
                                                                








                                                                                                
 
   
                                                                






                                                                                       
 
   
                                        





                                                                             
 
   
                                                            


                                                    
  





                                                                                      
                                                                                          
                                                                                     


                                                                                          
                                                                                      

                                  
                

                                                                               
 
   
                                                      

                           
                                              
  



                                                                           
                

                                                                             
 
   
                                                      



                                         
                                                                 
  

                                                                        
                

                                                                                                 
 
   
                                                      


                                          
                                                                      
  

                                                                        
                

                                                                            
 
   
                                                



                                         
                                                                      
  

                                                                        
                

                                                                                                 
 
   
                                             



                                                                            
  




                                                                                
 
   
                                                 


                                         
                                                                       
  






                                                                                         
                                        


















                                                                                                       
 
   
                                       














                                                                                                
 
   
                                                        

                                               
                                                                         








                                                                                                                                                                  
 
   
                                                       

                                               
                                                                  










                                                                                                                                                    
                              













                                                                        
 
   
                                













                                                                        
 
   
                                          






                                              
                                                                      








                                                                                    
 
   
                                                     

                           
                                                








                                                                          
 
   
                                                     

                           
                                                 
  

                                                                              





                                                                              
 
   
                                                    

                           
                                             




                                                               
 
   
                                       










                                                                        
 
   
                                       










                                                                        
 
   
                                                  








                                                                        
 
   
                                                  



                                                        


                                                            
 
   
                                                           

                           

                     






                                                                                         
 
   
                                                           
  


                                                        



                                                                     


                                                                                                 
 
   
                                                     

                                                    
                                              



                                                                        
 
                                       

   
                                                
  






                                                             

                                                                                                 
   
                                                                                                                           

   
                                                             



                                                         


                                                                          
   
                                                                              

   
                                                                  
  
                                                          
                                                                                                       

                                                                            
   
                                                                                             

   
                                                                              
  
                                                            
                                                                                           

                                                                                                       
   
                                                                                     

   
                                                                
  

                                                        

                                                                            
   
                                                                                                        
 
   
                                                                             
                                       


                                                                            
                              
  




                                                                                                                                  
                                                                       
  

                                                    
  
                                                                        


                                                                            
                              
  



                                                                             













                                                                      
 
   
                                              
  






                                                                            

                                                                                                 
   
                                                                                                                     



                                                          








                                                                            











                                                                                                 
   
                                                                                                                                             

   
                                                           



                                                           


                                                                          
   
                                                                        

   
                                                             
  
                                                          
                                                                                                       

                                                                            
   
                                                                                       

   
                                                                            
  
                                                            


                                                                                                       
                                                                                           
   
                                                                               

   
                                                           
  
                                                        
                                                       

                                                                            
   
                                                                                                  

   
                                                                           
  



                                                               

                                                                                                         
   
                                                                                                                                                                                 
 
   

                                                                             


                                                                            
                              
  



                                                                                                                            
   
                                                                       
  

                                                    
  
                                                                        


                                                                            
                              
  



                                                                       

















                                                                                                                                              
 
   
                                              
  





                                                       
                                                                                          
 

                                                                                                                              
 






















                                                                       
                                                                                                                                         
























                                                                        
                                                                                                                                         
 








                                                                             
                                                                             







                                             

                                                                           








                                                    
                                                                                          











                                                              
                                                                           
 









                                                                          
                                                                          



























                                                                            
 

















                                                                        
                                                                                                             

















                                                                           
                                                                                                                                   
 
   
                                                              


















                                                                      
                                                         

   
                                                              































                                                                       
                                                                                                                                                                            

   
                                                               













                                                                     
                                                                  
 
   
                                                                             





                                                                           
                                                                  





                                                                         
                                                              











                                                                     

                                                    












                                                                    
                                                                          
                 

                                                                
                                                











                                                                         

                                                                            
  
                                                             
  




                                                        
                                                                     
                                                 









                                                                      
                                                                   



                                                                      
                                                                      
                                                                      
                                                                    
                                                                   
                                                                  

                     






                                                                       










                                                                      
                                                                        

   
                                                                
                                                    




                                                        
                                                                        








                                                                      
                                                                  
 
















                                                                       





                                                                             














                                                                       





                                                                               
                                                                                 




                                                                                  





                                                                         





                                                                    
                                                                           
 












                                                                        
                                                                                                                               
 
                                                                                                                                 











                                                                        
                                                                                                        
 



                                                                              
                                                                                               




                                                                                 
                                                                                                  




                                                                                   
                                                                                                    




                                                                                    
                                                                                                     
 



                                                                                  
                                                                                                   
 
                                                                                                    
 












                                                                       
                                                                 



                                             
 












                                                                       
                                                                                        

 
                                
   
                                                               
  
                                                      



                                                                 
                                                                  
 
   
                                               

                                               
                                                                              


                                                      
                                                          
 
   
                              




                                                   
                                                 
 
   
                                                            


                                                                             

                                                                           



                                                                            

                             
                                                                            
 
   
                                                      














                                                                               
                                                                                        
 
     
                                                       
  

                                               
  





                                                                         
                                                                                          
 
   
                                                     
  

                                               
  





                                                                         
                                                                                        
 
   
                                                     
  

                                               
  





                                                                         
                                                                                        
 
   
                                                     
  

                                               
  





                                                                         
                                                                                        
 
   
                                                               
  

                                               
  





                                                                         
                                                                                                  
 
   
                                                        
  

                                               
  





                                                                         
                                                                                           
 
   
                                                         







                                                                         
                                                                         
  
                                                 
   
                                                                                            
 
   
                                                          
  

                                               
  




                                                                         
                                                                         
  
                                                  
   
                                                                                             
 
   
                                                         
  

                                               
  




                                                                         
  



                                                                                                                
 
   
                                                          
  

                                               
  




                                                                         
  



                                                                                                                 
 
   
                                                       
  

                                               
  





                                                                         
                                                                                          
 
   
                                                          
  








                                                                         
                                                                                            
 
   
                                                         
  

                                               
  




                                                                         
  


                                                                                                      
 
   
                                                          
  

                                               
  




                                                                         
  


                                                                                                       
 
   
                                                         
  

                                               
  





                                                                         
  
                                               
   
                                                                                            
 
   
                                                          
  

                                               
  


                                                                        
                                                                   

                                                                         
  
                                                
   
                                                                                             
 
   
                                                           
  

                                               
  





                                                                         
                                                                                              
 
   
                                                                  
  

                                               
  





                                                                         
                                                                                               
 
   
                                                        
  








                                                                         
                                                                                            
 
   
                                                       
  

                                               
  




                                                                         

             


                                                                                                
   
                                    
  
                                                      
                                           
   
                                                      

   
                                                               
  





                                                                       
                                                                       

   
                                                      










                                                                               
                                                                         

   
                                                         


                                                        
   
                                                             
 
   
                                      




                                     
                                                 
 
   
                                      




                                                 
                                                 

   
                                                                                 
  



                                           
                                                     
 

   
                                                                














                                                                     
                                                                       

   
                                                                     









                                                               
                                                                               

   
                                                                










                                                                    
                                                                       

   
                                                                     









                                                               
                                                                               

   
                                                              










                                                                      
                                                                        

   
                                                                  









                                                               
                                                                                

   
                                                                





                                                                     
                                                                  

                                                    
                                                                        

   
                                                                    









                                                               
                                                                                
 
   
                                                         









                                                                               
                                                                             



                                                                
                                                  
  
                                      
                                 
   
                                                                                                          
 
   
                                                                       
  
                                  








                                                                              
                                 
   
                                                                                                                    
 
   
                                                         

                           







                                                                               
                                                                                  



                                                                                                                 

   
                                                          
  
                                                
  


                                                                              
                    


                                      
              



                                                                 
















                                                                                            
                                                                    










                                                                                  
                                                                                  






                                                                                        
                                                                         

















                                                                                            
                                                                      






                                                                      
                                                                       

   
                                                                     



                                                                     
                                                               

   
                                                                        



                                              









                                                                               
                                                                      







                                                                              
   
                                                                                              

   
                                                                     
  

                                            
   
                                                                                    

   
                                                            
  

                                                                  
   
                                                                               

   
                                                               
  

                                                                       
   
                                                                

   
                                                        


                                                               
   
                                                                         

   
                                                            


                                                                    
   
                                                             

   
                                         
  
                                    












                                                                             
                                                                                       

   
                                                      
  
                                    





                                                                            
                                                                    
 
   
                                                                                










                                                                               
 
   
                                                                                 






                                                                   

   
                                                                     





                                                                 
                                                          



                                               


                                                               






                                                                      
   
                                                                             



                                  
                                    
                                                                          


                                                                  
   
                                                                
 
   
                                                                  

                                                                              



                                                                        


             

                                                                                                      
   
                                                                    




                                                                          
             


                                                                                       

                                                                                                 
 
   
                                                           


                                                                             

              

                                                                                            

   
                                                           





                                                                             


                                                                                                      
                                                         



                                                  
                                                            

































                                                                              
                                                                                                                         
 
   
                                                                         


                                                     
                                                            
   
                                                                                 
 
   
                                                

                                                   
                                                                              
   
                                                                        
 


                                                                                                                                                                                      
   
                                              






                                                                              
                                                       
 
   
                                                  




                                                                                  
 









                                                                        
                                                                                  








                                       
                                                              







                                             
                                                                      















                                                                               
                                                                                                         







                                                                        

                                                      





                                                                          
                                                                                                         














                                                                                           
                                                                                                              










                                                                       
                                                                     










                                                                      
                                                                     





                                                                      

                                                                     

                           
   
                                                 
  


                                                    
                                                                      
  





                                                                                                          
                                                                   
  

                                
                                               
  





                                                                                                           




                                                                                                          
                                                                                                    
                                                                                              
                                                          
                                                                                            
  



                                         



                                                                                     
 

      
   













                                                                          
                                                                       
                            








                                                                   
                                                                 
  

                                                      
                                                                           
  




                                                                                  
                                              
  



                                                  
                                                            
  




                                                                
                                                    
  
                                             
  
                                                                 







                                                     
                                                    
  
                                             
  
                                                                 







                                         
                                      



                                                      
                                                                                         
  

                                                            








                                                              
                                                 
  
                                        
  
                                                         
  




                                                        
                                                                             
  

                                                



                                                                    





                                                                 
                                                                             

                                                        
  



                                                  

















                                                                                                                                                                  




     
   
                                                                                    
                            
  

                                                                                     
                                                
                                                             
                                                                          
                                             




             

                                                                                                                                      
 
   
                                                                                
  

                                               
                                                              
  


                                                                       



                                                                            
  
                                                                       





















                                                                                  
                                                                           

                                                                       
  
                                                            
  
        
                                                                          
    


                                                                
    
  
                                                                          
    


                                                                     
    
  

                   
                                                         
                                                  
                                                         


                                                  
  

                                                                              
                                                                         
                                                                                        
  



                                                 
  




                                                          
                                                                         
          
  









                                                                             
  

                                                                           
                  

                                    
                                  

                                                 
  

             
                                                                                                                

   
                                                             










                                                                                          
                                                             

                            








                                                                       
                                                              
  
                                                                             
  



                                                                             
  
                                                                             
                                                                
                                                                           
                                                                            
                                                                              
                 
  

                                                 
  

             
                                                                  

   
                                                                   
  
                                                                               

                                                       
                                           
  

                                               
  

             

                                                                    
   
                                                 
  
                                                                                                 
                                                                               
  





                                                                             
                                                                       

                                                                      
  
        





                                                                
           
  
                                    
                                      




                                                                  
                                                                              
                     
  

                                                                         

                                                                      



                                                                             

                                  
  

             
                                                                                                                 
 
   
                                                                 
  


                                                                              
  
                                        




                                                                                        
                                                    
  


                                                            
  
                                                          
  




                                                                                         
                                                         









                                                                                                                                
                                                        
  
                                                 
                                                             
  


                                                                                         
  




                                                              
                                                          
  
                                                 
                                                               
  


                                                                                         
  




                                                                        
                                                       
  
                                                 
                                                            
  


                                                                                         
  



                                                           

























                                                                                                                          




























































                                                                                                                                                   
                                                                                                               


















                                                                                                                       

                                                                                                                    




















                                                                                                               
                                                                                                                         








                                                                                                              
                                                                                     
   
                                                                                                          










                                                                                            
                                                                                                







                                                                                                         
                                                                                     
   
                                                                                            






















                                                                                                               
                                                                                     


                                                                                   





                                                                                                         

                                                                                                                      








                                                                                                                   
   


     



     



                  


            
      
 
#ifndef _ECORE_EVAS_H
#define _ECORE_EVAS_H

#include <Evas.h>
#include <Ecore_Evas_Types.h>

#ifdef EAPI
# undef EAPI
#endif

#ifdef _WIN32
# ifdef EFL_BUILD
#  ifdef DLL_EXPORT
#   define EAPI __declspec(dllexport)
#  else
#   define EAPI
#  endif
# else
#  define EAPI __declspec(dllimport)
# endif
#else
# ifdef __GNUC__
#  if __GNUC__ >= 4
#   define EAPI __attribute__ ((visibility("default")))
#  else
#   define EAPI
#  endif
# else
#  define EAPI
# endif
#endif

/**
 * @file Ecore_Evas.h
 * @brief Evas wrapper functions.
 *
 * The following is a list of examples that partially exemplify Ecore_Evas's API:
 * @li @ref ecore_evas_callbacks_example_c
 * @li @ref ecore_evas_object_example_c
 * @li @ref ecore_evas_basics_example_c
 * @li @ref Ecore_Evas_Window_Sizes_Example_c
 * @li @ref Ecore_Evas_Buffer_Example_01_c
 * @li @ref Ecore_Evas_Buffer_Example_02_c
 */

/* FIXME:
 * to do soon:
 * - iconfication api needs to work
 * - maximization api needs to work
 *
 * later:
 * - buffer back-end that renders to an evas_image_object ???
 * - qt back-end ???
 * - dfb back-end ??? (dfb's threads make this REALLY HARD)
 */

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup Ecore_Evas_Group Ecore_Evas wrapper/helper set of functions
 * @ingroup Ecore
 *
 * Ecore evas is a set of functions that make it easy to tie together ecore's
 * main loop and input handling to evas. As such it's a natural base for EFL
 * applications. While this combination makes it easy to create the basic
 * aspects all applications need, for normal applications(ones with buttons,
 * checkboxes and layouts) one should consider using Elementary.
 *
 * Ecore evas is extremely well suited for applications that are not based on
 * widgets. It has a main loop that delivers events, does basic window handling
 * and leaves all of the drawing up to the user. This works very well if used
 * in conjunction with Edje or if doing custom drawing as, for example, is done
 * in games.
 *
 * This is a list of examples of these functions:
 * @li @ref ecore_evas_basics_example_c
 * @li @ref ecore_evas_object_example_c
 * @li @ref ecore_evas_callbacks_example_c
 * @li @ref Ecore_Evas_Window_Sizes_Example_c
 * @li @ref Ecore_Evas_Buffer_Example_01_c
 * @li @ref Ecore_Evas_Buffer_Example_02_c
 *
 * @{
 */

/* these are dummy and just tell you what API levels ecore_evas supports - not if
 * the actual support is compiled in. You need to query for that separately.
 */
#define HAVE_ECORE_EVAS_X 1
#define HAVE_ECORE_EVAS_FB 1
#define HAVE_ECORE_EVAS_X11_GL 1
//#define HAVE_ECORE_EVAS_X11_16 1
//#define HAVE_ECORE_EVAS_DIRECTFB 1
#define HAVE_ECORE_EVAS_WIN32 1
#define HAVE_ECORE_EVAS_COCOA 1
#define HAVE_ECORE_EVAS_SDL 1
//#define HAVE_ECORE_EVAS_WINCE 1
#define HAVE_ECORE_EVAS_EWS 1
#define HAVE_ECORE_EVAS_PSL1GHT 1
#define HAVE_ECORE_EVAS_WAYLAND_SHM 1
#define HAVE_ECORE_EVAS_WAYLAND_EGL 1
#define HAVE_ECORE_EVAS_DRM 1
#define HAVE_ECORE_EVAS_DRM_GL 1

typedef enum _Ecore_Evas_Engine_Type
{
   ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
   ECORE_EVAS_ENGINE_SOFTWARE_XLIB,
   ECORE_EVAS_ENGINE_XRENDER_X11,
   ECORE_EVAS_ENGINE_OPENGL_X11,
   ECORE_EVAS_ENGINE_SOFTWARE_XCB, /* @deprecated */
   ECORE_EVAS_ENGINE_XRENDER_XCB, /* @deprecated */
   ECORE_EVAS_ENGINE_SOFTWARE_GDI,
   ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
   ECORE_EVAS_ENGINE_DIRECT3D,
   ECORE_EVAS_ENGINE_OPENGL_GLEW,
   ECORE_EVAS_ENGINE_OPENGL_COCOA,
   ECORE_EVAS_ENGINE_SOFTWARE_SDL,
   ECORE_EVAS_ENGINE_DIRECTFB,
   ECORE_EVAS_ENGINE_SOFTWARE_FB,
   ECORE_EVAS_ENGINE_SOFTWARE_8_X11,
   ECORE_EVAS_ENGINE_SOFTWARE_16_X11,
   ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW,
   ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE,
   ECORE_EVAS_ENGINE_OPENGL_SDL,
   ECORE_EVAS_ENGINE_EWS,
   ECORE_EVAS_ENGINE_PSL1GHT,
   ECORE_EVAS_ENGINE_WAYLAND_SHM,
   ECORE_EVAS_ENGINE_WAYLAND_EGL,
   ECORE_EVAS_ENGINE_DRM,
   ECORE_EVAS_ENGINE_OPENGL_DRM
} Ecore_Evas_Engine_Type;

#define ECORE_EVAS_OPT_NONE         0
#define ECORE_EVAS_OPT_INDIRECT     1
#define ECORE_EVAS_OPT_VSYNC        2
#define ECORE_EVAS_OPT_SWAP_MODE    3
#define ECORE_EVAS_OPT_GL_DEPTH     4
#define ECORE_EVAS_OPT_GL_STENCIL   5
#define ECORE_EVAS_OPT_GL_MSAA      6
#define ECORE_EVAS_OPT_LAST         7

#define ECORE_EVAS_SWAP_MODE_AUTO   0
#define ECORE_EVAS_SWAP_MODE_FULL   1
#define ECORE_EVAS_SWAP_MODE_COPY   2
#define ECORE_EVAS_SWAP_MODE_DOUBLE 3
#define ECORE_EVAS_SWAP_MODE_TRIPLE 4


/**
 * @enum _Ecore_Evas_Avoid_Damage_Type
 * This option causes updates of the Ecore_Evas to be done on a pixmap, and
 * then copied to the window, or the pixmap used directly on the window,
 * depending on the setting.
 */
typedef enum _Ecore_Evas_Avoid_Damage_Type
{
   ECORE_EVAS_AVOID_DAMAGE_NONE = 0, /**< every expose event triggers a new damage and consequently render of the affected area. The rendering of things happens directly on the window */
   ECORE_EVAS_AVOID_DAMAGE_EXPOSE = 1, /**< there's a pixmap where everything is rendered into, and then copied to the window. On expose events, there's no need to render things again, just to copy the exposed region to the window */
   ECORE_EVAS_AVOID_DAMAGE_BUILT_IN = 2 /**<  there's the same pixmap as the previous one, but it is set as a "background pixmap" of the window. The rendered things appear directly on the window, with no need to copy anything, but would stay stored on the pixmap, so there's no need to render things again on expose events. This option can be faster than the previous one, but may lead to artifacts during resize of the window */
} Ecore_Evas_Avoid_Damage_Type;

typedef enum _Ecore_Evas_Object_Associate_Flags
{
  ECORE_EVAS_OBJECT_ASSOCIATE_BASE  = 0,
  ECORE_EVAS_OBJECT_ASSOCIATE_STACK = 1 << 0,
  ECORE_EVAS_OBJECT_ASSOCIATE_LAYER = 1 << 1,
  ECORE_EVAS_OBJECT_ASSOCIATE_DEL = 1 << 2
} Ecore_Evas_Object_Associate_Flags;

/* module setup/shutdown calls */

EAPI int         ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine);

/**
 * @brief Inits the Ecore_Evas system.
 *
 * @return How many times the lib has been initialized, @c 0 indicates failure.
 *
 * Set up the Evas wrapper system. Init Evas and Ecore libraries.
 *
 * @see ecore_evas_shutdown()
 */
EAPI int         ecore_evas_init(void);

/**
 * @brief Shuts down the Ecore_Evas system.
 *
 * @return @c 0 if ecore evas is fully shut down, or > @c 0 if it still being used.
 *
 * This closes the Evas wrapper system down. Shut down Evas and Ecore libraries.
 *
 * @see ecore_evas_init()
 */
EAPI int         ecore_evas_shutdown(void);

/**
 * @brief Sets application compositor synchronization on/off
 *
 * Turns on client+server synchronized rendering in X11.  App comp sync
 * is disabled by default, but can be turned on optionally.
 *
 * @note This is an experimental functionality and is likely to be removed.
 *
 * @param do_sync True to enable comp syncing, False to disable
 */
EAPI void        ecore_evas_app_comp_sync_set(Eina_Bool do_sync);

/**
 * @brief Get the compositing synchronization state
 *
 * @return True if app comp sync is enabled.
 *
 * @note This is an experimental functionality and is likely to be removed.
 *
 */
EAPI Eina_Bool   ecore_evas_app_comp_sync_get(void);

/**
 * @brief Returns a list of supported engine names.
 *
 * @return Newly allocated list with engine names. Engine names
 * strings are internal and should be considered constants, do not
 * free or modify them, to free the list use ecore_evas_engines_free().
 */
EAPI Eina_List  *ecore_evas_engines_get(void);

/**
 * @brief Free list returned by ecore_evas_engines_get()
 *
 * @param engines List with engine names
 */
EAPI void        ecore_evas_engines_free(Eina_List *engines);

/**
 * @brief Creates a new Ecore_Evas based on engine name and common parameters.
 *
 * @param engine_name Engine name as returned by
 *        ecore_evas_engines_get() or @c NULL to use environment variable
 *        ECORE_EVAS_ENGINE, which can be undefined and in this case
 *        this call will try to find the first working engine.
 * @param x Horizontal position of window (not supported in all engines)
 * @param y Vertical position of window (not supported in all engines)
 * @param w Width of window
 * @param h Height of window
 * @param extra_options String with extra parameter, dependent on engines
 *        or @ NULL. String is usually in the form: 'key1=value1;key2=value2'.
 *        Pay attention that when getting this from shell commands, most
 *        consider ';' as the command terminator, so you need to escape
 *        it or use quotes.
 * @return Ecore_Evas instance or @c NULL if creation failed.
 */
EAPI Ecore_Evas *ecore_evas_new(const char *engine_name, int x, int y, int w, int h, const char *extra_options);

/**
 * @brief Sets whether an Ecore_Evas has an alpha channel or not.
 *
 * @param ee The Ecore_Evas to shape
 * @param alpha @c EINA_TRUE to enable the alpha channel, @c EINA_FALSE to
 * disable it
 *
 * This function allows you to make an Ecore_Evas translucent using an
 * alpha channel. See ecore_evas_shaped_set() for details. The difference
 * between a shaped window and a window with an alpha channel is that an
 * alpha channel supports multiple levels of transparency, as opposed to
 * the 1 bit transparency of a shaped window (a pixel is either opaque, or
 * it's transparent).
 *
 * @warning Support for this depends on the underlying windowing system.
 */
EAPI void        ecore_evas_alpha_set(Ecore_Evas *ee, Eina_Bool alpha);

/**
 * @brief Queries whether an Ecore_Evas has an alpha channel.
 *
 * @param ee The Ecore_Evas to query.
 *
 * @return @c EINA_TRUE if ee has an alpha channel, @c EINA_FALSE if it does
 * not.
 *
 * @see ecore_evas_alpha_set()
 */
EAPI Eina_Bool   ecore_evas_alpha_get(const Ecore_Evas *ee);

/**
 * @brief Sets whether an Ecore_Evas has an transparent window or not.
 *
 * @param ee The Ecore_Evas to shape
 * @param transparent @c EINA_TRUE to enable the transparent window,
 * @c EINA_FALSE to disable it
 *
 * This function sets some translucency options, for more complete support see
 * ecore_evas_alpha_set().
 *
 * @warning Support for this depends on the underlying windowing system.
 *
 * @see ecore_evas_alpha_set()
 */
EAPI void        ecore_evas_transparent_set(Ecore_Evas *ee, Eina_Bool transparent);

/**
 * @brief Queries whether an Ecore_Evas is transparent.
 *
 * @param ee The Ecore_Evas to query.
 * @return @c EINA_TRUE if ee is transparent, @c EINA_FALSE if it isn't.
 *
 * @see ecore_evas_transparent_set()
 */
EAPI Eina_Bool   ecore_evas_transparent_get(const Ecore_Evas *ee);

/**
 * @brief Gets the geometry of an Ecore_Evas.
 *
 * @param ee The Ecore_Evas whose geometry y
 * @param x A pointer to an int to place the x coordinate in
 * @param y A pointer to an int to place the y coordinate in
 * @param w A pointer to an int to place the w size in
 * @param h A pointer to an int to place the h size in
 *
 * This function takes four pointers to (already allocated) ints, and places
 * the geometry of @p ee in them. If any of the parameters are not desired you
 * may pass @c NULL for them.
 *
 * @code
 * int x, y, w, h;
 * ecore_evas_geometry_get(ee, &x, &y, &w, &h);
 * @endcode
 *
 * @see ecore_evas_new()
 * @see ecore_evas_resize()
 * @see ecore_evas_move()
 * @see ecore_evas_move_resize()
 */
EAPI void        ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);

/**
 * @brief Gets the geometry which an Ecore_Evas was latest recently requested.
 *
 * @param ee The Ecore_Evas whose geometry y
 * @param x A pointer to an int to place the x coordinate in
 * @param y A pointer to an int to place the y coordinate in
 * @param w A pointer to an int to place the w size in
 * @param h A pointer to an int to place the h size in
 *
 * This function takes four pointers to (already allocated) ints, and places
 * the geometry which @p ee was latest recently requested . If any of the
 * parameters are not desired you may pass @c NULL for them.
 * This function can represent recently requested geometry.
 * ecore_evas_geometry_get function returns the value is updated after engine
 * finished request. By comparison, ecore_evas_request_geometry_get returns
 * recently requested value.
 *
 * @code
 * int x, y, w, h;
 * ecore_evas_request_geometry_get(ee, &x, &y, &w, &h);
 * @endcode
 *
 * @since 1.1
 */
EAPI void        ecore_evas_request_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);

/**
 * @brief Sets the Ecore_Evas window focus for the default seat.
 *
 * @param ee The Ecore_Evas
 * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus.
 *
 * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if
 * @p on is @c EINA_FALSE.
 *
 * @warning Support for this depends on the underlying windowing system.
 * @see ecore_evas_focus_device_set()
 */
EAPI void        ecore_evas_focus_set(Ecore_Evas *ee, Eina_Bool on);

/**
 * @brief Queries whether the default seat has the Ecore_Evas focus.
 *
 * @param ee The Ecore_Evas to set
 * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not.
 *
 * @see ecore_evas_focus_set()
 * @see ecore_evas_focus_device_get()
 */
EAPI Eina_Bool   ecore_evas_focus_get(const Ecore_Evas *ee);

/**
 * @brief Sets the Ecore_Evas windows focus for a given seat.
 *
 * @param ee The Ecore_Evas
 * @param seat An Efl_Input_Device that represents the seat or @c NULL for the default seat.
 * @param on @c EINA_TRUE for focus, @c EINA_FALSE to defocus.
 *
 * This function focuses @p ee if @p on is @c EINA_TRUE, or unfocuses @p ee if
 * @p on is @c EINA_FALSE.
 *
 * @warning Support for this depends on the underlying windowing system.
 * @see ecore_evas_focus_device_get()
 * @since 1.19
 */
EAPI void        ecore_evas_focus_device_set(Ecore_Evas *ee, Eo *seat,
                                             Eina_Bool on);
/**
 * @brief Queries whether an Ecore_Evas' window is focused or not.
 *
 * @param ee The Ecore_Evas to set
 * @param seat An Efl_Input_Device that represents the seat or @c NULL for the default seat.
 * @return @c EINA_TRUE if @p ee if focused, @c EINA_FALSE if not.
 *
 * @see ecore_evas_focus_device_set()
 * @since 1.19
 */
EAPI Eina_Bool   ecore_evas_focus_device_get(const Ecore_Evas *ee, Eo *seat);

/**
 * @brief Iconifies or uniconifies an Ecore_Evas' window.
 *
 * @param ee The Ecore_Evas
 * @param on @c EINA_TRUE to iconify, @c EINA_FALSE to uniconify.
 *
 * This function iconifies @p ee if @p on is @c EINA_TRUE, or uniconifies @p ee
 * if @p on is @c EINA_FALSE.
 *
 * @note Iconify and minimize are synonyms.
 *
 * @warning Support for this depends on the underlying windowing system.
 */
EAPI void        ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on);

/**
 * @brief Queries whether an Ecore_Evas' window is iconified or not.
 *
 * @param ee The Ecore_Evas to set
 * @return @c EINA_TRUE if @p ee is iconified, @c EINA_FALSE if not.
 *
 * @note Iconify and minimize are synonyms.
 *
 * @see ecore_evas_iconified_set()
 */
EAPI Eina_Bool   ecore_evas_iconified_get(const Ecore_Evas *ee);

/**
 * @brief Sets whether an Ecore_Evas' window is borderless or not.
 *
 * @param ee The Ecore_Evas
 * @param on @c EINA_TRUE for borderless, @c EINA_FALSE for bordered.
 *
 * This function makes @p ee borderless if @p on is @c EINA_TRUE, or bordered
 * if @p on is @c EINA_FALSE.
 *
 * @warning Support for this depends on the underlying windowing system.
 */
EAPI void        ecore_evas_borderless_set(Ecore_Evas *ee, Eina_Bool on);

/**
 * @brief Queries whether an Ecore_Evas' window is borderless or not.
 *
 * @param ee The Ecore_Evas to set
 * @return @c EINA_TRUE if @p ee is borderless, @c EINA_FALSE if not.
 *
 * @see ecore_evas_borderless_set()
 */
EAPI Eina_Bool   ecore_evas_borderless_get(const Ecore_Evas *ee);

/**
 * @brief Sets whether or not an Ecore_Evas' window is fullscreen.
 *
 * @param ee The Ecore_Evas
 * @param on @c EINA_TRUE fullscreen, @c EINA_FALSE not.
 *
 * This function causes @p ee to be fullscreen if @p on is @c EINA_TRUE, or
 * not if @p on is @c EINA_FALSE.
 *
 * @warning Support for this depends on the underlying windowing system.
 */
EAPI void        ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on);

/**
 * @brief Queries whether an Ecore_Evas' window is fullscreen or not.
 *
 * @param ee The Ecore_Evas to set
 * @return @c EINA_TRUE if @p ee is fullscreen, @c EINA_FALSE if not.
 *
 * @see ecore_evas_fullscreen_set()
 */
EAPI Eina_Bool   ecore_evas_fullscreen_get(const Ecore_Evas *ee);

/**
 * @brief Sets another window that this window is a group member of.
 *
 * @param ee The Ecore_Evas
 * @param ee_group The other group member
 *
 * If @p ee_group is @c NULL, @p ee is removed from the group, otherwise it is
 * added. Note that if you free the @p ee_group canvas before @p ee, then
 * getting the group canvas with ecore_evas_window_group_get() will return
 * an invalid handle.
 *
 * @warning Support for this depends on the underlying windowing system.
 * @since 1.2
 */
EAPI void        ecore_evas_window_group_set(Ecore_Evas *ee, const Ecore_Evas *ee_group);

/**
 * @brief Gets the canvas group set.
 *
 * This returns the handle set by ecore_evas_window_group_set().
 *
 * @param ee The Ecore_Evas to set
 * @return The Canvas group handle
 *
 * @see ecore_evas_window_group_set()
 * @since 1.2
 */
EAPI const Ecore_Evas *ecore_evas_window_group_get(const Ecore_Evas *ee);

/**
 * @brief Sets the aspect ratio of a canvas window.
 *
 * @param ee The Ecore_Evas
 * @param aspect The aspect ratio (width divided by height), or 0 to disable
 *
 * This sets the desired aspect ratio of a canvas window
 *
 * @warning Support for this depends on the underlying windowing system.
 * @since 1.2
 */
EAPI void        ecore_evas_aspect_set(Ecore_Evas *ee, double aspect);

/**
 * @brief Gets the aspect ratio of a canvas window.
 *
 * This returns the value set by ecore_evas_aspect_set().
 *
 * @param ee The Ecore_Evas to set
 * @return The aspect ratio
 *
 * @see ecore_evas_aspect_set()
 * @since 1.2
 */
EAPI double      ecore_evas_aspect_get(const Ecore_Evas *ee);

/**
 * @brief Sets The urgent hint flag.
 *
 * @param ee The Ecore_Evas
 * @param urgent The urgent state flag
 *
 * This sets the "urgent" state hint on a window so the desktop environment
 * can highlight it somehow.
 *
 * @warning Support for this depends on the underlying windowing system.
 * @since 1.2
 */
EAPI void        ecore_evas_urgent_set(Ecore_Evas *ee, Eina_Bool urgent);

/**
 * @brief Gets the urgent state on the canvas window.
 *
 * This returns the value set by ecore_evas_urgent_set()
 *
 * @param ee The Ecore_Evas to set
 * @return The urgent state set
 *
 * @see ecore_evas_urgent_set()
 * @since 1.2
 */
EAPI Eina_Bool   ecore_evas_urgent_get(const Ecore_Evas *ee);

/**
 * @brief Sets the modal state flag on the canvas window.
 *
 * @param ee The Ecore_Evas
 * @param modal The modal hint flag
 *
 * This hints if the window should be modal (eg if it is also transient
 * for another window, the other window will maybe be denied focus by
 * the desktop window manager).
 *
 * @warning Support for this depends on the underlying windowing system.
 * @since 1.2
 */
EAPI void        ecore_evas_modal_set(Ecore_Evas *ee, Eina_Bool modal);

/**
 * @brief Gets The modal flag.
 *
 * This returns the value set by ecore_evas_modal_set().
 *
 * @param ee The Ecore_Evas to set
 * @return The modal flag
 *
 * @see ecore_evas_modal_set()
 * @since 1.2
 */
EAPI Eina_Bool   ecore_evas_modal_get(const Ecore_Evas *ee);

/**
 * @brief Sets the "i demand attention" flag on a canvas window.
 *
 * @param ee The Ecore_Evas
 * @param demand The flag state to set
 *
 * A window may demand attention now (eg you must enter a password before
 * continuing), and so it may flag a window with this.
 *
 * @warning Support for this depends on the underlying windowing system.
 * @since 1.2
 */
EAPI void        ecore_evas_demand_attention_set(Ecore_Evas *ee, Eina_Bool demand);

/**
 * @brief Gets the "i demand attention" flag.
 *
 * This returns the value set by ecore_evas_demand_attention_set().
 *
 * @param ee The Ecore_Evas to set
 * @return The "i demand attention" flag
 *
 * @see ecore_evas_demand_attention_set()
 * @since 1.2
 */
EAPI Eina_Bool   ecore_evas_demand_attention_get(const Ecore_Evas *ee);

/**
 * @brief Sets the "focus skip" flag.
 *
 * @param ee The Ecore_Evas
 * @param skip The "focus skip" state to set.
 *
 * A window may not want to accept focus, be in the taskbar, pager etc.
 * sometimes (example for a small notification window that hovers around
 * a taskbar or panel, or hovers around a window until some activity
 * dismisses it).
 *
 * @warning Support for this depends on the underlying windowing system.
 * @since 1.2
 */
EAPI void        ecore_evas_focus_skip_set(Ecore_Evas *ee, Eina_Bool skip);

/**
 * @brief Gets the "focus skip" flag.
 *
 * This returns the value set by ecore_evas_focus_skip_set().
 *
 * @param ee The Ecore_Evas to set
 * @return The "focus skip" flag
 *
 * @see ecore_evas_focus_skip_set()
 * @since 1.2
 */
EAPI Eina_Bool   ecore_evas_focus_skip_get(const Ecore_Evas *ee);

/**
 * @brief Sets if this evas should ignore @b all events.
 *
 * @param ee The Ecore_Evas whose window's to ignore events.
 * @param ignore The Ecore_Evas new ignore state.
 *
 * @warning Support for this depends on the underlying windowing system.
 */
EAPI void        ecore_evas_ignore_events_set(Ecore_Evas *ee, Eina_Bool ignore);

/**
 * @brief Returns the ignore state of an Ecore_Evas' window.
 *
 * @param ee The Ecore_Evas whose window's ignore events state is returned.
 * @return The Ecore_Evas window's ignore state.
 *
 * @see ecore_evas_ignore_events_set()
 */
EAPI Eina_Bool   ecore_evas_ignore_events_get(const Ecore_Evas *ee);

/**
 * @brief Queries whether an Ecore_Evas' window is visible or not.
 *
 * @param ee The Ecore_Evas to query.
 * @return @c 1 if @p ee is visible, @c 0 if not.
 *
 * @see ecore_evas_show()
 * @see ecore_evas_hide()
 */
EAPI int         ecore_evas_visibility_get(const Ecore_Evas *ee);

/**
 * @brief Sets the layer of an Ecore_Evas' window.
 *
 * @param ee The Ecore_Evas
 * @param layer The layer to put @p ee on.
 *
 * This function moves @p ee to the layer @p layer.
 *
 * @warning Support for this depends on the underlying windowing system.
 *
 * @see ecore_evas_lower()
 * @see ecore_evas_raise()
 */
EAPI void        ecore_evas_layer_set(Ecore_Evas *ee, int layer);

/**
 * @brief Gets the layer of an Ecore_Evas' window.
 *
 * @param ee The Ecore_Evas to set
 * @return The layer @p ee's window is on
 *
 * @see ecore_evas_layer_set()
 * @see ecore_evas_lower()
 * @see ecore_evas_raise()
 */
EAPI int         ecore_evas_layer_get(const Ecore_Evas *ee);

/**
 * @brief Maximizes (or unmaximizes) an Ecore_Evas' window.
 *
 * @param ee The Ecore_Evas
 * @param on @c EINA_TRUE to maximize, @c EINA_FALSE to unmaximize
 *
 * This function maximizes @p ee if @p on is @c EINA_TRUE, or unmaximizes @p ee
 * if @p on is @c EINA_FALSE.
 *
 * @warning Support for this depends on the underlying windowing system.
 */
EAPI void        ecore_evas_maximized_set(Ecore_Evas *ee, Eina_Bool on);

/**
 * @brief Queries whether an Ecore_Evas' window is maximized