Blame main.c

452870
452870
#include "app.h"
452870
452870
#include "common.c"
452870
#include "app.c"
7e0df9
#include "touch.c"
452870
#include "graph.c"
452870
#include "input.c"
452870
#include "keyboard.c"
452870
d3e9d7
#include "layout.en.inc.c"
37122c
#include "layout.fn.inc.c"
37122c
#include "layout.en.full.inc.c"
d3e9d7
#include "layout.am.inc.c"
569832
#include "layout.ru.inc.c"
452870
8603b4
#include <signal.h></signal.h>
04543a
04543a
843e7a
Layout layouts[] = {
d3e9d7
  { keysEn, COUNTOF(keysEn) },
37122c
  { keysFn, COUNTOF(keysFn) },
37122c
  { keysEnFull, COUNTOF(keysEnFull) },
569832
  { keysAm, COUNTOF(keysAm) },
569832
  { keysRu, COUNTOF(keysRu) },
569832
};
843e7a
452870
App app = {
63daec
  { layouts, COUNTOF(layouts) } }; // keyboard
452870
452870
04543a
void terminate(int s)
04543a
    { appStop(&app, 1); }
04543a
04543a
7e0df9
int main(int argc, char **argv) {
7e0df9
  const char *touch_dev = argc > 1 ? argv[1] : NULL;
7e0df9
7e0df9
  if (!appInit(&app, touch_dev))
452870
    return 1;
04543a
  
04543a
  struct sigaction act = {};
04543a
  act.sa_handler = &terminate;
04543a
  sigaction(SIGHUP, &act, NULL);
04543a
  sigaction(SIGINT, &act, NULL);
04543a
  sigaction(SIGTERM, &act, NULL);
04543a
  
dbe1a1
  int success = appRun(&app);
452870
  appDeinit(&app);
dbe1a1
  return !success;
452870
}
452870