# `kind` bit 0x2 is the FOCUSABLE flag -- decoded, disc-wide. 2026-08-31.
#
# cargo run -p sylpheed-formats --example kind_census_five_screens  (SYLPHEED_DISC=/disc)
#
# The declaration entry's kind word (+0x28) and its focus/nav index (+0x2C) are
# two fields nobody had cross-checked. The index is -1 on anything that cannot
# take the cursor, so if the two agree everywhere, the bit that separates them is
# IDENTIFIED rather than guessed.
#
#   bit 0x2 of kind  ==  (focus index >= 0)      0 violations in 15493 entries
#
# 24 UI paks, every parseable build in each. 1062 focusable elements, 14431 not.
#
# WHY IT MATTERS: `kind == 0x3002` is NOT the test for a button. It catches 778
# of 1062 focusable elements and MISSES 284 -- 26.7 % -- at 0x2, 0x2002, 0x3003,
# 0x73002 and 0x73003. On GP_TITLE that is `ptbtn00.rat` on the PRESS (A) plate
# (entries 2 and 3), which is 0x73002. And 0x3000 (817 elements) resembles
# 0x3002 and is NOT focusable.
#
# The low bits look like independent flags -- 0x1 with a parent, 0x4 a repeated
# template instance, 0x10 a primitive -- and 0x2000/0x3000/0x70000 like a group
# in the high half. Only bit 0x2 is decoded here; the rest is observed structure
# and is NOT claimed.

GP_TITLE: 16 parseable builds of 16 entries

kind       elements by file suffix
0x0        .ratx27  .t32x102
0x1        .t32x2
0x4        .t32x8
0x10       .prmx18
0x3000     .t32x3
0x3002     .ratx16
0x73002    .ratx2

NON-BUTTON .t32 elements with kind != 0: 13
   entry  4  ptlogo1.t32              kind 0x4
   entry  4  ptlogo2.t32              kind 0x4
   entry  4  ptlogo1.t32              kind 0x4
   entry  4  ptlogo2.t32              kind 0x4
   entry  4  ptlogoall_eff.t32        kind 0x3000
   entry  4  ptlogoall_eff2.t32       kind 0x3000
   entry  7  ptlogo1.t32              kind 0x4
   entry  7  ptlogo2.t32              kind 0x4
   entry  7  ptlogo1.t32              kind 0x4
   entry  7  ptlogo2.t32              kind 0x4
   entry  7  ptlogo_all_eff.t32       kind 0x3000
   entry 10  palogo_sqex_eff.t32      kind 0x1
   entry 13  palogo_sqex_eff.t32      kind 0x1

*btn* elements with kind != 0x3002: 2
   entry  2  ptbtn00.rat              kind 0x73002
   entry  3  ptbtn00.rat              kind 0x73002

kind vs the focus index at +0x2C (-1 = not focusable), GP_TITLE:
   kind 0x0      focus = -1        129 elements
   kind 0x1      focus = -1          2 elements
   kind 0x4      focus = -1          8 elements
   kind 0x10     focus = -1         18 elements
   kind 0x3000   focus = -1          3 elements
   kind 0x3002   focus >= 0         16 elements
   kind 0x73002  focus >= 0          2 elements

DISC-WIDE — 24 UI paks, 15493 declaration entries
kind           focus = -1   focus >= 0
0x0                  7459            0
0x1                  1093            0
0x2                     0           16
0x4                  2964            0
0x5                   282            0
0x8                   650            0
0x9                     6            0
0xC                    48            0
0x10                  329            0
0x14                    2            0
0x2002                  0           16
0x3000                817            0
0x3001                 10            0
0x3002                  0          778
0x3003                  0          192
0x3004                426            0
0x3008                 72            0
0x300C                135            0
0x3010                 38            0
0x73002                 0           64
0x73003                 0           96

HYPOTHESIS: bit 0x2 of kind == (focus index >= 0)
violations: 0 of 15493
