collections {
  group { name: "e/modules/kbd/base/default";
    parts {
      part { name: "clip"; type: RECT;
        description { state: "default" 0.0;
          rel1.offset: -100 -300;
          rel2.offset: 99 -1;
          visible: 0;
        }
        description { state: "visible" 0.0;
          inherit: "default" 0.0;
          visible: 1;
        }
      }
      part { name: "bg"; type: RECT;
        clip_to: "clip";
        description { state: "default" 0.0;
          color: 48 48 48 255;
          rel1.relative: 0.0 1.0;
          rel2.relative: 1.0 2.0;
        }
        description { state: "visible" 0.0;
          inherit: "default" 0.0;
          rel1.relative: 0.0 0.0;
          rel2.relative: 1.0 1.0;
        }
      }
      part { name: "completion_clip"; type: RECT;
        clip_to: "clip";
        description { state: "default" 0.0;
          rel.to: "bg";
          rel1.offset: 4 4;
          rel2.to_y: "e.swallow.completion";
          rel2.relative: 1.0 1.0;
          rel2.offset: -5 -1;
          align: 0.5 0.0;
        }
      }
      part { name: "e.swallow.completion"; type: SWALLOW;
        clip_to: "completion_clip";
        description { state: "default" 0.0;
          rel.to: "bg";
          rel1.offset: 4 4;
          rel2.relative: 1.0 0.0;
          rel2.offset: -5 4;
          align: 0.5 0.0;
        }
      }
      part { name: "e.swallow.content"; type: SWALLOW;
        clip_to: "clip";
        description { state: "default" 0.0;
          rel.to: "bg";
          rel1.to_y: "e.swallow.completion";
          rel1.offset: 4 4;
          rel1.relative: 0.0 1.0;
          rel2.offset: -5 -5;
        }
      }
    }
    programs {
      program { signal: "e,state,visible"; source: "e";
        action: STATE_SET "visible" 0.0;
        target: "bg";
        target: "clip";
        transition: DECELERATE 0.5;
      }
      program { signal: "e,state,invisible"; source: "e";
        action: STATE_SET "default" 0.0;
        target: "bg";
        target: "clip";
        transition: DECELERATE 1.0;
      }
    }
  }

  group { name: "e/modules/kbd/key/default";
    parts {
      part { name: "selshow"; type: RECT;
        description { state: "default" 0.0;
          visible: 0;
        }
        description { state: "selected" 0.0;
          inherit: "default" 0.0;
          visible: 1;
        }
      }
      part { name: "bg"; type: RECT;
        mouse_events: 0;
        description { state: "default" 0.0;
          rel1.offset: 2 2;
          rel2.offset: -3 -3;
          color: 80 80 80 255;
        }
        description { state: "pressed" 0.0;
          inherit: "default" 0.0;
          color: 128 128 128 255;
          rel1.relative: 0.0 -1.0;
        }
      }
      part { name: "sel"; type: RECT;
        clip_to: "selshow";
        mouse_events: 0;
        description { state: "default" 0.0;
          rel.to: "bg";
          color: 51 153 255 255;
        }
        description { state: "pressed" 0.0;
          inherit: "default" 0.0;
          color: 153 204 255 255;
        }
      }
      part { name: "e.text.label"; type: TEXT;
        mouse_events: 0;
        scale: 1;
        description { state: "default" 0.0;
          rel1.to: "bg";
          rel1.offset: 2 2;
          rel2.to: "bg";
          rel2.offset: -3 -3;
          color: 255 255 255 160;
          text {
            font: "Sans";
            size: 10;
            min: 1 1;
            ellipsis: -1;
          }
        }
        description { state: "pressed" 0.0;
          inherit: "default" 0.0;
          color: 255 255 255 255;
          text {
            align: 0.5 0.0;
          }
        }
      }
      part { name: "e.swallow.content"; type: SWALLOW;
        mouse_events: 0;
        description { state: "default" 0.0;
          rel1.to: "bg";
          rel1.offset: 2 2;
          rel2.to: "bg";
          rel2.offset: -3 -3;
        }
      }
    }
    programs {
      program { signal: "e,state,selected"; source: "e";
        action: STATE_SET "selected" 0.0;
        target: "selshow";
      }
      program { signal: "e,state,unselected"; source: "e";
        action: STATE_SET "default" 0.0;
        target: "selshow";
      }
      program { signal: "e,state,pressed"; source: "e";
        action: STATE_SET "pressed" 0.0;
        target: "e.text.label";
        target: "bg";
        target: "sel";
      }
      program { signal: "e,state,released"; source: "e";
        action: STATE_SET "default" 0.0;
        target: "e.text.label";
        target: "bg";
        target: "sel";
      }
    }
  }

  group { name: "e/modules/kbd/match/word";
    parts {
      part { name: "selshow"; type: RECT;
        description { state: "default" 0.0;
          visible: 0;
        }
        description { state: "selected" 0.0;
          inherit: "default" 0.0;
          visible: 1;
        }
      }
      part { name: "bg"; type: RECT;
        description { state: "default" 0.0;
          rel1.offset: 2 2;
          rel2.offset: -3 -3;
          color: 64 64 64 255;
        }
        description { state: "pressed" 0.0;
          inherit: "default" 0.0;
          color: 128 128 128 255;
        }
      }
      part { name: "sel"; type: RECT;
        clip_to: "selshow";
        mouse_events: 0;
        description { state: "default" 0.0;
          rel.to: "bg";
          color: 51 153 255 255;
        }
        description { state: "pressed" 0.0;
          inherit: "default" 0.0;
          color: 153 204 255 255;
        }
      }
      part { name: "e.text.label"; type: TEXT;
        mouse_events: 0;
        scale: 1;
        description { state: "default" 0.0;
          rel1.to: "bg";
          rel1.offset: 2 2;
          rel2.to: "bg";
          rel2.offset: -3 -3;
          color: 255 255 255 160;
          text {
            font: "Sans";
            size: 10;
            min: 1 1;
          }
        }
        description { state: "pressed" 0.0;
          inherit: "default" 0.0;
          color: 255 255 255 255;
        }
      }
      part { name: "e.swallow.content"; type: SWALLOW;
        mouse_events: 0;
        description { state: "default" 0.0;
          rel1.to: "bg";
          rel1.offset: 2 2;
          rel2.to: "bg";
          rel2.offset: -3 -3;
        }
      }
    }
    programs {
      program { signal: "e,state,selected"; source: "e";
        action: STATE_SET "selected" 0.0;
        target: "selshow";
      }
      program { signal: "e,state,unselected"; source: "e";
        action: STATE_SET "default" 0.0;
        target: "selshow";
      }
      program { signal: "mouse,down,1"; source: "bg";
        action: STATE_SET "pressed" 0.0;
        target: "e.text.label";
        target: "bg";
        target: "sel";
      }
      program { signal: "mouse,up,1"; source: "bg";
        action: STATE_SET "default" 0.0;
        target: "e.text.label";
        target: "bg";
        target: "sel";
      }
      program { signal: "mouse,clicked,1"; source: "bg";
        action: SIGNAL_EMIT "e,action,do,select" "e";
      }
    }
  }
}
