luapage/ui.h

23 lines
672 B
C
Raw Normal View History

2021-05-02 15:07:43 +03:00
#ifndef __UI_H
#define __UI_H
#include <gtk/gtk.h>
2021-05-02 17:24:40 +03:00
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include <luajit.h>
2021-05-02 15:07:43 +03:00
struct application_state {
2021-05-02 17:24:40 +03:00
GtkApplication* gapp;
GtkWidget *page_window, *scrolled, *pageview;
GtkTextBuffer* pageview_buffer;
lua_State* L;
2021-05-02 15:07:43 +03:00
};
2021-05-02 17:24:40 +03:00
struct application_state* page_application_new();
void page_application_init(struct application_state* state);
void page_application_show(struct application_state* state);
void page_application_text_buffer_append_text(struct application_state* state, const char* display_text);
2021-05-03 14:51:05 +03:00
void page_application_text_buffer_set_text(struct application_state* state, const char* text);
2021-05-02 15:07:43 +03:00
#endif