#ifndef LIBMBTK_H
#define LIBMBTK_H

global resources; intended only for applications

/* One time backend init, per process, per backend */ int mbtk_be_init(mbtk_backend_t *be); void mbtk_be_uninit(mbtk_backend_t *be); /* Per display init/uninit; call when backend is inited */ int mbtk_display_init(mbtk_backend_t *be, mbtk_display_t *disp, int *argc, char **argv[]); void mbtk_display_uninit(mbtk_backend_t *be, mbtk_display_t *disp); /* Clipboard is per display and string only. clipboard_get() returns NULL or a string that needs to be free'd using clipboard_free(). */ void mbtk_clipboard_set(mbtk_display_t *display, const char *new_content); char *mbtk_clipboard_get(mbtk_display_t *display); void mbtk_clipboard_free(mbtk_display_t *display, char *str_got); /* Return time elapsed from display init, in seconds. Resolution is backend dependent but is at least millisec. */ double mbtk_get_time_el(mbtk_display_t *display); /* Call this to uninitialize all backends and close all open displays and windows free all memory used by the library. */ void mbtk_uninit();