aboutsummaryrefslogtreecommitdiff
path: root/src/ui/play_media.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/play_media.h')
-rw-r--r--src/ui/play_media.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/ui/play_media.h b/src/ui/play_media.h
new file mode 100644
index 0000000..29f8d1a
--- /dev/null
+++ b/src/ui/play_media.h
@@ -0,0 +1,79 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2022 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20/*
21 * @author Tobias Frisch
22 * @file ui/play_media.h
23 */
24
25#ifndef UI_PLAY_MEDIA_H_
26#define UI_PLAY_MEDIA_H_
27
28#include "messenger.h"
29
30typedef struct UI_PLAY_MEDIA_Handle
31{
32 gboolean playing;
33 gboolean fullscreen;
34
35 GtkWindow *parent;
36
37 GtkBuilder *builder;
38 HdyWindow *window;
39
40 GtkRevealer *header_revealer;
41 HdyHeaderBar *title_bar;
42 GtkButton *back_button;
43
44 HdyFlap *controls_flap;
45 GtkButton *play_pause_button;
46 GtkStack *play_symbol_stack;
47
48 GtkVolumeButton *volume_button;
49 GtkLabel *timeline_label;
50
51 GtkButton *settings_button;
52
53 GtkButton *fullscreen_button;
54 GtkStack *fullscreen_symbol_stack;
55
56 guint motion_lost;
57} UI_PLAY_MEDIA_Handle;
58
59/**
60 * Initializes a handle for the play media window
61 * of a given messenger application.
62 *
63 * @param app Messenger application
64 * @param handle Play media window handle
65 */
66void
67ui_play_media_window_init(MESSENGER_Application *app,
68 UI_PLAY_MEDIA_Handle *handle);
69
70/**
71 * Cleans up the allocated resources and resets the
72 * state of a given play media window handle.
73 *
74 * @param handle Play media window handle
75 */
76void
77ui_play_media_window_cleanup(UI_PLAY_MEDIA_Handle *handle);
78
79#endif /* UI_PLAY_MEDIA_H_ */