style: remove comments from header files

This commit is contained in:
2025-12-28 05:01:46 +01:00
parent a6b9fa3469
commit c76a620012
38 changed files with 167 additions and 1481 deletions
-44
View File
@@ -37,7 +37,6 @@
</div>
</nav>
</header>
<main>
<section class="hero" style="padding: 8rem 0 4rem;">
<div class="container hero-content">
@@ -47,7 +46,6 @@
</p>
</div>
</section>
<section class="section">
<div class="container">
<h2>Overview</h2>
@@ -56,7 +54,6 @@
A global <code>DWNState</code> singleton manages all state, and the main event loop
dispatches X11 events to specialized modules.
</p>
<div class="card" style="margin: 2rem 0;">
<h3>Project Statistics</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; text-align: center;">
@@ -78,8 +75,6 @@
</div>
</div>
</div>
<!-- Directory Structure -->
<h2 id="structure" style="margin-top: 3rem;">Directory Structure</h2>
<div class="code-header">
<span>Project Layout</span>
@@ -104,8 +99,6 @@
├── Makefile # Build system
├── CLAUDE.md # AI assistant context
└── README.md # Project readme</code></pre>
<!-- Core Modules -->
<h2 id="modules" style="margin-top: 3rem;">Core Modules</h2>
<div class="table-wrapper">
<table>
@@ -185,8 +178,6 @@
</tbody>
</table>
</div>
<!-- Module Dependencies -->
<h2 id="dependencies" style="margin-top: 3rem;">Module Dependencies</h2>
<div class="card">
<pre style="margin: 0; background: transparent; border: none; padding: 0;"><code>main.c (orchestrator)
@@ -208,14 +199,11 @@
└── keys.c
└── config.c</code></pre>
</div>
<!-- Global State -->
<h2 id="state" style="margin-top: 3rem;">Global State (DWNState)</h2>
<p>
All window manager state is centralized in a single <code>DWNState</code> structure.
This simplifies state management and makes the codebase easier to understand.
</p>
<div class="code-header">
<span>include/dwn.h (simplified)</span>
</div>
@@ -223,32 +211,23 @@
Display *display; // X11 connection
Window root; // Root window
int screen; // Default screen
Client *clients[MAX_CLIENTS]; // All managed windows
int client_count;
Workspace workspaces[MAX_WORKSPACES]; // Virtual desktops
int current_workspace;
Panel top_panel;
Panel bottom_panel;
Config config; // User configuration
KeyBinding keys[MAX_KEYBINDINGS];
// EWMH atoms
Atom atoms[ATOM_COUNT];
} DWNState;
extern DWNState *dwn; // Global singleton</code></pre>
<!-- Event Loop -->
<h2 id="events" style="margin-top: 3rem;">Event Loop</h2>
<p>
DWN uses a traditional X11 event loop with XNextEvent. Events are dispatched
to appropriate handlers based on type.
</p>
<div class="code-header">
<span>main.c (simplified)</span>
</div>
@@ -256,11 +235,9 @@ extern DWNState *dwn; // Global singleton</code></pre>
dwn_init(); // Initialize X11, atoms, config
setup_keybindings(); // Register keyboard shortcuts
setup_panels(); // Create panel windows
XEvent event;
while (running) {
XNextEvent(dwn->display, &event);
switch (event.type) {
case MapRequest:
handle_map_request(&event.xmaprequest);
@@ -280,12 +257,9 @@ extern DWNState *dwn; // Global singleton</code></pre>
// ... more event types
}
}
dwn_cleanup();
return 0;
}</code></pre>
<!-- Key Constants -->
<h2 id="constants" style="margin-top: 3rem;">Key Constants</h2>
<div class="table-wrapper">
<table>
@@ -325,8 +299,6 @@ extern DWNState *dwn; // Global singleton</code></pre>
</tbody>
</table>
</div>
<!-- Coding Conventions -->
<h2 id="conventions" style="margin-top: 3rem;">Coding Conventions</h2>
<div class="features-grid" style="grid-template-columns: repeat(2, 1fr);">
<div class="card">
@@ -348,33 +320,26 @@ extern DWNState *dwn; // Global singleton</code></pre>
</ul>
</div>
</div>
<div class="code-header" style="margin-top: 1.5rem;">
<span>Example Function</span>
</div>
<pre><code>void client_focus(Client *c) {
if (!c) return;
// Unfocus previous
if (dwn->focused && dwn->focused != c) {
client_unfocus(dwn->focused);
}
dwn->focused = c;
XSetInputFocus(dwn->display, c->window, RevertToPointerRoot, CurrentTime);
XRaiseWindow(dwn->display, c->frame);
decorations_update(c);
atoms_set_active_window(c->window);
}</code></pre>
<!-- EWMH/ICCCM -->
<h2 id="protocols" style="margin-top: 3rem;">EWMH/ICCCM Support</h2>
<p>
DWN implements key Extended Window Manager Hints and ICCCM protocols
for compatibility with modern applications.
</p>
<div class="features-grid" style="grid-template-columns: repeat(2, 1fr);">
<div class="card">
<h3>EWMH Atoms</h3>
@@ -407,13 +372,10 @@ extern DWNState *dwn; // Global singleton</code></pre>
</ul>
</div>
</div>
<!-- Build System -->
<h2 id="build" style="margin-top: 3rem;">Build System</h2>
<p>
DWN uses a simple Makefile-based build system with pkg-config for dependency detection.
</p>
<div class="table-wrapper">
<table>
<thead>
@@ -467,13 +429,10 @@ extern DWNState *dwn; // Global singleton</code></pre>
</tbody>
</table>
</div>
<!-- Contributing -->
<h2 id="contributing" style="margin-top: 3rem;">Contributing</h2>
<p>
Contributions are welcome! Here's how to get started:
</p>
<div class="steps">
<div class="step">
<div class="step-number">1</div>
@@ -511,11 +470,9 @@ extern DWNState *dwn; // Global singleton</code></pre>
</div>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="container">
<div class="footer-grid">
@@ -559,7 +516,6 @@ extern DWNState *dwn; // Global singleton</code></pre>
</div>
</div>
</footer>
<script src="js/main.js"></script>
</body>
</html>