lib: Introduce Clapper GTK integration library

An easy to use GTK integration library. Meant as a GtkVideo alternative.

While GtkVideo is more of a simple example of video playback under GTK4, this
acts as a full-fledged video player in the form of a GtkWidget that can be placed
anywhere within application.

The widget offers customization options for both top header and bottom playback
controls panels. The Clapper playback API is exposed under widget "player" property
making it easy for the programmer to set media and control playback programically.

The new library will be distributed with Clapper player. This includes public headers
and GObject Introspection support.

Licensed under LGPL-2.1-or-later.
This commit is contained in:
Rafał Dzięgiel
2024-03-13 20:58:00 +01:00
parent d7f069d6c3
commit 675ddc85a1
91 changed files with 11030 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="clapper-gtk">
<template class="ClapperGtkVideo" parent="GtkWidget">
<child type="overlay">
<object class="ClapperGtkStatus" id="status">
<property name="halign">center</property>
<property name="valign">center</property>
<property name="visible">false</property>
</object>
</child>
<child type="overlay">
<object class="ClapperGtkBufferingAnimation" id="buffering_animation">
<property name="halign">center</property>
<property name="valign">center</property>
<property name="visible">false</property>
</object>
</child>
<child>
<object class="GtkGestureClick" id="touch_gesture">
<property name="propagation-phase">capture</property>
<property name="touch-only">true</property>
<signal name="pressed" handler="touch_pressed_cb"/>
<signal name="released" handler="touch_released_cb"/>
</object>
</child>
<child>
<object class="GtkGestureClick" id="click_gesture">
<property name="button">1</property>
<signal name="pressed" handler="left_click_pressed_cb"/>
<signal name="released" handler="left_click_released_cb"/>
<signal name="stopped" handler="left_click_stopped_cb"/>
</object>
</child>
<child>
<object class="GtkEventControllerMotion">
<signal name="enter" handler="motion_enter_cb"/>
<signal name="motion" handler="motion_cb"/>
<signal name="leave" handler="motion_leave_cb"/>
</object>
</child>
<child>
<object class="GtkDropControllerMotion">
<signal name="motion" handler="drop_motion_cb"/>
<signal name="leave" handler="drop_motion_leave_cb"/>
</object>
</child>
</template>
</interface>