diff options
author | 2010-06-11 18:51:16 -0400 | |
---|---|---|
committer | 2010-06-11 18:51:16 -0400 | |
commit | 8e66381a040f695f4203b28bc3f1d6818d0da7a2 (patch) | |
tree | e30e8115d27b423b579e60178f36a151dc795f50 /scripts/gen_iface.lua | |
parent | 7a4800f05f26067a1cef77e5431256aab4c3d675 (diff) | |
download | textadept-8e66381a040f695f4203b28bc3f1d6818d0da7a2.tar.gz textadept-8e66381a040f695f4203b28bc3f1d6818d0da7a2.zip |
Removed _G.textadept.
Created new _SCINTILLA core module.
Renamed textadept.constants to _SCINTILLA.constants
Renamed textadept.buffer_functions to _SCINTILLA.functions
Renamed textadept.buffer_properties to _SCINTILLA.properties
Created new gui core module.
Renamed textadept._print() to gui._print().
Renamed textadept.check_focused_buffer() to gui.check_focused_buffer().
Renamed textadept.clipboard_text to gui.clipboard_text.
Renamed textadept.context_menu to gui.context_menu
Renamed textadept.command_entry to gui.command_entry.
Renamed textadept.dialog to gui.dialog.
Renamed textadept.docstatusbar_text to gui.docstatusbar_text.
Renamed textadept.find to gui.find.
Renamed textadept.focused_doc_pointer to gui.focused_doc_pointer.
Renamed textadept.get_split_table() to gui.get_split_table().
Renamed textadept.gtkmenu() to gui.gtkmenu().
Renamed textadept.goto_view() to gui.goto_view().
Renamed textadept.menubar to gui.menubar.
Renamed textadept.print() to gui.print().
Renamed textadept.size to gui.size.
Renamed textadept.statusbar_text to gui.statusbar_text.
Renamed textadept.switch_buffer() to gui.switch_buffer().
Renamed textadept.title to gui.title.
Renamed textadept.buffers to _G._BUFFERS.
Renamed textadept.new_buffer() to _G.new_buffer().
Renamed textadept.quit() to _G.quit().
Renamed textadept.reset() to _G.reset().
Renamed textadept.views to _G._VIEWS.
Renamed textadept.user_dofile() to _G.user_dofile().
Renamed textadept.iconv to string.iconv.
Renamed textadept.session_file to _SESSIONFILE.
Renamed appropriate C functions.
Diffstat (limited to 'scripts/gen_iface.lua')
-rwxr-xr-x | scripts/gen_iface.lua | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/scripts/gen_iface.lua b/scripts/gen_iface.lua index aa5f8c33..917ffeae 100755 --- a/scripts/gen_iface.lua +++ b/scripts/gen_iface.lua @@ -9,7 +9,15 @@ local constants = contents:match('ifaceConstants%[%] = (%b{})') local functions = contents:match('ifaceFunctions%[%] = (%b{})') local properties = contents:match('ifaceProperties%[%] = (%b{})') -local out = '' +local out = [[ +-- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE. + +--- +-- Scintilla constants, functions, and properties. +-- Do not modify anything in this module. Doing so will result in instability. +module('_SCINTILLA', package.seeall) + +]] local types = { void = 0, int = 1, length = 2, position = 3, colour = 4, bool = 5, @@ -17,7 +25,13 @@ local types = { findtext = 11, formatrange = 12 } -out = out..'local constants = {\n' +out = out..[[ +--- +-- Scintilla constants. +-- @class table +-- @name constants +constants = { +]] -- {"constant", value} for item in constants:sub(2, -2):gmatch('%b{}') do local name, value = item:match('^{"(.-)",(.-)}') @@ -53,9 +67,15 @@ out = out..[[ SCN_INDICATORCLICK = 2023, SCN_INDICATORRELEASE = 2024, ]] -out = out..'}\nrawset(textadept, \'constants\', constants)\n\n' +out = out..'}\n\n' -out = out..'local buffer_functions = {\n' +out = out..[[ +--- +-- Scintilla functions. +-- @class table +-- @name functions +functions = { +]] -- {"function", msg_id, iface_*, {iface_*, iface_*}} for item in functions:sub(2, -2):gmatch('%b{}') do local name, msg_id, rt_type, p1_type, p2_type = @@ -67,9 +87,15 @@ for item in functions:sub(2, -2):gmatch('%b{}') do name, msg_id, types[rt_type], types[p1_type], types[p2_type]) out = out..line end -out = out..'}\nrawset(textadept, \'buffer_functions\', buffer_functions)\n\n' +out = out..'}\n\n' -out = out..'local buffer_properties = {\n' +out = out..[[ +--- +-- Scintilla properties. +-- @class table +-- @name properties +properties = { +]] -- {"property", get_id, set_id, rt_type, p1_type} for item in properties:sub(2, -2):gmatch('%b{}') do local name, get_id, set_id, rt_type, p1_type = @@ -81,7 +107,7 @@ for item in properties:sub(2, -2):gmatch('%b{}') do name, get_id, set_id, types[rt_type], types[p1_type]) out = out..line end -out = out..'}\nrawset(textadept, \'buffer_properties\', buffer_properties)\n' +out = out..'}\n' f = io.open('../core/iface.lua', 'w') f:write(out) |