Added some comments.
This commit is contained in:
parent
03b467d9d9
commit
801b7dd0d9
|
@ -1,13 +1,44 @@
|
||||||
#ifndef LITE_XL_PLUGIN_API
|
#ifndef LITE_XL_PLUGIN_API
|
||||||
#define LITE_XL_PLUGIN_API
|
#define LITE_XL_PLUGIN_API
|
||||||
/* This file was automatically generated by the below code. Do not modify directly.
|
/*
|
||||||
#!/bin/sh
|
The lite_xl plugin API is quite simple. Any shared library can be a plugin file, so long
|
||||||
# Takes lua folder, outputs a header file that includes all the necessary macros for writing a lite plugin.
|
as it has an entrypoint that looks like the following, where xxxxx is the plugin name:
|
||||||
# Takes a minimal approach, and strips out problematic functions. Should be good enough for most purposes.
|
|
||||||
|
|
||||||
|
#include "lite_xl_plugin_api.h"
|
||||||
|
|
||||||
|
int lua_open_xxxxx(lua_State* L, void* XL) {
|
||||||
|
lite_xl_plugin_init(XL);
|
||||||
|
...
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
In linux, to compile this file, you'd do: 'gcc -o xxxxx.so -shared xxxxx.c'. Simple!
|
||||||
|
Due to the way the API is structured, you *should not* link or include lua libraries.
|
||||||
|
|
||||||
|
This file was automatically generated by the below code. Do NOT MODIFY DIRECTLY.
|
||||||
|
|
||||||
|
|
||||||
|
#!/bin/sh
|
||||||
echo "#ifndef LITE_XL_PLUGIN_API"
|
echo "#ifndef LITE_XL_PLUGIN_API"
|
||||||
echo "#define LITE_XL_PLUGIN_API"
|
echo "#define LITE_XL_PLUGIN_API"
|
||||||
echo "/* This file was automatically generated by the below code. Do not modify directly."
|
echo "/* "
|
||||||
|
echo "The lite_xl plugin API is quite simple. Any shared library can be a plugin file, so long"
|
||||||
|
echo "as it has an entrypoint that looks like the following, where xxxxx is the plugin name:"
|
||||||
|
echo
|
||||||
|
echo '#include "lite_xl_plugin_api.h"'
|
||||||
|
echo
|
||||||
|
echo "int lua_open_xxxxx(lua_State* L, void* XL) {"
|
||||||
|
echo " lite_xl_plugin_init(XL);"
|
||||||
|
echo " ..."
|
||||||
|
echo " return 1;"
|
||||||
|
echo "}"
|
||||||
|
echo
|
||||||
|
echo "In linux, to compile this file, you'd do: 'gcc -o xxxxx.so -shared xxxxx.c'. Simple!"
|
||||||
|
echo "Due to the way the API is structured, you *should not* link or include lua libraries."
|
||||||
|
echo
|
||||||
|
echo "This file was automatically generated by the below code. Do NOT MODIFY DIRECTLY."
|
||||||
|
echo
|
||||||
|
echo
|
||||||
cat $0
|
cat $0
|
||||||
echo "*""/"
|
echo "*""/"
|
||||||
echo "#include <stddef.h>"
|
echo "#include <stddef.h>"
|
||||||
|
|
|
@ -637,8 +637,8 @@ static int f_set_window_opacity(lua_State *L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Symbol table for native plugin loading. Allows for a statically
|
||||||
|
// bound lua library to be used by native plugins.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char* symbol;
|
const char* symbol;
|
||||||
void* address;
|
void* address;
|
||||||
|
|
Loading…
Reference in New Issue