Per-platform app lifecycle, windowing and surface handling behind one contract