#include "plug_common.h" TGB_PLUGIN_DECLARE_API_VERSION; static const tgb_host_api *H; static tgb_status cmd_try_edit(tgb_plugin_handle *self, void *user) { (void)user; return H->edit_begin(self, 0, 0); } static tgb_status cmd_try_edit_unchecked(tgb_plugin_handle *self, void *user) { (void)user; return H->add_frame(self, 0); } TGB_PLUGIN_EXPORT tgb_status tgb_plugin_init(const tgb_host_api *host, tgb_plugin_handle *self, tgb_plugin_info *info) { H = host; host->register_command(self, "intenta-editar", cmd_try_edit, NULL); host->register_command(self, "intenta-anadir", cmd_try_edit_unchecked, NULL); info->name = "Solo lectura"; info->version = "0.1"; info->required_caps = TGB_CAP_READ_DOCUMENT; /* NO pide editar */ return TGB_OK; }