aboutsummaryrefslogblamecommitdiffstats
path: root/src/lib/elementary/elm_dayselector.eo
blob: f21d746087dd066c1782d35b9fa654d29897d7ea (plain) (tree)
1
2
3
4
5
6

                        

                                                                           
 
                                                                                   









                                   
                                                                          

 
                                                    
 
                                   
                                  
                                  
                                 

                            
              
                                                  
 


                                            

              
                                                  
 


                                            

                 
                                                                                                       

          
                                
              
                                                    
 

                                            

              
                                                    
 


                                            

                 
                                                                           

          
                               
              
                                                          
 


                                            

              
                                                          
 


                                            

                 
                                                                                                  

          
                          























                                                                                                    

                 
                                                                                                              

                                                                               

          
                                 
                                                        
 


                                                                            
 
                                         
 

                     
                                                                                                                       

                        
                                                  
 


                                         
                 
                                                                                              
                                                                        

          
                               
                                                  
 


                                         
                                                              
                 
                                                                                               



               
                        
                             
                                
                                     
                        

           
                                 
                                                                     
        
    
 
enum Elm.Dayselector.Day
{
   [[Identifies the day of the week. API can call the selection/unselection
     of day with this as a parameter.

     See also @Elm.Dayselector.day_selected_set, @Elm.Dayselector.day_selected_get.
   ]]

   legacy: elm_dayselector;
   sun = 0,[[Indicates Sunday.]]
   mon,    [[Indicates Monday.]]
   tue,    [[Indicates Tuesday.]]
   wed,    [[Indicates Wednesday.]]
   thu,    [[Indicates Thursday.]]
   fri,    [[Indicates Friday.]]
   sat,    [[Indicates Saturday.]]
   max     [[Sentinel value to indicate last enum field during iteration]]
}

class Elm.Dayselector (Efl.Ui.Layout, Efl.Ui.Legacy)
{
   [[Elementary dayselector class]]
   legacy_prefix: elm_dayselector;
   eo_prefix: elm_obj_dayselector;
   event_prefix: elm_dayselector;
   methods {
      @property week_start {
         set {
            [[Set the starting day of Dayselector.

              See also @Elm.Dayselector.Day,
              @.week_start.get.
            ]]
         }
         get {
            [[Get the starting day of Dayselector.

              See also @Elm.Dayselector.Day,
              @.week_start.set.
            ]]
         }
         values {
            day: Elm.Dayselector.Day; [[Dayselector_Day the first day that the user wants to display.]]
         }
      }
      @property weekend_length {
         set {
            [[Set the weekend length of Dayselector.

              See also @.weekend_length.get.
            ]]
         }
         get {
            [[Get the weekend length of Dayselector.

              See also @Elm.Dayselector.Day,
              @.weekend_length.set.
            ]]
         }
         values {
            length: uint; [[Weekend length, number of days as an integer.]]
         }
      }
      @property weekend_start {
         set {
            [[Set the weekend starting day of Dayselector.

              See also @Elm.Dayselector.Day,
              @.weekend_start.get.
            ]]
         }
         get {
            [[Get the weekend starting day of Dayselector.

              See also @Elm.Dayselector.Day,
              @.weekend_start.set.
            ]]
         }
         values {
            day: Elm.Dayselector.Day; [[Dayselector_Day the first day from where weekend starts.]]
         }
      }
      weekdays_names_set {
         [[Set weekdays names to be displayed by the Dayselector.

           By default or if weekdays is $null, weekdays abbreviations get from system are displayed:
           E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

           The first string should be related to Sunday, the second to Monday...

           See also @.weekdays_names_get,
           @.weekend_start.set.

           @since 1.8
         ]]
           /* FIXME-doc
            *
            * The usage should be like this:
            * @code
            * const char *weekdays[] =
            * {
            * "Sunday", "Monday", "Tuesday", "Wednesday",
            * "Thursday", "Friday", "Saturday"
            * };
            * elm_dayselector_wekdays_names_set(calendar, weekdays);
            * @endcode
            */

         params {
            @in weekdays: legacy(ptr(string)) @nullable; [[Array of seven strings to be used as weekday names.
            Warning: It must have 7 elements, or it will access invalid memory.
            Warning: The strings must be NULL terminated ('@\0').]]
         }
      }
      weekdays_names_get @const {
         [[Get weekdays names displayed by the calendar.

           By default, weekdays abbreviations get from system are displayed:
           E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"
           The first string is related to Sunday, the second to Monday...

           See also @.weekdays_names_set.

           @since 1.8
         ]]
         return: list<stringshare @owned> @owned @warn_unused; [[A list of seven strings to be used as weekday names.]]
      }
      day_selected_set {
         [[Set the state of given Dayselector_Day.

           See also @Elm.Dayselector.Day,
           @.day_selected_get.
         ]]
         params {
            @in day: Elm.Dayselector.Day; [[Dayselector_Day that the user want to set state.]]
            @in selected: bool; [[State of the day. $true is selected.]]
         }
      }
      day_selected_get @const {
         [[Get the state of given Dayselector_Day.

           See also @Elm.Dayselector.Day,
           @.day_selected_set.
         ]]
         return: bool; [[$true on success, $false on failure]]
         params {
            @in day: Elm.Dayselector.Day; [[Dayselector_Day that the user want to know state.]]
         }
      }
   }
   implements {
      class.constructor;
      Efl.Object.constructor;
      Efl.Ui.Widget.theme_apply;
      Efl.Ui.L10n.translation_update;
      Efl.Part.part_get;
   }
   events {
      /* FIXME: Nobody emits this
      dayselector,changed; [[Called when dayselector widget changed]]
      */
   }
}