aboutsummaryrefslogtreecommitdiff
path: root/docs/api/system.lua
AgeCommit message (Collapse)Author
2025-01-13Additional corrections to system.get_file_infojgmdev
2024-09-14Add primary selection support (#1729)Guldoman
* Add support for primary selections * Handle primary selection in `DocView`s
2024-08-27Adjust scale retrieveal on startup (#152)Jefferson González
Since new renwindow api (that allows initializing windows directly Lua) the main window creation was moved to core.init but, the scale detection code was still been performed before. This meant that loading the default system style was using the incorrect scale causing issues that would only be resolved by manually re-scaling the interface. Tried to wrongly fix the issue by delegating the responsibility to the scale plugin but that wasn't the correct solution (didn't notice what explained on first paragraph until later). Now we defer style loading until main window is created and the default system scale properly detected, this ensures that the correct scale is set before performing any style calculations that rely on it. Now besides updating scale on the displaychanged event it also updates it when the window is resized, but we limited the amount of scale checks on resize to prevent crashes on X11. Finally, updated system.get_scale documentation.
2024-06-25Rebase window creation and management to Lua (#108)Jefferson González
* move window creation and management to Lua (#1751) * remove scaling logic from font code for the time being its been hardcoded to 1 for the non SDL Renderer basewin setup, so nothing is lost for non MacOS users. will be revisited in the future when scaling is improved with SDL3 and moved into scripts. * remove unused window_renderer argument from font functions * move window logic to lua, pass window via argument * rename window creation functions `*_create`, `*_destroy`, add real init * Set active window when processing frame * get size directly from RenWindow, get active window size from renderer * correct reverted draw calls * fix window not reappearing on restart * add simple logic to persist the core window * fix style * add renwindow documentation * make windows hidden by default again * reorder ren_update_rects execution, add comment to note future work * Adapt code that calls system.win functions * Remove scale detection from start.lua * Trimmed spaces from renwindow docs * Enable darkmode on window creation and added min win size --------- Co-authored-by: Jan <sentrycraft123@gmail.com>
2024-06-12Auto chdir to project depending on active document (#93)Jefferson González
This change better supports plugins like the terminal without them having to implement current project path detection. When editing files not part of the root project the system will automatically chdir to their current parent directory. Other changes include: * added system.getcwd():string * added core.current_project(filename?:string):core.project * added Project:path_belongs_to(path):boolean * increased the mod minor version as a result of newly introduced functions
2024-01-22Add system.setenv (#1706)Chloé Vulquin
* add system.setenv * document system.setenv * system.setenv: use wide versions of functions on windows * do not include processenv.h * system.setenv: report failure, including of utfconv * system.setenv: free utfconv output
2023-11-20Fix running core.step when receiving an event while not waiting ↵Guldoman
lite-xl/lite-xl#1667
2023-11-20Allow writing to hidden files on Windows lite-xl/lite-xl#1653takase1121
2023-07-25docs(system): fix missing parameter in function prototypetakase1121
2023-07-25docs(system): fix missing parameter for system.path_comparetakase1121
2023-05-21Project rebrandingjgmdev
2023-05-20Merged improved scaling support from lite-xl/lite-xl#1347jgmdev
2023-05-13docs(system): make all parameters for set_window_hit_test optionaltakase1121
2022-12-20add touch eventsJan200101
2022-11-30docs api: minor correctionsjgmdev
2022-11-23update documentation for system (#1210)Takase
2022-09-29system: added raise_window() (#1131)Jefferson González
2022-02-04Added system.get_process_id() to api docs.jgmdev
2021-07-09Namespaced aliases, virtual classes and added missing returns.jgmdev
2021-06-25Documented with EmmyLua the C API using .lua interface files.jgmdev