fix: prevent `Surface` vs `gears.surface` clashes
ci/woodpecker/pr/docker-build Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline failed Details
ci/woodpecker/pr/build-and-run Pipeline failed Details

This commit is contained in:
Aire-One 2023-10-08 17:51:34 +02:00
parent 9e65a4cc9b
commit e7b938a074
2 changed files with 7 additions and 6 deletions

View File

@ -151,7 +151,7 @@ local global_module_ast <const> = ast.create_node("module", "global_env_def", "g
-- Declare global types
table.insert(global_module_ast.children, ast.create_node("type", "Gears_Shape_Function", { "(function(cr: any, width: integer, height: integer))" }, true))
table.insert(global_module_ast.children, ast.create_node("type", "Color", { "any" }, true))
table.insert(global_module_ast.children, ast.create_node("type", "Surface", { "any" }, true))
table.insert(global_module_ast.children, ast.create_node("type", "Cairo_Surface", { "any" }, true))
table.insert(global_module_ast.children, ast.create_node("type", "Cairo_Context", { "any" }, true))
table.insert(global_module_ast.children, ast.create_node("type", "Image", { "any" }, true))
for record_kind, nodes in pairs(global_nodes_by_record_kind) do

View File

@ -3,20 +3,21 @@ local type Node = require("awesomewmdtl.types.Node")
local type_map <const>: { string : string } = {
awesome = "Awesome",
bool = "boolean",
["surface._native"] = "Surface",
["surface._native"] = "Cairo_Surface",
cairo_context = "Cairo_Context",
["cairo.surface"] = "Cairo_Surface",
color = "Color",
client = "Client",
["gears.shape"] = "Gears_Shape_Function",
["gears.surface"] = "Surface",
["gears.surface"] = "Cairo_Surface",
image = "Image",
int = "integer",
layout = "Layout",
raw_surface = "Surface",
raw_curface = "Surface", -- typo that should be fixed in the Client doc
raw_surface = "Cairo_Surface",
raw_curface = "Cairo_Surface", -- typo that should be fixed in the Client doc
screen = "Screen",
shape = "Gears_Shape_Function",
surface = "Surface",
surface = "Cairo_Surface",
tag = "Tag",
widget = "wibox.widget",