YWIZSHWIMO3PRNZOC5G6QD22LTWT6CRKLGJTZRVLXJRWHS5PC2JQC 6C3UZDESM2HPFIHAW5YIPUV6VXO4YV5DIEY574HUGP2DGOQNUVOAC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC 7KX3WBFEXMIHNKWNF4NUOBW5HO3PEL3ZEFFMTAXFOQG6V7BYXZ3AC O5GJ6PNNBYHH4X3DU4XOB7IDJ4QEW5KXFETIDUJESBUKJYXBSYYAC 7TQAF4BYIK75EEYCCK7VEUSZHNCWMWIA3HZGQKIILYESUZ5ZZRVQC SUPHTPXYKS4JBDPASHAYA5OBVJ45QT7ZV2HYNTF7OJYOKKS6DW5QC FBDRJ53NJ5BWDQGU2GWZ6NEYHKCCRD7RODMIG7QQZBRFUB4HR7OAC JE6PEYCDKZAOTTEWA35OZ2YGAEAWNHMAPCRPDI4ZV5H3NAVQVCSQC ZANGJNNX6EITFBOF6NWCF2EM5BDQDEIOD4UPWMF5I6SKAURRTIHAC A1 = function(key, preserve_screen_top_of_cursor_node)-- like A, but updating a single node-- this only works because Nodes is a flat array; we don't support row/col types here yet-- delete previously added shapes for this node:for i=#Surface,1,-1 dolocal x = Surface[i]if x.key == key thentable.remove(Surface, i)endendlocal node = Definitions[key]compute_layout(node, node.x,node.y, Surface, preserve_screen_top_of_cursor_node)-- continue the pipelineB(preserve_screen_top_of_cursor_node)end
get_multiple_definitions_from_app = function(defs)-- batch interface for speed-- turn an array of string names into a table of string definitions corresponding to themlive.send_to_app('GET* '..table.concat(defs, ' '))local response = wait_for_response()local result = {}for def in response:gmatch('(.-)\n==fw: definition boundary==\n') dolocal name = live.get_cmd_from_buffer(def)if name == nil thenprint('failed to get cmd from buffer', def)endresult[name] = defendreturn resultendif #defs == 0 then return {} end
definition_background_color = function(name)end-- TODO: get rid of this functionreturn Border_color
get_default_map = function()-- Suggest a map for one's own code.-- Mostly the driver manages its map of an app's code outside the app. However, an app can suggest a default map for people who haven't created one.live.send_to_app('DEFAULT_MAP')local responserepeatlove.timer.sleep(0.01)response = live.receive_from_app()until responselocal result = {}if #response == 0 thenreturn resultendreturn json.decode(response)end
get_definition_from_app = function(name)-- return definition for a name-- if no such definition, return ''live.send_to_app('GET '..name)return wait_for_response()end