├── data ├── packages │ ├── deb │ │ └── ubuntu-ppa │ │ │ ├── compat │ │ │ ├── source │ │ │ └── format │ │ │ ├── rules │ │ │ ├── changelog │ │ │ ├── copyright │ │ │ └── control │ ├── flatpak │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── configure │ │ └── com.vinszent.GnomeTwitch.json │ ├── windows │ │ ├── README.md │ │ ├── gnome-twitch-git-i686.install │ │ ├── gnome-twitch-git-x86_64.install │ │ ├── PKGBUILD │ │ ├── gnome-twitch.iss │ │ └── create_windows_installer.sh │ ├── pacman │ │ ├── gnome-twitch-git │ │ │ └── PKGBUILD │ │ ├── gnome-twitch │ │ │ ├── 0001-Fix-typo-in-Meson-build-options.patch │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-mpv-opengl │ │ │ ├── 0001-Fix-typo-in-Meson-build-options.patch │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-gstreamer-cairo │ │ │ ├── 0001-Fix-typo-in-Meson-build-options.patch │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-gstreamer-clutter │ │ │ ├── 0001-Fix-typo-in-Meson-build-options.patch │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-gstreamer-opengl │ │ │ ├── 0001-Fix-typo-in-Meson-build-options.patch │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-mpv-opengl-git │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-gstreamer-cairo-git │ │ │ └── PKGBUILD │ │ ├── gnome-twitch-player-backend-gstreamer-opengl-git │ │ │ └── PKGBUILD │ │ └── gnome-twitch-player-backend-gstreamer-clutter-git │ │ │ └── PKGBUILD │ └── fedora │ │ └── gnome-twitch.spec ├── icons │ ├── offline-cover.png │ ├── com.vinszent.GnomeTwitch.ico │ ├── hicolor │ │ ├── 16x16 │ │ │ └── apps │ │ │ │ ├── gnome-twitch.png │ │ │ │ └── com.vinszent.GnomeTwitch.png │ │ ├── 22x22 │ │ │ └── apps │ │ │ │ ├── gnome-twitch.png │ │ │ │ └── com.vinszent.GnomeTwitch.png │ │ ├── 24x24 │ │ │ └── apps │ │ │ │ ├── gnome-twitch.png │ │ │ │ └── com.vinszent.GnomeTwitch.png │ │ ├── 32x32 │ │ │ └── apps │ │ │ │ ├── gnome-twitch.png │ │ │ │ └── com.vinszent.GnomeTwitch.png │ │ ├── 48x48 │ │ │ └── apps │ │ │ │ ├── gnome-twitch.png │ │ │ │ └── com.vinszent.GnomeTwitch.png │ │ ├── 256x256 │ │ │ └── apps │ │ │ │ ├── gnome-twitch.png │ │ │ │ └── com.vinszent.GnomeTwitch.png │ │ └── 512x512 │ │ │ └── apps │ │ │ ├── gnome-twitch.png │ │ │ └── com.vinszent.GnomeTwitch.png │ ├── gt-show-chat-symbolic.svg │ ├── gt-camera-symbolic.svg │ ├── gt-hide-chat-symbolic.svg │ ├── gt-film-symbolic.svg │ └── export_logo.sh ├── screenshots │ ├── scrot_player.png │ └── scrot_streams.png ├── com.vinszent.GnomeTwitch.desktop.in ├── ui │ ├── gt-twitch-login-dlg.ui │ ├── app-menu.ui │ ├── gt-channel-header-bar.ui │ ├── gt-container-view.ui │ ├── gt-twitch-channel-info-panel.ui │ ├── gt-twitch-channel-info-dlg.ui │ ├── gt-error-dlg.ui │ ├── gt-vod-container-child.ui │ └── gt-browse-header-bar.ui ├── com.vinszent.GnomeTwitch.gresource.xml ├── meson.build ├── com.vinszent.GnomeTwitch.appdata.xml.in ├── com.vinszent.GnomeTwitch.gschema.xml └── com.vinszent.GnomeTwitch.style.css ├── po ├── LINGUAS ├── meson.build └── POTFILES.in ├── .gitignore ├── player-backends ├── player-backend-mpv-opengl │ ├── player-backend-mpv-opengl.plugin │ ├── meson.build │ └── gt-player-backend-mpv-opengl.h ├── player-backend-gstreamer-cairo │ ├── player-backend-gstreamer-cairo.plugin │ ├── meson.build │ └── gt-player-backend-gstreamer-cairo.h ├── player-backend-gstreamer-opengl │ ├── player-backend-gstreamer-opengl.plugin │ ├── meson.build │ └── gt-player-backend-gstreamer-opengl.h └── player-backend-gstreamer-clutter │ ├── player-backend-gstreamer-clutter.plugin │ ├── meson.build │ └── gt-player-backend-gstreamer-clutter.h ├── zanata.xml ├── meson_options.txt ├── src ├── gt-cache-file.h ├── gt-channel-header-bar.h ├── gt-channel-vod-container.h ├── version.h.in ├── gt-enums.h ├── gt-http-soup.h ├── gt-cache.h ├── gt-channel-container-view.h ├── gt-chat.h ├── gt-twitch-login-dlg.h ├── gt-followed-container-view.h ├── gt-top-game-container.h ├── gt-enums.c ├── gt-search-game-container.h ├── gt-top-channel-container.h ├── gt-vod-container-child.h ├── gt-game-channel-container.h ├── gt-game-container-view.h ├── gt-followed-channel-container.h ├── gt-twitch-channel-info-dlg.h ├── gt-browse-header-bar.h ├── gt-settings-dlg.h ├── gt-games-container-child.h ├── gt-channels-container-child.h ├── gt-resource-downloader.h ├── gt-search-channel-container.h ├── gt-game.h ├── gt-follows-manager.h ├── gt-vod.h ├── gt-container-view.h ├── gt-channel-header-bar.c ├── gt-win.h ├── gt-http.c ├── gt-cache.c ├── gt-player.h ├── gt-http.h ├── gt-item-container.h ├── gt-channel.h ├── gt-followed-container-view.c ├── gt-app.h ├── utils.h ├── main.c ├── gt-channel-container-view.c └── gt-player-backend.c ├── print_git_version.py ├── meson_post_install.py ├── LICENSE ├── include ├── meson.build └── gnome-twitch │ └── gt-player-backend.h ├── CONTRIBUTING.md ├── README.md ├── CHANGELOG.md └── meson.build /data/packages/deb/ubuntu-ppa/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /data/packages/deb/ubuntu-ppa/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /data/packages/flatpak/.gitignore: -------------------------------------------------------------------------------- 1 | .flatpak-builder/ 2 | app/ -------------------------------------------------------------------------------- /data/icons/offline-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/offline-cover.png -------------------------------------------------------------------------------- /data/screenshots/scrot_player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/screenshots/scrot_player.png -------------------------------------------------------------------------------- /data/screenshots/scrot_streams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/screenshots/scrot_streams.png -------------------------------------------------------------------------------- /data/icons/com.vinszent.GnomeTwitch.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/com.vinszent.GnomeTwitch.ico -------------------------------------------------------------------------------- /data/icons/hicolor/16x16/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/16x16/apps/gnome-twitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/22x22/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/22x22/apps/gnome-twitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/24x24/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/24x24/apps/gnome-twitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/32x32/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/32x32/apps/gnome-twitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/48x48/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/48x48/apps/gnome-twitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/256x256/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/256x256/apps/gnome-twitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/512x512/apps/gnome-twitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/512x512/apps/gnome-twitch.png -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # please keep this list sorted alphabetically 2 | cs 3 | de 4 | es 5 | fr 6 | hu 7 | nl 8 | pl 9 | pt 10 | ru 11 | sr 12 | sv 13 | -------------------------------------------------------------------------------- /data/icons/gt-show-chat-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/hicolor/16x16/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/16x16/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/22x22/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/22x22/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/24x24/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/24x24/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/32x32/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/32x32/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/48x48/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/48x48/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/256x256/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/256x256/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/icons/hicolor/512x512/apps/com.vinszent.GnomeTwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/how/gnome-twitch/master/data/icons/hicolor/512x512/apps/com.vinszent.GnomeTwitch.png -------------------------------------------------------------------------------- /data/packages/deb/ubuntu-ppa/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ 4 | 5 | override_dh_auto_configure: 6 | autoreconf -i 7 | dh_auto_configure 8 | 9 | override_dh_auto_test: 10 | # Do nothing 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *#* 3 | build 4 | .SRCINFO 5 | po/*.mo 6 | .compdb.json 7 | .clang_complete 8 | /src/.deps/ 9 | /.dir-locals.el 10 | /.projectile 11 | compile_commands.json 12 | data/packages/rpm/obs 13 | TODO.org 14 | /twitch_api.rest 15 | -------------------------------------------------------------------------------- /data/icons/gt-camera-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/gt-hide-chat-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/icons/gt-film-symbolic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /player-backends/player-backend-mpv-opengl/player-backend-mpv-opengl.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Name = MPV OpenGL player backend 3 | Module = player-backend-mpv-opengl 4 | Description = MPV player backend using OpenGL for rendering 5 | Authors = Vincent Szolnoky 6 | Website = https://github.com/vinszent/gnome-twitch 7 | License = GPL3 8 | Loader = C -------------------------------------------------------------------------------- /zanata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://translate.zanata.org/ 4 | gnome-twitch 5 | master 6 | gettext 7 | po 8 | po 9 | 10 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-cairo/player-backend-gstreamer-cairo.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Name = GStreamer Cairo player backend 3 | Module = player-backend-gstreamer-cairo 4 | Description = Gstreamer player backend using Cairo for rendering 5 | Authors = Vincent Szolnoky 6 | Website = https://github.com/vinszent/gnome-twitch 7 | License = GPL3 8 | Loader = C -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-opengl/player-backend-gstreamer-opengl.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Name = GStreamer OpenGL player backend 3 | Module = player-backend-gstreamer-opengl 4 | Description = Gstreamer player backend using OpenGL for rendering 5 | Authors = Vincent Szolnoky 6 | Website = https://github.com/vinszent/gnome-twitch 7 | License = GPL3 8 | Loader = C -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-clutter/player-backend-gstreamer-clutter.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Name = GStreamer Clutter player backend 3 | Module = player-backend-gstreamer-clutter 4 | Description = Gstreamer player backend using Clutter for rendering 5 | Authors = Vincent Szolnoky 6 | Website = https://github.com/vinszent/gnome-twitch 7 | License = GPL3 8 | Loader = C -------------------------------------------------------------------------------- /data/packages/windows/README.md: -------------------------------------------------------------------------------- 1 | How to build for Microsoft Windows 2 | ======================== 3 | 4 | 1. Install Msys2 from http://www.msys2.org/ 5 | 2. Make sure the system is setup with `pacman -Syu base-devel` 6 | 2. Clone the repo with `git clone https://github.com/vinszent/gnome-twitch` 7 | 3. Change to the windows directory with `cd gnome-twitch/data/packages/windows` 8 | 3. Run `sh create_windows_install.sh` 9 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('build-executable', type : 'boolean', value : true, description : 'Build the main executable') 2 | option('build-player-backends', type : 'string', description : 'Comma separated list of player backends to build. Possible values are gstreamer-cairo, gstreamer-opengl, gstreamer-clutter and mpv-opengl') 3 | option('use-deprecated-webkit', type : 'boolean', value : false, description : 'Use deprecated WebKit1 API') 4 | -------------------------------------------------------------------------------- /src/gt-cache-file.h: -------------------------------------------------------------------------------- 1 | #ifndef GT_CACHE_FILE_H 2 | #define GT_CACHE_FILE_H 3 | 4 | #include 5 | 6 | G_BEGIN_DECLS 7 | 8 | #define GT_TYPE_CACHE_FILE gt_cache_file_get_type() 9 | 10 | G_DECLARE_FINAL_TYPE(GtCacheFile, gt_cache_file, GT, CACHE_FILE, GObject); 11 | 12 | struct _GtCacheFile 13 | { 14 | GObject parent_instance; 15 | }; 16 | 17 | GtCacheFile* gt_cache_file_new(); 18 | 19 | G_END_DECLS 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/gt-channel-header-bar.h: -------------------------------------------------------------------------------- 1 | #ifndef GT_CHANNEL_HEADER_BAR_H 2 | #define GT_CHANNEL_HEADER_BAR_H 3 | 4 | #include 5 | 6 | G_BEGIN_DECLS 7 | 8 | #define GT_TYPE_CHANNEL_HEADER_BAR gt_channel_header_bar_get_type() 9 | 10 | G_DECLARE_FINAL_TYPE(GtChannelHeaderBar, gt_channel_header_bar, GT, CHANNEL_HEADER_BAR, GtkHeaderBar); 11 | 12 | struct _GtChannelHeaderBar 13 | { 14 | GtkHeaderBar parent_instance; 15 | }; 16 | 17 | G_END_DECLS 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /data/packages/flatpak/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all install 2 | 3 | all: 4 | ninja -C build/gnome-twitch/ 5 | ninja -C build/player-backend-gstreamer-cairo/ 6 | ninja -C build/player-backend-gstreamer-clutter/ 7 | ninja -C build/player-backend-gstreamer-opengl/ 8 | 9 | install: 10 | ninja -C build/gnome-twitch/ install 11 | ninja -C build/player-backend-gstreamer-cairo/ install 12 | ninja -C build/player-backend-gstreamer-clutter/ install 13 | ninja -C build/player-backend-gstreamer-opengl/ install 14 | -------------------------------------------------------------------------------- /src/gt-channel-vod-container.h: -------------------------------------------------------------------------------- 1 | #ifndef GT_CHANNEL_VOD_CONTAINER_H 2 | #define GT_CHANNEL_VOD_CONTAINER_H 3 | 4 | #include "gt-item-container.h" 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | #define GT_TYPE_CHANNEL_VOD_CONTAINER gt_channel_vod_container_get_type() 10 | 11 | G_DECLARE_FINAL_TYPE(GtChannelVODContainer, gt_channel_vod_container, GT, CHANNEL_VOD_CONTAINER, GtItemContainer); 12 | 13 | struct _GtChannelVODContainer 14 | { 15 | GtItemContainer parent_instance; 16 | }; 17 | 18 | G_END_DECLS 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /data/com.vinszent.GnomeTwitch.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=GNOME Twitch 3 | Comment=Enjoy Twitch on your GNU/Linux desktop 4 | # Translators: Search terms to find this application. 5 | # Do NOT translate or localize the semicolons! 6 | # The list MUST also end with a semicolon! 7 | Keywords=stream;video;twitch;live;games; 8 | Type=Application 9 | Exec=gnome-twitch 10 | # Translators: Don't translate this, xgettext marks this automatically 11 | Icon=com.vinszent.GnomeTwitch 12 | Categories=GTK;GNOME;AudioVideo;Player;Video; 13 | Terminal=false 14 | -------------------------------------------------------------------------------- /print_git_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import subprocess 5 | 6 | try: 7 | if subprocess.check_call(('git', 'rev-parse', '--is-inside-work-tree'), 8 | stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) == 0: 9 | count = subprocess.check_output(('git', 'rev-list', '--count', 'HEAD')).decode().strip() 10 | hash_ = subprocess.check_output(('git', 'rev-parse', '--short', 'HEAD')).decode().strip() 11 | print('r{}.{}'.format(count, hash_)) 12 | except: 13 | sys.exit(1) 14 | -------------------------------------------------------------------------------- /meson_post_install.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import subprocess 5 | 6 | prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local') 7 | datadir = os.path.join(prefix, 'share') 8 | 9 | # Packaging tools define DESTDIR and this isn't needed for them 10 | if 'DESTDIR' not in os.environ: 11 | print('Compiling GSchema...') 12 | subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')]) 13 | 14 | print('Updating icon cache...') 15 | subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons', 'hicolor')]) 16 | 17 | print('Updating desktop database...') 18 | subprocess.call(['update-desktop-database', '-q', os.path.join(datadir, 'applications')]) 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Enjoy Twitch on your GNU/Linux desktop. 2 | Copyright (C) 2017 vinszent a.k.a Vincent Szolnoky 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | -------------------------------------------------------------------------------- /data/packages/deb/ubuntu-ppa/changelog: -------------------------------------------------------------------------------- 1 | gnome-twitch (0.1.0-1~wily1) wily; urgency=low 2 | 3 | * Rearrange dependencies 4 | 5 | -- Vincent Szolnoky Fri, 24 Oct 2015 02:29:37 +0200 6 | 7 | 8 | gnome-twitch (0.1.0-4) wily; urgency=low 9 | 10 | * Update dependencies 11 | 12 | -- Vincent Szolnoky Fri, 23 Oct 2015 17:52:02 +0200 13 | 14 | gnome-twitch (0.1.0-3) wily; urgency=low 15 | 16 | * Update dependencies 17 | 18 | -- Vincent Szolnoky Fri, 23 Oct 2015 17:46:45 +0200 19 | 20 | gnome-twitch (0.1.0-2) wily; urgency=low 21 | 22 | * Update dependencies 23 | 24 | -- Vincent Szolnoky Fri, 23 Oct 2015 17:35:36 +0200 25 | 26 | gnome-twitch (0.1.0-1) wily; urgency=low 27 | 28 | * Initial release. (Closes: #XXXXXX) 29 | 30 | -- Vincent Szolnoky Fri, 23 Oct 2015 15:34:53 +0200 31 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | i18n = import('i18n') 18 | 19 | i18n.gettext(meson.project_name(), preset: 'glib') 20 | -------------------------------------------------------------------------------- /data/packages/flatpak/configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p build/gnome-twitch/ 4 | 5 | meson.py --prefix /app \ 6 | --libdir lib \ 7 | -Ddo-post-install=true \ 8 | -Dwith-player-backend-gstreamer-opengl=true \ 9 | -Dwith-player-backend-gstreamer-cairo=true \ 10 | -Dwith-player-backend-gstreamer-clutter=true \ 11 | -Db_lundef=false \ 12 | ../../../ \ 13 | build/gnome-twitch/ 14 | 15 | for srcdir in ../../../subprojects/player-backend-gstreamer-*; do 16 | builddir=build/$(basename "${srcdir}") 17 | mkdir "${builddir}" 18 | meson.py --prefix /app --libdir lib "${srcdir}" "${builddir}" 19 | done 20 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-git/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | pkgname=gnome-twitch-git 4 | pkgver=r924.0f37971 5 | pkgrel=1 6 | pkgdesc="Enjoy Twitch on your GNU/Linux desktop" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/vinszent/gnome-twitch" 9 | license=('GPL3') 10 | makedepends=('git' 'meson') 11 | depends=('gtk3' 'libsoup' 'json-glib' 'webkit2gtk' 'libpeas' 'gobject-introspection') 12 | conflicts=('gnome-twitch') 13 | source=("$pkgname::git+https://github.com/vinszent/gnome-twitch.git") 14 | md5sums=('SKIP') 15 | 16 | pkgver() 17 | { 18 | cd "$pkgname" 19 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 20 | } 21 | 22 | build() 23 | { 24 | cd "$pkgname" 25 | rm -rf build 26 | mkdir build 27 | cd build 28 | meson --prefix /usr --libdir lib --buildtype release .. 29 | ninja 30 | } 31 | 32 | package() 33 | { 34 | cd "$pkgname/build" 35 | DESTDIR="$pkgdir" ninja install 36 | } 37 | -------------------------------------------------------------------------------- /src/version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef _GT_VERSION_H 20 | #define _GT_VERSION_H 21 | 22 | #define GT_VERSION "@VCS_TAG@" 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | headers = ['gnome-twitch/gt-player-backend.h', 18 | 'gnome-twitch/gt-log.h'] 19 | 20 | install_headers(headers, subdir : meson.project_name()) 21 | -------------------------------------------------------------------------------- /data/packages/deb/ubuntu-ppa/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: gnome-twitch 3 | Source: https://github.com/vinszent/gnome-twitch 4 | 5 | Files: * 6 | Copyright: 2015 Vincent Szolnoky 7 | License: GPL-3+ 8 | Enjoy Twitch on your GNU/Linux desktop. 9 | Copyright (C) 2015 Vincent Szolnoky 10 | 11 | This program is free software: you can redistribute it and/or modify 12 | under the terms of the GNU General Public License as published by 13 | Free Software Foundation, either version 3 of the License, or 14 | at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, 17 | WITHOUT ANY WARRANTY; without even the implied warranty of 18 | or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program. If not, see . -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch/0001-Fix-typo-in-Meson-build-options.patch: -------------------------------------------------------------------------------- 1 | From 6bee8bc0d1626087340138e66225d55ebe9d498e Mon Sep 17 00:00:00 2001 2 | From: vinszent 3 | Date: Fri, 13 Oct 2017 17:52:44 +0200 4 | Subject: [PATCH] Fix typo in Meson build options 5 | 6 | --- 7 | meson_options.txt | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/meson_options.txt b/meson_options.txt 11 | index 17937a3..0d17ec3 100644 12 | --- a/meson_options.txt 13 | +++ b/meson_options.txt 14 | @@ -1,3 +1,3 @@ 15 | option('build-executable', type : 'boolean', value : true, description : 'Build the main executable') 16 | option('build-player-backends', type : 'string', description : 'Comma separated list of player backends to build. Possible values are gstreamer-cairo, gstreamer-opengl, gstreamer-clutter and mpv-opengl') 17 | -option('use-deprecated-webkit', type : 'boolean', value : false, descritpion : 'Use deprecated WebKit1 API') 18 | +option('use-deprecated-webkit', type : 'boolean', value : false, description : 'Use deprecated WebKit1 API') 19 | -- 20 | 2.14.2 21 | 22 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-mpv-opengl/0001-Fix-typo-in-Meson-build-options.patch: -------------------------------------------------------------------------------- 1 | From 6bee8bc0d1626087340138e66225d55ebe9d498e Mon Sep 17 00:00:00 2001 2 | From: vinszent 3 | Date: Fri, 13 Oct 2017 17:52:44 +0200 4 | Subject: [PATCH] Fix typo in Meson build options 5 | 6 | --- 7 | meson_options.txt | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/meson_options.txt b/meson_options.txt 11 | index 17937a3..0d17ec3 100644 12 | --- a/meson_options.txt 13 | +++ b/meson_options.txt 14 | @@ -1,3 +1,3 @@ 15 | option('build-executable', type : 'boolean', value : true, description : 'Build the main executable') 16 | option('build-player-backends', type : 'string', description : 'Comma separated list of player backends to build. Possible values are gstreamer-cairo, gstreamer-opengl, gstreamer-clutter and mpv-opengl') 17 | -option('use-deprecated-webkit', type : 'boolean', value : false, descritpion : 'Use deprecated WebKit1 API') 18 | +option('use-deprecated-webkit', type : 'boolean', value : false, description : 'Use deprecated WebKit1 API') 19 | -- 20 | 2.14.2 21 | 22 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-cairo/0001-Fix-typo-in-Meson-build-options.patch: -------------------------------------------------------------------------------- 1 | From 6bee8bc0d1626087340138e66225d55ebe9d498e Mon Sep 17 00:00:00 2001 2 | From: vinszent 3 | Date: Fri, 13 Oct 2017 17:52:44 +0200 4 | Subject: [PATCH] Fix typo in Meson build options 5 | 6 | --- 7 | meson_options.txt | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/meson_options.txt b/meson_options.txt 11 | index 17937a3..0d17ec3 100644 12 | --- a/meson_options.txt 13 | +++ b/meson_options.txt 14 | @@ -1,3 +1,3 @@ 15 | option('build-executable', type : 'boolean', value : true, description : 'Build the main executable') 16 | option('build-player-backends', type : 'string', description : 'Comma separated list of player backends to build. Possible values are gstreamer-cairo, gstreamer-opengl, gstreamer-clutter and mpv-opengl') 17 | -option('use-deprecated-webkit', type : 'boolean', value : false, descritpion : 'Use deprecated WebKit1 API') 18 | +option('use-deprecated-webkit', type : 'boolean', value : false, description : 'Use deprecated WebKit1 API') 19 | -- 20 | 2.14.2 21 | 22 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-clutter/0001-Fix-typo-in-Meson-build-options.patch: -------------------------------------------------------------------------------- 1 | From 6bee8bc0d1626087340138e66225d55ebe9d498e Mon Sep 17 00:00:00 2001 2 | From: vinszent 3 | Date: Fri, 13 Oct 2017 17:52:44 +0200 4 | Subject: [PATCH] Fix typo in Meson build options 5 | 6 | --- 7 | meson_options.txt | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/meson_options.txt b/meson_options.txt 11 | index 17937a3..0d17ec3 100644 12 | --- a/meson_options.txt 13 | +++ b/meson_options.txt 14 | @@ -1,3 +1,3 @@ 15 | option('build-executable', type : 'boolean', value : true, description : 'Build the main executable') 16 | option('build-player-backends', type : 'string', description : 'Comma separated list of player backends to build. Possible values are gstreamer-cairo, gstreamer-opengl, gstreamer-clutter and mpv-opengl') 17 | -option('use-deprecated-webkit', type : 'boolean', value : false, descritpion : 'Use deprecated WebKit1 API') 18 | +option('use-deprecated-webkit', type : 'boolean', value : false, description : 'Use deprecated WebKit1 API') 19 | -- 20 | 2.14.2 21 | 22 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-opengl/0001-Fix-typo-in-Meson-build-options.patch: -------------------------------------------------------------------------------- 1 | From 6bee8bc0d1626087340138e66225d55ebe9d498e Mon Sep 17 00:00:00 2001 2 | From: vinszent 3 | Date: Fri, 13 Oct 2017 17:52:44 +0200 4 | Subject: [PATCH] Fix typo in Meson build options 5 | 6 | --- 7 | meson_options.txt | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/meson_options.txt b/meson_options.txt 11 | index 17937a3..0d17ec3 100644 12 | --- a/meson_options.txt 13 | +++ b/meson_options.txt 14 | @@ -1,3 +1,3 @@ 15 | option('build-executable', type : 'boolean', value : true, description : 'Build the main executable') 16 | option('build-player-backends', type : 'string', description : 'Comma separated list of player backends to build. Possible values are gstreamer-cairo, gstreamer-opengl, gstreamer-clutter and mpv-opengl') 17 | -option('use-deprecated-webkit', type : 'boolean', value : false, descritpion : 'Use deprecated WebKit1 API') 18 | +option('use-deprecated-webkit', type : 'boolean', value : false, description : 'Use deprecated WebKit1 API') 19 | -- 20 | 2.14.2 21 | 22 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Vincent 2 | 3 | pkgname=gnome-twitch 4 | pkgver=0.4.1 5 | pkgrel=2 6 | pkgdesc="Enjoy Twitch on your GNU/Linux desktop" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/vinszent/gnome-twitch" 9 | license=('GPL3') 10 | makedepends=('git' 'meson') 11 | depends=('gtk3' 'libsoup' 'json-glib' 'webkit2gtk' 'libpeas' 'gobject-introspection') 12 | conflicts=('gnome-twitch-git') 13 | source=("https://github.com/vinszent/gnome-twitch/archive/v${pkgver}.tar.gz" 14 | "0001-Fix-typo-in-Meson-build-options.patch") 15 | md5sums=('452609cf714ef98153c64949ba7ba130' 16 | '9efc76e74fbfd6ca20a2b474b0980002') 17 | 18 | prepare() 19 | { 20 | cd "${pkgname}-${pkgver}" 21 | patch -p1 -i ../0001-Fix-typo-in-Meson-build-options.patch 22 | } 23 | 24 | build() 25 | { 26 | cd "${pkgname}-${pkgver}" 27 | rm -rf build 28 | mkdir build 29 | cd build 30 | meson --prefix=/usr --libdir=lib --buildtype=release .. 31 | ninja 32 | } 33 | 34 | package() 35 | { 36 | cd "${pkgname}-${pkgver}"/build 37 | DESTDIR="$pkgdir" ninja install 38 | } 39 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | data/com.vinszent.GnomeTwitch.appdata.xml.in 4 | data/com.vinszent.GnomeTwitch.desktop.in 5 | data/com.vinszent.GnomeTwitch.gschema.xml 6 | data/ui/app-menu.ui 7 | data/ui/gt-channels-container-child.ui 8 | data/ui/gt-chat.ui 9 | data/ui/gt-error-dlg.ui 10 | data/ui/gt-item-container.ui 11 | data/ui/gt-player.ui 12 | data/ui/gt-settings-dlg.ui 13 | data/ui/gt-twitch-channel-info-dlg.ui 14 | data/ui/gt-win.ui 15 | src/gt-app.c 16 | src/gt-channel.c 17 | src/gt-channel-container-view.c 18 | src/gt-channels-container-child.c 19 | src/gt-channel-vod-container.c 20 | src/gt-chat.c 21 | src/gt-followed-channel-container.c 22 | src/gt-follows-manager.c 23 | src/gt-game.c 24 | src/gt-game-channel-container.c 25 | src/gt-games-container-child.c 26 | src/gt-item-container.c 27 | src/gt-player.c 28 | src/gt-search-channel-container.c 29 | src/gt-search-game-container.c 30 | src/gt-settings-dlg.c 31 | src/gt-top-channel-container.c 32 | src/gt-top-game-container.c 33 | src/gt-twitch.c 34 | src/gt-twitch-login-dlg.c 35 | src/gt-win.c 36 | -------------------------------------------------------------------------------- /data/packages/windows/gnome-twitch-git-i686.install: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | # Copyright © 2017 Vincent Szolnoky 4 | # 5 | # GNOME Twitch is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # GNOME Twitch is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNOME Twitch. If not, see . 17 | # 18 | 19 | post_install() { 20 | mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas 21 | mingw32/bin/gtk-update-icon-cache -q -t -f /mingw32/share/icons/hicolor 22 | } 23 | 24 | post_upgrade() { 25 | post_install $1 26 | } 27 | 28 | post_remove() { 29 | post_install $1 30 | } -------------------------------------------------------------------------------- /data/packages/windows/gnome-twitch-git-x86_64.install: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | # Copyright © 2017 Vincent Szolnoky 4 | # 5 | # GNOME Twitch is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # GNOME Twitch is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNOME Twitch. If not, see . 17 | # 18 | 19 | post_install() { 20 | mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas 21 | mingw64/bin/gtk-update-icon-cache -q -t -f /mingw64/share/icons/hicolor 22 | } 23 | 24 | post_upgrade() { 25 | post_install $1 26 | } 27 | 28 | post_remove() { 29 | post_install $1 30 | } -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-mpv-opengl-git/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | pkgname=gnome-twitch-player-backend-mpv-opengl-git 4 | pkgver=r1010.e74f175 5 | pkgrel=1 6 | pkgdesc="MPV OpenGL (hardware rendering) player backend for GNOME Twitch" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/vinszent/gnome-twitch" 9 | license=('GPL3') 10 | makedepends=('git' 'meson') 11 | depends=('gnome-twitch-git' 'gtk3' 'libpeas' 'gobject-introspection' 'mpv') 12 | # replaces=('gnome-twitch-mpv') Once 0.4.0 is released we can replace it 13 | source=("$pkgname::git+https://github.com/vinszent/gnome-twitch.git") 14 | md5sums=('SKIP') 15 | conflicts=('gnome-twitch-player-backend-mpv-opengl') 16 | 17 | pkgver() 18 | { 19 | cd "${pkgname}" 20 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 21 | } 22 | 23 | build() 24 | { 25 | cd "${pkgname}" 26 | rm -rf build 27 | mkdir build 28 | cd build 29 | meson --prefix /usr --libdir lib --buildtype release \ 30 | -Dbuild-executable=false \ 31 | -Dbuild-player-backends=mpv-opengl .. 32 | ninja 33 | } 34 | 35 | package() 36 | { 37 | cd "${pkgname}/build" 38 | DESTDIR="$pkgdir" ninja install 39 | } 40 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-cairo-git/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | pkgname=gnome-twitch-player-backend-gstreamer-cairo-git 4 | pkgver=r1010.e74f175 5 | pkgrel=1 6 | pkgdesc="GStreamer Cairo (software rendering) player backend for GNOME Twitch" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/vinszent/gnome-twitch" 9 | license=('GPL3') 10 | makedepends=('git' 'meson') 11 | depends=('gnome-twitch-git' 'gtk3' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'libpeas' 'gobject-introspection') 12 | source=("$pkgname::git+https://github.com/vinszent/gnome-twitch.git") 13 | md5sums=('SKIP') 14 | conflicts=('gnome-twitch-player-backend-gstreamer-cairo') 15 | 16 | pkgver() 17 | { 18 | cd "${pkgname}" 19 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 20 | } 21 | 22 | build() 23 | { 24 | cd "${pkgname}" 25 | rm -rf build 26 | mkdir build 27 | cd build 28 | meson --prefix /usr --libdir lib --buildtype release \ 29 | -Dbuild-executable=false \ 30 | -Dbuild-player-backends=gstreamer-cairo .. 31 | ninja 32 | } 33 | 34 | package() 35 | { 36 | cd "${pkgname}/build" 37 | DESTDIR="$pkgdir" ninja install 38 | } 39 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-opengl-git/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | pkgname=gnome-twitch-player-backend-gstreamer-opengl-git 4 | pkgver=r1010.e74f175 5 | pkgrel=1 6 | pkgdesc="GStreamer OpenGL (hardware rendering) player backend for GNOME Twitch" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/vinszent/gnome-twitch" 9 | license=('GPL3') 10 | makedepends=('git' 'meson') 11 | depends=('gnome-twitch-git' 'gtk3' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'libpeas' 'gobject-introspection') 12 | source=("$pkgname::git+https://github.com/vinszent/gnome-twitch.git") 13 | md5sums=('SKIP') 14 | conflicts=('gnome-twitch-player-backend-gstreamer-opengl') 15 | 16 | pkgver() 17 | { 18 | cd "${pkgname}" 19 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 20 | } 21 | 22 | build() 23 | { 24 | cd "${pkgname}" 25 | rm -rf build 26 | mkdir build 27 | cd build 28 | meson --prefix /usr --libdir lib --buildtype release \ 29 | -Dbuild-executable=false \ 30 | -Dbuild-player-backends=gstreamer-opengl .. 31 | ninja 32 | } 33 | 34 | package() 35 | { 36 | cd "${pkgname}/build" 37 | DESTDIR="$pkgdir" ninja install 38 | } 39 | -------------------------------------------------------------------------------- /src/gt-enums.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef _GT_ENUMS_H 20 | #define _GT_ENUMS_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_TWITCH_STREAM_QUALITY gt_twitch_stream_quality_get_type() 27 | #define GT_TYPE_SETTINGS_DLG_VIEW gt_settings_dlg_view_get_type() 28 | 29 | GType gt_twitch_stream_quality_get_type(); 30 | GType gt_settings_dlg_view_get_type(); 31 | 32 | G_END_DECLS 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-clutter-git/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | pkgname=gnome-twitch-player-backend-gstreamer-clutter-git 4 | pkgver=r1010.e74f175 5 | pkgrel=1 6 | pkgdesc="GStreamer Clutter (hardware rendering) player backend for GNOME Twitch" 7 | arch=('i686' 'x86_64') 8 | url="https://github.com/vinszent/gnome-twitch" 9 | license=('GPL3') 10 | makedepends=('git' 'meson') 11 | depends=('gnome-twitch-git' 'gtk3' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'libpeas' 'gobject-introspection' 'clutter-gst' 'clutter-gtk') 12 | source=("$pkgname::git+https://github.com/vinszent/gnome-twitch.git") 13 | md5sums=('SKIP') 14 | conflicts=('gnome-twitch-player-backend-gstreamer-clutter') 15 | 16 | pkgver() 17 | { 18 | cd "${pkgname}" 19 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 20 | } 21 | 22 | build() 23 | { 24 | cd "${pkgname}" 25 | rm -rf build 26 | mkdir build 27 | cd build 28 | meson --prefix /usr --libdir lib --buildtype release \ 29 | -Dbuild-executable=false \ 30 | -Dbuild-player-backends=gstreamer-clutter .. 31 | ninja 32 | } 33 | 34 | package() 35 | { 36 | cd "${pkgname}/build" 37 | DESTDIR="$pkgdir" ninja install 38 | } 39 | -------------------------------------------------------------------------------- /src/gt-http-soup.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_HTTP_SOUP_H 20 | #define GT_HTTP_SOUP_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_HTTP_SOUP gt_http_soup_get_type() 27 | 28 | G_DECLARE_FINAL_TYPE(GtHTTPSoup, gt_http_soup, GT, HTTP_SOUP, GObject); 29 | 30 | struct _GtHTTPSoup 31 | { 32 | GObject parent_instance; 33 | }; 34 | 35 | GtHTTPSoup* gt_http_soup_new(); 36 | 37 | G_END_DECLS 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/gt-cache.h: -------------------------------------------------------------------------------- 1 | #ifndef GT_CACHE_H 2 | #define GT_CACHE_H 3 | 4 | #include 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | #define GT_TYPE_CACHE gt_cache_get_type() 10 | 11 | G_DECLARE_INTERFACE(GtCache, gt_cache, GT, CACHE, GObject); 12 | 13 | #define GT_CACHE_ERROR g_quark_from_static_string("gt-cache-error-quark") 14 | 15 | typedef enum 16 | { 17 | GT_CACHE_ERROR_ENTRY_NOT_FOUND, 18 | } GtCacheError; 19 | 20 | struct _GtCacheInterface 21 | { 22 | GTypeInterface parent_interface; 23 | 24 | void (*save_data) (GtCache* self, const gchar* key, gconstpointer data, gsize length, GDateTime* last_updated, GDateTime* expiry, const gchar* etag); 25 | GInputStream* (*get_data_stream) (GtCache* self, const gchar* key, GError** error); 26 | gboolean (*is_data_stale) (GtCache* self, const gchar* key, GDateTime* last_updated, const gchar* etag); 27 | }; 28 | 29 | /* TODO: Add docs */ 30 | void gt_cache_save_data(GtCache* self, const gchar* key, gconstpointer data, gsize length, GDateTime* last_updated, GDateTime* expiry, const gchar* etag); 31 | GInputStream* gt_cache_get_data_stream(GtCache* self, const gchar* key, GError** error); 32 | gboolean gt_cache_is_data_stale(GtCache* self, const gchar* key, GDateTime* last_updated, const gchar* etag); 33 | 34 | G_END_DECLS 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /data/icons/export_logo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 4 | # Copyright © 2017 Vincent Szolnoky 5 | # 6 | # GNOME Twitch is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # GNOME Twitch is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with GNOME Twitch. If not, see . 18 | 19 | # Linux icons 20 | for i in 16 22 24 32 48 256 512 21 | do 22 | inkscape -z -e hicolor/$i\x$i/apps/com.vinszent.GnomeTwitch.png -w $i -h $i com.vinszent.GnomeTwitch.svg 23 | done 24 | 25 | # Windows icon 26 | icotool -c \ 27 | hicolor/16x16/apps/com.vinszent.GnomeTwitch.png \ 28 | hicolor/32x32/apps/com.vinszent.GnomeTwitch.png \ 29 | hicolor/48x48/apps/com.vinszent.GnomeTwitch.png \ 30 | -o com.vinszent.GnomeTwitch.ico 31 | -------------------------------------------------------------------------------- /data/packages/deb/ubuntu-ppa/control: -------------------------------------------------------------------------------- 1 | Source: gnome-twitch 2 | Section: video 3 | Priority: optional 4 | Maintainer: Vincent Szolnoky 5 | Build-Depends: debhelper (>= 9), 6 | dh-autoreconf, 7 | autotools-dev, 8 | intltool (>= 0.50.0), 9 | pkg-config, 10 | libgtk-3-dev (>= 3.16.0), 11 | libgstreamer1.0-dev, 12 | libclutter-gst-3.0-dev, 13 | libclutter-gtk-1.0-dev, 14 | libclutter-1.0-dev, 15 | libsoup2.4-dev, 16 | libjson-glib-dev, 17 | libglib2.0-dev, 18 | gstreamer1.0-plugins-base, 19 | gstreamer1.0-plugins-good, 20 | gstreamer1.0-plugins-bad 21 | Standards-Version: 3.9.6 22 | Homepage: https://github.com/vinszent/gnome-twitch 23 | 24 | Package: gnome-twitch 25 | Architecture: any 26 | Depends: ${shlibs:Depends}, 27 | ${misc:Depends}, 28 | gstreamer1.0-clutter-3.0, 29 | gstreamer1.0-plugins-base, 30 | gstreamer1.0-plugins-good, 31 | gstreamer1.0-plugins-bad, 32 | gstreamer1.0-libav, 33 | gstreamer1.0-pulseaudio 34 | Suggests: gstreamer1.0-vaapi, 35 | libva 36 | Description: Enjoy Twitch on your GNU/Linux desktop. 37 | GNOME Twitch app for watching Twitch on your GNU/Linux desktop. 38 | -------------------------------------------------------------------------------- /src/gt-channel-container-view.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_CHANNEL_CONTAINER_VIEW_H 20 | #define GT_CHANNEL_CONTAINER_VIEW_H 21 | 22 | #include "gt-container-view.h" 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_CHANNEL_CONTAINER_VIEW gt_channel_container_view_get_type() 27 | 28 | G_DECLARE_FINAL_TYPE(GtChannelContainerView, gt_channel_container_view, GT, CHANNEL_CONTAINER_VIEW, GtContainerView); 29 | 30 | struct _GtChannelContainerView 31 | { 32 | GtContainerView parent_instance; 33 | }; 34 | 35 | G_END_DECLS 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-mpv-opengl/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | _gitname=gnome-twitch 4 | pkgname=gnome-twitch-player-backend-mpv-opengl 5 | pkgver=0.4.0 6 | pkgrel=3 7 | pkgdesc="MPV OpenGL (hardware rendering) player backend for GNOME Twitch" 8 | arch=('i686' 'x86_64') 9 | url="https://github.com/vinszent/gnome-twitch" 10 | license=('GPL3') 11 | makedepends=('git' 'meson') 12 | depends=('gnome-twitch' 'gtk3' 'libpeas' 'gobject-introspection' 'mpv') 13 | replaces=('gnome-twitch-mpv') 14 | source=("https://github.com/Ippytraxx/gnome-twitch/archive/v${pkgver}.tar.gz" 15 | "0001-Fix-typo-in-Meson-build-options.patch") 16 | md5sums=('42abec672144865828a9eb4764037a3a' 17 | '9efc76e74fbfd6ca20a2b474b0980002') 18 | conflicts=('gnome-twitch-player-backend-mpv-opengl-git' 19 | 'gnome-twitch-mpv') 20 | 21 | prepare() 22 | { 23 | cd "${_gitname}-${pkgver}" 24 | patch -p1 -i ../0001-Fix-typo-in-Meson-build-options.patch 25 | } 26 | 27 | build() 28 | { 29 | cd "${_gitname}-${pkgver}" 30 | rm -rf build 31 | mkdir build 32 | cd build 33 | meson --prefix /usr --libdir lib --buildtype release \ 34 | -Dbuild-executable=false \ 35 | -Dbuild-player-backends=mpv-opengl .. 36 | ninja 37 | } 38 | 39 | package() 40 | { 41 | cd "${_gitname}-${pkgver}/build" 42 | DESTDIR="$pkgdir" ninja install 43 | } 44 | -------------------------------------------------------------------------------- /src/gt-chat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_CHAT_H 20 | #define GT_CHAT_H 21 | 22 | #include 23 | #include "gt-channel.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_CHAT gt_chat_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtChat, gt_chat, GT, CHAT, GtkBox) 30 | 31 | struct _GtChat 32 | { 33 | GtkBox parent_instance; 34 | }; 35 | 36 | GtChat* gt_chat_new(); 37 | void gt_chat_connect(GtChat* self, GtChannel* chan); 38 | void gt_chat_disconnect(GtChat* self); 39 | 40 | G_END_DECLS 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/gt-twitch-login-dlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_TWITCH_LOGIN_DLG_H 20 | #define GT_TWITCH_LOGIN_DLG_H 21 | 22 | #include 23 | #include "gt-win.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_TWITCH_LOGIN_DLG gt_twitch_login_dlg_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtTwitchLoginDlg, gt_twitch_login_dlg, GT, TWITCH_LOGIN_DLG, GtkDialog) 30 | 31 | struct _GtTwitchLoginDlg 32 | { 33 | GtkDialog parent_instance; 34 | }; 35 | 36 | GtTwitchLoginDlg* gt_twitch_login_dlg_new(GtkWindow* win); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-cairo/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | _gitname=gnome-twitch 4 | pkgname=gnome-twitch-player-backend-gstreamer-cairo 5 | pkgver=0.4.0 6 | pkgrel=2 7 | pkgdesc="GStreamer Cairo (software rendering) player backend for GNOME Twitch" 8 | arch=('i686' 'x86_64') 9 | url="https://github.com/vinszent/gnome-twitch" 10 | license=('GPL3') 11 | makedepends=('git' 'meson') 12 | depends=('gnome-twitch' 'gtk3' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'libpeas' 'gobject-introspection') 13 | source=("https://github.com/Ippytraxx/gnome-twitch/archive/v${pkgver}.tar.gz" 14 | "0001-Fix-typo-in-Meson-build-options.patch") 15 | md5sums=('42abec672144865828a9eb4764037a3a' 16 | '9efc76e74fbfd6ca20a2b474b0980002') 17 | conflicts=('gnome-twitch-player-backend-gstreamer-cairo-git') 18 | 19 | prepare() 20 | { 21 | cd "${_gitname}-${pkgver}" 22 | patch -p1 -i ../0001-Fix-typo-in-Meson-build-options.patch 23 | } 24 | 25 | build() 26 | { 27 | cd "${_gitname}-${pkgver}" 28 | rm -rf build 29 | mkdir build 30 | cd build 31 | meson --prefix /usr --libdir lib --buildtype release \ 32 | -Dbuild-executable=false \ 33 | -Dbuild-player-backends=gstreamer-cairo .. 34 | ninja 35 | } 36 | 37 | package() 38 | { 39 | cd "${_gitname}-${pkgver}/build" 40 | DESTDIR="$pkgdir" ninja install 41 | } 42 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-opengl/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | _gitname=gnome-twitch 4 | pkgname=gnome-twitch-player-backend-gstreamer-opengl 5 | pkgver=0.4.0 6 | pkgrel=2 7 | pkgdesc="GStreamer OpenGL (hardware rendering) player backend for GNOME Twitch" 8 | arch=('i686' 'x86_64') 9 | url="https://github.com/vinszent/gnome-twitch" 10 | license=('GPL3') 11 | makedepends=('git' 'meson') 12 | depends=('gnome-twitch' 'gtk3' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'libpeas' 'gobject-introspection') 13 | source=("https://github.com/Ippytraxx/gnome-twitch/archive/v${pkgver}.tar.gz" 14 | "0001-Fix-typo-in-Meson-build-options.patch") 15 | md5sums=('42abec672144865828a9eb4764037a3a' 16 | '9efc76e74fbfd6ca20a2b474b0980002') 17 | conflicts=('gnome-twitch-player-backend-gstreamer-opengl-git') 18 | 19 | prepare() 20 | { 21 | cd "${_gitname}-${pkgver}" 22 | patch -p1 -i ../0001-Fix-typo-in-Meson-build-options.patch 23 | } 24 | 25 | build() 26 | { 27 | cd "${_gitname}-${pkgver}" 28 | rm -rf build 29 | mkdir build 30 | cd build 31 | meson --prefix /usr --libdir lib --buildtype release \ 32 | -Dbuild-executable=false \ 33 | -Dbuild-player-backends=gstreamer-opengl .. 34 | ninja 35 | } 36 | 37 | package() 38 | { 39 | cd "${_gitname}-${pkgver}/build" 40 | DESTDIR="$pkgdir" ninja install 41 | } 42 | -------------------------------------------------------------------------------- /src/gt-followed-container-view.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_FOLLOWED_CONTAINER_VIEW_H 20 | #define GT_FOLLOWED_CONTAINER_VIEW_H 21 | 22 | #include 23 | #include "gt-container-view.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_FOLLOWED_CONTAINER_VIEW gt_followed_container_view_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtFollowedContainerView, gt_followed_container_view, GT, FOLLOWED_CONTAINER_VIEW, GtContainerView); 30 | 31 | struct _GtFollowedContainerView 32 | { 33 | GtContainerView parent_instance; 34 | }; 35 | 36 | G_END_DECLS 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/gt-top-game-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_TOP_GAME_CONTAINER_H 20 | #define GT_TOP_GAME_CONTAINER_H 21 | 22 | #include 23 | #include "gt-item-container.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_TOP_GAME_CONTAINER gt_top_game_container_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtTopGameContainer, gt_top_game_container, GT, TOP_GAME_CONTAINER, GtItemContainer); 30 | 31 | struct _GtTopGameContainer 32 | { 33 | GtItemContainer parent_instance; 34 | }; 35 | 36 | GtTopGameContainer* gt_top_game_container_new(); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-enums.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include "gt-enums.h" 20 | #include "gt-twitch.h" 21 | #include "gt-settings-dlg.h" 22 | 23 | static const GEnumValue gt_settings_dlg_view_enum_values[] = 24 | { 25 | {GT_SETTINGS_DLG_VIEW_GENERAL, "GT_SETTINGS_DLG_GENERAL", "general"}, 26 | {GT_SETTINGS_DLG_VIEW_PLAYERS, "GT_SETTINGS_DLG_PLUGINS", "plugins"} 27 | }; 28 | 29 | GType 30 | gt_settings_dlg_view_get_type() 31 | { 32 | static GType type = 0; 33 | 34 | if (!type) 35 | type = g_enum_register_static("GtSettingsDlgView", gt_settings_dlg_view_enum_values); 36 | 37 | return type; 38 | } 39 | -------------------------------------------------------------------------------- /data/packages/pacman/gnome-twitch-player-backend-gstreamer-clutter/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: vinszent 2 | 3 | _gitname=gnome-twitch 4 | pkgname=gnome-twitch-player-backend-gstreamer-clutter 5 | pkgver=0.4.0 6 | pkgrel=2 7 | pkgdesc="GStreamer Clutter (hardware rendering) player backend for GNOME Twitch" 8 | arch=('i686' 'x86_64') 9 | url="https://github.com/vinszent/gnome-twitch" 10 | license=('GPL3') 11 | makedepends=('git' 'meson') 12 | depends=('gnome-twitch' 'gtk3' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-bad' 'libpeas' 'gobject-introspection' 'clutter-gst' 'clutter-gtk') 13 | source=("https://github.com/Ippytraxx/gnome-twitch/archive/v${pkgver}.tar.gz" 14 | "0001-Fix-typo-in-Meson-build-options.patch") 15 | md5sums=('42abec672144865828a9eb4764037a3a' 16 | '9efc76e74fbfd6ca20a2b474b0980002') 17 | conflicts=('gnome-twitch-player-backend-gstreamer-clutter-git') 18 | 19 | prepare() 20 | { 21 | cd "${_gitname}-${pkgver}" 22 | patch -p1 -i ../0001-Fix-typo-in-Meson-build-options.patch 23 | } 24 | 25 | build() 26 | { 27 | cd "${_gitname}-${pkgver}" 28 | rm -rf build 29 | mkdir build 30 | cd build 31 | meson --prefix /usr --libdir lib --buildtype release \ 32 | -Dbuild-executable=false \ 33 | -Dbuild-player-backends=gstreamer-clutter .. 34 | ninja 35 | } 36 | 37 | package() 38 | { 39 | cd "${_gitname}-${pkgver}/build" 40 | DESTDIR="$pkgdir" ninja install 41 | } 42 | -------------------------------------------------------------------------------- /src/gt-search-game-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_SEARCH_GAME_CONTAINER_H 20 | #define GT_SEARCH_GAME_CONTAINER_H 21 | 22 | #include 23 | #include "gt-item-container.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_SEARCH_GAME_CONTAINER gt_search_game_container_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtSearchGameContainer, gt_search_game_container, GT, SEARCH_GAME_CONTAINER, GtItemContainer); 30 | 31 | struct _GtSearchGameContainer 32 | { 33 | GtItemContainer parent_instance; 34 | }; 35 | 36 | GtSearchGameContainer* gt_search_game_container_new(); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-top-channel-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_TOP_CHANNEL_CONTAINER_H 20 | #define GT_TOP_CHANNEL_CONTAINER_H 21 | 22 | #include 23 | #include "gt-item-container.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_TOP_CHANNEL_CONTAINER gt_top_channel_container_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtTopChannelContainer, gt_top_channel_container, GT, TOP_CHANNEL_CONTAINER, GtItemContainer); 30 | 31 | struct _GtTopChannelContainer 32 | { 33 | GtItemContainer parent_instance; 34 | }; 35 | 36 | GtTopChannelContainer* gt_top_channel_container_new(); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-vod-container-child.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_VOD_CONTAINER_CHILD_H 20 | #define GT_VOD_CONTAINER_CHILD_H 21 | 22 | #include "gt-vod.h" 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_VOD_CONTAINER_CHILD gt_vod_container_child_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtVODContainerChild, gt_vod_container_child, GT, VOD_CONTAINER_CHILD, GtkFlowBoxChild); 30 | 31 | struct _GtVODContainerChild 32 | { 33 | GtkFlowBoxChild parent_instance; 34 | 35 | GtVOD* vod; 36 | }; 37 | 38 | GtVODContainerChild* gt_vod_container_child_new(GtVOD* vod); 39 | 40 | G_END_DECLS 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-cairo/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | gstreamer_dep = dependency('gstreamer-1.0') 18 | 19 | deps_gstreamer_cairo = [ 20 | libgtk_dep, 21 | libpeas_dep, 22 | gstreamer_dep, 23 | gt_library_dep 24 | ] 25 | 26 | src_gstreamer_cairo = [ 27 | 'gt-player-backend-gstreamer-cairo.c' 28 | ] 29 | 30 | shared_module('player-backend-gstreamer-cairo', src_gstreamer_cairo, 31 | c_args : default_c_args, 32 | dependencies : deps_gstreamer_cairo, 33 | install_dir : player_backend_install_dir, 34 | install : true) 35 | 36 | install_data(sources : 'player-backend-gstreamer-cairo.plugin', 37 | install_dir : player_backend_install_dir) 38 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-opengl/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | gstreamer_dep = dependency('gstreamer-1.0') 18 | 19 | deps_gstreamer_opengl = [ 20 | libgtk_dep, 21 | libpeas_dep, 22 | gstreamer_dep, 23 | gt_library_dep 24 | ] 25 | 26 | src_gstreamer_opengl = [ 27 | 'gt-player-backend-gstreamer-opengl.c' 28 | ] 29 | 30 | shared_module('player-backend-gstreamer-opengl', src_gstreamer_opengl, 31 | c_args : default_c_args, 32 | dependencies : deps_gstreamer_opengl, 33 | install_dir : player_backend_install_dir, 34 | install : true) 35 | 36 | install_data(sources : 'player-backend-gstreamer-opengl.plugin', 37 | install_dir : player_backend_install_dir) 38 | -------------------------------------------------------------------------------- /player-backends/player-backend-mpv-opengl/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | mpv_dep = dependency('mpv') 18 | epoxy_dep = dependency('epoxy') 19 | 20 | deps_mpv_opengl = [ 21 | libgtk_dep, 22 | mpv_dep, 23 | libpeas_dep, 24 | mpv_dep, 25 | epoxy_dep, 26 | gt_library_dep 27 | ] 28 | 29 | src_mpv_opengl = [ 30 | 'gt-player-backend-mpv-opengl.c' 31 | ] 32 | 33 | shared_module('player-backend-mpv-opengl', src_mpv_opengl, 34 | c_args : default_c_args, 35 | dependencies : deps_mpv_opengl, 36 | install_dir : player_backend_install_dir, 37 | install : true) 38 | 39 | install_data(sources : 'player-backend-mpv-opengl.plugin', 40 | install_dir : player_backend_install_dir) 41 | -------------------------------------------------------------------------------- /src/gt-game-channel-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_GAME_CHANNEL_CONTAINER_H 20 | #define GT_GAME_CHANNEL_CONTAINER_H 21 | 22 | #include 23 | #include "gt-item-container.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_GAME_CHANNEL_CONTAINER gt_game_channel_container_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtGameChannelContainer, gt_game_channel_container, GT, GAME_CHANNEL_CONTAINER, GtItemContainer); 30 | 31 | struct _GtGameChannelContainer 32 | { 33 | GtItemContainer parent_instance; 34 | }; 35 | 36 | GtGameChannelContainer* gt_game_channel_container_new(); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-game-container-view.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_GAME_CONTAINER_VIEW_H 20 | #define GT_GAME_CONTAINER_VIEW_H 21 | 22 | #include 23 | #include "gt-container-view.h" 24 | #include "gt-game.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GT_TYPE_GAME_CONTAINER_VIEW gt_game_container_view_get_type() 29 | 30 | G_DECLARE_FINAL_TYPE(GtGameContainerView, gt_game_container_view, GT, GAME_CONTAINER_VIEW, GtContainerView); 31 | 32 | struct _GtGameContainerView 33 | { 34 | GtContainerView parent_instance; 35 | }; 36 | 37 | void gt_game_container_view_open_game(GtGameContainerView* self, GtGame* game); 38 | 39 | G_END_DECLS 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/gt-followed-channel-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_FOLLOWED_CHANNEL_CONTAINER_H 20 | #define GT_FOLLOWED_CHANNEL_CONTAINER_H 21 | 22 | #include 23 | #include "gt-item-container.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_FOLLOWED_CHANNEL_CONTAINER gt_followed_channel_container_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtFollowedChannelContainer, gt_followed_channel_container, GT, FOLLOWED_CHANNEL_CONTAINER, GtItemContainer); 30 | 31 | struct _GtFollowedChannelContainer 32 | { 33 | GtItemContainer parent_instance; 34 | }; 35 | 36 | GtFollowedChannelContainer* gt_followed_channel_container_new(); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /data/ui/gt-twitch-login-dlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 37 | 38 | -------------------------------------------------------------------------------- /player-backends/player-backend-mpv-opengl/gt-player-backend-mpv-opengl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_PLAYER_BACKEND_MPV_OPENGL_H 20 | #define GT_PLAYER_BACKEND_MPV_OPENGL_H 21 | 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_PLAYER_BACKEND_MPV_OPENGL gt_player_backend_mpv_opengl_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtPlayerBackendMpvOpenGL, gt_player_backend_mpv_opengl, GT, PLAYER_BACKEND_MPV_OPENGL, PeasExtensionBase); 30 | 31 | struct _GtPlayerBackendMpvOpenGL 32 | { 33 | PeasExtensionBase parent_instance; 34 | }; 35 | 36 | G_MODULE_EXPORT void peas_register_types(PeasObjectModule* module); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-twitch-channel-info-dlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_TWITCH_CHANNEL_INFO_DLG_H 20 | #define GT_TWITCH_CHANNEL_INFO_DLG_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_TWITCH_CHANNEL_INFO_DLG gt_twitch_channel_info_dlg_get_type() 27 | 28 | G_DECLARE_FINAL_TYPE(GtTwitchChannelInfoDlg, gt_twitch_channel_info_dlg, GT, TWITCH_CHANNEL_INFO_DLG, GtkDialog) 29 | 30 | struct _GtTwitchChannelInfoDlg 31 | { 32 | GtkDialog parent_instance; 33 | }; 34 | 35 | GtTwitchChannelInfoDlg* gt_twitch_channel_info_dlg_new(GtkWindow* win); 36 | void gt_twitch_channel_info_dlg_load_channel(GtTwitchChannelInfoDlg* self, const gchar* chan); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-browse-header-bar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_BROWSE_HEADER_BAR_H 20 | #define GT_BROWSE_HEADER_BAR_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_BROWSE_HEADER_BAR (gt_browse_header_bar_get_type()) 27 | 28 | G_DECLARE_FINAL_TYPE(GtBrowseHeaderBar, gt_browse_header_bar, GT, BROWSE_HEADER_BAR, GtkHeaderBar) 29 | 30 | struct _GtBrowseHeaderBar 31 | { 32 | GtkHeaderBar parent_instance; 33 | }; 34 | 35 | void gt_browse_header_bar_stop_search(GtBrowseHeaderBar* self); 36 | void gt_browse_header_bar_toggle_search(GtBrowseHeaderBar* self); 37 | gboolean gt_browse_header_bar_handle_event(GtBrowseHeaderBar* self, GdkEvent* event); 38 | 39 | G_END_DECLS 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-clutter/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | clutter_gst_dep = dependency('clutter-gst-3.0') 18 | clutter_gtk_dep = dependency('clutter-gtk-1.0') 19 | 20 | deps_gstreamer_clutter = [ 21 | libgtk_dep, 22 | libpeas_dep, 23 | clutter_gst_dep, 24 | clutter_gtk_dep, 25 | gt_library_dep 26 | ] 27 | 28 | src_gstreamer_clutter = [ 29 | 'gt-player-backend-gstreamer-clutter.c' 30 | ] 31 | 32 | shared_module('player-backend-gstreamer-clutter', src_gstreamer_clutter, 33 | c_args : default_c_args, 34 | dependencies : deps_gstreamer_clutter, 35 | install_dir : player_backend_install_dir, 36 | install : true) 37 | 38 | install_data(sources : 'player-backend-gstreamer-clutter.plugin', 39 | install_dir : player_backend_install_dir) 40 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-cairo/gt-player-backend-gstreamer-cairo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_PLAYER_BACKEND_GSTREAMER_CAIRO_H 20 | #define GT_PLAYER_BACKEND_GSTREAMER_CAIRO_H 21 | 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_PLAYER_BACKEND_GSTREAMER_CAIRO gt_player_backend_gstreamer_cairo_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtPlayerBackendGstreamerCairo, gt_player_backend_gstreamer_cairo, GT, PLAYER_BACKEND_GSTREAMER_CAIRO, PeasExtensionBase); 30 | 31 | struct _GtPlayerBackendGstreamerCairo 32 | { 33 | PeasExtensionBase parent_instance; 34 | }; 35 | 36 | G_MODULE_EXPORT void peas_register_types(PeasObjectModule* module); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-settings-dlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_SETTINGS_DLG_H 20 | #define GT_SETTINGS_DLG_H 21 | 22 | #include "gt-win.h" 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GT_TYPE_SETTINGS_DLG (gt_settings_dlg_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE(GtSettingsDlg, gt_settings_dlg, GT, SETTINGS_DLG, GtkDialog); 31 | 32 | typedef enum _GtSettingsDlgView 33 | { 34 | GT_SETTINGS_DLG_VIEW_GENERAL, 35 | GT_SETTINGS_DLG_VIEW_PLAYERS 36 | } GtSettingsDlgView; 37 | 38 | struct _GtSettingsDlg 39 | { 40 | GtkDialog parent_instance; 41 | }; 42 | 43 | GtSettingsDlg* gt_settings_dlg_new(GtWin* win); 44 | void gt_settings_dlg_set_view(GtSettingsDlg* self, GtSettingsDlgView view); 45 | 46 | G_END_DECLS 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-opengl/gt-player-backend-gstreamer-opengl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_PLAYER_BACKEND_GSTREAMER_OPENGL_H 20 | #define GT_PLAYER_BACKEND_GSTREAMER_OPENGL_H 21 | 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_PLAYER_BACKEND_GSTREAMER_OPENGL gt_player_backend_gstreamer_opengl_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtPlayerBackendGstreamerOpenGL, gt_player_backend_gstreamer_opengl, GT, PLAYER_BACKEND_GSTREAMER_OPENGL, PeasExtensionBase); 30 | 31 | struct _GtPlayerBackendGstreamerOpenGL 32 | { 33 | PeasExtensionBase parent_instance; 34 | }; 35 | 36 | G_MODULE_EXPORT void peas_register_types(PeasObjectModule* module); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /player-backends/player-backend-gstreamer-clutter/gt-player-backend-gstreamer-clutter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_PLAYER_BACKEND_GSTREAMER_CLUTTER_H 20 | #define GT_PLAYER_BACKEND_GSTREAMER_CLUTTER_H 21 | 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_PLAYER_BACKEND_GSTREAMER_CLUTTER gt_player_backend_gstreamer_clutter_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtPlayerBackendGstreamerClutter, gt_player_backend_gstreamer_clutter, GT, PLAYER_BACKEND_GSTREAMER_CLUTTER, PeasExtensionBase); 30 | 31 | struct _GtPlayerBackendGstreamerClutter 32 | { 33 | PeasExtensionBase parent_instance; 34 | }; 35 | 36 | G_MODULE_EXPORT void peas_register_types(PeasObjectModule* module); 37 | 38 | G_END_DECLS 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/gt-games-container-child.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_GAMES_CONTAINER_CHILD_H 20 | #define GT_GAMES_CONTAINER_CHILD_H 21 | 22 | #include 23 | #include "gt-game.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_GAMES_VIEW_CHILD (gt_games_container_child_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE(GtGamesContainerChild, gt_games_container_child, GT, GAMES_CONTAINER_CHILD, GtkFlowBoxChild) 30 | 31 | struct _GtGamesContainerChild 32 | { 33 | GtkFlowBoxChild parent_instance; 34 | }; 35 | 36 | GtGamesContainerChild* gt_games_container_child_new(GtGame* game); 37 | void gt_games_container_child_hide_overlay(GtGamesContainerChild* self); 38 | GtGame* gt_games_container_child_get_game(GtGamesContainerChild* self); 39 | 40 | G_END_DECLS 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /data/ui/app-menu.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 |
24 | 25 | Settings 26 | win.show_settings 27 | 28 |
29 |
30 | 31 | About 32 | win.show_about 33 | 34 | 35 | Quit 36 | app.quit 37 | <Ctrl>Q 38 | 39 |
40 |
41 |
42 | -------------------------------------------------------------------------------- /src/gt-channels-container-child.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_CHANNELS_CONTAINER_CHILD_H 20 | #define GT_CHANNELS_CONTAINER_CHILD_H 21 | 22 | #include 23 | #include "gt-channel.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_CHANNELS_CONTAINER_CHILD (gt_channels_container_child_get_type()) 28 | 29 | G_DECLARE_FINAL_TYPE(GtChannelsContainerChild, gt_channels_container_child, GT, CHANNELS_CONTAINER_CHILD, GtkFlowBoxChild) 30 | 31 | struct _GtChannelsContainerChild 32 | { 33 | GtkFlowBoxChild parent_instance; 34 | 35 | GtChannel* channel; 36 | }; 37 | 38 | GtChannelsContainerChild* gt_channels_container_child_new(GtChannel* chan); 39 | void gt_channels_container_child_hide_overlay(GtChannelsContainerChild* self); 40 | 41 | G_END_DECLS 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/gt-resource-downloader.h: -------------------------------------------------------------------------------- 1 | #ifndef GT_RESOURCE_DOWNLOADER_H 2 | #define GT_RESOURCE_DOWNLOADER_H 3 | 4 | #include 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | #define GT_TYPE_RESOURCE_DOWNLOADER gt_resource_downloader_get_type() 10 | 11 | #define GT_IMAGE_FILETYPE_JPEG "jpeg" 12 | #define GT_IMAGE_FILETYPE_PNG "png" 13 | 14 | typedef void (*ResourceDownloaderFunc)(GdkPixbuf* pixbuf, gpointer udata, GError* err); 15 | 16 | G_DECLARE_FINAL_TYPE(GtResourceDownloader, gt_resource_downloader, GT, RESOURCE_DOWNLOADER, GObject); 17 | 18 | struct _GtResourceDownloader 19 | { 20 | GObject parent_instance; 21 | }; 22 | 23 | GtResourceDownloader* gt_resource_downloader_new(); 24 | GtResourceDownloader* gt_resource_downloader_new_with_cache(const gchar* filepath); 25 | void gt_resource_downloader_set_image_filetype(GtResourceDownloader* self, const gchar* filetype); 26 | GdkPixbuf* gt_resource_downloader_download_image(GtResourceDownloader* self, const gchar* uri, const gchar* name, GError** error); 27 | void gt_resource_downloader_download_image_async(GtResourceDownloader* self, const gchar* uri, const gchar* name, GAsyncReadyCallback cb, GCancellable* cancel, gpointer udata); 28 | GdkPixbuf* gt_resource_donwloader_download_image_finish(GtResourceDownloader* self, GAsyncResult* result, GError** error); 29 | GdkPixbuf* gt_resource_downloader_download_image_immediately(GtResourceDownloader* self, const gchar* uri, const gchar* name, ResourceDownloaderFunc cb, gpointer udata, GError** error); 30 | 31 | G_END_DECLS 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/gt-search-channel-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_SEARCH_CHANNEL_CONTAINER_H 20 | #define GT_SEARCH_CHANNEL_CONTAINER_H 21 | 22 | #include "gt-item-container.h" 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_SEARCH_CHANNEL_CONTAINER gt_search_channel_container_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtSearchChannelContainer, gt_search_channel_container, GT, SEARCH_CHANNEL_CONTAINER, GtItemContainer); 30 | 31 | struct _GtSearchChannelContainer 32 | { 33 | GtItemContainer parent_instance; 34 | }; 35 | 36 | GtSearchChannelContainer* gt_search_channel_container_new(); 37 | void gt_search_channel_container_set_query(GtSearchChannelContainer* self, const gchar* query); 38 | const gchar* gt_search_channel_container_get_query(GtSearchChannelContainer* self); 39 | 40 | G_END_DECLS 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /data/com.vinszent.GnomeTwitch.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ui/gt-win.ui 5 | ui/gt-player.ui 6 | ui/gt-item-container.ui 7 | ui/gt-container-view.ui 8 | ui/gt-channels-container.ui 9 | ui/gt-channels-container-child.ui 10 | ui/gt-vod-container-child.ui 11 | ui/gt-browse-header-bar.ui 12 | ui/gt-channel-header-bar.ui 13 | ui/gt-games-container.ui 14 | ui/gt-games-container-child.ui 15 | ui/gt-settings-dlg.ui 16 | ui/gt-chat.ui 17 | ui/gt-twitch-login-dlg.ui 18 | ui/gt-twitch-channel-info-dlg.ui 19 | ui/gt-twitch-channel-info-panel.ui 20 | ui/gt-error-dlg.ui 21 | ui/app-menu.ui 22 | com.vinszent.GnomeTwitch.style.css 23 | icons/offline-cover.png 24 | icons/gt-offline.svg 25 | icons/gt-offline-symbolic.svg 26 | icons/gt-camera-symbolic.svg 27 | icons/gt-film-symbolic.svg 28 | icons/gt-show-chat-symbolic.svg 29 | icons/gt-hide-chat-symbolic.svg 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/gt-game.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_GAME_H 20 | #define GT_GAME_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_GAME (gt_game_get_type()) 27 | 28 | G_DECLARE_FINAL_TYPE(GtGame, gt_game, GT, GAME, GInitiallyUnowned) 29 | 30 | struct _GtGame 31 | { 32 | GInitiallyUnowned parent_instance; 33 | }; 34 | 35 | typedef struct 36 | { 37 | gchar* id; 38 | gchar* name; 39 | gchar* preview_url; 40 | gchar* logo_url; 41 | gint64 viewers; 42 | gint64 channels; 43 | } GtGameData; 44 | 45 | typedef GList GtGameList; 46 | 47 | GtGame* gt_game_new(GtGameData* data); 48 | void gt_game_update_from_raw_data(GtGame* self, GtGameData* data); 49 | void gt_game_list_free(GList* self); 50 | const gchar* gt_game_get_name(GtGame* self); 51 | gboolean gt_game_get_updating(GtGame* self); 52 | gint64 gt_game_get_viewers(GtGame* self); 53 | GtGameData* gt_game_data_new(); 54 | void gt_game_data_free(GtGameData* data); 55 | 56 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtGameData, gt_game_data_free); 57 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtGameList, gt_game_list_free); 58 | 59 | G_END_DECLS 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/gt-follows-manager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_FOLLOWS_MANAGER_H 20 | #define GT_FOLLOWS_MANAGER_H 21 | 22 | #include 23 | 24 | #include "gt-channel.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GT_TYPE_FOLLOWS_MANAGER (gt_follows_manager_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE(GtFollowsManager, gt_follows_manager, GT, FOLLOWS_MANAGER, GObject); 31 | 32 | typedef struct _GtFollowsManagerPrivate GtFollowsManagerPrivate; 33 | 34 | struct _GtFollowsManager 35 | { 36 | GObject parent_instance; 37 | 38 | GList* follow_channels; 39 | }; 40 | 41 | GtFollowsManager* gt_follows_manager_new(void); 42 | void gt_follows_manager_load_from_file(GtFollowsManager* self); 43 | void gt_follows_manager_load_from_twitch(GtFollowsManager* self); 44 | void gt_follows_manager_save(GtFollowsManager* self); 45 | gboolean gt_follows_manager_is_channel_followed(GtFollowsManager* self, GtChannel* chan); 46 | gboolean gt_follows_manager_is_loading_follows(GtFollowsManager* self); 47 | void gt_follows_manager_attach_to_channel(GtFollowsManager* self, GtChannel* chan); 48 | void gt_follows_manager_refresh(GtFollowsManager* self); 49 | 50 | G_END_DECLS 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/gt-vod.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_VOD_H 20 | #define GT_VOD_H 21 | 22 | #include "gt-channel.h" 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_VOD gt_vod_get_type() 28 | 29 | G_DECLARE_FINAL_TYPE(GtVOD, gt_vod, GT, VOD, GObject); 30 | 31 | struct _GtVOD 32 | { 33 | GObject parent_instance; 34 | }; 35 | 36 | typedef struct 37 | { 38 | gchar* id; 39 | gchar* broadcast_id; 40 | GDateTime* created_at; 41 | GDateTime* published_at; 42 | gchar* description; 43 | gchar* game; 44 | gchar* language; 45 | gint64 length; 46 | /* NOTE: Uncomment when needed */ 47 | /* GtChannelData* channel; */ 48 | struct 49 | { 50 | gchar* large; 51 | gchar* medium; 52 | gchar* small; 53 | gchar* template; 54 | } preview; 55 | gchar* title; 56 | gchar* url; 57 | gint64 views; 58 | gchar* tag_list; 59 | } GtVODData; 60 | 61 | GtVODData* gt_vod_data_new(); 62 | void gt_vod_data_free(GtVODData* data); 63 | const gchar* gt_vod_get_id(GtVOD* self); 64 | gboolean gt_vod_get_updating(GtVOD* self); 65 | 66 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtVODData, gt_vod_data_free); 67 | 68 | GtVOD* gt_vod_new(GtVODData* data); 69 | 70 | G_END_DECLS 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /src/gt-container-view.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_CONTAINER_VIEW_H 20 | #define GT_CONTAINER_VIEW_H 21 | 22 | #include 23 | #include "gt-item-container.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define GT_TYPE_CONTAINER_VIEW gt_container_view_get_type() 28 | 29 | G_DECLARE_DERIVABLE_TYPE(GtContainerView, gt_container_view, GT, CONTAINER_VIEW, GtkBox); 30 | 31 | struct _GtContainerViewClass 32 | { 33 | GtkBoxClass parent_class; 34 | 35 | void (*refresh)(GtContainerView* self); 36 | void (*go_back)(GtContainerView* self); 37 | }; 38 | 39 | void gt_container_view_add_container(GtContainerView* self, GtItemContainer* container); 40 | void gt_container_view_set_search_active(GtContainerView* self, gboolean search_active); 41 | gboolean gt_container_view_get_search_active(GtContainerView* self); 42 | gboolean gt_container_view_get_show_back_button(GtContainerView* self); 43 | GtkWidget* gt_container_view_get_container_stack(GtContainerView* self); 44 | GtkWidget* gt_container_view_get_search_entry(GtContainerView* self); 45 | GtkWidget* gt_container_view_get_search_bar(GtContainerView* self); 46 | void gt_container_view_set_search_popover_widget(GtContainerView* self, GtkWidget* popover); 47 | void gt_container_view_go_back(GtContainerView* self); 48 | void gt_container_view_refresh(GtContainerView* self); 49 | 50 | G_END_DECLS 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | datadir = get_option('datadir') 18 | 19 | if (host_machine.system() != 'windows') 20 | i18n = import('i18n') 21 | 22 | i18n.merge_file( 23 | input : 'com.vinszent.GnomeTwitch.desktop.in', 24 | output : 'com.vinszent.GnomeTwitch.desktop', 25 | po_dir : '../po', 26 | type : 'desktop', 27 | install : true, 28 | install_dir : join_paths(datadir, 'applications')) 29 | 30 | i18n.merge_file( 31 | input : 'com.vinszent.GnomeTwitch.appdata.xml.in', 32 | output : 'com.vinszent.GnomeTwitch.appdata.xml', 33 | po_dir : '../po', 34 | install : true, 35 | install_dir : join_paths(datadir, 'metainfo')) 36 | endif 37 | 38 | icondir = join_paths(datadir, 'icons', 'hicolor') 39 | icon_sizes = ['16x16', '24x24', '32x32', '48x48', '256x256', '512x512'] 40 | 41 | foreach size : icon_sizes 42 | install_data('icons/hicolor/@0@/apps/com.vinszent.GnomeTwitch.png'.format(size), 43 | install_dir : join_paths(icondir, size, 'apps')) 44 | endforeach 45 | 46 | install_data('icons/hicolor/scalable/apps/com.vinszent.GnomeTwitch.svg', 47 | install_dir : 'share/icons/hicolor/scalable/apps') 48 | 49 | install_data('icons/hicolor/scalable/apps/com.vinszent.GnomeTwitch-symbolic.svg', 50 | install_dir : 'share/icons/hicolor/symbolic/apps') 51 | 52 | install_data('com.vinszent.GnomeTwitch.gschema.xml', 53 | install_dir : join_paths(datadir, 'glib-2.0/schemas/')) 54 | -------------------------------------------------------------------------------- /src/gt-channel-header-bar.c: -------------------------------------------------------------------------------- 1 | #include "gt-channel-header-bar.h" 2 | #include "gt-win.h" 3 | #include "gt-channel.h" 4 | #include "utils.h" 5 | 6 | #define TAG "GtChannelHeaderBar" 7 | #include "gnome-twitch/gt-log.h" 8 | 9 | typedef struct 10 | { 11 | GtkWidget* status_label; 12 | GtkWidget* name_label; 13 | } GtChannelHeaderBarPrivate; 14 | 15 | G_DEFINE_TYPE_WITH_PRIVATE(GtChannelHeaderBar, gt_channel_header_bar, GTK_TYPE_HEADER_BAR); 16 | 17 | static void 18 | channel_opened_cb(GObject* source, GParamSpec* pspec, gpointer udata) 19 | { 20 | RETURN_IF_FAIL(GT_IS_WIN(source)); 21 | RETURN_IF_FAIL(G_IS_PARAM_SPEC(pspec)); 22 | RETURN_IF_FAIL(GT_IS_CHANNEL_HEADER_BAR(udata)); 23 | 24 | GtChannelHeaderBar* self = GT_CHANNEL_HEADER_BAR(udata); 25 | GtChannelHeaderBarPrivate* priv = gt_channel_header_bar_get_instance_private(self); 26 | GtWin* win = GT_WIN(source); 27 | 28 | gtk_label_set_label(GTK_LABEL(priv->status_label), 29 | gt_channel_get_status(win->open_channel)); 30 | 31 | gtk_label_set_label(GTK_LABEL(priv->name_label), 32 | gt_channel_get_display_name(win->open_channel)); 33 | } 34 | 35 | static void 36 | realize_cb(GtkWidget* widget, gpointer udata) 37 | { 38 | g_assert(GT_IS_CHANNEL_HEADER_BAR(widget)); 39 | 40 | GtChannelHeaderBar* self = GT_CHANNEL_HEADER_BAR(widget); 41 | GtWin* win = GT_WIN_TOPLEVEL(self); 42 | 43 | RETURN_IF_FAIL(GT_IS_WIN(win)); 44 | 45 | g_signal_connect_object(win, "notify::open-channel", G_CALLBACK(channel_opened_cb), self, 0); 46 | } 47 | 48 | static void 49 | gt_channel_header_bar_class_init(GtChannelHeaderBarClass* klass) 50 | { 51 | gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass), 52 | "/com/vinszent/GnomeTwitch/ui/gt-channel-header-bar.ui"); 53 | 54 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelHeaderBar, status_label); 55 | gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelHeaderBar, name_label); 56 | } 57 | 58 | static void 59 | gt_channel_header_bar_init(GtChannelHeaderBar* self) 60 | { 61 | gtk_widget_init_template(GTK_WIDGET(self)); 62 | 63 | utils_signal_connect_oneshot(self, "realize", G_CALLBACK(realize_cb), NULL); 64 | } 65 | -------------------------------------------------------------------------------- /data/ui/gt-channel-header-bar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 59 | 60 | -------------------------------------------------------------------------------- /src/gt-win.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_WIN_H 20 | #define GT_WIN_H 21 | 22 | #include 23 | #include "gt-app.h" 24 | #include "gt-channel.h" 25 | #include "gt-vod.h" 26 | #include "gt-player.h" 27 | 28 | #define GT_WIN_TOPLEVEL(w) GT_WIN(gtk_widget_get_ancestor(GTK_WIDGET(w), GTK_TYPE_WINDOW)) 29 | #define GT_WIN_ACTIVE GT_WIN(gtk_application_get_active_window(GTK_APPLICATION(main_app))) 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define GT_TYPE_WIN (gt_win_get_type()) 34 | 35 | G_DECLARE_FINAL_TYPE(GtWin, gt_win, GT, WIN, GtkApplicationWindow) 36 | 37 | struct _GtWin 38 | { 39 | GtkApplicationWindow parent_instance; 40 | 41 | GtPlayer* player; 42 | GtChannel* open_channel; 43 | }; 44 | 45 | GtWin* gt_win_new(GtApp* app); 46 | void gt_win_open_channel(GtWin* self, GtChannel* chan); 47 | void gt_win_play_vod(GtWin* self, GtVOD* vod); 48 | gboolean gt_win_is_fullscreen(GtWin* self); 49 | void gt_win_toggle_fullscreen(GtWin* self); 50 | void gt_win_show_info_message(GtWin* self, const gchar* msg_fmt, ...); 51 | void gt_win_show_error_message(GtWin* self, const gchar* secondary, const gchar* details_fmt, ...); 52 | void gt_win_show_error_dialogue(GtWin* self, const gchar* secondary, const gchar* details_fmt, ...); 53 | void gt_win_ask_question(GtWin* self, const gchar* msg, GCallback cb, gpointer udata); 54 | void gt_win_inhibit_screensaver(GtWin* self); 55 | void gt_win_uninhibit_screensaver(GtWin* self); 56 | 57 | G_END_DECLS 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /data/ui/gt-container-view.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 59 | 60 | -------------------------------------------------------------------------------- /data/ui/gt-twitch-channel-info-panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | True 24 | vertical 25 | 320 26 | 27 | 28 | True 29 | 30 | 31 | True 32 | vertical 33 | 34 | 35 | True 36 | 5 37 | 5 38 | 39 | 40 | 41 | 42 | True 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | True 52 | word-char 53 | False 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /data/com.vinszent.GnomeTwitch.appdata.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.vinszent.GnomeTwitch.desktop 4 | gnome-twitch 5 | GNOME Twitch 6 | GNOME Twitch 7 | Twitch desktop client 8 | CC0-1.0 9 | GPL-3.0+ 10 | 11 |

12 | Allows searching for and watching Twitch streams from the desktop. 13 |

14 |

Notable Features:

15 |
    16 |
  • Watch your favorite streams natively with fully accelerated video
  • 17 |
  • Built in chat which can even be overlayed over the video
  • 18 |
  • Easy favorites/follows management and receive notifications when they are online
  • 19 |
20 |
21 | http://gnome-twitch.vinszent.com/ 22 | https://github.com/vinszent/gnome-twitch/issues 23 | 24 | 25 | https://raw.githubusercontent.com/vinszent/gnome-twitch/master/data/screenshots/scrot_player.png 26 | Watching a stream with a chat 27 | 28 | 29 | https://raw.githubusercontent.com/vinszent/gnome-twitch/master/data/screenshots/scrot_streams.png 30 | Viewing live channels 31 | 32 | 33 | 34 | 35 | 36 |

37 | This release is focused on improving stability and having 38 | better error handling. Some key features have also been 39 | implemented. These include better chat moving and resizing, 40 | language selection, various UI additions, and more. 41 |

42 |
43 |
44 | 45 | 46 |

This is a minor release to fix an error getting follows.

47 |
48 |
49 |
50 | 51 | AppMenu 52 | HiDpiIcon 53 | ModernToolkit 54 | Notifications 55 | 56 | vinszent_at_vinszent.com 57 |
58 | -------------------------------------------------------------------------------- /data/packages/windows/PKGBUILD: -------------------------------------------------------------------------------- 1 | # 2 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | # Copyright © 2017 Vincent Szolnoky 4 | # 5 | # GNOME Twitch is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # GNOME Twitch is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with GNOME Twitch. If not, see . 17 | # 18 | 19 | pkgname="${MINGW_PACKAGE_PREFIX}-gnome-twitch-git" 20 | pkgver=r897.028500f 21 | pkgrel=1 22 | arch=('any') 23 | pkgdesc="Enjoy Twitch on your GNU/Linux desktop (mingw-w64)" 24 | url="https://github.com/vinszent/gnome-twitch" 25 | license=('GPL3') 26 | depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" 27 | "${MINGW_PACKAGE_PREFIX}-gtk3" 28 | "${MINGW_PACKAGE_PREFIX}-json-glib" 29 | "${MINGW_PACKAGE_PREFIX}-libpeas" 30 | "${MINGW_PACKAGE_PREFIX}-libsoup" 31 | "${MINGW_PACKAGE_PREFIX}-gst-plugins-good" 32 | "${MINGW_PACKAGE_PREFIX}-gst-plugins-base" 33 | "${MINGW_PACKAGE_PREFIX}-gst-plugins-bad" 34 | "${MINGW_PACKAGE_PREFIX}-gst-libav" 35 | "${MINGW_PACKAGE_PREFIX}-gobject-introspection" 36 | "${MINGW_PACKAGE_PREFIX}-webkitgtk3" 37 | ) 38 | makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" 39 | "${MINGW_PACKAGE_PREFIX}-pkg-config" 40 | "${MINGW_PACKAGE_PREFIX}-python3" 41 | "${MINGW_PACKAGE_PREFIX}-meson" 42 | "gettext" 43 | "git" 44 | ) 45 | install=gnome-twitch-git-${MSYSTEM_CARCH}.install 46 | options=('strip') 47 | source=("$pkgname::git+https://github.com/vinszent/gnome-twitch.git") 48 | md5sums=('SKIP') 49 | 50 | pkgver() { 51 | cd "${pkgname}" 52 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 53 | } 54 | 55 | build() { 56 | cd "$pkgname" 57 | rm -rf build-${MINGW_CHOST} 58 | mkdir -p build-${MINGW_CHOST} 59 | cd build-${MINGW_CHOST} 60 | meson.py --prefix "C:/${MINGW_PREFIX}" \ 61 | -Duse-deprecated-webkit=true \ 62 | -Dbuild-player-backends=gstreamer-cairo .. 63 | ninja 64 | } 65 | 66 | package() { 67 | cd "${pkgname}/build-${MINGW_CHOST}" 68 | DESTDIR="${pkgdir}" ninja install 69 | } 70 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | ## Translating 3 | ### Zanata 4 | You can edit translations with Red Hat's Zanata project using 5 | GNOME Twitch's project 6 | page 7 | [here](https://translate.zanata.org/project/view/gnome-twitch). Zanata 8 | provides a nice web interface to edit translations which makes it easier to contribute. There is a short startup guide to get you 9 | going 10 | [here](http://docs.zanata.org/en/release/user-guide/translator-guide/). If 11 | you want a new language added, just create a new GitHub issue and I'll 12 | enable it. 13 | ### Manually 14 | 1. Clone the latest source: `git clone https://github.com/vinszent/gnome-twitch` 15 | 2. Change to the clone directory: `cd gnome-twitch` 16 | 3. Setup Meson: `meson build` 17 | 4. Copy the template file to your chosen language (eg: `cp po/gnome-twitch.pot es.po`) 18 | 5. Edit the newly created template manually or with your favourite Gettext editor (gtranslator, poedit, etc) 19 | 6. Add your language to the langs array in `po/meson.build` 20 | 7. Add the language code to the LINGUAS file in the po directory (notice the file is sorted alphabetically) 21 | 8. Test your translation by running `ninja install && gnome-twitch` (needs root to install) from the `build` directory. 22 | 23 | ## Development 24 | 1. Clone the latest source: `git clone https://github.com/vinszent/gnome-twitch` 25 | 2. Change to the clone directory: `cd gnome-twitch` 26 | 3. Setup Meson: `meson build` 27 | 4. Create a new feature branch and switch to it: `git checkout -b myfeature` 28 | 5. Write code! 29 | 6. Test your code: `cd build && ninja && ./src/gnome-twitch` 30 | 7. Add your changes: `git add -A` 31 | 8. Commit your changes: `git commit -m 'Short message'` 32 | 9. Push changes to your GitHub repo. 33 | 10. Submit a PR request! 34 | 35 | ### Coding style 36 | I use Allman/BSD style indenting; I'm usually not too picky but there are a few key points: 37 | 38 | * Braces always on a new line, for functions and control statements. 39 | 40 | * Space between control statement and parenthesis but not for functions, i.e.: 41 | 42 | ``` 43 | while (TRUE) 44 | { 45 | ... 46 | } 47 | ``` 48 | 49 | _(See next point for function example)_ 50 | 51 | * Function declarations are split, i.e.: 52 | 53 | ``` 54 | static void 55 | my_func(gpointer data) 56 | { 57 | ... 58 | } 59 | ``` 60 | 61 | * Pointer stars are put after the type, not before the variable, i.e.: 62 | 63 | ``` 64 | gchar* my_str; 65 | ``` 66 | 67 | * Not a syntax thing but use GLib types whenever possible, i.e.: 68 | 69 | `gchar` instead of `char`, `gint` instead of `int`, etc. 70 | -------------------------------------------------------------------------------- /src/gt-http.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include "gt-http.h" 20 | 21 | #define TAG "GtHTTP" 22 | #include "gnome-twitch/gt-log.h" 23 | 24 | G_DEFINE_INTERFACE(GtHTTP, gt_http, G_TYPE_OBJECT); 25 | 26 | static void 27 | gt_http_default_init(GtHTTPInterface* iface) 28 | { 29 | g_autofree gchar* default_cache_directory = g_build_filename(g_get_user_cache_dir(), 30 | "gnome-twitch", "http-cache", NULL); 31 | 32 | g_object_interface_install_property(iface, g_param_spec_uint("max-inflight-per-category", 33 | "Max inflight per category", "Maximum allowed inflight messages per category", 34 | 0, G_MAXUINT, 4, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); 35 | 36 | g_object_interface_install_property(iface, g_param_spec_string("cache-directory", 37 | "Cache directory", "Directory where cached files should be placed", 38 | default_cache_directory, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); 39 | } 40 | 41 | void 42 | gt_http_get(GtHTTP* http, const gchar* uri, gchar** headers, 43 | GCancellable* cancel, GCallback cb, gpointer udata, gint flags) 44 | { 45 | RETURN_IF_FAIL(GT_IS_HTTP(http)); 46 | RETURN_IF_FAIL(GT_HTTP_GET_IFACE(http)->get != NULL); 47 | 48 | return GT_HTTP_GET_IFACE(http)->get(http, uri, headers, cancel, cb, udata, flags); 49 | } 50 | 51 | void 52 | gt_http_get_with_category(GtHTTP* http, const gchar* uri, const gchar* category, gchar** headers, 53 | GCancellable* cancel, GCallback cb, gpointer udata, gint flags) 54 | { 55 | RETURN_IF_FAIL(GT_IS_HTTP(http)); 56 | RETURN_IF_FAIL(GT_HTTP_GET_IFACE(http)->get != NULL); 57 | 58 | return GT_HTTP_GET_IFACE(http)->get_with_category(http, uri, category, headers, cancel, cb, udata, flags); 59 | } 60 | -------------------------------------------------------------------------------- /data/packages/windows/gnome-twitch.iss: -------------------------------------------------------------------------------- 1 | ; This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | ; Copyright © 2017 Vincent Szolnoky 3 | ; 4 | ; GNOME Twitch is free software: you can redistribute it and/or modify 5 | ; it under the terms of the GNU General Public License as published by 6 | ; the Free Software Foundation, either version 3 of the License, or 7 | ; (at your option) any later version. 8 | ; 9 | ; GNOME Twitch is distributed in the hope that it will be useful, 10 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | ; GNU General Public License for more details. 13 | ; 14 | ; You should have received a copy of the GNU General Public License 15 | ; along with GNOME Twitch. If not, see . 16 | ; 17 | 18 | ; Inno setup script to creat a Microsoft Windows installer 19 | ; for GNOME Twitch 20 | 21 | [Setup] 22 | ; Unique indentifier 23 | AppId={{59E6C536-C0C7-4F96-AADA-8BD35D92721E} 24 | AppName=GNOME Twitch 25 | AppVersion=%VERSION% 26 | AppPublisherURL=http://gnome-twitch.vinszent.com 27 | AppSupportURL=http://gnome-twitch.vinszent.com 28 | AppUpdatesURL=http://gnome-twitch.vinszent.com 29 | DefaultDirName={pf}\GNOME Twitch 30 | DefaultGroupName=GNOME Twitch 31 | AllowNoIcons=yes 32 | OutputBaseFilename=gnome-twitch-%VERSION%-setup-32 33 | Compression=lzma2 34 | SolidCompression=no 35 | SetupIconFile=..\..\icons\com.vinszent.GnomeTwitch.ico 36 | UninstallDisplayIcon={app}\com.vinszent.GnomeTwitch.ico 37 | LicenseFile=..\..\..\LICENSE 38 | OutputDir=. 39 | 40 | [Languages] 41 | Name: "english"; MessagesFile: "compiler:Default.isl" 42 | 43 | [Tasks] 44 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked 45 | 46 | [Files] 47 | Source: "gnome-twitch-chroot\%MINGW_ARCH%\bin\gnome-twitch.exe"; DestDir: "{app}\bin"; Flags: ignoreversion 48 | Source: "gnome-twitch-chroot\%MINGW_ARCH%\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs 49 | Source: "..\..\icons\com.vinszent.GnomeTwitch.ico"; DestDir: "{app}" 50 | 51 | [Icons] 52 | Name: "{group}\GNOME Twitch"; Filename: "{app}\bin\gnome-twitch.exe"; IconFilename: "{app}\com.vinszent.GnomeTwitch.ico" 53 | Name: "{commondesktop}\GNOME Twitch"; Filename: "{app}\bin\gnome-twitch.exe"; IconFilename: "{app}\com.vinszent.GnomeTwitch.ico"; Tasks: desktopicon 54 | 55 | [Run] 56 | Filename: "{app}\bin\gnome-twitch.exe"; Description: "{cm:LaunchProgram,GNOME Twitch}"; Flags: nowait postinstall skipifsilent -------------------------------------------------------------------------------- /src/gt-cache.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include "gt-cache.h" 20 | 21 | #define TAG "GtCache" 22 | #include "gnome-twitch/gt-log.h" 23 | 24 | G_DEFINE_INTERFACE(GtCache, gt_cache, G_TYPE_OBJECT) 25 | 26 | static void 27 | gt_cache_default_init(GtCacheInterface* iface) 28 | { 29 | g_autofree gchar* default_cache_directory = g_build_filename(g_get_user_cache_dir(), 30 | "gnome-twitch", "http-cache", NULL); 31 | 32 | g_object_interface_install_property(iface, g_param_spec_string("cache-directory", 33 | "Cache directory", "Directory where cached files should be placed", 34 | default_cache_directory, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); 35 | } 36 | 37 | void 38 | gt_cache_save_data(GtCache* cache, const gchar* key, gconstpointer data, gsize length, GDateTime* last_updated, GDateTime* expiry, const gchar* etag) 39 | { 40 | RETURN_IF_FAIL(GT_IS_CACHE(cache)); 41 | RETURN_IF_FAIL(GT_CACHE_GET_IFACE(cache)->save_data != NULL); 42 | 43 | return GT_CACHE_GET_IFACE(cache)->save_data(cache, key, data, length, last_updated, expiry, etag); 44 | } 45 | 46 | GInputStream* 47 | gt_cache_get_data_stream(GtCache* cache, const gchar* key, GError** error) 48 | { 49 | RETURN_VAL_IF_FAIL(GT_IS_CACHE(cache), NULL); 50 | RETURN_VAL_IF_FAIL(GT_CACHE_GET_IFACE(cache)->get_data_stream != NULL, NULL); 51 | 52 | return GT_CACHE_GET_IFACE(cache)->get_data_stream(cache, key, error); 53 | } 54 | 55 | gboolean 56 | gt_cache_is_data_stale(GtCache* cache, const gchar* key, GDateTime* last_updated, const gchar* etag) 57 | { 58 | RETURN_VAL_IF_FAIL(GT_IS_CACHE(cache), TRUE); 59 | RETURN_VAL_IF_FAIL(GT_CACHE_GET_IFACE(cache)->is_data_stale != NULL, TRUE); 60 | 61 | return GT_CACHE_GET_IFACE(cache)->is_data_stale(cache, key, last_updated, etag); 62 | } 63 | -------------------------------------------------------------------------------- /src/gt-player.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_PLAYER_H 20 | #define GT_PLAYER_H 21 | 22 | #include "gt-channel.h" 23 | #include "gt-vod.h" 24 | #include "gt-twitch.h" 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define GT_TYPE_PLAYER (gt_player_get_type()) 30 | 31 | G_DECLARE_FINAL_TYPE(GtPlayer, gt_player, GT, PLAYER, GtkStack) 32 | 33 | struct _GtPlayer 34 | { 35 | GtkStack parent_instance; 36 | }; 37 | 38 | typedef struct 39 | { 40 | gboolean visible; 41 | gboolean docked; 42 | gboolean dark_theme; 43 | gdouble opacity; 44 | gdouble width; 45 | gdouble height; 46 | gdouble x_pos; 47 | gdouble y_pos; 48 | gdouble docked_handle_pos; 49 | } GtPlayerChannelSettings; 50 | 51 | typedef enum 52 | { 53 | GT_PLAYER_MEDIUM_NONE, 54 | GT_PLAYER_MEDIUM_LIVESTREAM, 55 | GT_PLAYER_MEDIUM_VOD, 56 | } GtPlayerMedium; 57 | 58 | void gt_player_open_channel(GtPlayer* self, GtChannel* chan); 59 | void gt_player_open_vod(GtPlayer* self, GtVOD* vod); 60 | void gt_player_play_livestream(GtPlayer* self); 61 | void gt_player_close_channel(GtPlayer* self); 62 | void gt_player_play(GtPlayer* self); 63 | void gt_player_pause(GtPlayer* self); 64 | void gt_player_stop(GtPlayer* self); 65 | void gt_player_set_quality(GtPlayer* self, const gchar* quality); 66 | void gt_player_toggle_muted(GtPlayer* self); 67 | GtChannel* gt_player_get_channel(GtPlayer* self); 68 | GList* gt_player_get_available_stream_qualities(GtPlayer* self); 69 | GtPlayerChannelSettings* gt_player_channel_settings_new(); 70 | void gt_player_channel_settings_free(GtPlayerChannelSettings* settings); 71 | 72 | G_END_DECLS 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ![](/data/icons/hicolor/48x48/apps/com.vinszent.GnomeTwitch.png) GNOME Twitch 2 | 3 | Enjoy Twitch on your GNU/Linux desktop. 4 | 5 | 6 | 7 | ## Install 8 | ### Dependencies 9 | * meson >= 0.36.0 (install only) 10 | * ninja (install only) 11 | * gtk+-3.0 >= 3.20 12 | * libsoup 13 | * json-glib 14 | * webkit2gtk or webkitgtk with `-Duse-deprecated-webkit=true` flag 15 | 16 | #### Player backend - GStreamer Cairo & GStreamer OpenGL 17 | * gstreamer-1.0 18 | * gst-libav 19 | * gst-plugins-base 20 | * gst-plugins-good 21 | * gst-plugins-bad 22 | 23 | #### Player backend - GStreamer Clutter 24 | Same as above plus: 25 | 26 | * clutter-gst-3.0 27 | * clutter-gtk-1.0 28 | 29 | #### Player backend - MPV OpenGL 30 | * mpv 31 | 32 | ### From source 33 | 34 | ``` shell 35 | meson build 36 | sudo ninja -C build install 37 | ``` 38 | 39 | ### Install player backends 40 | #### Root install 41 | ``` shell 42 | meson build \ 43 | -Dbuild-executable=false \ 44 | -Dbuild-player-backends=${PLAYER_BACKENDS_YOU_WANT} 45 | sudo ninja -C build install 46 | ``` 47 | 48 | **Note:** `${PLAYER_BACKENDS_YOU_WANT}` should be replaced with a 49 | comma separated list of 50 | `gstreamer-opengl,gstreamer-cairo,gstreamer-clutter,mpv-opengl`, for 51 | example `-Dbuild-player-backends=gstreamer-cairo,mpv-opengl` 52 | 53 | #### Local install 54 | ``` shell 55 | meson build --prefix=$HOME/.local --libdir=share \ 56 | -Dbuild-executable=false \ 57 | -Dbuild-player-backends=${PLAYER_BACKENDS_YOU_WANT} 58 | ninja -C build install 59 | ``` 60 | 61 | ### Packages 62 | * [Flatpak (courtesy of @TingPing)](https://github.com/vinszent/gnome-twitch/wiki/How-to-install-FlatPak-package) 63 | * [Arch Linux](https://www.archlinux.org/packages/community/x86_64/gnome-twitch/) 64 | * [Arch Linux (git)](https://aur.archlinux.org/packages/gnome-twitch-git/) 65 | * [Debian (courtesy of @dengelt)](https://tracker.debian.org/pkg/gnome-twitch/) 66 | * [Ubuntu (courtesy of WebUpd8.org)](https://launchpad.net/%7Enilarimogard/+archive/ubuntu/webupd8/+index?batch=75&direction=backwards&memo=150&start=75) (Same requirements as above) 67 | * [Gentoo (courtesy of @TorArneThune)](https://github.com/TorArneThune/gnome-twitch-ebuild) 68 | * [Solus](https://packages.solus-project.com/shannon/g/gnome-twitch/) 69 | * [OpenBSD](http://openports.se/multimedia/gnome-twitch) 70 | 71 | To install extra backends, please refer to either instructions above or checkout the [wiki page](https://github.com/vinszent/gnome-twitch/wiki/How-to-install-player-backends) 72 | for details on which packages to install for the common distros. 73 | 74 | ## Screenshots 75 | ![](/data/screenshots/scrot_player.png?raw=true) 76 | ![](/data/screenshots/scrot_streams.png?raw=true) 77 | -------------------------------------------------------------------------------- /data/com.vinszent.GnomeTwitch.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | Prefer dark theme 7 | Whether to use the dark variant of the theme 8 | 9 | 10 | 'source' 11 | Default quality 12 | Default quality selected when opening a stream 13 | 14 | 15 | '' 16 | Language filter 17 | Language to filter by 18 | 19 | 20 | 21 | 0.3 22 | Current volume of the player 23 | 24 | 25 | 710 26 | Window height 27 | Current window height 28 | 29 | 30 | 1050 31 | Window width 32 | Current window width 33 | 34 | 35 | '' 36 | Twitch OAuth token 37 | 38 | OAuth token used to authenticate all requests to the Twitch API. 39 | Note that if you want to “log out” then you can just set the OAuth 40 | token to an empty string. 41 | 42 | 43 | 44 | '' 45 | Twitch user name 46 | 47 | User name that is used in conjunction with the OAuth token 48 | to authenticate to the Twitch API. Is also used to login to IRC 49 | and other Twitch services. 50 | 51 | 52 | 53 | '' 54 | Twitch user ID 55 | 56 | User ID that is used in conjunction with the OAuth token 57 | to authenticate to the Twitch API. 58 | 59 | 60 | 61 | [] 62 | Loaded player backend 63 | Currently loaded player backend 64 | 65 | 66 | true 67 | Show notifications 68 | Whether to show notifications when channels start streaming 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /data/packages/fedora/gnome-twitch.spec: -------------------------------------------------------------------------------- 1 | %global appid com.vinszent.GnomeTwitch 2 | 3 | Name: gnome-twitch 4 | Version: 0.3.1 5 | Release: 1%{?dist} 6 | Summary: Enjoy Twitch on your GNU/Linux desktop 7 | 8 | License: GPLv3+ 9 | URL: https://github.com/vinszent/gnome-twitch 10 | Source0: https://github.com/vinszent/gnome-twitch/archive/v%{version}.tar.gz 11 | 12 | BuildRequires: meson >= 0.36.0 13 | BuildRequires: gettext 14 | BuildRequires: pkgconfig(glib-2.0) 15 | BuildRequires: pkgconfig(gtk+-3.0) >= 3.20.0 16 | BuildRequires: pkgconfig(gstreamer-1.0) 17 | BuildRequires: pkgconfig(libsoup-2.4) 18 | BuildRequires: pkgconfig(json-glib-1.0) 19 | BuildRequires: pkgconfig(libpeas-gtk-1.0) 20 | BuildRequires: pkgconfig(webkit2gtk-4.0) 21 | BuildRequires: libappstream-glib 22 | 23 | 24 | Requires: gstreamer1-plugins-good 25 | # Note that this requires rpmfusion... 26 | Requires: gstreamer1-libav 27 | # opengl backend 28 | Requires: gstreamer1(element-gtkglsink) 29 | # cairo backend 30 | Requires: gstreamer1(element-gtksink) 31 | 32 | %description 33 | Enjoy Twitch on your GNU/Linux desktop 34 | 35 | %prep 36 | %autosetup -p1 37 | 38 | %build 39 | # NOTE: These options change in the next release 40 | %meson -Dwith-player-gstreamer-cairo=true -Dwith-player-gstreamer-opengl=true -Ddo-post-install=false -Db_lundef=false 41 | %meson_build 42 | 43 | %install 44 | %meson_install 45 | rm -rf %{buildroot}/%{_includedir} 46 | %find_lang gnome-twitch 47 | 48 | # NOTE: Added next release 49 | #%check 50 | #/usr/bin/appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml 51 | 52 | %post 53 | /bin/touch --no-create %{_datadir}/icons/hicolor &> /dev/null || : 54 | 55 | %postun 56 | if [ $1 -eq 0 ] ; then 57 | /bin/touch --no-create %{_datadir}/icons/hicolor &> /dev/null || : 58 | /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || : 59 | fi 60 | 61 | %posttrans 62 | /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || : 63 | 64 | %files -f gnome-twitch.lang 65 | %license LICENSE 66 | %dir %{_libdir}/%{name} 67 | %dir %{_libdir}/%{name}/plugins 68 | %dir %{_libdir}/%{name}/plugins/player-backends 69 | %{_bindir}/%{name} 70 | %{_libdir}/%{name}/plugins/player-backends/* 71 | %{_datadir}/applications/%{appid}.desktop 72 | %{_datadir}/icons/hicolor/*/apps/%{name}.png 73 | %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg 74 | %{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg 75 | %{_datadir}/glib-2.0/schemas/%{appid}.gschema.xml 76 | #%{_datadir}/appdata/*.appdata.xml 77 | 78 | %changelog 79 | * Wed Mar 8 2017 Patrick Griffis 80 | - Cleanup and update to 0.3.1 81 | 82 | * Sun Aug 7 2016 Vincent Szolnoky 83 | - Update to v0.2.1 84 | 85 | * Fri Apr 8 2016 Vincent Szolnoky 86 | - Initial package 87 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## v0.4.1 4 | ### Summary: 5 | Minor bug fixes and translation updates for v0.4.1. 6 | 7 | * __Updated translations__ 8 | 9 | Updated translations for Dutch, German, Polish, Portugese, Russian, 10 | Serbian and Spanish. 11 | 12 | * __Bug fixes__ 13 | - Fixed UI lag when updating channels #260 14 | - Fixed bug that causes the header bar to be shown when hovering over the chat input #247 15 | - Removed indirect restrictions on window width #255 16 | - Fixed a crash when opening a offline channel #251 17 | - Fix some minor GCC warnings #250 18 | - Fix bug where the fullscreen bar is visible twice #239 19 | 20 | ## v0.4.0 21 | ### Summary: 22 | Mainly work on stability with much better error 23 | handling and reporting, but also some key features have been 24 | implemented. 25 | 26 | * __Better moving and resizing of chat__ 27 | 28 | When the chat is undocked it can now be easily moved and resized by 29 | selecting the `Move & resize chat` from the `Edit chat` submenu. The 30 | chat will then have a red border around it and can be moved and 31 | resized with the mouse instead of sliders. 32 | 33 | * __Notifications have been re-enabled__ 34 | 35 | Notifications are now enabled again. They can be clicked to start 36 | playing a channel. 37 | 38 | * __Language selection__ 39 | 40 | A language can now be chosen in the `Settings` menu. This will 41 | automatically filter channels according to the selected language 42 | where applicable. 43 | 44 | * __Searching for offline channels__ 45 | 46 | There is now a menu button that can be pressed to bring up search 47 | settings. From there one can select to also search for offline 48 | channels. 49 | 50 | * __Display all stream qualities__ 51 | 52 | Shows all available stream qualities including special ones like 720p60, etc. 53 | 54 | * __Display all chat badges__ 55 | 56 | Displays all chat badges including any news ones and temporary ones 57 | like the Horde/Alliance chat badges from the Warcraft event. 58 | 59 | * __Dynamic loading of items in containers__ 60 | 61 | No longer load a fixed number of items (channels, games, etc) but 62 | instead look at the allocation size at fetch an appropriate 63 | amount. This will speed up startup and refresh times. 64 | 65 | * __Empty views__ 66 | 67 | Implemented empty views that provide visual feedback instead of 68 | just a blank view. 69 | 70 | * __Notification bar__ 71 | 72 | Improved the notification bar so notifications can be queued and 73 | errors can also be displayed. 74 | 75 | * __Viewer count for games__ 76 | 77 | The viewer count for each game is now visible. Although the games 78 | are already sorted according to viewership, this helps gauging a 79 | game's popularity. 80 | 81 | * __Changes to the build system__ 82 | 83 | The Meson build scripts have been significantly cleaned up (with 84 | help from @TingPing). 85 | -------------------------------------------------------------------------------- /data/ui/gt-twitch-channel-info-dlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 66 | 67 | -------------------------------------------------------------------------------- /src/gt-http.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_HTTP_H 20 | #define GT_HTTP_H 21 | 22 | #include "config.h" 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GT_TYPE_HTTP gt_http_get_type() 29 | 30 | G_DECLARE_INTERFACE(GtHTTP, gt_http, GT, HTTP, GObject); 31 | 32 | typedef void (*GtHTTPStreamCallback) (GtHTTP* http, GInputStream* res, GError* error, gpointer user_data); 33 | typedef void (*GtHTTPDataCallback) (GtHTTP* http, gconstpointer res, gsize length, GError* error, gpointer user_data); 34 | 35 | typedef enum 36 | { 37 | GT_HTTP_FLAG_RETURN_STREAM = 1, 38 | GT_HTTP_FLAG_RETURN_DATA = 1 << 2, 39 | GT_HTTP_FLAG_CACHE_RESPONSE = 1 << 3, 40 | } GtHTTPFlag; 41 | 42 | #define GT_HTTP_ERROR g_quark_from_static_string("gt-http-error-quark") 43 | 44 | typedef enum 45 | { 46 | GT_HTTP_ERROR_UNKNOWN, 47 | GT_HTTP_ERROR_UNSUCCESSFUL_RESPONSE, 48 | GT_HTTP_ERROR_NOT_FOUND = 404, 49 | } GtHTTPError; 50 | 51 | static gchar* GT_HTTP_NO_HEADERS[] = {NULL}; 52 | 53 | static gchar* GT_HTTP_TWITCH_HLS_HEADERS[] = 54 | { 55 | "Client-ID", CLIENT_ID, 56 | "Accept", "application/vnd.apple.mpegurl, text/html", /* NOTE: text/html is for when the stream isn't live and HTML is returned instead */ 57 | NULL, 58 | }; 59 | 60 | static gchar* DEFAULT_TWITCH_HEADERS[] = 61 | { 62 | "Client-ID", CLIENT_ID, 63 | "Accept", "application/vnd.twitchtv.v5+json", 64 | "Accept", "image/*", 65 | NULL, 66 | }; 67 | 68 | struct _GtHTTPInterface 69 | { 70 | GTypeInterface parent_interface; 71 | 72 | void (*get) (GtHTTP* http, const gchar* uri, gchar** headers, 73 | GCancellable* cancel, GCallback cb, gpointer udata, gint flags); 74 | void (*get_with_category) (GtHTTP* http, const gchar* uri, const gchar* category, gchar** headers, 75 | GCancellable* cancel, GCallback cb, gpointer udata, gint flags); 76 | }; 77 | 78 | /* TODO: Add docs */ 79 | void gt_http_get(GtHTTP* http, const gchar* uri, gchar** headers, 80 | GCancellable* cancel, GCallback cb, gpointer udata, gint flags); 81 | void gt_http_get_with_category(GtHTTP* http, const gchar* uri, const gchar* category, gchar** headers, 82 | GCancellable* cancel, GCallback cb, gpointer udata, gint flags); 83 | 84 | G_END_DECLS 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /src/gt-item-container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_ITEM_CONTAINER_H 20 | #define GT_ITEM_CONTAINER_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_ITEM_CONTAINER (gt_item_container_get_type()) 27 | 28 | G_DECLARE_DERIVABLE_TYPE(GtItemContainer, gt_item_container, GT, ITEM_CONTAINER, GtkStack); 29 | 30 | typedef struct 31 | { 32 | gint child_width; 33 | gint child_height; 34 | gboolean append_extra; 35 | gchar* empty_label_text; 36 | gchar* empty_sub_label_text; 37 | gchar* empty_image_name; 38 | gchar* error_label_text; 39 | gchar* fetching_label_text; 40 | } GtItemContainerProperties; 41 | 42 | struct _GtItemContainerClass 43 | { 44 | GtkStackClass parent_class; 45 | 46 | /* Protected funcs */ 47 | void (*get_properties) (GtItemContainer* item_container, gint* child_width, gint* child_height, gboolean* append_extra, 48 | gchar** empty_label_text, gchar** empty_sub_label_text, gchar** empty_image_name, 49 | gchar** error_label_text, gchar** fetching_label_text); 50 | void (*get_container_properties) (GtItemContainer* item_container, GtItemContainerProperties* props); 51 | GtkWidget* (*create_child) (GtItemContainer* item_container, gpointer data); 52 | void (*activate_child) (GtItemContainer* item_container, gpointer child); 53 | /* NOTE: This will be called before the container is cleared. This can be useful if you need 54 | to do something like disconnect signals from each child. */ 55 | void (*request_extra_items) (GtItemContainer* item_container, gint amount, gint offset); 56 | }; 57 | 58 | GtkWidget* gt_item_container_get_flow_box(GtItemContainer* self); /* NOTE: Should only be used by children*/ 59 | void gt_item_container_refresh(GtItemContainer* self); 60 | void gt_item_container_append_item(GtItemContainer* self, gpointer item); 61 | void gt_item_container_append_items(GtItemContainer* self, GList* items); 62 | void gt_item_container_set_items(GtItemContainer* self, GList* items); 63 | void gt_item_container_set_fetching_items(GtItemContainer* self, gboolean fetching_items); 64 | void gt_item_container_remove_item(GtItemContainer* self, gpointer item); 65 | void gt_item_container_show_error(GtItemContainer* self, const GError* error); 66 | 67 | G_END_DECLS; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/gt-channel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_CHANNEL_H 20 | #define GT_CHANNEL_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define GT_TYPE_CHANNEL (gt_channel_get_type()) 27 | 28 | G_DECLARE_FINAL_TYPE(GtChannel, gt_channel, GT, CHANNEL, GInitiallyUnowned) 29 | 30 | struct _GtChannel 31 | { 32 | GInitiallyUnowned parent_instance; 33 | }; 34 | 35 | typedef struct 36 | { 37 | gchar* id; 38 | gchar* game; 39 | gint64 viewers; 40 | GDateTime* stream_started_time; 41 | gchar* status; 42 | gchar* name; 43 | gchar* display_name; 44 | gchar* preview_url; 45 | gchar* video_banner_url; 46 | gchar* logo_url; 47 | gchar* profile_url; 48 | gboolean online; 49 | } GtChannelData; 50 | 51 | typedef GList GtChannelDataList; 52 | typedef GList GtChannelList; 53 | 54 | GtChannel* gt_channel_new(GtChannelData* data); 55 | GtChannel* gt_channel_new_from_id_and_name(const gchar* id, const gchar* name); 56 | void gt_channel_toggle_followed(GtChannel* self); 57 | void gt_channel_list_free(GList* list); 58 | gboolean gt_channel_compare(GtChannel* self, gpointer other); 59 | const gchar* gt_channel_get_name(GtChannel* self); 60 | const gchar* gt_channel_get_display_name(GtChannel* self); 61 | const gchar* gt_channel_get_id(GtChannel* self); 62 | const gchar* gt_channel_get_game_name(GtChannel* self); 63 | const gchar* gt_channel_get_status(GtChannel* self); 64 | gboolean gt_channel_is_online(GtChannel* self); 65 | gboolean gt_channel_is_error(GtChannel* self); 66 | gboolean gt_channel_is_updating(GtChannel* self); 67 | gboolean gt_channel_is_followed(GtChannel* self); 68 | const gchar* gt_channel_get_error_message(GtChannel* self); 69 | const gchar* gt_channel_get_error_details(GtChannel* self); 70 | gboolean gt_channel_update(GtChannel* self); 71 | GtChannelData* gt_channel_data_new(); 72 | void gt_channel_data_free(GtChannelData* data); 73 | void gt_channel_data_list_free(GList* list); 74 | gint gt_channel_data_compare(GtChannelData* a, GtChannelData* b); 75 | 76 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtChannelList, gt_channel_list_free); 77 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtChannelData, gt_channel_data_free); 78 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtChannelDataList, gt_channel_data_list_free); 79 | 80 | G_END_DECLS 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /include/gnome-twitch/gt-player-backend.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_PLAYER_BACKEND_H 20 | #define GT_PLAYER_BACKEND_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | GType gt_player_backend_state_get_type(); 27 | 28 | #define GT_TYPE_PLAYER_BACKEND_STATE (gt_player_backend_state_get_type()) 29 | 30 | /** 31 | * GtPlayerBackendState: 32 | * @GT_PLAYER_BACKEND_STATE_PLAYING: Currently playing 33 | * @GT_PLAYER_BACKEND_STATE_PAUSED: Currently paused 34 | * @GT_PLAYER_BACKEND_STATE_STOPPED: Currently stopped 35 | * @GT_PLAYER_BACKEND_STATE_BUFFERING: Currently buffering 36 | * @GT_PLAYER_BACKEND_STATE_LOADING: Currently loading or doing some other miscellaneous work 37 | * 38 | * The different states that a player backend can be in. 39 | */ 40 | typedef enum 41 | { 42 | GT_PLAYER_BACKEND_STATE_PLAYING, 43 | GT_PLAYER_BACKEND_STATE_PAUSED, 44 | GT_PLAYER_BACKEND_STATE_STOPPED, 45 | GT_PLAYER_BACKEND_STATE_BUFFERING, 46 | GT_PLAYER_BACKEND_STATE_LOADING, 47 | } GtPlayerBackendState; 48 | 49 | #define GT_TYPE_PLAYER_BACKEND (gt_player_backend_get_type()) 50 | 51 | G_DECLARE_INTERFACE(GtPlayerBackend, gt_player_backend, GT, PLAYER_BACKEND, GObject) 52 | 53 | struct _GtPlayerBackendInterface 54 | { 55 | GTypeInterface parent_iface; 56 | 57 | GtkWidget* (*get_widget) (GtPlayerBackend* backend); 58 | void (*play) (GtPlayerBackend* backend); 59 | void (*pause) (GtPlayerBackend* backend); 60 | void (*stop) (GtPlayerBackend* backend); 61 | void (*set_uri) (GtPlayerBackend* backend, const gchar* uri); 62 | void (*set_position) (GtPlayerBackend* backend, gint64 position); 63 | }; 64 | 65 | /** 66 | * gt_player_backend_get_widget 67 | * 68 | * Returns: (transfer none): The Gtk Widget 69 | * 70 | * Returns a Gtk.Widget that presents the player to the user 71 | */ 72 | GtkWidget* gt_player_backend_get_widget(GtPlayerBackend* backend); 73 | 74 | /* TODO: Doc strings */ 75 | void gt_player_backend_play(GtPlayerBackend* backend); 76 | void gt_player_backend_pause(GtPlayerBackend* backend); 77 | void gt_player_backend_stop(GtPlayerBackend* backend); 78 | void gt_player_backend_set_uri(GtPlayerBackend* backend, const gchar* uri); 79 | void gt_player_backend_set_position(GtPlayerBackend* backend, gint64 position); 80 | GtPlayerBackendState gt_player_backend_get_state(GtPlayerBackend* backend); 81 | 82 | G_END_DECLS 83 | 84 | #endif 85 | -------------------------------------------------------------------------------- /src/gt-followed-container-view.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include "gt-followed-container-view.h" 20 | #include "gt-followed-channel-container.h" 21 | #include "gt-follows-manager.h" 22 | #include "gt-app.h" 23 | 24 | #define TAG "GtFollowedContainerView" 25 | #include "gnome-twitch/gt-log.h" 26 | 27 | typedef struct 28 | { 29 | GtFollowedChannelContainer* followed_container; 30 | } GtFollowedContainerViewPrivate; 31 | 32 | G_DEFINE_TYPE_WITH_PRIVATE(GtFollowedContainerView, gt_followed_container_view, GT_TYPE_CONTAINER_VIEW); 33 | 34 | static void 35 | refresh(GtContainerView* view) 36 | { 37 | g_assert(GT_IS_FOLLOWED_CONTAINER_VIEW(view)); 38 | 39 | GtFollowedContainerView* self = GT_FOLLOWED_CONTAINER_VIEW(view); 40 | GtFollowedContainerViewPrivate* priv = gt_followed_container_view_get_instance_private(self); 41 | 42 | GtkWidget* container = gtk_stack_get_visible_child( 43 | GTK_STACK(gt_container_view_get_container_stack(view))); 44 | 45 | RETURN_IF_FAIL(GT_IS_FOLLOWED_CHANNEL_CONTAINER(container)); 46 | RETURN_IF_FAIL(container == GTK_WIDGET(priv->followed_container)); 47 | 48 | /* NOTE: Our only container is the followed_container so we can 49 | * safely call this without checking */ 50 | gt_follows_manager_refresh(main_app->fav_mgr); 51 | } 52 | 53 | static void 54 | constructed(GObject* obj) 55 | { 56 | GtFollowedContainerView* self = GT_FOLLOWED_CONTAINER_VIEW(obj); 57 | GtFollowedContainerViewPrivate* priv = gt_followed_container_view_get_instance_private(self); 58 | GtkWidget* search_entry = gt_container_view_get_search_entry(GT_CONTAINER_VIEW(self)); 59 | 60 | gt_container_view_add_container(GT_CONTAINER_VIEW(self), 61 | GT_ITEM_CONTAINER(priv->followed_container)); 62 | 63 | g_object_bind_property(search_entry, "text", priv->followed_container, "query", G_BINDING_DEFAULT); 64 | 65 | G_OBJECT_CLASS(gt_followed_container_view_parent_class)->constructed(obj); 66 | } 67 | 68 | static void 69 | gt_followed_container_view_class_init(GtFollowedContainerViewClass* klass) 70 | { 71 | G_OBJECT_CLASS(klass)->constructed = constructed; 72 | 73 | GT_CONTAINER_VIEW_CLASS(klass)->refresh = refresh; 74 | } 75 | 76 | static void 77 | gt_followed_container_view_init(GtFollowedContainerView* self) 78 | { 79 | GtFollowedContainerViewPrivate* priv = gt_followed_container_view_get_instance_private(self); 80 | 81 | priv->followed_container = gt_followed_channel_container_new(); 82 | } 83 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 2 | # Copyright © 2017 Vincent Szolnoky 3 | # 4 | # GNOME Twitch is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # GNOME Twitch is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License 15 | # along with GNOME Twitch. If not, see . 16 | 17 | project('gnome-twitch', 'c', 18 | version : '0.4.1', 19 | meson_version : '>= 0.37.0', 20 | license : 'GPL3', 21 | default_options: [ 22 | 'c_std=gnu11', 23 | 'warning_level=2', 24 | ] 25 | ) 26 | 27 | test_cflags = [ 28 | '-Wno-unused-variable', 29 | '-Wno-unused-parameter', 30 | '-Wno-missing-field-initializers' 31 | ] 32 | 33 | default_c_args = [] 34 | cc = meson.get_compiler('c') 35 | foreach cflag : test_cflags 36 | if cc.has_argument(cflag) 37 | default_c_args += cflag 38 | endif 39 | endforeach 40 | 41 | # Used in config.h 42 | LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir')) 43 | LIB_DIR = join_paths(get_option('prefix'), get_option('libdir')) 44 | DATA_DIR = join_paths(get_option('prefix'), get_option('datadir')) 45 | 46 | player_backend_options = get_option('build-player-backends').split(',') 47 | 48 | BUILD_EXECUTABLE = get_option('build-executable') 49 | BUILD_PLAYER_BACKEND_GSTREAMER_CAIRO = player_backend_options.contains('gstreamer-cairo') 50 | BUILD_PLAYER_BACKEND_GSTREAMER_OPENGL = player_backend_options.contains('gstreamer-opengl') 51 | BUILD_PLAYER_BACKEND_GSTREAMER_CLUTTER = player_backend_options.contains('gstreamer-clutter') 52 | BUILD_PLAYER_BACKEND_MPV_OPENGL = player_backend_options.contains('mpv-opengl') 53 | 54 | include_dir = include_directories('include') 55 | 56 | # Common dependencies 57 | libgtk_dep = dependency('gtk+-3.0', version : '>=3.20') 58 | libpeas_dep = dependency('libpeas-1.0') 59 | 60 | # This will possibly override later 61 | gt_library_dep = declare_dependency( 62 | include_directories : include_dir) 63 | 64 | if BUILD_EXECUTABLE 65 | subdir('data') 66 | subdir('po') 67 | subdir('include') 68 | subdir('src') 69 | 70 | meson.add_install_script('meson_post_install.py') 71 | elif host_machine.system() == 'windows' 72 | # We aren't building the main executable and we are on Windows 73 | # but we still could possibly be building plugins. 74 | # Therefore we need to declare the sub-library as a dep that 75 | # should already exist on the system (otherwise why are you 76 | # trying to build plugins for an app that you don't have installed). 77 | gt_library_dep = dependency('gnome-twitch') 78 | endif 79 | 80 | player_backend_install_dir = join_paths(get_option('libdir'), 81 | 'gnome-twitch', 'player-backends') 82 | 83 | if BUILD_PLAYER_BACKEND_GSTREAMER_CLUTTER 84 | subdir('player-backends/player-backend-gstreamer-clutter') 85 | endif 86 | if BUILD_PLAYER_BACKEND_MPV_OPENGL 87 | subdir('player-backends/player-backend-mpv-opengl') 88 | endif 89 | if BUILD_PLAYER_BACKEND_GSTREAMER_CAIRO 90 | subdir('player-backends/player-backend-gstreamer-cairo') 91 | endif 92 | if BUILD_PLAYER_BACKEND_GSTREAMER_OPENGL 93 | subdir('player-backends/player-backend-gstreamer-opengl') 94 | endif 95 | -------------------------------------------------------------------------------- /src/gt-app.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef GT_APP_H 20 | #define GT_APP_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GT_TYPE_APP (gt_app_get_type()) 29 | 30 | G_DECLARE_FINAL_TYPE(GtApp, gt_app, GT, APP, GtkApplication) 31 | 32 | #include "gt-follows-manager.h" 33 | #include "gt-irc.h" 34 | #include "gt-http.h" 35 | 36 | typedef struct 37 | { 38 | gchar* id; 39 | gchar* name; 40 | gchar* oauth_token; 41 | gchar* display_name; 42 | gchar* bio; 43 | gchar* logo_url; 44 | gchar* type; 45 | gchar* email; 46 | gboolean email_verified; 47 | gboolean partnered; 48 | gboolean twitter_connected; 49 | GDateTime* created_at; 50 | GDateTime* updated_at; 51 | 52 | struct 53 | { 54 | gboolean email; 55 | gboolean push; 56 | } notifications; 57 | } GtUserInfo; 58 | 59 | typedef struct 60 | { 61 | gboolean valid; 62 | gchar* oauth_token; 63 | gchar* user_name; 64 | gchar* user_id; 65 | gchar* client_id; 66 | GStrv scopes; 67 | GDateTime* created_at; 68 | GDateTime* updated_at; 69 | } GtOAuthInfo; 70 | 71 | #include "gt-twitch.h" 72 | 73 | typedef struct _GtAppPrivate GtAppPrivate; 74 | 75 | struct _GtApp 76 | { 77 | GtkApplication parent_instance; 78 | 79 | GtTwitch* twitch; 80 | GtFollowsManager* fav_mgr; 81 | GSettings* settings; 82 | 83 | PeasEngine* players_engine; 84 | 85 | SoupSession* soup; 86 | 87 | GtHTTP* http; 88 | }; 89 | 90 | typedef struct 91 | { 92 | gchar* name; 93 | gboolean visible; 94 | gboolean docked; 95 | gboolean dark_theme; 96 | gdouble opacity; 97 | gdouble width; 98 | gdouble height; 99 | gdouble x_pos; 100 | gdouble y_pos; 101 | gdouble docked_handle_pos; 102 | } GtChatViewSettings; 103 | 104 | GtChatViewSettings* gt_chat_view_settings_new(); 105 | GtApp* gt_app_new(void); 106 | 107 | extern GtApp* main_app; 108 | extern gchar* ORIGINAL_LOCALE; 109 | extern gint LOG_LEVEL; 110 | extern gboolean NO_FANCY_LOGGING; 111 | extern const gchar* TWITCH_AUTH_SCOPES[]; 112 | 113 | gboolean gt_app_is_logged_in(GtApp* self); 114 | void gt_app_set_oauth_info(GtApp* self, GtOAuthInfo* info); 115 | const GtUserInfo* gt_app_get_user_info(GtApp* self); 116 | const GtOAuthInfo* gt_app_get_oauth_info(GtApp* self); 117 | const gchar* gt_app_get_language_filter(GtApp* self); 118 | gboolean gt_app_should_show_notifications(GtApp* self); 119 | 120 | GtUserInfo* gt_user_info_new(); 121 | void gt_user_info_free(GtUserInfo* info); 122 | GtOAuthInfo* gt_oauth_info_new(); 123 | void gt_oauth_info_free(GtOAuthInfo* info); 124 | 125 | G_END_DECLS 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /data/ui/gt-error-dlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 23 | True 24 | 490 25 | 295 26 | False 27 | 1 28 | Something went wrong 29 | 32 | 33 | 34 | false 35 | 36 | 37 | false 38 | Report error 39 | true 40 | true 41 | 44 | 45 | 46 | end 47 | 48 | 49 | 50 | 51 | true 52 | Close 53 | 54 | 55 | 56 | 57 | 58 | 59 | 100 60 | 400 61 | vertical 62 | 7 63 | 64 | 65 | true 66 | start 67 | true 68 | 69 | 70 | 71 | 72 | true 73 | start 74 | true 75 | <b>Details:</b> 76 | 77 | 78 | 79 | 80 | True 81 | 100 82 | 400 83 | never 84 | true 85 | 86 | 87 | True 88 | char 89 | true 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /data/ui/gt-vod-container-child.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 93 | 94 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #ifndef _UTILS_H 20 | #define _UTILS_H 21 | 22 | #include "gt-channel.h" 23 | #include "gt-game.h" 24 | #include "gt-vod.h" 25 | #include 26 | #include 27 | 28 | #define REMOVE_STYLE_CLASS(w, n) gtk_style_context_remove_class(gtk_widget_get_style_context(GTK_WIDGET(w)), n) 29 | #define ADD_STYLE_CLASS(w, n) gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(w)), n) 30 | #define ROUND(x) ((gint) ((x) + 0.5)) 31 | #define PRINT_BOOL(b) b ? "true" : "false" 32 | #define STRING_EQUALS(a, b) (g_strcmp0(a, b) == 0) 33 | 34 | #define GT_UTILS_ERROR g_quark_from_static_string("gt-utils-error-quark") 35 | 36 | typedef enum 37 | { 38 | GT_UTILS_ERROR_PARSING_PLAYLIST, 39 | GT_UTILS_ERROR_PARSING_TIME, 40 | GT_UTILS_ERROR_JSON, 41 | GT_UTILS_ERROR_SOUP, 42 | } GtUtilsError; 43 | 44 | typedef struct 45 | { 46 | gint64 int_1; 47 | gint64 int_2; 48 | gint64 int_3; 49 | 50 | gchar* str_1; 51 | gchar* str_2; 52 | gchar* str_3; 53 | 54 | gboolean bool_1; 55 | gboolean bool_2; 56 | gboolean bool_3; 57 | } GenericTaskData; 58 | 59 | typedef struct 60 | { 61 | gchar* name; 62 | gchar* resolution; 63 | gchar* uri; 64 | } GtPlaylistEntry; 65 | 66 | typedef GList GtPlaylistEntryList; 67 | 68 | gpointer utils_value_ref_sink_object(const GValue* val); 69 | gchar* utils_value_dup_string_allow_null(const GValue* val); 70 | void utils_container_clear(GtkContainer* cont); 71 | guint64 utils_timestamp_filename(const gchar* filename, GError** error); 72 | guint64 utils_timestamp_file(GFile* file, GError** error); 73 | gint64 utils_timestamp_now(void); 74 | guint64 utils_http_full_date_to_timestamp(const char* string); 75 | void utils_pixbuf_scale_simple(GdkPixbuf** pixbuf, gint width, gint height, GdkInterpType interp); 76 | const gchar* utils_search_key_value_strv(gchar** strv, const gchar* key); 77 | gboolean utils_str_empty(const gchar* str); 78 | gchar* utils_str_capitalise(const gchar* str); 79 | void utils_signal_connect_oneshot(gpointer instance, const gchar* signal, GCallback cb, gpointer udata); 80 | void utils_signal_connect_oneshot_swapped(gpointer instance, const gchar* signal, GCallback cb, gpointer udata); 81 | void utils_refresh_cancellable(GCancellable** cancel); 82 | GDateTime* utils_parse_time_iso_8601(const gchar* time, GError** error); 83 | GenericTaskData* generic_task_data_new(); 84 | void generic_task_data_free(GenericTaskData* data); 85 | GWeakRef* utils_weak_ref_new(gpointer obj); 86 | void utils_weak_ref_free(GWeakRef* ref); 87 | JsonReader* utils_parse_json(const gchar* data, GError** error); 88 | GtChannelData* utils_parse_stream_from_json(JsonReader* reader, GError** error); 89 | GtChannelData* utils_parse_channel_from_json(JsonReader* reader, GError** error); 90 | GtGameData* utils_parse_game_from_json(JsonReader* reader, GError** error); 91 | GtVODData* utils_parse_vod_from_json(JsonReader* reader, GError** error); 92 | GtPlaylistEntryList* utils_parse_playlist(const gchar* str, GError** error); 93 | void gt_playlist_entry_free(GtPlaylistEntry* entry); 94 | void gt_playlist_entry_list_free(GtPlaylistEntryList* list); 95 | 96 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GWeakRef, utils_weak_ref_free); 97 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtPlaylistEntry, gt_playlist_entry_free); 98 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtPlaylistEntryList, gt_playlist_entry_list_free); 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "gt-app.h" 25 | #include "config.h" 26 | #include "utils.h" 27 | 28 | #define TAG "Main" 29 | #include "gnome-twitch/gt-log.h" 30 | 31 | #ifdef GDK_WINDOWING_X11 32 | #include 33 | #endif 34 | 35 | #define RED "\x1B[31m" 36 | #define GRN "\x1B[32m" 37 | #define YEL "\x1B[33m" 38 | #define BLU "\x1B[34m" 39 | #define MAG "\x1B[35m" 40 | #define CYN "\x1B[36m" 41 | #define WHT "\x1B[37m" 42 | #define RESET "\x1B[0m" 43 | 44 | GtApp* main_app; 45 | gchar* ORIGINAL_LOCALE; 46 | 47 | static void 48 | gt_log(const gchar* domain, 49 | gint _level, 50 | const gchar* msg, 51 | gpointer udata) 52 | { 53 | gchar* level; 54 | GDateTime* date = NULL; 55 | gchar* time_fmt = NULL; 56 | gchar* colour = WHT; 57 | 58 | if ((_level >= 1 << G_LOG_LEVEL_USER_SHIFT //GT levels 59 | && _level > LOG_LEVEL) || 60 | (_level < 1 << G_LOG_LEVEL_USER_SHIFT //GLib levels 61 | && _level > G_LOG_LEVEL_WARNING)) 62 | { 63 | return; 64 | } 65 | 66 | switch (_level) 67 | { 68 | case G_LOG_LEVEL_ERROR: 69 | case GT_LOG_LEVEL_ERROR: 70 | level = "Error"; 71 | colour = RED; 72 | break; 73 | case G_LOG_LEVEL_CRITICAL: 74 | case GT_LOG_LEVEL_CRITICAL: 75 | level = "Critical"; 76 | colour = YEL; 77 | break; 78 | case G_LOG_LEVEL_WARNING: 79 | case GT_LOG_LEVEL_WARNING: 80 | level = "Warning"; 81 | colour = MAG; 82 | break; 83 | case GT_LOG_LEVEL_MESSAGE: 84 | level = "Message"; 85 | colour = GRN; 86 | break; 87 | case G_LOG_LEVEL_INFO: 88 | case GT_LOG_LEVEL_INFO: 89 | level = "Info"; 90 | colour = CYN; 91 | break; 92 | case GT_LOG_LEVEL_DEBUG: 93 | level = "Debug"; 94 | colour = BLU; 95 | break; 96 | case GT_LOG_LEVEL_TRACE: 97 | level = "Trace"; 98 | break; 99 | default: 100 | level = "Unknown"; 101 | break; 102 | } 103 | 104 | date = g_date_time_new_now_utc(); 105 | time_fmt = g_date_time_format(date, "%H:%M:%S"); 106 | 107 | if (NO_FANCY_LOGGING) 108 | g_print("[%s] %s - %s : %s\n", 109 | time_fmt, level, domain ? domain : "GNOME-Twitch", msg); 110 | else 111 | g_print("\e[1m[%s]\e[0m %s%s%s - %s : \e[3m%s\e[0m\n", 112 | time_fmt, colour, level, RESET, domain ? domain : "GNOME-Twitch", msg); 113 | 114 | 115 | g_free(time_fmt); 116 | g_date_time_unref(date); 117 | 118 | } 119 | 120 | int main(int argc, char** argv) 121 | { 122 | #ifdef GDK_WINDOWING_X11 123 | XInitThreads(); 124 | #endif 125 | 126 | bindtextdomain("gnome-twitch", GT_LOCALE_DIR); 127 | bind_textdomain_codeset("gnome-twitch", "UTF-8"); 128 | textdomain("gnome-twitch"); 129 | 130 | g_log_set_default_handler((GLogFunc) gt_log, NULL); 131 | 132 | ORIGINAL_LOCALE = g_strdup(setlocale(LC_NUMERIC, NULL)); 133 | 134 | main_app = gt_app_new(); 135 | 136 | gint ret = g_application_run(G_APPLICATION(main_app), argc, argv); 137 | 138 | g_object_unref(main_app); 139 | 140 | return ret; 141 | } 142 | -------------------------------------------------------------------------------- /data/ui/gt-browse-header-bar.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | 22 | 105 | 106 | -------------------------------------------------------------------------------- /data/packages/windows/create_windows_installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 5 | # Copyright © 2017 Vincent Szolnoky 6 | # 7 | # GNOME Twitch is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # GNOME Twitch is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with GNOME Twitch. If not, see . 19 | # 20 | 21 | # This script assumes you are running it from the 22 | # gnome-twitch/data/packages/windows directory 23 | 24 | PACKAGE_DIR="gnome-twitch-chroot" 25 | PACKAGE_VERSION=0.4 26 | MINGW_ARCH="${MSYSTEM,,}" 27 | LOG_NAME="build-log.txt" 28 | 29 | touch "$LOG_NAME" 30 | 31 | # Update versions 32 | sed -i "s/%VERSION%/${PACKAGE_VERSION}/g" gnome-twitch.iss 33 | sed -i "s/%MINGW_ARCH%/${MINGW_ARCH}/g" gnome-twitch.iss 34 | 35 | # Create chroot environment 36 | echo "==> Creating chroot environment" 37 | 38 | mkdir "${PACKAGE_DIR}" 39 | mkdir -p "${PACKAGE_DIR}"/var/lib/pacman 40 | 41 | pacman -Syu --noconfirm --root "${PACKAGE_DIR}" &>> "$LOG_NAME" 42 | 43 | # Bootstrap chroot 44 | echo "==> Bootstrapping chroot" 45 | pacman -S --noconfirm --root "${PACKAGE_DIR}" bash filesystem pacman &>> "$LOG_NAME" 46 | 47 | # Compile and install GT 48 | echo "==> Compiling and installing packages" 49 | makepkg -s -c --noconfirm &>> "$LOG_NAME" 50 | 51 | pacman -U mingw-w64-"${MSYSTEM_CARCH}"-gnome-twitch-git*.tar.xz --root "${PACKAGE_DIR}" --noconfirm &>> "$LOG_NAME" 52 | 53 | cd "${PACKAGE_DIR}/${MSYSTEM_PREFIX}" 54 | 55 | # Remove unecessary files 56 | echo "==> Removing unecessary files and optimizing" 57 | find -name "*.a" | xargs rm -f # Remove all static libraries 58 | find -not -name "gnome-twitch.exe" -name "*.exe" | xargs rm -f # Remove all executables as we probably won't need them, I hope 59 | find bin -name "*" -not -name "*.exe" -not -name "*.dll" -type f | xargs rm -f # Remove leftover executables 60 | rm -rf bin/libopencv* # Unusally large dlls that are not needed 61 | rm -rf bin/gtk3-demo*.exe 62 | rm -rf bin/gdbm*.exe 63 | rm -rf bin/py* 64 | rm -rf bin/*-config 65 | rm -rf var/ 66 | rm -rf samples/ 67 | rm -rf libexec/ 68 | rm -rf sbin/ 69 | rm -rf include/ 70 | rm -rf share/man 71 | rm -rf share/readline 72 | rm -rf share/aclocal 73 | rm -rf share/gnome-common 74 | rm -rf share/glade 75 | rm -rf share/gettext 76 | rm -rf share/terminfo 77 | rm -rf share/tabset 78 | rm -rf share/pkgconfig 79 | rm -rf share/bash-completion 80 | rm -rf share/appdata 81 | rm -rf share/gdb 82 | rm -rf share/help 83 | rm -rf share/gtk-doc 84 | rm -rf share/doc 85 | rm -rf share/vala 86 | rm -rf share/cogl 87 | rm -rf share/applications 88 | rm -rf share/common-lisp 89 | rm -rf share/OpenCV 90 | rm -rf share/emacs 91 | rm -rf share/libtool 92 | rm -rf lib/terminfo 93 | rm -rf lib/python2* 94 | rm -rf lib/python3* 95 | rm -rf lib/ruby 96 | rm -rf lib/pkgconfig 97 | rm -rf lib/peas-demo 98 | rm -rf lib/cmake 99 | 100 | # Strip all binaries of symbols for smaller size 101 | find -name *.dll | xargs strip 102 | find -name *.exe | xargs strip 103 | 104 | # Remove unused translation files 105 | find share/locale/ -type f | grep -v atk10.mo | grep -v libpeas.mo | grep -v gsettings-desktop-schemas.mo | grep -v json-glib-1.0.mo | grep -v glib20.mo | grep -v gdk-pixbuf.mo | grep -v gtk30.mo | grep -v gtk30-properties.mo | grep -v iso_*.mo | grep -v gnome-twitch.mo | grep -v gstreamer-1.0.mo | grep -v gst-plugins-*.mo | grep -v WebKitGTK-3.0.mo | xargs rm 106 | find share/locale/ -type d | xargs rmdir -p --ignore-fail-on-non-empty 107 | 108 | cd ../../ 109 | 110 | echo "==> Compiling installer" 111 | C:/Program\ Files\ \(x86\)/Inno\ Setup\ 5/ISCC.exe gnome-twitch.iss &>> "$LOG_NAME" 112 | 113 | # Cleanup 114 | echo "==> Cleaning up" 115 | rm -rf "$PACKAGE_DIR" 116 | rm -f mingw-w64-"${MSYSTEM_CARCH}"-gnome-twitch-git*.tar.xz 117 | 118 | echo "" 119 | echo "Finished! Installer ready at gnome-twitch-$PACKAGE_VERSION-setup-32.exe" 120 | echo "Build log available at build-log.txt" 121 | -------------------------------------------------------------------------------- /data/com.vinszent.GnomeTwitch.style.css: -------------------------------------------------------------------------------- 1 | .gt-channels-container-child #overlay, 2 | .gt-games-container-child #overlay, 3 | .gt-vod-container-child #action-box 4 | { 5 | background-color: rgba(0, 0, 0, 0.7); 6 | } 7 | 8 | .gt-channels-container-child #overlay, 9 | .gt-games-container-child #overlay 10 | { 11 | padding: 7px; 12 | } 13 | 14 | .gt-channels-container-child #overlay label, 15 | .gt-channels-container-child #overlay image, 16 | .gt-games-container-child #overlay label, 17 | .gt-games-container-child #overlay image 18 | { 19 | color: rgba(109, 115, 128, 1); 20 | } 21 | 22 | .gt-channels-container-child .overlay-box .info-image 23 | { 24 | color: rgba(109, 115, 128, 1); 25 | padding: 7px; 26 | } 27 | 28 | .gt-channels-container-child #follow-button 29 | { 30 | background-color: rgba(0, 0, 0, 0); 31 | border-style: none; 32 | box-shadow: none; 33 | background-image: none; 34 | border-style: none; 35 | padding: 0px; 36 | } 37 | 38 | .gt-channels-container-child #follow-button:hover image 39 | { 40 | transition: 150ms ease-in-out; 41 | color: gold; 42 | } 43 | 44 | .gt-channels-container-child #follow-button image 45 | { 46 | transition: 150ms ease-in-out; 47 | color: rgba(109, 115, 128, 1); 48 | } 49 | 50 | .gt-channels-container-child #follow-button:checked image 51 | { 52 | color: gold; 53 | } 54 | 55 | .gt-channels-container-child-offline image 56 | { 57 | -gtk-icon-effect: dim; 58 | } 59 | 60 | .gt-channels-container-child-offline name-label, 61 | .gt-channels-container-child-offline game-label 62 | 63 | { 64 | color: alpha(currentColor,0.55); 65 | } 66 | 67 | .gt-player #buffer-box 68 | { 69 | background-color: black; 70 | border-radius: 4px; 71 | opacity: 0.8; 72 | padding: 7px; 73 | } 74 | 75 | .gt-chat textview, 76 | .gt-chat textview text 77 | { 78 | background-color: transparent; 79 | } 80 | 81 | .gt-chat entry 82 | { 83 | background-color: transparent; 84 | background-image: none; 85 | } 86 | 87 | .gt-chat textview.light-theme text 88 | { 89 | color: rgba(50, 50, 62, 1.0); 90 | } 91 | 92 | .gt-chat textview.dark-theme text 93 | { 94 | color: rgba(255, 255, 255, 1.0); 95 | } 96 | 97 | .gt-chat textview:selected, 98 | .gt-chat textview:selected 99 | { 100 | color: @selected_fg_color; 101 | background-color: @selected_bg_color; 102 | } 103 | 104 | .gt-chat entry.light-theme 105 | { 106 | color: rgba(0, 0, 0, 1); 107 | border-color: rgba(204, 204, 204, 1.0); 108 | } 109 | 110 | .gt-chat entry.dark-theme 111 | { 112 | color: rgba(255, 255, 255, 1.0); 113 | border-color: rgba(81, 81, 85, 1.0); 114 | } 115 | 116 | .gt-player #empty-link-button, 117 | .gt-item-container #empty-link-button, 118 | .gt-channels-container-child #error-link-button 119 | { 120 | padding-left: 0px; 121 | padding-right: 0px; 122 | } 123 | 124 | .gt-item-container #empty-label, 125 | .gt-player #empty-label 126 | { 127 | font-weight: bold; 128 | font-size: large; 129 | } 130 | 131 | .gt-item-container #empty-sub-label, 132 | .gt-item-container #empty-link-button, 133 | .gt-player #empty-sub-label, 134 | .gt-player #empty-link-button, 135 | .gt-channels-container-child #error-link-button, 136 | .link-sub-label 137 | { 138 | font-weight: lighter; 139 | font-size: small; 140 | } 141 | 142 | button.link-sub-label > label 143 | { 144 | text-decoration-line: none; 145 | } 146 | 147 | #chat-entry.popup-open image 148 | { 149 | transition: 300ms ease-in-out; 150 | color: lighter(currentColor); 151 | } 152 | 153 | #chat-entry image 154 | { 155 | transition: 300ms ease-in-out; 156 | } 157 | 158 | @keyframes blinker 159 | { 160 | 0% { border-color: black; } 161 | 50% { border-color: red; } 162 | 100% { border-color: black; } 163 | } 164 | 165 | .gt-player.edit-chat .gt-chat 166 | { 167 | border-style: solid; 168 | border-width: 4px; 169 | border-color: red; 170 | /* animation: blinker 1s linear infinite; */ 171 | } 172 | 173 | .gt-error-dlg #info-label, 174 | .gt-error-dlg #error-label 175 | { 176 | font-weight: bold; 177 | } 178 | 179 | .gt-channels-container-child #error-box 180 | { 181 | border-color: black; 182 | border-width: 1px; 183 | border-style: solid; 184 | } 185 | 186 | .gt-player #player-controls 187 | { 188 | background-color: rgba(0, 0, 0, 0.7); 189 | } 190 | 191 | .gt-player #player-controls button { 192 | background: none; 193 | border: none; 194 | outline: none; 195 | box-shadow: none; 196 | } 197 | 198 | .gt-player #player-controls button:hover { 199 | color: darker(currentColor); 200 | } 201 | -------------------------------------------------------------------------------- /data/packages/flatpak/com.vinszent.GnomeTwitch.json: -------------------------------------------------------------------------------- 1 | { 2 | "app-id": "com.vinszent.GnomeTwitch", 3 | "branch": "stable", 4 | 5 | "runtime": "org.gnome.Platform", 6 | "runtime-version": "3.22", 7 | "sdk": "org.gnome.Sdk", 8 | 9 | "command": "gnome-twitch", 10 | 11 | "finish-args": [ 12 | "--share=ipc", 13 | "--socket=x11", 14 | "--socket=wayland", 15 | "--socket=pulseaudio", 16 | "--share=network", 17 | "--filesystem=xdg-run/dconf", 18 | "--filesystem=~/.config/dconf:ro", 19 | "--talk-name=ca.desrt.dconf", 20 | "--env=DCONF_USER_CONFIG_DIR=.config/dconf" 21 | ], 22 | "build-options" : { 23 | "cflags": "-O2 -g", 24 | "cxxflags": "-O2 -g" 25 | }, 26 | "cleanup": [ 27 | "*.la", 28 | "*.a", 29 | "/include", 30 | "/lib/pkgconfig", 31 | "/share/pkgconfig", 32 | "/share/aclocal", 33 | "/man", 34 | "/share/bash-completion", 35 | "/share/gtk-doc", 36 | "/share/man" 37 | ], 38 | "modules": [ 39 | { 40 | "name": "ninja", 41 | "cleanup": [ "*" ], 42 | "sources": [ 43 | { 44 | "type": "git", 45 | "url": "https://github.com/ninja-build/ninja.git", 46 | "branch": "v1.7.1" 47 | }, 48 | { 49 | "type": "script", 50 | "dest-filename": "configure", 51 | "commands": [ 52 | "./configure.py --bootstrap" 53 | ] 54 | }, 55 | { 56 | "type": "script", 57 | "dest-filename": "Makefile", 58 | "commands": [ 59 | "all:", 60 | "install:", 61 | "\tinstall -D ninja /app/bin/ninja" 62 | ] 63 | } 64 | ] 65 | }, 66 | { 67 | "name": "meson", 68 | "cleanup": [ "*" ], 69 | "sources": [ 70 | { 71 | "type": "git", 72 | "url": "https://github.com/mesonbuild/meson.git", 73 | "branch": "0.33.0" 74 | }, 75 | { 76 | "type": "script", 77 | "dest-filename": "configure", 78 | "commands": [ "" ] 79 | }, 80 | { 81 | "type": "script", 82 | "dest-filename": "Makefile", 83 | "commands": [ 84 | "all:", 85 | "install:", 86 | "\tpython3 ./setup.py install --prefix=/app/" 87 | ] 88 | } 89 | ] 90 | }, 91 | { 92 | "name": "yasm", 93 | "cleanup": [ "*" ], 94 | "sources": [ 95 | { 96 | "type": "archive", 97 | "url": "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz", 98 | "sha256": "3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f" 99 | } 100 | ] 101 | }, { 102 | "name": "gst-libav", 103 | "cleanup": [ 104 | "/bin/*", 105 | "/lib/peas-demo" 106 | ], 107 | "sources": [ 108 | { 109 | "type": "git", 110 | "url": "git://anongit.freedesktop.org/gstreamer/gst-libav", 111 | "branch": "1.8" 112 | } 113 | ] 114 | }, { 115 | "name": "libpeas", 116 | "cleanup": [ 117 | "/bin/*", 118 | "/lib/peas-demo" 119 | ], 120 | "sources": [ 121 | { 122 | "type": "git", 123 | "url": "git://git.gnome.org/libpeas", 124 | "branch": "libpeas-1.18.0" 125 | } 126 | ] 127 | }, { 128 | "name": "gnome-twitch", 129 | "subdir": "data/packages/flatpak", 130 | "sources": [ 131 | { 132 | "type": "git", 133 | "url": "https://github.com/vinszent/gnome-twitch.git", 134 | "branch": "master" 135 | } 136 | ] 137 | } 138 | ] 139 | } 140 | -------------------------------------------------------------------------------- /src/gt-channel-container-view.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include "gt-channel-container-view.h" 20 | #include "gt-top-channel-container.h" 21 | #include "gt-search-channel-container.h" 22 | #include 23 | 24 | #define TAG "GtChannelContainerView" 25 | #include "gnome-twitch/gt-log.h" 26 | 27 | typedef struct 28 | { 29 | GtkWidget* offline_check_button; 30 | GtkWidget* popover_box; 31 | GtkWidget* search_popover; 32 | 33 | GtTopChannelContainer* top_container; 34 | GtSearchChannelContainer* search_container; 35 | } GtChannelContainerViewPrivate; 36 | 37 | G_DEFINE_TYPE_WITH_PRIVATE(GtChannelContainerView, gt_channel_container_view, GT_TYPE_CONTAINER_VIEW); 38 | 39 | static void 40 | search_active_cb(GObject* obj, 41 | GParamSpec* pspec, gpointer udata) 42 | { 43 | GtChannelContainerView* self = GT_CHANNEL_CONTAINER_VIEW(udata); 44 | GtChannelContainerViewPrivate* priv = gt_channel_container_view_get_instance_private(self); 45 | GtkWidget* container_stack = gt_container_view_get_container_stack( 46 | GT_CONTAINER_VIEW(self)); 47 | 48 | if (gt_container_view_get_search_active(GT_CONTAINER_VIEW(self))) 49 | gtk_stack_set_visible_child(GTK_STACK(container_stack), GTK_WIDGET(priv->search_container)); 50 | else 51 | gtk_stack_set_visible_child(GTK_STACK(container_stack), GTK_WIDGET(priv->top_container)); 52 | } 53 | 54 | static void 55 | refresh(GtContainerView* view) 56 | { 57 | g_assert(GT_IS_CHANNEL_CONTAINER_VIEW(view)); 58 | 59 | GtkWidget* container = gtk_stack_get_visible_child( 60 | GTK_STACK(gt_container_view_get_container_stack(view))); 61 | 62 | g_assert(GT_IS_ITEM_CONTAINER(container)); 63 | 64 | gt_item_container_refresh(GT_ITEM_CONTAINER(container)); 65 | } 66 | 67 | static void 68 | constructed(GObject* obj) 69 | { 70 | GtChannelContainerView* self = GT_CHANNEL_CONTAINER_VIEW(obj); 71 | GtChannelContainerViewPrivate* priv = gt_channel_container_view_get_instance_private(self); 72 | GtkWidget* search_entry = gt_container_view_get_search_entry(GT_CONTAINER_VIEW(self)); 73 | 74 | gt_container_view_set_search_popover_widget(GT_CONTAINER_VIEW(self), priv->popover_box); 75 | 76 | gt_container_view_add_container(GT_CONTAINER_VIEW(self), 77 | GT_ITEM_CONTAINER(priv->top_container)); 78 | 79 | gt_container_view_add_container(GT_CONTAINER_VIEW(self), 80 | GT_ITEM_CONTAINER(priv->search_container)); 81 | 82 | g_signal_connect(self, "notify::search-active", G_CALLBACK(search_active_cb), self); 83 | 84 | g_object_bind_property(search_entry, "text", priv->search_container, "query", G_BINDING_DEFAULT); 85 | 86 | G_OBJECT_CLASS(gt_channel_container_view_parent_class)->constructed(obj); 87 | } 88 | 89 | static void 90 | gt_channel_container_view_class_init(GtChannelContainerViewClass* klass) 91 | { 92 | G_OBJECT_CLASS(klass)->constructed = constructed; 93 | 94 | GT_CONTAINER_VIEW_CLASS(klass)->refresh = refresh; 95 | } 96 | 97 | static void 98 | gt_channel_container_view_init(GtChannelContainerView* self) 99 | { 100 | GtChannelContainerViewPrivate* priv = gt_channel_container_view_get_instance_private(self); 101 | 102 | priv->offline_check_button = gtk_check_button_new_with_label(_("Include offline channels")); 103 | priv->popover_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 10); 104 | 105 | g_object_set(priv->popover_box, "margin", 10, NULL); 106 | 107 | gtk_box_pack_start(GTK_BOX(priv->popover_box), priv->offline_check_button, FALSE, FALSE, 0); 108 | 109 | priv->top_container = gt_top_channel_container_new(); 110 | priv->search_container = gt_search_channel_container_new(); 111 | 112 | g_object_bind_property(priv->offline_check_button, "active", 113 | priv->search_container, "search-offline", G_BINDING_DEFAULT); 114 | } 115 | -------------------------------------------------------------------------------- /src/gt-player-backend.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of GNOME Twitch - 'Enjoy Twitch on your GNU/Linux desktop' 3 | * Copyright © 2017 Vincent Szolnoky 4 | * 5 | * GNOME Twitch is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * GNOME Twitch is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with GNOME Twitch. If not, see . 17 | */ 18 | 19 | #include "gnome-twitch/gt-player-backend.h" 20 | 21 | #define TAG "GtPlayerBackend" 22 | #include "gnome-twitch/gt-log.h" 23 | 24 | G_DEFINE_INTERFACE(GtPlayerBackend, gt_player_backend, G_TYPE_OBJECT) 25 | 26 | static const GEnumValue gt_player_backend_state_enum_values[] = 27 | { 28 | {GT_PLAYER_BACKEND_STATE_PLAYING, "GT_PLAYER_BACKEND_STATE_PLAYING", "playing"}, 29 | {GT_PLAYER_BACKEND_STATE_PAUSED, "GT_PLAYER_BACKEND_STATE_PAUSED", "paused"}, 30 | {GT_PLAYER_BACKEND_STATE_STOPPED, "GT_PLAYER_BACKEND_STATE_STOPPED", "stopped"}, 31 | {GT_PLAYER_BACKEND_STATE_BUFFERING, "GT_PLAYER_STATE_BACKEND_BUFFERING", "buffering"}, 32 | {GT_PLAYER_BACKEND_STATE_LOADING, "GT_PLAYER_STATE_BACKEND_LOADING", "loading"}, 33 | {0, NULL, NULL}, 34 | }; 35 | 36 | GType 37 | gt_player_backend_state_get_type() 38 | { 39 | static GType type = 0; 40 | 41 | if (!type) 42 | type = g_enum_register_static("GtPlayerBackendState", gt_player_backend_state_enum_values); 43 | 44 | return type; 45 | } 46 | 47 | static void 48 | gt_player_backend_default_init(GtPlayerBackendInterface* iface) 49 | { 50 | g_object_interface_install_property(iface, g_param_spec_double("volume", "Volume", "Current volume", 51 | 0, 1.0, 0.3, G_PARAM_READWRITE)); 52 | 53 | g_object_interface_install_property(iface, g_param_spec_enum("state", "State", "Current state", 54 | GT_TYPE_PLAYER_BACKEND_STATE, GT_PLAYER_BACKEND_STATE_STOPPED, G_PARAM_READABLE)); 55 | 56 | g_object_interface_install_property(iface, g_param_spec_double("buffer-fill", "buffer-fill", "Current buffer fill", 57 | 0, 1.0, 0, G_PARAM_READABLE)); 58 | 59 | g_object_interface_install_property(iface, g_param_spec_int64("duration", "Duration", "Current duration", 60 | 0, G_MAXINT64, 0, G_PARAM_READABLE)); 61 | 62 | g_object_interface_install_property(iface, g_param_spec_int64("position", "Position", "Current position", 63 | 0, G_MAXINT64, 0, G_PARAM_READABLE)); 64 | 65 | g_object_interface_install_property(iface, g_param_spec_boolean("seekable", "Seekable", "Whether seekable", 66 | FALSE, G_PARAM_READABLE)); 67 | } 68 | 69 | GtkWidget* 70 | gt_player_backend_get_widget(GtPlayerBackend* backend) 71 | { 72 | g_assert(GT_IS_PLAYER_BACKEND(backend)); 73 | g_assert_nonnull(GT_PLAYER_BACKEND_GET_IFACE(backend)->get_widget); 74 | 75 | return GT_PLAYER_BACKEND_GET_IFACE(backend)->get_widget(backend); 76 | } 77 | 78 | void 79 | gt_player_backend_play(GtPlayerBackend* backend) 80 | { 81 | RETURN_IF_FAIL(GT_IS_PLAYER_BACKEND(backend)); 82 | 83 | GT_PLAYER_BACKEND_GET_IFACE(backend)->play(backend); 84 | } 85 | 86 | void 87 | gt_player_backend_stop(GtPlayerBackend* backend) 88 | { 89 | RETURN_IF_FAIL(GT_IS_PLAYER_BACKEND(backend)); 90 | 91 | GT_PLAYER_BACKEND_GET_IFACE(backend)->stop(backend); 92 | } 93 | 94 | void 95 | gt_player_backend_pause(GtPlayerBackend* backend) 96 | { 97 | RETURN_IF_FAIL(GT_IS_PLAYER_BACKEND(backend)); 98 | 99 | GT_PLAYER_BACKEND_GET_IFACE(backend)->pause(backend); 100 | } 101 | 102 | void 103 | gt_player_backend_set_uri(GtPlayerBackend* backend, const gchar* uri) 104 | { 105 | RETURN_IF_FAIL(GT_IS_PLAYER_BACKEND(backend)); 106 | 107 | GT_PLAYER_BACKEND_GET_IFACE(backend)->set_uri(backend, uri); 108 | } 109 | 110 | void 111 | gt_player_backend_set_position(GtPlayerBackend* backend, gint64 position) 112 | { 113 | RETURN_IF_FAIL(GT_IS_PLAYER_BACKEND(backend)); 114 | 115 | GT_PLAYER_BACKEND_GET_IFACE(backend)->set_position(backend, position); 116 | } 117 | 118 | GtPlayerBackendState 119 | gt_player_backend_get_state(GtPlayerBackend* backend) 120 | { 121 | RETURN_VAL_IF_FAIL(GT_IS_PLAYER_BACKEND(backend), GT_PLAYER_BACKEND_STATE_STOPPED); 122 | 123 | GtPlayerBackendState state; 124 | 125 | g_object_get(backend, "state", &state, NULL); 126 | 127 | return state; 128 | } 129 | --------------------------------------------------------------------------------