Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 241 additions & 15 deletions examples/xmake-requires.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,230 @@
{
["linux|x86_64"] = {
["ca-certificates#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "20250131"
},
["cairo#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.18.0"
},
["cmake#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "4.2.3"
},
["expat#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "2.7.4"
},
["fontconfig#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "2.17.1"
},
["freetype#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "2.14.1"
},
["gperf#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "3.2.1"
},
["libffi#0b3b0fcf"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "3.4.8"
},
["libpng#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "v1.6.55"
},
["libpthread-stubs#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "0.5"
},
["libx11#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.8.13"
},
["libxau#16fb575b"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.0.12"
},
["libxcb#16fb575b"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.17.0"
},
["libxdmcp#16fb575b"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.1.5"
},
["libxext#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.3.7"
},
["libxrender#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "0.9.12"
},
["meson#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.10.2"
},
["ninja#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "v1.13.1"
},
["openssl >=1.1.1-a#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.1.1-w"
},
["pixman#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "0.46.2"
},
["pkg-config#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "0.29.2"
},
["python 3.x#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "3.13.11"
},
["util-macros#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.20.0"
},
["xcb-proto#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.17.0"
},
["xorgproto#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "2023.2"
},
["xtrans#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "1.6.0"
},
["zlib#0b3b0fcf"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "v1.3.2"
},
["zlib#f56260b5"] = {
repo = {
branch = "master",
commit = "75c3fcffb897a8aeb37863c495b9f58266216b26",
url = "https://gitlab.com/tboox/xmake-repo.git"
},
version = "v1.3.2"
}
},
__meta__ = {
version = "1.0"
},
Expand Down Expand Up @@ -53,19 +279,19 @@
},
["lcui#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libcss#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libi18n#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
Expand Down Expand Up @@ -95,7 +321,7 @@
},
["libplatform#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
Expand All @@ -109,55 +335,55 @@
},
["libthread#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libtimer#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libui#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libui-cursor#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libui-router#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libui-server#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libui-widgets#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libui-xml#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
["libworker#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
Expand Down Expand Up @@ -195,7 +421,7 @@
},
["pandagl#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
Expand Down Expand Up @@ -225,7 +451,7 @@
},
["yutil#31fecfc4"] = {
repo = {
url = "../build"
url = "../build/packages"
},
version = "latest"
},
Expand Down
4 changes: 3 additions & 1 deletion lib/ptk/include/ptk/types.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* lib/ptk/include/ptk/types.h
*
* Copyright (c) 2023-2026, Liu Chao <hello@lcui.dev> All rights reserved.
Expand All @@ -22,6 +22,7 @@ typedef enum {
PTK_APP_ID_UNKNOWN,
PTK_APP_ID_LINUX,
PTK_APP_ID_LINUX_X11,
PTK_APP_ID_LINUX_WAYLAND,
PTK_APP_ID_WIN_DESKTOP,
PTK_APP_ID_UWP
} ptk_app_id_t;
Expand Down Expand Up @@ -289,6 +290,7 @@ typedef struct ptk_window_driver {
void (*get_position)(ptk_window_t *, int *, int *);
void (*set_maximized)(ptk_window_t *, bool);
void *(*get_handle)(ptk_window_t *);
unsigned (*get_dpi)(ptk_window_t *);
int (*get_width)(ptk_window_t *);
int (*get_height)(ptk_window_t *);
bool (*is_maximized)(ptk_window_t *);
Expand Down
27 changes: 27 additions & 0 deletions lib/ptk/rules/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
rule("wayland.protocol")
on_load(function(target)
if target:sourcebatches()["wayland.protocol"] then
local generatedir = path.join(target:autogendir(), "rules", "wayland")
target:add("includedirs", generatedir)
end
end)

before_buildcmd_file(function(target, batchcmds, sourcefile, opt)
local generatedir = path.join(target:autogendir(), "rules", "wayland")
local basename = path.basename(sourcefile)
local headerfile = path.join(generatedir, basename .. "-client-protocol.h")
local sourcefile_c = path.join(generatedir, basename .. "-protocol.c")
local objectfile = target:objectfile(sourcefile_c)
local scanner = os.getenv("WAYLAND_SCANNER") or "/usr/bin/wayland-scanner"
local code_mode = target:kind() == "shared" and "public-code" or "private-code"

table.insert(target:objectfiles(), objectfile)
batchcmds:show_progress(opt.progress, "${color.build.object}wayland-scanner %s", sourcefile)
batchcmds:mkdir(generatedir)
batchcmds:vrunv(scanner, {"client-header", path(sourcefile), path(headerfile)})
batchcmds:vrunv(scanner, {code_mode, path(sourcefile), path(sourcefile_c)})
batchcmds:compile(sourcefile_c, objectfile)
batchcmds:add_depfiles(sourcefile)
batchcmds:set_depmtime(os.mtime(objectfile))
batchcmds:set_depcache(target:dependfile(objectfile))
end)
Loading
Loading