diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2014-11-11 23:27:51 -0500 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2014-11-11 23:27:51 -0500 |
commit | f4cc2ff3bdac044f30bc08cdd3ca283db825b4b8 (patch) | |
tree | 13699c014725faf8eefb1a9072bafc92454b1fdd /scripts/gen_iface.lua | |
parent | 74d743ea868ea0cfa1785eddc226b370ea1e26cb (diff) |
Added new `_SCINTILLA.next_image_type()` for registering images.
Diffstat (limited to 'scripts/gen_iface.lua')
-rwxr-xr-x | scripts/gen_iface.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/gen_iface.lua b/scripts/gen_iface.lua index 49fd747e..bb4f11d9 100755 --- a/scripts/gen_iface.lua +++ b/scripts/gen_iface.lua @@ -147,7 +147,7 @@ for i = 1, #properties do end f:write('}\n\n') f:write([[ -local marker_number, indic_number, list_type = -1, -1, 0 +local marker_number, indic_number, list_type, image_type = -1, -1, 0, 0 --- -- Returns a unique marker number for use with `buffer.marker_define()`. @@ -186,6 +186,20 @@ function M.next_user_list_type() return list_type end +--- +-- Returns a unique image type identier number for use with +-- `buffer.register_image()` and `buffer.register_rgba_image()`. +-- Use this function for custom image types in order to prevent clashes with +-- identifiers of other custom image types. +-- @usage local image_type = _SCINTILLA.next_image_type() +-- @see buffer.register_image +-- @see buffer.register_rgba_image +-- @name next_image_type +function M.next_image_type() + image_type = image_type + 1 + return image_type +end + return M ]]) f:close() |