@dot
digraph D {
  graph [label="Orthogonal edges", splines=ortho, nodesep=1.0];
  node [shape=box fontname=Arial];

  rankdir=LR;
  color = "white"
  bgcolor = "white"
  fillcolor = "white"
  fontcolor = "white"
  pencolor = "white"

  _1 [
    label = <<b>Joystick</b>>
  ];
  _2 [
    label =  <<b>Joystick<br/>Event</b>>
  ];
  _3 [
    label =  <<b>Keyboard</b>>
  ];
  _4 [
    label =  <<b>Keyboard<br/>Event</b>>
  ];

  _5 [
    label = <<b>Joystick</b><br/><font color="#777777"><i>CJoystick</i></font>>;
  ]
  _6 [
    label = <<b>Peripheral Event</b><br/><font color="#777777"><i>kodi::addon::PeripheralEvent</i></font>>;
  ]
  _7 [
    label = <<b>ButtonMap</b><br/><font color="#777777"><i>kodi::addon::JoystickFeatures*</i></font>>;
  ]

  _8 [
    label = <<b>C struct</b><br/><font color="#777777"><i>JOYSTICK_INFO</i></font>>;
  ]
  _9 [
    label = <<b>C struct</b><br/><font color="#777777"><i>PERIPHERAL_EVENT</i></font>>;
  ]
  _10 [
    label = <<b>C structs</b><br/><font color="#777777"><i>JOYSTICK_FEATURE*</i></font>>;
  ]

  _11 [
    label = <<b>Joystick Peripheral</b><br/><font color="#777777"><i>CPeripheralJoystick</i></font>>
  ]

  _12 [
    label = <<b>Event Handling</b><br/><font color="#777777"><i>IJoystickDriverHandler</i></font>>
  ]

  _13 [
    label = <<b>Keyboard Peripheral</b><br/><font color="#777777"><i>CPeripheralKeyboard</i></font>>
  ]

  _14 [
    label = <<b>Keyboard Handling</b><br/><font color="#777777"><i>IKeyboardHandler</i></font>>
  ]

  _15 [
    label = <<b>Input Handling</b><br/><font color="#777777"><i>CGenericJoystickInputHandling</i></font>>
  ]

  _16 [
    label = <<b>Button Mapping</b><br/><font color="#777777"><i>CGenericJoystickButtonMapping</i></font>>
  ]

  _19 [
    label = <<b>Joystick Imitation</b><br/><font color="#777777"><i>CGenericKeyboadHandler</i></font>>
  ]

  _20 [
    label = <<b>Button Map</b><br/><font color="#777777"><i>CAddonJoystickButtonMap</i></font>>
  ]

  _23 [
    label = <<b>Button Dialog</b><br/><font color="#777777"><i>CGUIDialogControllerInput</i></font>>
  ]

  _24 [
    label = <<b>Game Controller Add-ons</b><br/><font color="#777777"><i>CGameController</i></font>>
  ]

  _2 -> _6 [penwidth=3, weight=2];
  _6 -> _9 [penwidth=3, weight=10];
  _7 -> _10 [dir=back, penwidth=3, weight=0];
  _10 -> _20 [dir=back, penwidth=3, weight=-2];
  _9 -> _12 [penwidth=3, weight=21];
  _12 -> _16 [penwidth=3];
  _16 -> _23 [penwidth=3, dir=both, weight=20];
  _23 -> _24 [penwidth=3, dir=back, weight=0];
  edge[constraint=false];
  _20 -> _16 [dir=back, penwidth=3, weight=0];


  subgraph cluster_1 {
    graph [nodesep=6, ranksep=4];
    label = <<b><font point-size='20'>OS</font></b>>;
    fontcolor = "white";
    bgcolor = "red";

    _1 [style=filled, fillcolor=white];
    _2 [style=filled, fillcolor=white];
    _3 [style=filled, fillcolor=white];
    _4 [style=filled, fillcolor=white];
  }

  subgraph cluster_2 {
    graph [nodesep=6, ranksep=4];
    label = <<b><font point-size='20'>Peripheral Add-on</font></b>>;
    fontcolor = "white";
    bgcolor = "red";

    _5 [style=filled, fillcolor=white];
    _6 [style=filled, fillcolor=white];
    _7 [style=filled, fillcolor=white];
  }

  subgraph cluster_3 {
    graph [nodesep=6, ranksep=4];
    label = <<b><font point-size='20'>Peripheral API</font></b>>;
    fontcolor = "white";
    bgcolor = "red";

    _8 [style=filled, fillcolor=white];
    _9 [style=filled, fillcolor=white];
    _10 [style=filled, fillcolor=white];
  }

  subgraph cluster_4 {
    graph [nodesep=6, ranksep=4];
    label = <<b><font point-size='20'>Peripheral Busses</font></b>>;
    fontcolor = "white";
    bgcolor = "red";

    subgraph cluster_4_1 {
      graph [nodesep=6, ranksep=4];
      label = <<font point-size='18'><b>Virtual Add-on Bus</b></font><br/><font color="#777777"><i>CPeripheralBusAddon</i></font>>;
      fontcolor = "black";
      bgcolor = "white";

      _11 [style=filled, fillcolor=white];
      _12 [style=filled, fillcolor=white];

    }

    subgraph cluster_4_2 {
      graph [nodesep=6, ranksep=4];
        label = "";
      ""  [
        color="red"
        bgcolor = "red";
      ];
      pencolor = "red";
    }

    subgraph cluster_4_3 {
      graph [nodesep=6, ranksep=4];
      label = <<font point-size='18'><b>Virtual Application Bus</b></font><br/><font color="#777777"><i>CPeripheralBusApplication</i></font>>;
      fontcolor = "black";
      bgcolor = "white";

      _13 [style=filled, fillcolor=white];
      _14 [style=filled, fillcolor=white];
    }
  }

  subgraph cluster_7 {
    graph [nodesep=6, ranksep=4];
    label = <<b><font point-size='20'>Input Library</font></b>>;
    fontcolor = "white";
    bgcolor = "red";
    rank=same;

    subgraph cluster_7_1 {
      graph [nodesep=6, ranksep=4];
      label = ""
      pencolor = "red";
      _15 [style=filled, fillcolor=white];
      _16 [style=filled, fillcolor=white];
    }

    subgraph cluster_7_2 {
        graph [nodesep=6, ranksep=4];
        label = "";
      "-"  [
        color="red"
        fontcolor="red"
        bgcolor = "red";
      ];
      pencolor = "red";
    }

    subgraph cluster_7_3 {
      graph [nodesep=6, ranksep=4];
      label = ""
      pencolor = "red";
      _19 [style=filled, fillcolor=white];
      _20 [style=filled, fillcolor=white];
    }
  }

  subgraph cluster_9 {
    graph [nodesep=6, ranksep=4];
    label = <<b><font point-size='20'>Configuration GUI</font></b>>;
    fontcolor = "white";
    bgcolor = "red";

    _23 [style=filled, fillcolor=white];
    _24 [style=filled, fillcolor=white];
  }
}
@enddot
