Add doc-gen comment stuff

Somehow the doc-gen tool still works, kinda crazy
This commit is contained in:
Ottatop 2024-01-14 19:53:43 -06:00
parent 35e7b73646
commit fbef4007ea
8 changed files with 66 additions and 1 deletions

View file

@ -2,12 +2,18 @@ local cqueues = require("cqueues")
local client = require("pinnacle.grpc.client") local client = require("pinnacle.grpc.client")
---The entry point to configuration.
---
---This module contains one function: `setup`, which is how you'll access all the ways to configure Pinnacle.
---@class PinnacleModule ---@class PinnacleModule
local pinnacle = { local pinnacle = {
version = "v0alpha1", version = "v0alpha1",
} }
---@classmod ---The Pinnacle module.
---
---This module holds all the other configuration modules (Window, Input, etc.), and allows you to
---quit the compositor using the `quit` method.
---@class Pinnacle ---@class Pinnacle
---@field private config_client Client ---@field private config_client Client
---@field input Input ---@field input Input

View file

@ -25,9 +25,11 @@ end
---@return integer total_length ---@return integer total_length
local function read_length_prefixed_message(body) end local function read_length_prefixed_message(body) end
---@nodoc
---@class ClientModule ---@class ClientModule
local client = {} local client = {}
---@nodoc
---@class Client ---@class Client
---@field conn H2Connection ---@field conn H2Connection
---@field loop CqueuesLoop ---@field loop CqueuesLoop

View file

@ -92,11 +92,15 @@ local mouse_edge_values = {
---| "press" Trigger on mouse button press ---| "press" Trigger on mouse button press
---| "release" Trigger on mouse button release ---| "release" Trigger on mouse button release
---@nodoc
---@class InputModule ---@class InputModule
---@field private btn table ---@field private btn table
local input = {} local input = {}
input.btn = mouse_button_values input.btn = mouse_button_values
---Input management.
---
---This module provides utilities to set key- and mousebinds as well as change keyboard settings.
---@class Input ---@class Input
---@field private config_client Client ---@field private config_client Client
local Input = { local Input = {

View file

@ -1,3 +1,4 @@
---@nodoc
---@enum Key ---@enum Key
local keys = { local keys = {
NoSymbol = 0x00000000, NoSymbol = 0x00000000,

View file

@ -35,20 +35,34 @@ local function build_grpc_request_params(method, data)
} }
end end
---@nodoc
---@class OutputHandleModule ---@class OutputHandleModule
local output_handle = {} local output_handle = {}
---An output handle.
---
---This is a handle to one of your monitors.
---It serves to make it easier to deal with them, defining methods for getting properties and
---helpers for things like positioning multiple monitors.
---
---This can be retrieved through the various `get` functions in the `Output` module.
---@classmod ---@classmod
---@class OutputHandle ---@class OutputHandle
---@field private config_client Client ---@field private config_client Client
---@field name string The unique name of this output ---@field name string The unique name of this output
local OutputHandle = {} local OutputHandle = {}
---@nodoc
---@class OutputModule ---@class OutputModule
---@field private handle OutputHandleModule ---@field private handle OutputHandleModule
local output = {} local output = {}
output.handle = output_handle output.handle = output_handle
---Output management.
---
---An output is what you would call a monitor. It presents windows, your cursor, and other UI elements.
---
---Outputs are uniquely identified by their name, a.k.a. the name of the connector they're plugged in to.
---@class Output ---@class Output
---@field private config_client Client ---@field private config_client Client
local Output = {} local Output = {}

View file

@ -29,9 +29,13 @@ local function build_grpc_request_params(method, data)
} }
end end
---@nodoc
---@class ProcessModule ---@class ProcessModule
local process = {} local process = {}
---Process management.
---
---This module provides utilities to spawn processes and capture their output.
---@class Process ---@class Process
---@field private config_client Client ---@field private config_client Client
local Process = {} local Process = {}

View file

@ -41,6 +41,11 @@ end
---@class TagHandleModule ---@class TagHandleModule
local tag_handle = {} local tag_handle = {}
---A tag handle.
---
---This is a handle that allows manipulation of a tag.
---
---This can be retrieved through the various `get` functions in the `Tag` module.
---@classmod ---@classmod
---@class TagHandle ---@class TagHandle
---@field private config_client Client ---@field private config_client Client
@ -52,6 +57,21 @@ local TagHandle = {}
local tag = {} local tag = {}
tag.handle = tag_handle tag.handle = tag_handle
---Tag management.
---
---This module provides utilities for creating and manipulating tags.
---
---A tag is a sort of marker for each of your windows. It allows you to present windows in ways that
---traditional workspaces cannot.
---
---More specifically:
---
--- - A window can have multiple tags.
--- - This means that you can have one window show up across multiple "workspaces" if you come something like i3.
--- - An output can display multiple tags at once.
--- - This allows you to toggle a tag and have windows on both tags display at once. This is helpful if you, say, want to reference a browser window while coding; you toggle your browser's tag and temporarily reference it while you work without having to change screens.
---
---If you need to get tags beyond the first with the same name, use the `get` method and find what you need.
---@class Tag ---@class Tag
---@field private config_client Client ---@field private config_client Client
local Tag = {} local Tag = {}

View file

@ -41,20 +41,34 @@ local function build_grpc_request_params(method, data)
} }
end end
---@nodoc
---@class WindowHandleModule ---@class WindowHandleModule
local window_handle = {} local window_handle = {}
---A window handle.
---
---This is a handle to an application window that allows manipulation of the window.
---
---If the window is destroyed, the handle will become invalid and may not do
---what you want it to.
---
---You can retrieve window handles through the various `get` functions in the `Window` module.
---@classmod ---@classmod
---@class WindowHandle ---@class WindowHandle
---@field private config_client Client ---@field private config_client Client
---@field id integer ---@field id integer
local WindowHandle = {} local WindowHandle = {}
---@nodoc
---@class WindowModule ---@class WindowModule
---@field private handle WindowHandleModule ---@field private handle WindowHandleModule
local window = {} local window = {}
window.handle = window_handle window.handle = window_handle
---Window management.
---
---This module helps you deal with setting windows to fullscreen and maximized, setting their size,
---moving them between tags, and various other actions.
---@class Window ---@class Window
---@field private config_client Client ---@field private config_client Client
local Window = {} local Window = {}