Page MenuHomePhabricator

Edc Formatting Rule
Updated 1,743 Days AgoPublic

This is just a recommendation.
Reference Code: Dark theme http://git.enlightenment.org/themes/dark.git/tree/edje/edc

Rules

  • Indentation : three spaces. no tabs.
parts {
   part { name: "base";
      description { state: "default" 0.0;
      }
   }
}
  • Brace : no separate line for { brace.

    [YES]
parts { 
}

[NO]

parts
{

}
  • name with the same line as the keywords.
group { name: "main";
}

part { name: "base";
}

program { name: "popup_show";
}
  • state with the same line as 'description'
description { state: "default" 0.0;
}
  • part name, type, mouse_events in one line.
part { name: "label2_new"; type: TEXT; mouse_events: 0;
}
  • program's signal and source at the same line.
program {
   signal: "mouse,move"; source: "elm.drag_button_base";
}
  • don't describe default values.

But if you really want to specify the value, you can describe it even it's default value.

type: IMAGE;
mouse_events: 1;
rel1.relative: 0.0 0.0;
rel1.offset: 0 0;
rel2.relative: 1.0 1.0;
rel2.offset: -1 -1;
  • don't describe 'program' name if it is not necessary.
program {
}
  • signal name
elm,action,show
elm,action,hide
elm,action,xxx,show
elm,action,xxx,hide
elm,action,xxx,yyy,show
elm,action,xxx,yyy,hide

elm,state,visible
elm,state,hidden
elm,state,xxx,visible
elm,state,xxx,hidden
elm,state,xxx,yyy,visible
elm,state,xxx,yyy,hidden
Last Author
seoz
Last Edited
Mar 9 2014, 6:10 AM
Projects
None
Subscribers
None