mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
30 lines
673 B
JavaScript
30 lines
673 B
JavaScript
const { GObject, Gtk } = imports.gi;
|
|
const Misc = imports.clapper_src.misc;
|
|
const { PlayerRemote } = imports.clapper_src.playerRemote;
|
|
|
|
var WidgetRemote = GObject.registerClass(
|
|
class ClapperWidgetRemote extends Gtk.Grid
|
|
{
|
|
_init(opts)
|
|
{
|
|
super._init();
|
|
|
|
Misc.loadCustomCss();
|
|
|
|
this.player = new PlayerRemote();
|
|
this.player.webclient.passMsgData = this.receiveWs.bind(this);
|
|
}
|
|
|
|
receiveWs(action, value)
|
|
{
|
|
switch(action) {
|
|
case 'close':
|
|
let root = this.get_root();
|
|
root.run_dispose();
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
});
|