summaryrefslogblamecommitdiff
path: root/src/lib/efl/interfaces/efl_ui_zoom.eo
blob: a2f4d1f3c85470856822bde12eb6efc41800ffed (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                           

                               




                                                                                                    

 
                           
 
                            
                          
                    


                                





                                                                             
                 
                                               

          
                            









                                                                           
 





                                                                        

              

                 
                                                             


                           
                     
 








                                                                           

              

                 
                                                                               


          
           


                                                        

    
enum @beta Efl.Ui.Zoom_Mode
{
   [[Types of zoom available.]]
   manual = 0, [[Zoom controlled manually by @Efl.Ui.Zoom.zoom_level.]]
   auto_fit, [[Zoom until whole image fits inside object. Parts of the object might be left blank.]]
   auto_fill, [[Zoom until image fills the object. Parts of the image might not show.]]
   auto_fit_in, [[Zoom in until image fits inside object.]]
   last [[Internal. Sentinel value to indicate last enum field during iteration.]]
}

interface @beta Efl.Ui.Zoom
{
   [[Efl UI zoom interface]]
   event_c_prefix: efl_ui;
   c_prefix: efl_ui;

   methods {
      @property zoom_animation {
         [[This sets the zoom animation state to on or off for zoomable. The
           default is off. When $paused is $true, it will stop zooming using
           animation on zoom level changes and change instantly, stopping any
           existing animations that are running.]]
         set {}
         get {}
         values {
            paused: bool; [[The paused state.]]
         }
      }
      @property zoom_level {
         [[Zoom level of the image.

           This selects the zoom level. If $zoom is 1, it means no zoom. If
           it's smaller than 1, it means zoom in. If it's bigger than 1,
           it means zoom out. For  example, $zoom 1 will be 1:1 pixel for
           pixel. $zoom 2 will be 2:1 (that is 2x2 photo pixels will
           display as 1 on-screen pixel) which is a zoom out. 4:1 will
           be 4x4 photo pixels as 1 screen pixel, and so on. The $zoom
           parameter must be greater than 0. It is suggested to stick
           to powers of 2. (1, 2, 4, 8, 16, 32, etc.).

           Note that if you set @.zoom_mode to anything other than
           @Efl.Ui.Zoom_Mode.manual (which is the default value) the
           @.zoom_level might be changed at any time by the zoomable
           object itself to account for image and viewport size changes.
         ]]
         set {
         }
         get {
         }
         values {
            zoom: double; [[The image's current zoom level.]]
         }
      }
      @property zoom_mode {
         [[Zoom mode.

           This sets the zoom mode to manual or one of several automatic
           levels. @Efl.Ui.Zoom_Mode.manual means that zoom is controlled
           manually by @.zoom_level and will stay at that level until
           changed by code or until @.zoom_mode is changed. This is the
           default mode. The Automatic modes will allow the zoomable object
           to automatically adjust zoom mode based on image and viewport
           size changes.
         ]]
         set {
         }
         get {
         }
         values {
            mode: Efl.Ui.Zoom_Mode(Efl.Ui.Zoom_Mode.manual); [[The zoom mode.]]
         }
      }
   }
   events {
      zoom,start: void; [[Called when zooming started]]
      zoom,stop: void; [[Called when zooming stopped]]
      zoom,change: void; [[Called when zooming changed]]
   }
}