summaryrefslogtreecommitdiff
path: root/meta/3rd/love2d/library/love.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-20 17:06:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-20 17:06:06 +0800
commit002e0c1673fdc5bd76331aaa1359cbb0925dad2e (patch)
tree6cbd6e62f3119798f300c2b67927677ae0dceaaa /meta/3rd/love2d/library/love.lua
parent4bad35e608179e74c9ce186fa2038573055e574b (diff)
downloadlua-language-server-002e0c1673fdc5bd76331aaa1359cbb0925dad2e.zip
update
Diffstat (limited to 'meta/3rd/love2d/library/love.lua')
-rw-r--r--meta/3rd/love2d/library/love.lua59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/3rd/love2d/library/love.lua b/meta/3rd/love2d/library/love.lua
index eb1324e5..96d1dca1 100644
--- a/meta/3rd/love2d/library/love.lua
+++ b/meta/3rd/love2d/library/love.lua
@@ -25,3 +25,62 @@ function love.hasDeprecationOutput() end
---
---@param enable boolean # Whether to enable or disable deprecation output.
function love.setDeprecationOutput(enable) end
+
+---@class love.Data: love.Object
+local Data = {}
+
+---
+---Creates a new copy of the Data object.
+---
+---@return love.Data clone # The new copy.
+function Data:clone() end
+
+---
+---Gets an FFI pointer to the Data.
+---
+---This function should be preferred instead of Data:getPointer because the latter uses light userdata which can't store more all possible memory addresses on some new ARM64 architectures, when LuaJIT is used.
+---
+---@return ffi.cdata* pointer # A raw void* pointer to the Data, or nil if FFI is unavailable.
+function Data:getFFIPointer() end
+
+---
+---Gets a pointer to the Data. Can be used with libraries such as LuaJIT's FFI.
+---
+---@return lightuserdata pointer # A raw pointer to the Data.
+function Data:getPointer() end
+
+---
+---Gets the Data's size in bytes.
+---
+---@return number size # The size of the Data in bytes.
+function Data:getSize() end
+
+---
+---Gets the full Data as a string.
+---
+---@return string data # The raw data.
+function Data:getString() end
+
+---@class love.Object
+local Object = {}
+
+---
+---Destroys the object's Lua reference. The object will be completely deleted if it's not referenced by any other LÖVE object or thread.
+---
+---This method can be used to immediately clean up resources without waiting for Lua's garbage collector.
+---
+---@return boolean success # True if the object was released by this call, false if it had been previously released.
+function Object:release() end
+
+---
+---Gets the type of the object as a string.
+---
+---@return string type # The type as a string.
+function Object:type() end
+
+---
+---Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.
+---
+---@param name string # The name of the type to check for.
+---@return boolean b # True if the object is of the specified type, false otherwise.
+function Object:typeOf(name) end