-
Notifications
You must be signed in to change notification settings - Fork 1
/
editor_widget.h
32 lines (25 loc) · 1.25 KB
/
editor_widget.h
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
#pragma once
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define PLATON_TYPE_EDITOR_WIDGET platon_editor_widget_get_type()
G_DECLARE_DERIVABLE_TYPE(PlatonEditorWidget, platon_editor_widget, PLATON, EDITOR_WIDGET, GtkWidget)
struct _PlatonEditorWidgetClass {
GtkWidgetClass parent_class;
void (*insert_newline)(PlatonEditorWidget* self);
void (*delete_backward)(PlatonEditorWidget* self);
void (*delete_forward)(PlatonEditorWidget* self);
void (*move_left)(PlatonEditorWidget* self, gboolean extend_selection);
void (*move_right)(PlatonEditorWidget* self, gboolean extend_selection);
void (*move_up)(PlatonEditorWidget* self, gboolean extend_selection);
void (*move_down)(PlatonEditorWidget* self, gboolean extend_selection);
void (*move_to_beginning_of_line)(PlatonEditorWidget* self, gboolean extend_selection);
void (*move_to_end_of_line)(PlatonEditorWidget* self, gboolean extend_selection);
void (*select_all)(PlatonEditorWidget* self);
void (*copy)(PlatonEditorWidget* self);
void (*cut)(PlatonEditorWidget* self);
void (*paste)(PlatonEditorWidget* self);
};
PlatonEditorWidget* platon_editor_widget_new(GFile* file);
gboolean platon_editor_widget_save(PlatonEditorWidget* self);
void platon_editor_widget_save_as(PlatonEditorWidget* self, GFile* file);
G_END_DECLS