From 1c2a441cb56860d6bf558270b4a77d64dac2b954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 29 Nov 2021 00:35:39 +0100 Subject: Add a simple toolbar to the view There is still considerable work to be done. --- fastiv-view.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'fastiv-view.h') diff --git a/fastiv-view.h b/fastiv-view.h index ca314f4..20ff445 100644 --- a/fastiv-view.h +++ b/fastiv-view.h @@ -24,3 +24,29 @@ G_DECLARE_FINAL_TYPE(FastivView, fastiv_view, FASTIV, VIEW, GtkWidget) /// Try to open the given file, synchronously, to be displayed by the widget. gboolean fastiv_view_open(FastivView *self, const gchar *path, GError **error); + +typedef enum _FastivViewCommand { + FASTIV_VIEW_COMMAND_ROTATE_LEFT = 1, + FASTIV_VIEW_COMMAND_MIRROR, + FASTIV_VIEW_COMMAND_ROTATE_RIGHT, + + FASTIV_VIEW_COMMAND_PAGE_FIRST, + FASTIV_VIEW_COMMAND_PAGE_PREVIOUS, + FASTIV_VIEW_COMMAND_PAGE_NEXT, + FASTIV_VIEW_COMMAND_PAGE_LAST, + + FASTIV_VIEW_COMMAND_FRAME_FIRST, + FASTIV_VIEW_COMMAND_FRAME_PREVIOUS, + FASTIV_VIEW_COMMAND_FRAME_NEXT, + // Going to the end frame makes no sense, wrap around if needed. + + FASTIV_VIEW_COMMAND_PRINT, + FASTIV_VIEW_COMMAND_SAVE_PAGE, + + FASTIV_VIEW_COMMAND_ZOOM_IN, + FASTIV_VIEW_COMMAND_ZOOM_OUT, + FASTIV_VIEW_COMMAND_ZOOM_1 +} FastivViewCommand; + +/// Execute a user action. +void fastiv_view_command(FastivView *self, FastivViewCommand command); -- cgit v1.2.3