summaryrefslogblamecommitdiff
path: root/src/lib/edje/edje_embryo.c
blob: b5b3b6663f9aaecbb23d4f349336f370fb7fdb11 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                         
  
                              
  





                                
  


                               
  


























                                                             


                                                                              
  

   
          
  
                                  
  




                                                                            
  






                             
                                
                   
                  

                                

                                               
                                                
                                                                                                

                                       
                                      



                                           

                                                

                                   









                                                
                                        


                            

                     
                                       





                     

                        

                   











                                  



                                                        








                               




















                                                                











                          




                                    
  
                                                                       
  


                                                 
                    





                                   







                                  

                                  



                                   
  


                                  
                                    
  






                                                                  
                                                  

                                                                     


                                                   
                                                      
                                                             

                                                     


                                                             




                                                                  

                                                                        
  
                                                          
  

   




                                                                
 









                                                                
 











                                                                  
 











                                                                  
 












                                                                
 





                                                     
                                       











                                        


       
                              









                                                                   
 




                                                     
                         









                                                                
 




                                    
                                                 



            







                                                              
                                                                    









                                                               
                                                                 











                                                                   
                                                                 











                                                                    
                                                                  











                                                                   

                                                                



            







                                                                    

                                                                 



            







                                                                  

                                                        

 










                                                                   
                                                      














                                                                    
                                                       














                                                                   
                                                                      



            










                                                                    
                                                                       



            








                                                                  

                                                             

         
                                       











                                        


       
                              




            









                                                                     
                                                      













                                                                      
                                                       













                                                                     
                                                                      











                                                                      
                                                                   
                                                                 












                                                                    
                                                                        



                                  








                                                              
 















                                                                     
 







                                    










                                                                    
                                 


            








                                                             
 















                                                                    
 






                                    
 













                                                                                        
                 






                                                       
 



                                                                          
 



                                                                          
 



                                                                          
 




                                                         
 








                            



                                                                     
            

                           
 





                                       
 



                                  

                               
                      
                                   
      


                    
 




                                                                     

                           
 





                                       
 



                                  

                               
                      
                                   
      
                    
 







                                                                     

                              

                            
 



                                    
 
                                   
 


                                          






                                                                              
 
                                    
 







                                                                         
 

                      
 






                                                        


                                 

                                                                       










                                                                                        








                                                                  
                           


                                    
                                                     



                             

            
 







                                                                          
                                                           

 





                                                             
 








                                    







                                                                    
                  



                                    
                     

                        

                                                 






                                                          








                                                                     
                  
















                                                         












                                                                       
                                                  
                        
                                                                             






                                                          





                                                                    
                   
 
                                                  
              



                                           
                                                   


                                                                       








                                                                  
                   
 
                                                  
              



                                              
                                                   


                                                                        


            






                                                                       
                                                            



                                    

                                                   





                                                                   









                                                                  
 

                                                    




                                    

                     

                                            


                 


                                                        

                                                                      

                                                                            
                         



            










                                                                       
                                                              


















                                                 
                                                    








                                                               
                                                    














                                                                  
                                                    














                                                                                     
                                                    



















                                                                                                
           




                                                                    
                              



                    






                                                                  
                 







                                                        



                                                                 
                                            
















                                             


       

                                 



            









                                                                                                   
 















                                                        

                                                                             

                                                                              
                         



            











                                                                                          
                                


















                                                 
                                









                                                               
                                















                                                                  
                                















                                                                                     
                                




















                                                                                                 
           











                                                                        




                                                                    

                      
 



                                    
                                                                                                           

          
                                                   



            
                           
                  
                                                                     

            


                      

                                    



                                                                 

 
                                             
                  
                                                                 

            

                      


                             


                                    
                                                        



                                                                      








                                                                 
                      
 



                                    
                                                        
                                                           

                                                                            
            

 


































                                                                      

                                                                           
            

 
                              
                  
                                                                 


                   
                      


               


                                    
                                                        
                        




                                                              

 
                                      
                  
                                                                 


                   
                      

           



                                    
                                                        
                                                                  
         
      
                                       




                                  



                                        


                                   


       
                              



            
                          
                  

























                                                                     














                                                                        
                          

















                                                                        



                                                                               














                                                                       

                                                           
















                                                                       
                          
                                            






                                                                      


                   
                      


                             


                                    
                                                        



                                                                     


            
                                                
                  
                                                                      


                   
                      
 




                                                        
                                                          

                                                                           
            

 
                                                   
                  
                                                                      


                   



                             
                                    





                                                                     



            
                                           





                                                                     
                                         














                                                                          






                                                                      
 




                                                        
                                                          

                                                                           
            
 
 
                                          





                                                                     
                    
 
                                                              





                                    


                                                                    
                               

              
                               


























































                                                                                         


                                
                                                            

                       






                                                               
                                        

                 


                                                                     
 











                                                                                   
            











                                                                                        
            
                      
 
                                                           
                      

                                                  
                                                
                 
                  
                                       
            


                                                                     
 



                                       
 














                                                             
                                                                          
            









                                                       
            


                      
 







                                                               
                 

                                                  
                 

                                
                                                                          
            









                                                       
            

                      
 



                                                          
                                                        



                                                                                               
                 
                                                                

                                                         
                 
                                                                          
            

            
 



                                             
 

                                                       
            

                      
 








                                                                                                    
                 

                           
                                                                
                           

                                                       
                                                     
                      
                       
                                            
                 
                                                                          
            

            
 
              
              
      
            

 





                                                                     
                                                   











                                                                 
                  







                                         
                                                                             


                                    

                          
                                     












                                                                                          












                                                                
                                               


                    
 


                                                                                             

                 

      

                                                        

                

                                                          



                                                           
                                              
      

                                                     
 

                                                                
 

                                                                           
                                                                      


                                   
 


                                                                      
 

                                                                  
 
                                                               
 


                                                      

      
                                                         




                                                     
                                              
 
                                                    
 


                                                                               

                                                             



                                                                                 
      
          
 
                               









                                                                      
           

                                     
                                                  








                                                                 
                   




                                      
                    
 



                                                                
 
                                
                    
 



                                                          
 
                                
                    
 



                                                          
 
                                 
                    
 



                                                           
 
                                   
                    
 



                                                                   
 
                                        
                    
 


                                                                  
 
                                  
                    
 





                                                            
 
                                   
                    
 





                                                             
 
                                   





                                                          
 
                     
 
                                                                      
 





                                                
 
                                        
                    
 



                                                            
 
                                 
                    
 



                                                                        
 
                                    
                    
 



                                                              
 
                                        
                    
 



                                                                  
 
                                 
                    
 



                                                                        
 
                                    
                    
 



                                                              
 
                                        
                    
 



                                                                  
 
                                  




                                                                
 

                                                                      
 

               
 
                                   

                                          
 

                                                                
 
                                                                      
 



                                                
 
               
       

                                        
       




                                                                                                            
 



                                                                           
            
             
            


                                                                             
 

               
 



                                            
 

                                                                                                            
 


                                                                           
 



                                                               
            
             
            
                                                                             
 




                                                                 
 

               
 



                                            
 

                                                                                                            
 







                                                                           
            
             
            









                                                                             
 


                                          
 



                                                          
 






                                                                      
 
                                       

                                          
 



                                                          
 
                              
 




                                                                      
 
                                      

                                          
 

                                                               
 
                              
 




                                                                      
 
                                       

                                          
 

                                                                    
 
                              
 




                                                                      
 
                                      

                                          
 

                                                               
 




                                                                      
 
                                     

                                          
 

                                                               
 
                                                                      
 




                                             
 
                                     

                                          
 



                                                          
 
                                                                      
 




                                             
 
                                     

                                          
 



                                                          
 
                                                                      
 




                                             
 
                                       

                                          
 

                                                               
 
                                                                      
 




                                                   
 
                                    
                    
 


                                                            
 
                                   
                    
 


                                                           
 
                                      
                    
 


                                                                 
 
                                      
                    
 


                                                                 
 
                                           
                    
 


                                                                      
 
                                      
                    
 


                                                                  
 
                                      
                    
 


                                                                  
 
                                      
                    
 


                                                                  
 
                                          
                    
 


                                                                 
 
                                         
                    
 


                                                                 
 
                                         
                    
 


                                                                 
 
                                        
                    
 


                                                                
 
                                           




                                                                
 

                                                                        
 

               
 
                                              




                                                                
 

                                                                        
 

               
 










                                                                    

               












                                                                    

               










                                                                    

               










                                                                    

               










                                                                    

               

       

                                         
                    
 


                                                                     
 
                                                
                    
 


                                                                            
 
                                             
                    
 


                                                                         
 
                                            
                    
 




                                                                               
 
                                          
                    
 



                                                                              
 
                                             



                                                                     
 
                                            



                                                                        
 
                                             



                                                                         
 
                                                    



                                                                            
 
                                             



                                                                     
 
                                                    





                                                                              
 
                                                    





                                                                              
 
                                              



                                                                     
 
                                      



                                                              
 
                                          



                                                                  
 
      
              
              

      
                      
                              
      
                         








                                                                      
                 

                                     
                                                  








                                                                 
                   




                                      
                    
 



                                                                
 
                                
                    
 



                                                          
 
                                
                    
 



                                                          
 
                                 
                    
 



                                                           
 
                                   
                    
 



                                                                   
 
                                        
                    
 


                                                                  
 
                                  
                    
 





                                                            
 
                                   
                    
 





                                                             
 
                                   

                                          
 


                                                           
 
                     
 
                                                                      
 






                                                
 
                                        
                    
 



                                                 
 
                                 
                    
 



                                                                        
 
                                    









































                                                                        
 

                                                                
 
                                                                      
 
                                          
 
               
       
 


                                          
 

                                                                
 
                                                                      
 



                                                
 
               
       
 



                                            
 

                                                                                                            
 


                                                                           
 
                                                        
            
             
            
                                                                             
 
                                                          
            
 

               
 



                                            
 

                                                                                                            
 


                                                                           
 



                                                               
            
             
            
                                                                             
 




                                                                 
 

               
 



                                            
 

                                                                                                            
 
                                                    
            
                                                                           
 







                                                                             
 




                                                             
 

               
 
                                 

                                          
 




                                                          
 
                                                                      
 

                                         
 

               
 
                                       

                                          
 




                                                          
 
                                                                      
 

                                   
 

               
 
                                      

                                          
 


                                                               
 
                                                                      
 

                                         
 

               
 
                                       

                                          
 


                                                                    
 
                                                                      
 

                                          
 

               
 
                                      

                                          
 
                                                               
 
                     
 
                                                                      
 



                                            
 
                                     

                                          
 

                                                               
 
                                                                      
 




                                             
 
                                     

                                          
 


                                                          
 
                     
 
                                                                      
 




                                             
 
                                     





                                                          
 
                     
 
                                                                      
 

                                             
 

               
 
                                       

                                          
 
                                                               
 
                     
 
                                                                      
 




                                                   
 
                                    
                    
 


                                                            
 
                                   
                    
 


                                                           
 
                                      
                    
 


                                                                 
 
                                      
                    
 


                                                                 
 
                                           
                    
 


                                                                      
 
                                      
                    
 


                                                                  
 
                                      
                    
 


                                                                  
 
                                      
                    
 


                                                                  
 
                                          
                    
 


                                                                 
 
                                         
                    
 


                                                                 
 
                                         
                    
 


                                                                 
 
                                        
                    
 


                                                                
 
                                           

                                            
 




                                                                        
 

               
 
                                              




                                                                
 

                                                                        
 

               
 

                                         
                    
 


                                                                     
 
                                                
                    
 


                                                                            
 
                                             
                    
 


                                                                         
 
                                            
                    
 




                                                                               
 
                                          
                    
 



                                                                              
 
                                             



                                                                     
 
                                            



                                                                        
 
                                             



                                                                         
 
                                                    



                                                                            
 
                                             



                                                                     
 
                                                    





                                                                              
 
                                                    





                                                                              
 
                                              



                                                                     
 
                                      



                                                              
 
                                          



                                                                  
 
      
              
              




            
















                                                                         
                                                         




















                                                                         
                                                                                              




            





















                                                                         
















                                                                          
                                                          




















                                                                          
                                                                                               




            
















                                                                         
                                                         




















                                                                         
                                                                                              





















                                                                       
                                                       




















                                                                       
                                                                                            




            




                                                                     
                        


                        
 












                                                        
                                            

                          
                                                                  




                                                              
                                      



            




















































                                                                    





















                                                                               
                                            
























                                                                               
                                                   
























                                                                                 
                                            

























                                                                                 
                                                   























                                                                                  
                                            





























                                                                               
                                            



                           
                                 


       

                                        
                                
                               


            
      



























                                                                               
                                                   

 
                                                     
                  
                                                                                      


















                                                        
                                            





























                                                                                  
                                            



                           
                                 


       

                                        
                                
                               


            
      



























                                                                                  
                                                   

 





















                                                                                
                                            
























                                                                                
                                                   

 
                    
                                                                      

                                                                      
                  
                                                                                                                                                











                                                        
                          
      
                       
 


                                                    
 
                                
      
 

            
 


                                                                          
                  
                                                                                                                                                         











                                                        
                          
      




                                   
      
 

            
 
                                                         
                  
                                                                        
 
                             
                                                 
                                                                       
 
 



                                                                               
                             
                                                 
                                                                      
 
 



                                                                      
                             
                                                 
                                                                     





                                                                       
                             
                                                 
                                                              

 
                                   
                  
                                                                             






                      
                             





                                                        
                                                    



            
                                                               
                  
                                                                           
 
                             
                                                 
                                                            

 
                                                                
                  
                                                                            
 
                             
                                                 
                                                             
 




                                                                             
                             
                                                 
                                                                     





                                                                             
                             
                                                 
                                                                     





                                                                                 
                             
                                                 
                                                                      





                                                                                 
                             
                                                 
                                                                      











                                                                     
                             





                                                        
                                            


            










                                                                             
                             









                                                        



                                                    
 


                                                              














                                                                             
                             









                                                        

                                                                 








                               
 

      























                                                                            



















                                                             
    
                                                   

                      
 

                            
 
                    
                                                    






                                                                                




                                                                                  
                                                                                  
                                                                              


                                                                                  
                                                                                  
                                                                              

                                                                                      
                                                                                    

                                                                                      


                                                                                    
                                                                                  
 

                                                                                  
                                                                                            
 
                                                                    
                                                                                  
                                                                                    
                                                                                        
                                                                              
                                                                              
                                                                                          
                                                                                                    
                                                                                  

                                                                                    
                                                                            

                                                                                      

                                                                            






                                                                                          
                                                                                      
                                                                                      
                                                                                      
                                                                              
                                                                                              

                                                                                            
                                                                                    
                                                                                    

                                                                                  
                                                                                        
                                                                                    
                                                                                    


                                                                                      
                                                                                        
 

                                                                                            
                                                                                            

                                                                                              



                                                                                            
 


                                                                                  

                                                                                    






                                                                                                              


                                                                                                                      

                                                                                                          


                                                                                          
                                                                                                        

                                                                                        


                                                                                                    




                                                                                                            

                                                                                                    
      

                                                                                                  
                                                                    


    
                                                       
 




                                                             









                                                                        
                                 
 
 
                                                             
    
                                                                                   
 
                   
                      
 


                                       



                                                  
                                                  
                                                                            

                                  


















                                                                              
                                                                                                        




                                                                                          



                                                             

                                      
                                           

                                 
                               
                                      
                                
                                 
                          




                                                                                            

                                      
                                           

                                 
                                                                              
                                      
                                
                                 
                          


                                                                           
      
                                                 
 
 
    



                                   
 



                                             







                                                       

      
 
#include "edje_private.h"

/*
 * ALREADY EXPORTED BY EMBRYO:
 *
 * enum Float_Round_Method {
 *    ROUND, FLOOR, CEIL, TOZERO
 * };
 * enum Float_Angle_Mode {
 *    RADIAN, DEGREES, GRADES
 * };
 *
 * numargs();
 * getarg(arg, index=0);
 * setarg(arg, index=0, value);
 *
 * Float:atof(string[]);
 * Float:fract(Float:value);
 *       round(Float:value, Float_Round_Method:method=ROUND);
 * Float:sqrt(Float:value);
 * Float:pow(Float:value, Float:exponent);
 * Float:log(Float:value, Float:base=10.0);
 * Float:sin(Float:value, Float_Angle_Mode:mode=RADIAN);
 * Float:cos(Float:value, Float_Angle_Mode:mode=RADIAN);
 * Float:tan(Float:value, Float_Angle_Mode:mode=RADIAN);
 * Float:abs(Float:value);
 *       atoi(str[]);
 *       fnmatch(glob[], str[]);
 *       strcmp(str1[], str2[]);
 *       strncmp(str1[], str2[]);
 *       strcpy(dst[], src[]);
 *       strncpy(dst[], src[], n);
 *       strlen(str[]);
 *       strcat(dst[], src[]);
 *       strncat(dst[], src[], n);
 *       strprep(dst[], src[]);
 *       strnprep(dst[], src[], n);
 *       strcut(dst[], str[], n, n2);
 *       snprintf(dst[], dstn, fmt[], ...);
 *       strstr(str[], ndl[]);
 *       strchr(str[], ch[]);
 *       strrchr(str[], ch[]);
 *       rand();
 * Float:randf();
 * Float:seconds();
 *       date(&year, &month, &day, &yearday, &weekday, &hr, &min, &Float:sec);
 *
 */

/* EDJE...
 *
 * implemented so far as examples:
 *
 * enum Msg_Type {
 *    MSG_NONE, MSG_STRING, MSG_INT, MSG_FLOAT, MSG_STRING_SET, MSG_INT_SET,
 *    MSG_FLOAT_SET, MSG_STRING_INT, MSG_INT_FLOAT, MSG_STRING_INT_SET,
 *    MSG_INT_FLOAT_SET
 * };
 *
 * get_int(id)
 * set_int(id, v)
 * Float:get_float (id)
 * set_float(id, Float:v)
 * get_strlen(id)
 * get_str(id, dst[], maxlen)
 * set_str(id, str[])
 * timer(Float:in, fname[], val)
 * cancel_timer(id)
 * reset_timer(id)
 * anim(Float:len, fname[], val)
 * cancel_anim(id)
 * emit(sig[], src[])
 * set_state(part_id, state[], Float:sta