mirror of
https://github.com/Rafostar/clapper.git
synced 2025-09-06 03:11:59 +02:00
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:
161
src/lib/clapper-gtk/ui/clapper-gtk-billboard.ui
Normal file
161
src/lib/clapper-gtk/ui/clapper-gtk-billboard.ui
Normal file
@@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<template class="ClapperGtkBillboard" parent="ClapperGtkContainer">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="height-target">422</property>
|
||||
<property name="adaptive-height">420</property>
|
||||
<property name="visible">false</property>
|
||||
<signal name="adapt" handler="adapt_cb"/>
|
||||
<child>
|
||||
<object class="GtkCenterBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">true</property>
|
||||
<child type="start">
|
||||
<object class="GtkRevealer" id="side_revealer">
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="transition-duration">500</property>
|
||||
<property name="visible">false</property>
|
||||
<signal name="notify::child-revealed" handler="revealer_revealed_cb"/>
|
||||
<child>
|
||||
<object class="ClapperGtkLeadContainer">
|
||||
<property name="blocked-actions">toggle-play</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">start</property>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
<class name="sidebox"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="progress_revealer">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="transition-type">slide-up</property>
|
||||
<property name="transition-duration">200</property>
|
||||
<property name="reveal-child">true</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="progress_box">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">fill</property>
|
||||
<property name="spacing">4</property>
|
||||
<style>
|
||||
<class name="progressbox"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="top_progress">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">fill</property>
|
||||
<property name="vexpand">true</property>
|
||||
<property name="inverted">true</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="bottom_progress">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">fill</property>
|
||||
<property name="vexpand">true</property>
|
||||
<property name="inverted">true</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="progress_image">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">fill</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<property name="transition-duration" bind-source="progress_revealer" bind-property="transition-duration" bind-flags="sync-create"/>
|
||||
<property name="reveal-child" bind-source="progress_revealer" bind-property="reveal-child" bind-flags="invert-boolean">false</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="progress_label">
|
||||
<property name="valign">center</property>
|
||||
<property name="label">100%</property>
|
||||
<style>
|
||||
<class name="numeric"/>
|
||||
<class name="progresslabel"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkRevealer" id="message_revealer">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="transition-duration">500</property>
|
||||
<signal name="notify::child-revealed" handler="revealer_revealed_cb"/>
|
||||
<child>
|
||||
<object class="ClapperGtkContainer">
|
||||
<property name="width-target">280</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="spacing">8</property>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
<class name="rounded"/>
|
||||
<class name="messagebox"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="message_image">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="message_label">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="wrap">true</property>
|
||||
<property name="wrap-mode">word-char</property>
|
||||
<property name="natural-wrap-mode">word</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
<class name="numeric"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
254
src/lib/clapper-gtk/ui/clapper-gtk-extra-menu-button.ui
Normal file
254
src/lib/clapper-gtk/ui/clapper-gtk-extra-menu-button.ui
Normal file
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<menu id="extra-menu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="custom">top-box</attribute>
|
||||
</item>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes">Video</attribute>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="custom">video-streams</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes">Audio</attribute>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="custom">audio-streams</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes">Subtitles</attribute>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Enabled</attribute>
|
||||
<attribute name="action">clappergtk.subtitle-stream-enabled</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Open…</attribute>
|
||||
<attribute name="action">clappergtk.open-subtitle-stream</attribute>
|
||||
<attribute name="hidden-when">action-disabled</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="custom">subtitle-streams</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
</section>
|
||||
</menu>
|
||||
<template class="ClapperGtkExtraMenuButton" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="menu_button">
|
||||
<property name="direction">up</property>
|
||||
<property name="icon-name">view-more-symbolic</property>
|
||||
<property name="popover">
|
||||
<object class="GtkPopoverMenu">
|
||||
<property name="menu-model">extra-menu</property>
|
||||
<signal name="map" handler="popover_map_cb"/>
|
||||
<signal name="unmap" handler="popover_unmap_cb"/>
|
||||
<signal name="notify::visible-submenu" handler="visible_submenu_changed_cb"/>
|
||||
<child type="top-box">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="volume_box">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="volume_button">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">audio-volume-high-symbolic</property>
|
||||
<property name="action-name">video.toggle-mute</property>
|
||||
<property name="tooltip-text" translatable="yes">Mute</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
<class name="flat"/>
|
||||
<class name="spinsidebutton"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="volume_spin">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width-chars">5</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment">
|
||||
<property name="lower">0.0</property>
|
||||
<property name="upper">2.0</property>
|
||||
<property name="value">1.0</property>
|
||||
<property name="page-increment">0</property>
|
||||
<property name="step-increment">0.02</property>
|
||||
</object>
|
||||
</property>
|
||||
<signal name="input" handler="volume_spin_input_cb"/>
|
||||
<signal name="output" handler="volume_spin_output_cb"/>
|
||||
<signal name="value-changed" handler="volume_spin_changed_cb"/>
|
||||
<style>
|
||||
<class name="numeric"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="speed_box">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="speed_button">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">power-profile-balanced-symbolic</property>
|
||||
<property name="action-name">video.set-speed</property>
|
||||
<property name="action-target">1.0</property>
|
||||
<property name="tooltip-text" translatable="yes">Reset</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
<class name="flat"/>
|
||||
<class name="spinsidebutton"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="speed_spin">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width-chars">5</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment">
|
||||
<property name="lower">0.05</property>
|
||||
<property name="upper">2.0</property>
|
||||
<property name="value">1.0</property>
|
||||
<property name="page-increment">0</property>
|
||||
<property name="step-increment">0.05</property>
|
||||
</object>
|
||||
</property>
|
||||
<signal name="input" handler="speed_spin_input_cb"/>
|
||||
<signal name="output" handler="speed_spin_output_cb"/>
|
||||
<signal name="value-changed" handler="speed_spin_changed_cb"/>
|
||||
<style>
|
||||
<class name="numeric"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator" id="top_separator">
|
||||
<property name="orientation">horizontal</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="video-streams">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="orientation">horizontal</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="video_sw">
|
||||
<property name="css-name">clapper-gtk-menu-scrolled-window</property>
|
||||
<property name="hscrollbar-policy">automatic</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<property name="propagate-natural-width">false</property>
|
||||
<property name="propagate-natural-height">true</property>
|
||||
<property name="max-content-width">320</property>
|
||||
<property name="max-content-height">192</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="video_list_view">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="enable-rubberband">false</property>
|
||||
<property name="single-click-activate">false</property>
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="resource">/com/github/rafostar/Clapper/clapper-gtk/ui/clapper-gtk-stream-list-item.ui</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="audio-streams">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="orientation">horizontal</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="audio_sw">
|
||||
<property name="css-name">clapper-gtk-menu-scrolled-window</property>
|
||||
<property name="hscrollbar-policy">automatic</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<property name="propagate-natural-width">false</property>
|
||||
<property name="propagate-natural-height">true</property>
|
||||
<property name="max-content-width">320</property>
|
||||
<property name="max-content-height">192</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="audio_list_view">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="enable-rubberband">false</property>
|
||||
<property name="single-click-activate">false</property>
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="resource">/com/github/rafostar/Clapper/clapper-gtk/ui/clapper-gtk-stream-list-item.ui</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="subtitle-streams">
|
||||
<object class="GtkScrolledWindow" id="subtitle_sw">
|
||||
<property name="css-name">clapper-gtk-menu-scrolled-window</property>
|
||||
<property name="hscrollbar-policy">automatic</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<property name="propagate-natural-width">false</property>
|
||||
<property name="propagate-natural-height">true</property>
|
||||
<property name="max-content-width">320</property>
|
||||
<property name="max-content-height">192</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="subtitle_list_view">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="enable-rubberband">false</property>
|
||||
<property name="single-click-activate">false</property>
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="resource">/com/github/rafostar/Clapper/clapper-gtk/ui/clapper-gtk-stream-list-item.ui</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
83
src/lib/clapper-gtk/ui/clapper-gtk-seek-bar.ui
Normal file
83
src/lib/clapper-gtk/ui/clapper-gtk-seek-bar.ui
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<template class="ClapperGtkSeekBar" parent="GtkWidget">
|
||||
<property name="hexpand">true</property>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="position_revealer">
|
||||
<property name="halign">end</property>
|
||||
<property name="transition-type">slide-left</property>
|
||||
<property name="transition-duration">800</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="position_label">
|
||||
<property name="valign">center</property>
|
||||
<property name="label">00:00</property>
|
||||
<style>
|
||||
<class name="numeric"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="focusable">false</property>
|
||||
<property name="draw-value">false</property>
|
||||
<property name="adjustment">position_adjustment</property>
|
||||
<signal name="value-changed" handler="scale_value_changed_cb"/>
|
||||
<signal name="notify::css-classes" handler="scale_css_classes_changed_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPopover" id="popover">
|
||||
<property name="position">top</property>
|
||||
<property name="autohide">false</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="popover_label">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="duration_revealer">
|
||||
<property name="halign">start</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<property name="transition-duration">800</property>
|
||||
<property name="reveal-child" bind-source="position_revealer" bind-property="reveal-child" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="duration_label">
|
||||
<property name="valign">center</property>
|
||||
<property name="label">00:00</property>
|
||||
<style>
|
||||
<class name="numeric"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventControllerMotion">
|
||||
<signal name="motion" handler="motion_cb"/>
|
||||
<signal name="leave" handler="motion_leave_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGestureClick">
|
||||
<property name="propagation-phase">capture</property>
|
||||
<property name="touch-only">true</property>
|
||||
<signal name="released" handler="touch_released_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkAdjustment" id="position_adjustment">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">0</property>
|
||||
<property name="value">0</property>
|
||||
<property name="page-increment">0</property>
|
||||
<property name="step-increment">8</property>
|
||||
</object>
|
||||
</interface>
|
137
src/lib/clapper-gtk/ui/clapper-gtk-simple-controls.ui
Normal file
137
src/lib/clapper-gtk/ui/clapper-gtk-simple-controls.ui
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<template class="ClapperGtkSimpleControls" parent="ClapperGtkContainer">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="adaptive-width">560</property>
|
||||
<signal name="adapt" handler="initial_adapt_cb"/>
|
||||
<child>
|
||||
<object class="ClapperGtkContainer">
|
||||
<property name="adaptive-width">400</property>
|
||||
<signal name="adapt" handler="full_adapt_cb"/>
|
||||
<child>
|
||||
<object class="GtkCenterBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
<style>
|
||||
<class name="centerbox"/>
|
||||
</style>
|
||||
<child type="center">
|
||||
<object class="ClapperGtkContainer">
|
||||
<property name="width-target">944</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="fullscreen_top_revealer">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="transition-duration">200</property>
|
||||
<property name="reveal-child" bind-source="controls_slide_revealer" bind-property="child-revealed" bind-flags="invert-boolean">false</property>
|
||||
<property name="visible" bind-source="controls_slide_revealer" bind-property="reveal-child" bind-flags="invert-boolean">false</property>
|
||||
<child>
|
||||
<object class="ClapperGtkToggleFullscreenButton">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="visible" bind-source="ClapperGtkSimpleControls" bind-property="fullscreenable" bind-flags="sync-create"/>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
<class name="flat"/>
|
||||
<class name="circular"/>
|
||||
<class name="fullscreenbutton"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ClapperGtkLeadContainer">
|
||||
<property name="blocked-actions">toggle-play|seek-request</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
<class name="rounded"/>
|
||||
<class name="mainbox"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="ClapperGtkTogglePlayButton">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="flat"/>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ClapperGtkSeekBar" id="seek_bar">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="seek-method" bind-source="ClapperGtkSimpleControls" bind-property="seek-method" bind-flags="bidirectional"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ClapperGtkExtraMenuButton" id="extra_menu_button">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="flat"/>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkRevealer" id="controls_slide_revealer">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="transition-type">slide-left</property>
|
||||
<property name="transition-duration">400</property>
|
||||
<property name="reveal-child" bind-source="fullscreen_top_revealer" bind-property="child-revealed" bind-flags="invert-boolean">true</property>
|
||||
<property name="reveal-child" bind-source="fullscreen_bottom_revealer" bind-property="child-revealed" bind-flags="default"/>
|
||||
<signal name="notify::child-revealed" handler="controls_revealed_cb"/>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="fullscreen_bottom_revealer">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="transition-duration">200</property>
|
||||
<property name="reveal-child" bind-source="controls_slide_revealer" bind-property="child-revealed" bind-flags="default">true</property>
|
||||
<child>
|
||||
<object class="ClapperGtkToggleFullscreenButton">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="visible" bind-source="ClapperGtkSimpleControls" bind-property="fullscreenable" bind-flags="sync-create"/>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
<class name="flat"/>
|
||||
<class name="circular"/>
|
||||
<class name="fullscreenbutton"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
45
src/lib/clapper-gtk/ui/clapper-gtk-status.ui
Normal file
45
src/lib/clapper-gtk/ui/clapper-gtk-status.ui
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<template class="ClapperGtkStatus" parent="ClapperGtkContainer">
|
||||
<property name="width-target">562</property>
|
||||
<property name="height-target">402</property>
|
||||
<property name="adaptive-width">560</property>
|
||||
<property name="adaptive-height">400</property>
|
||||
<signal name="adapt" handler="adapt_cb"/>
|
||||
<child>
|
||||
<object class="GtkBox" id="status_box">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="title_label">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="wrap">true</property>
|
||||
<style>
|
||||
<class name="title-1"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="description_label">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="wrap">true</property>
|
||||
<style>
|
||||
<class name="body"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
15
src/lib/clapper-gtk/ui/clapper-gtk-stream-list-item.ui
Normal file
15
src/lib/clapper-gtk/ui/clapper-gtk-stream-list-item.ui
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="ClapperGtkStreamCheckButton">
|
||||
<binding name="stream">
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</binding>
|
||||
<binding name="active">
|
||||
<lookup name="selected">GtkListItem</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
22
src/lib/clapper-gtk/ui/clapper-gtk-title-header.ui
Normal file
22
src/lib/clapper-gtk/ui/clapper-gtk-title-header.ui
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="clapper-gtk">
|
||||
<template class="ClapperGtkTitleHeader" parent="ClapperGtkLeadContainer">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="blocked-actions">toggle-play|seek-request</property>
|
||||
<property name="width-target">640</property>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
<class name="rounded"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="ClapperGtkTitleLabel" id="label">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
48
src/lib/clapper-gtk/ui/clapper-gtk-video.ui
Normal file
48
src/lib/clapper-gtk/ui/clapper-gtk-video.ui
Normal 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>
|
Reference in New Issue
Block a user