summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_ui_format.eo
blob: 2f386dafa7c1b1c4177b532ea39bb4ae4525c8ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import eina_types;

function Efl.Ui.Format_Func_Cb {
   [[Function pointer for format function hook]]
   params {
      @in str: ptr(Eina.Strbuf); [[the formated string to be appended by user.]]
      @in value: const(any_value); [[The Eina.Value passed by $obj.]]
   }
};

mixin Efl.Ui.Format
{
   [[interface class for format_func]]
   methods {
      @property format_cb {
         set @pure_virtual {
            [[Set the format function pointer to format the string.
            ]]
         }
         values {
            func: Efl.Ui.Format_Func_Cb @nullable; [[The format function callback]]
         }
      }
      @property format_string {
         [[Control the format string for a given units label

           If $NULL is passed on $format, it will make $obj's units
           area to be hidden completely. If not, it'll set the <b>format
           string</b> for the units label's text. The units label is
           provided a floating point value, so the units text is up display
           at most one floating point value. Note that the units label is
           optional. Use a format string such as "%1.2f meters" for example.

           Note: The default format string is an integer percentage,
           as in $"%.0f %%".
         ]]
         values {
            units: string @nullable; [[The format string for $obj's units label.]]
         }
      }
   }
}