diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2026-01-01 18:04:40 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2026-01-01 18:04:40 -0700 |
| commit | 628174c992a5a740feb4dc119adf8dfb1f89f992 (patch) | |
| tree | 683361b27cf4b6df2c5cc782d70de9bdf5fd38a8 /rt/include/foreign_intf.h | |
| parent | be1ef8cee5f68eb9afecca94071069a1ff82825e (diff) | |
| download | montis-628174c992a5a740feb4dc119adf8dfb1f89f992.tar.gz montis-628174c992a5a740feb4dc119adf8dfb1f89f992.tar.bz2 montis-628174c992a5a740feb4dc119adf8dfb1f89f992.zip | |
Have Meson orchestrate the whole build rather than stack.
As a part of this, I changed the file layout to:
rt/ - the Montis runtime
plug/ - the Montis plugin
wlroots/ - wlroots
Diffstat (limited to 'rt/include/foreign_intf.h')
| -rw-r--r-- | rt/include/foreign_intf.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/rt/include/foreign_intf.h b/rt/include/foreign_intf.h new file mode 100644 index 0000000..6558fab --- /dev/null +++ b/rt/include/foreign_intf.h @@ -0,0 +1,33 @@ +/* Contains a structure, which contains functions to back-call into + * the harness code. */ + +#ifndef __FOREIGN_INTERFACE +#define __FOREIGN_INTERFACE + +#define EXPORT(a) a + +typedef void *ctx_t; + +typedef struct FOREIGN_INTERFACE { + /* DO NOT ADD ANY UNEXPORTED VARIABLES HERE */ + + /* The context, which needs to be passed to each function. This context is + * opaque to the plugin and should not be changed. */ + EXPORT(ctx_t ctx); + + /* Requests the harness hot reload the current plugin. */ + EXPORT(void (*request_hot_reload)(ctx_t ctx)); + + /* Requests the harness hot reload the current plugin. */ + EXPORT(void (*do_log)(ctx_t ctx, const char *str)); + + /* Requestes that the whole system exit. Exits with the given return code. */ + EXPORT(void (*request_exit)(ctx_t ctx, int rc)); + + /* Returns the seat associated with the server. */ + EXPORT(void *(*get_seat)(ctx_t ctx)); +} foreign_interface_t; + +#undef EXPORT + +#endif /* __FOREIGN_INTERFACE */ |