summaryrefslogtreecommitdiff
path: root/README
blob: db256daa15b698b6f160e530c2ddf5dc636ebd93 (plain)
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
efl_ui_cc is a little transpiler that creates c code form a json file.

The json file can be used to describe a UI, it may look like this:
{
  "ui-name" : "Example",
  "ui-content" : {
    "type": "Efl.Ui.Box",
    "id" : "box",
    "pack-linear" : [
      {
        "type" : "Efl.Ui.Image",
        "file" : "cool-file.png",
        "id" : "img",
        "align" : [0.0, 1.0],
      },
      {
        "type" : "Efl.Ui.Check",
        "id" : "txt",
        "text" : "Only show black and white channels",
      },
      {
        "type" : "Efl.Ui.Button",
        "id" : "btn",
        "text" : "Safe",
      },
    ],
   },
}

The result will be two files, one header file and one c file.
The header file is used to export API for creating this UI in c, additionally, a data strcuture is returned that will contain all the widgets that have a id.
The C file itself is just generated c code, It has to be compiled as a standalone c file into your project so the API is available.