2021-02-09 17:37:26 +02:00
|
|
|
/* koto-playerbar.h
|
|
|
|
*
|
|
|
|
* Copyright 2021 Joshua Strobl
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2021-03-23 19:50:09 +02:00
|
|
|
#include <gstreamer-1.0/gst/gst.h>
|
2021-02-24 20:17:18 +02:00
|
|
|
#include <gtk-4.0/gtk/gtk.h>
|
2021-03-23 19:50:09 +02:00
|
|
|
#include "playback/engine.h"
|
2021-02-09 17:37:26 +02:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define KOTO_TYPE_PLAYERBAR (koto_playerbar_get_type())
|
2021-02-24 20:17:18 +02:00
|
|
|
G_DECLARE_FINAL_TYPE (KotoPlayerBar, koto_playerbar, KOTO, PLAYERBAR, GObject)
|
2021-03-23 19:50:09 +02:00
|
|
|
#define KOTO_IS_PLAYERBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), KOTO_TYPE_PLAYERBAR))
|
2021-02-09 17:37:26 +02:00
|
|
|
|
|
|
|
KotoPlayerBar* koto_playerbar_new (void);
|
2021-02-24 20:17:18 +02:00
|
|
|
GtkWidget* koto_playerbar_get_main(KotoPlayerBar* bar);
|
2021-02-09 17:37:26 +02:00
|
|
|
void koto_playerbar_create_playback_details(KotoPlayerBar* bar);
|
|
|
|
void koto_playerbar_create_primary_controls(KotoPlayerBar* bar);
|
|
|
|
void koto_playerbar_create_secondary_controls(KotoPlayerBar* bar);
|
2021-03-23 19:50:09 +02:00
|
|
|
void koto_playerbar_go_backwards(GtkGestureClick *gesture, int n_press, double x, double y, gpointer data);
|
|
|
|
void koto_playerbar_go_forwards(GtkGestureClick *gesture, int n_press, double x, double y, gpointer data);
|
2021-03-25 17:29:45 +02:00
|
|
|
void koto_playerbar_handle_is_playing(KotoPlaybackEngine *engine, gpointer user_data);
|
|
|
|
void koto_playerbar_handle_is_paused(KotoPlaybackEngine *engine, gpointer user_data);
|
|
|
|
void koto_playerbar_handle_progressbar_pressed(GtkGestureClick *gesture, int n_press, double x, double y, gpointer data);
|
|
|
|
void koto_playerbar_handle_progressbar_released(GtkGestureClick *gesture, double x, double y, guint button, GdkEventSequence *seq, gpointer data);
|
|
|
|
void koto_playerbar_handle_progressbar_value_changed(GtkRange *progress_bar, gpointer data);
|
|
|
|
void koto_playerbar_handle_tick_duration(KotoPlaybackEngine *engine, gpointer user_data);
|
|
|
|
void koto_playerbar_handle_tick_track(KotoPlaybackEngine *engine, gpointer user_data);
|
|
|
|
void koto_playerbar_handle_volume_button_change(GtkScaleButton *button, double value, gpointer user_data);
|
2021-03-23 19:50:09 +02:00
|
|
|
void koto_playerbar_reset_progressbar(KotoPlayerBar* bar);
|
|
|
|
void koto_playerbar_set_progressbar_duration(KotoPlayerBar* bar, gint64 duration);
|
|
|
|
void koto_playerbar_set_progressbar_value(KotoPlayerBar* bar, gint64 progress);
|
|
|
|
void koto_playerbar_toggle_play_pause(GtkGestureClick *gesture, int n_press, double x, double y, gpointer data);
|
2021-03-25 17:29:45 +02:00
|
|
|
void koto_playerbar_update_track_info(KotoPlaybackEngine *engine, gpointer user_data);
|
2021-02-09 17:37:26 +02:00
|
|
|
|
|
|
|
G_END_DECLS
|