aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl/interfaces/efl_ui_format.eo
blob: c7b6aba841b4cc8522704d75b5776445e0806d9c (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 @beta Efl.Ui.Format_Func_Cb {
   [[Function pointer for format function hook]]
   params {
      @in str: strbuf; [[the formated string to be appended by user.]]
      @in value: const(any_value); [[The @Eina.Value passed by $obj.]]
   }
};

mixin @beta 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; [[The format function callback]]
         }
      }
      @property format_string {
         [[Control the format string for a given units label

           If $NULL is passed to $format, it will hide $obj's units
           area completely. If not, it'll set the <b>format
           string</b> for the units label text. The units label is
           provided as a floating point value, so the units text can 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; [[The format string for $obj's units label.]]
         }
      }
   }
}