@mica/sdk (SDK contract v1)
    Preparing search index...

    Function useDisplayWrite

    • OS Service Hook for changing how big the phone is drawn on screen (MICA-127) — the size, the motion preference, and the home screen grid. Separate from useDisplay(), which only reads it; the window is Settings' business, not every app's.

      Returns {
          setDisplaySize: (size: number) => void;
          setFrame: (id: string) => void;
          setFrameColor: (id: string) => void;
          setHomeGridSize: (columns: number, rows: number) => void;
          setMotionPreference: (preference: MotionPreference) => void;
      }

      • setDisplaySize: (size: number) => void
      • setFrame: (id: string) => void

        MICA-236: the phone body's camera style, one of FRAME_IDS, or '' to follow the owner's mica_default_frame. Anything else is ignored. Settings only: not in the add-on member allowlist, so a sandboxed frame cannot restyle the player's phone.

      • setFrameColor: (id: string) => void

        MICA-236: the bezel colour (black, graphite, silver) or ''. Settings only, as above.

      • setHomeGridSize: (columns: number, rows: number) => void

        Applies a new grid size and reflows anything the shrink pushed out of bounds. The setter alone would leave those items structurally valid but unreachable — a shrink is the one time homeGridItems needs touching from outside homeGrid.ts itself, so this bundles the write and the reflow into one call rather than asking every caller to remember the second step.

        MICA-121: checked before either store is touched, and refused outright if the new size can't hold every item — not applied-then-partially-undone. The grid's own capacity never changes as a side effect of a resize the player never agreed to, and the toast tells them why the stepper in Settings > Display didn't move.

      • setMotionPreference: (preference: MotionPreference) => void