summaryrefslogtreecommitdiff
path: root/src/editor.h
blob: d0b382f19400e63c4075929fcfa1fdc788e9cdc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* parc
 * Copyright (C) 2025 Ekaitz Zarraga <ekaitz@elenq.tech>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef EDITOR_H
#define EDITOR_H

typedef struct _editor editor;

editor *editor_create (void);
void editor_open (editor *ed, const char *path);
void editor_destroy (editor *ed);

/* TODO */
void editor_move_cursor (editor *ed, size_t where);
void editor_insert_at (editor *ed, size_t where, const char *x);
void editor_delete_at (editor *ed, size_t where, size_t count);

/* Debug only */
void editor_display (editor *ed);

#endif