blob: 10612db4c3c3af593d40719bf30bacf554c70d6f (
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
36
37
38
39
40
41
42
43
44
|
#ifndef GGAZE_WINDOW_H
#define GGAZE_WINDOW_H
/*:*
* ggaze — main window
*
* GgazeWindow : GtkApplicationWindow owns the layout: an AdwHeaderBar and a
* GtkStack with two children (`grid`, `large`). The grid child is a placeholder
* until M7; the large child is the GgazeViewer (M1). M2 adds a Navigator over
* the current folder, a single GCancellable (last-write-wins), keybinding
* shortcuts, and a file/folder drop target. See docs/architecture.md.
*
* Copyright (c) 2026 ggaze contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*:*/
#include "app.h"
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GGAZE_TYPE_WINDOW (ggaze_window_get_type())
G_DECLARE_FINAL_TYPE(GgazeWindow, ggaze_window, GGAZE, WINDOW,
GtkApplicationWindow)
/* Construct a new window attached to p_app. */
GgazeWindow *ggaze_window_new(GgazeApp *p_app);
/* Open p_arg (a file or a folder): for a file, list its parent folder with
* p_arg current; for a folder, list it with the first image current. Loads the
* current image into the viewer and switches the stack to "large". */
void ggaze_window_open(GgazeWindow *p_win, GFile *p_arg);
/* Navigation over the current folder (bound to h/l/Left/Right/g/G via
* shortcuts.c). No-ops if nothing is open. */
void ggaze_window_prev(GgazeWindow *p_win);
void ggaze_window_next(GgazeWindow *p_win);
void ggaze_window_first(GgazeWindow *p_win);
void ggaze_window_last(GgazeWindow *p_win);
G_END_DECLS
#endif /* GGAZE_WINDOW_H */
|