fed/editor.h
2025-07-04 02:48:44 +02:00

27 lines
634 B
C

#ifndef EDITOR_H
#define EDITOR_H
#include "app_ressources.h"
#include "buffer.h"
typedef struct {
Buffer* buffer;
int width;
int height;
size_t cursor_idx;
int cursor_line;
int cursor_col;
AppRessources* ressources;
} Editor;
void editor_init(
Editor* editor, int width, int height, AppRessources* ressources);
void editor_open(Editor* editor, Buffer* buffer);
void editor_cursor_up(Editor* editor);
void editor_cursor_down(Editor* editor);
void editor_cursor_left(Editor* editor);
void editor_cursor_right(Editor* editor);
void editor_render(Editor* editor, void* renderer, int x, int y);
#endif