# lxylxy123456/cariboublocker architecture

> Architecture diagram of the GitHub repository lxylxy123456/cariboublocker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lxylxy123456/cariboublocker
- Repository: https://github.com/lxylxy123456/cariboublocker

## Overview

##### Project type and purpose
- This is a GNOME Shell extension (“cariboublocker”) whose sole purpose is to override GNOME Shell’s touchscreen‐detection logic so the on-screen keyboard never appears.
- It is not a multi-service system or a client/server app; it’s a single plug-in loaded into the GNOME Shell runtime.

##### File structure
- Top-level artifacts
- .github/workflows/zip.yml – CI step to build/version the extension zip
- LICENSE, README.md, stylesheet.css – metadata, user guide, optional CSS
- Version folders (3.36.3, 40.0, 41, …, 48): each contains extension.js + metadata.json for a specific GNOME Shell release
- metadata.json for each version declares “shell-version” compatibility and extension UUID, author, entry point (extension.js)
- extension.js is the only JavaScript payload: it defines enable()/disable() functions that patch KeyboardManager._lastDeviceIsTouchscreen()

##### README for additional insights
- README describes:
- Supported GNOME versions
- Installation methods (extensions.gnome.org or manual zip)
- How to add unsupported versions via metadata.json or dconf
- The core code change: always return false in _lastDeviceIsTouchscreen()

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Packaging Layer
    subgraph "Packaging" 
        direction TB
        CI[".github/workflows/zip.yml"]:::config
        LICENSE["LICENSE"]:::config
        README["README.md"]:::config
        CSS["stylesheet.css"]:::config

        subgraph "Version Folders" 
            direction TB
            V363["3.36.3/metadata.json"]:::extension
            V403["40.0/metadata.json"]:::extension
            V40["40/metadata.json"]:::extension
            V41["41/metadata.json"]:::extension
            V42["42/metadata.json"]:::extension
            V43["43/metadata.json"]:::extension
            V44["44/metadata.json"]:::extension
            V45["45/metadata.json"]:::extension
            V48["48/metadata.json"]:::extension
        end

        subgraph "Extension Payloads"
            direction TB
            E363["3.36.3/extension.js"]:::extension
            E403["40.0/extension.js"]:::extension
            E40["40/extension.js"]:::extension
            E41["41/extension.js"]:::extension
            E42["42/extension.js"]:::extension
            E43["43/extension.js"]:::extension
            E44["44/extension.js"]:::extension
            E45["45/extension.js"]:::extension
            E48["48/extension.js"]:::extension
        end
    end

    %% Runtime Layer
    subgraph "GNOME Shell Process" 
        direction TB
        ShellCore["GNOME Shell Core"]:::host
        ExtMgr["Extension Manager"]:::host

        subgraph "cariboublocker Extension" 
            direction TB
            Meta["metadata.json"]:::extension
            Code["extension.js"]:::extension
            Patch["Monkey-patch\n_lastDeviceIsTouchscreen()"]:::extension
        end

        DConf["dconf/GSettings"]:::config
        KM["KeyboardManager Instance"]:::host
        Input["Clutter.InputDevice\n(TOUCHSCREEN)"]:::host
        IME["Caribou IME Spawn Logic"]:::host
    end

    %% Relationships
    CI -->|"builds zip"| V363
    CI --> V403
    CI --> V40
    CI --> V41
    CI --> V42
    CI --> V43
    CI --> V44
    CI --> V45
    CI --> V48

    ShellCore --> ExtMgr
    ExtMgr -->|"reads"| Meta
    Meta --> Code
    Code -->|"enable()"| Patch
    Patch --> KM
    Input -->|"input event"| KM
    KM -->|"calls _lastDeviceIsTouchscreen()"| Patch
    Patch -->|"returns false"| IME
    DConf -.->|"override metadata validation"| ExtMgr
    ExtMgr -->|"disable()"| Patch

    %% Click Events
    click CI "https://github.com/lxylxy123456/cariboublocker/blob/master/.github/workflows/zip.yml"
    click V363 "https://github.com/lxylxy123456/cariboublocker/blob/master/3.36.3/metadata.json"
    click V403 "https://github.com/lxylxy123456/cariboublocker/blob/master/40.0/metadata.json"
    click V40 "https://github.com/lxylxy123456/cariboublocker/blob/master/40/metadata.json"
    click V41 "https://github.com/lxylxy123456/cariboublocker/blob/master/41/metadata.json"
    click V42 "https://github.com/lxylxy123456/cariboublocker/blob/master/42/metadata.json"
    click V43 "https://github.com/lxylxy123456/cariboublocker/blob/master/43/metadata.json"
    click V44 "https://github.com/lxylxy123456/cariboublocker/blob/master/44/metadata.json"
    click V45 "https://github.com/lxylxy123456/cariboublocker/blob/master/45/metadata.json"
    click V48 "https://github.com/lxylxy123456/cariboublocker/blob/master/48/metadata.json"
    click E363 "https://github.com/lxylxy123456/cariboublocker/blob/master/3.36.3/extension.js"
    click E403 "https://github.com/lxylxy123456/cariboublocker/blob/master/40.0/extension.js"
    click E40 "https://github.com/lxylxy123456/cariboublocker/blob/master/40/extension.js"
    click E41 "https://github.com/lxylxy123456/cariboublocker/blob/master/41/extension.js"
    click E42 "https://github.com/lxylxy123456/cariboublocker/blob/master/42/extension.js"
    click E43 "https://github.com/lxylxy123456/cariboublocker/blob/master/43/extension.js"
    click E44 "https://github.com/lxylxy123456/cariboublocker/blob/master/44/extension.js"
    click E45 "https://github.com/lxylxy123456/cariboublocker/blob/master/45/extension.js"
    click E48 "https://github.com/lxylxy123456/cariboublocker/blob/master/48/extension.js"
    click LICENSE "https://github.com/lxylxy123456/cariboublocker/tree/master/LICENSE"
    click README "https://github.com/lxylxy123456/cariboublocker/blob/master/README.md"
    click CSS "https://github.com/lxylxy123456/cariboublocker/blob/master/stylesheet.css"

    %% Styles
    classDef host fill:#AED6F1,stroke:#1F618D,color:#1F2833
    classDef extension fill:#A9DFBF,stroke:#196F3D,color:#1F2833
    classDef config fill:#F9E79F,stroke:#B7950B,color:#1F2833
```
