# maplespe/explorerblurmica architecture

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

- Interactive diagram: https://gitdiagram.com/maplespe/explorerblurmica
- Repository: https://github.com/maplespe/explorerblurmica

## Overview

##### Project type and purpose
- This is a dual‑component Windows application:
- A native C++ Shell‑extension DLL (“ExplorerBlurMica.dll”) that hooks into File Explorer and injects blur/Acrylic/Mica background effects.
- A small Python‑based GUI tool (“program.py” + CustomTkinter) that edits a local `config.ini` and runs registration scripts (`register.cmd` / `uninstall.cmd`).
- Its purpose is to let end‑users install/uninstall and configure a blur/acrylic/mica effect in File Explorer on Win10/Win11.

##### File structure
Top level:
- ExplorerBlurMica.sln – Visual Studio solution
- ExplorerBlurMica/… – C++ source, headers, resource files, and embedded MinHook library
- src/register.cmd / uninstall.cmd – wrapper scripts that call `regsvr32` to register/unregister the DLL
- program.py – Python GUI for editing `config.ini` and invoking scripts
Key directories & files:
- ExplorerBlurMica/Helper – utility classes (GraphicsHelper, ThemeHelper, Win32Helper, etc.)
- ExplorerBlurMica/minhook – integrated MinHook code (hook engine, trampoline, disassembler)
- dllmain.cpp – entry point; sets up hooks and listens for window‐creation events
- Various “Tweaker” headers – implement hooking logic for menus, ribbons, UI trees

##### README for additional insights
- Confirms it’s a “Explorer only” effect; uses MinHook for API interception
- Python GUI uses CustomTkinter; no other external services
- Configuration via `[config]`/`[light]`/`[dark]` sections in `config.ini`

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "External Manager"
        GUI["Python GUI (program.py)"]:::external
        Config["config.ini"]:::config
        subgraph "Registration Scripts"
            Register["register.cmd"]:::external
            Uninstall["uninstall.cmd"]:::external
        end
    end

    Registry["Windows Registry (COM)"]:::process
    Explorer["File Explorer.exe"]:::process

    GUI -->|"read/write"| Config
    GUI -->|"invoke"| Register
    GUI -->|"invoke"| Uninstall
    Register -->|"regsvr32"| Registry
    Uninstall -->|"regsvr32"| Registry
    Registry -->|"COM load"| Explorer

    Explorer -->|"loads DLL"| DLL

    subgraph "ExplorerBlurMica.dll" 
        DllMain["dllmain.cpp"]:::native
        Config -->|"reads"| DllMain

        subgraph "MinHook Library"
            MH_H["MinHook.h"]:::minhook
            MH_Hook["hook.cpp"]:::minhook
            MH_Tramp["trampoline.cpp"]:::minhook
        end

        subgraph "Helper Modules"
            GH["GraphicsHelper.h"]:::native
            TH["ThemeHelper.h"]:::native
            WH["Win32Helper.h"]:::native
        end

        subgraph "Tweaker Classes"
            MTB["MenuToolBarTweaker.h"]:::native
            RT["RibbonTweaker.h"]:::native
            VI["visualtreewatcher.h"]:::native
        end

        DllMain -->|"initialize hooks"| MH_H
        MH_H -->|"use engine"| MH_Hook
        MH_Hook -->|"setup trampolines"| MH_Tramp
        MH_Tramp -->|"intercept API calls"| GH
        MH_Tramp -->|"intercept API calls"| TH
        MH_Tramp -->|"intercept API calls"| MTB
        MH_Tramp -->|"intercept API calls"| RT
        MH_Tramp -->|"intercept API calls"| VI
    end

    subgraph "Windows Composition"
        Comp["Composition Engine"]:::process
    end

    GH -->|"apply blur/Mica"| Comp
    TH -->|"apply theme settings"| Comp
    MTB -->|"tweak menus"| Comp
    RT -->|"tweak ribbons"| Comp
    VI -->|"watch UI tree"| Comp

    click GUI "https://github.com/maplespe/explorerblurmica/blob/main/program.py"
    click Config "https://github.com/maplespe/explorerblurmica/blob/main/src/config.ini"
    click Register "https://github.com/maplespe/explorerblurmica/blob/main/src/register.cmd"
    click Uninstall "https://github.com/maplespe/explorerblurmica/blob/main/src/uninstall.cmd"
    click DllMain "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/dllmain.cpp"
    click MH_H "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/minhook/MinHook.h"
    click MH_Hook "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/minhook/hook.cpp"
    click MH_Tramp "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/minhook/trampoline.cpp"
    click GH "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/Helper/GraphicsHelper.h"
    click TH "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/Helper/ThemeHelper.h"
    click WH "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/Helper/Win32Helper.h"
    click MTB "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/MenuToolBarTweaker.h"
    click RT "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/RibbonTweaker.h"
    click VI "https://github.com/maplespe/explorerblurmica/blob/main/ExplorerBlurMica/visualtreewatcher.h"

    classDef external fill:#ADD8E6,stroke:#000
    classDef config fill:#90EE90,stroke:#000
    classDef native fill:#FFA500,stroke:#000
    classDef process fill:#D3D3D3,stroke:#000
    classDef minhook fill:#FFB347,stroke:#000
```
