public NowPlayingInterface()
        {
            GtkElementsService service = ServiceManager.Get <GtkElementsService> ();

            primary_window = service.PrimaryWindow;

            Contents = new NowPlayingContents();

            // This is my really sweet hack - it's where the video widget
            // is sent when the source is not active. This keeps the video
            // widget from being completely destroyed, causing problems with
            // its internal windowing and GstXOverlay. It's also conveniently
            // the window that is used to do fullscreen video. Sweeeeeeeeeet.
            video_window         = new FullscreenWindow(service.PrimaryWindow);
            video_window.Hidden += OnFullscreenWindowHidden;
            video_window.Realize();
            video_window.Add(Contents);

            frame = new Hyena.Widgets.RoundedFrame();
            frame.SetFillColor(new Cairo.Color(0, 0, 0));
            frame.DrawBorder = false;
            frame.Show();

            PackStart(frame, true, true, 0);

            fullscreen_adapter = new FullscreenAdapter();
            fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen;
            screensaver = new ScreensaverManager();
        }
        public NowPlayingInterface ()
        {
            GtkElementsService service = ServiceManager.Get<GtkElementsService> ();
            primary_window = service.PrimaryWindow;

            Contents = new NowPlayingContents ();

            // This is my really sweet hack - it's where the video widget
            // is sent when the source is not active. This keeps the video
            // widget from being completely destroyed, causing problems with
            // its internal windowing and GstXOverlay. It's also conveniently
            // the window that is used to do fullscreen video. Sweeeeeeeeeet.
            video_window = new FullscreenWindow (service.PrimaryWindow);
            video_window.Hidden += OnFullscreenWindowHidden;
            video_window.Realize ();
            video_window.Add (Contents);

            frame = new Hyena.Widgets.RoundedFrame ();
            frame.SetFillColor (new Cairo.Color (0, 0, 0));
            frame.DrawBorder = false;
            frame.Show ();

            PackStart (frame, true, true, 0);

            fullscreen_adapter = new FullscreenAdapter ();
            fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen;
            screensaver = new ScreensaverManager ();
        }
Exemple #3
0
        public NowPlayingInterface()
        {
            GtkElementsService service = ServiceManager.Get <GtkElementsService> ();

            primary_window = service.PrimaryWindow;

            Contents = new NowPlayingContents();
            Contents.ButtonPressEvent += (o, a) => {
                if (a.Event.Type == Gdk.EventType.TwoButtonPress)
                {
                    var iaservice = ServiceManager.Get <InterfaceActionService> ();
                    var action    = iaservice.ViewActions["FullScreenAction"] as Gtk.ToggleAction;
                    if (action != null && action.Sensitive)
                    {
                        action.Active = !action.Active;
                    }
                }
            };

            // This is my really sweet hack - it's where the video widget
            // is sent when the source is not active. This keeps the video
            // widget from being completely destroyed, causing problems with
            // its internal windowing and GstXOverlay. It's also conveniently
            // the window that is used to do fullscreen video. Sweeeeeeeeeet.
            video_window         = new FullscreenWindow(service.PrimaryWindow);
            video_window.Hidden += OnFullscreenWindowHidden;
            video_window.Realize();
            video_window.Add(Contents);

            frame = new Hyena.Widgets.RoundedFrame();
            frame.SetFillColor(new Cairo.Color(0, 0, 0));
            frame.DrawBorder = false;
            frame.Show();

            PackStart(frame, true, true, 0);

            fullscreen_adapter = new FullscreenAdapter();
            fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen;
            screensaver = new ScreensaverManager();
        }
        public NowPlayingInterface()
        {
            GtkElementsService service = ServiceManager.Get <GtkElementsService> ();

            primary_window = service.PrimaryWindow;

            Contents = new NowPlayingContents();

            fullscreen_window         = new FullscreenWindow(primary_window);
            fullscreen_window.Hidden += OnFullscreenWindowHidden;

            frame = new Hyena.Widgets.RoundedFrame();
            frame.SetFillColor(new Cairo.Color(0, 0, 0));
            frame.DrawBorder = false;
            frame.Child      = Contents;
            frame.Show();

            PackStart(frame, true, true, 0);

            fullscreen_adapter = new FullscreenAdapter();
            fullscreen_adapter.SuggestUnfullscreen += OnAdapterSuggestUnfullscreen;
            screensaver = new ScreensaverManager();
        }
Exemple #5
0
 private void OnCreateVideoWindow(PlayerEventArgs args)
 {
     ServiceManager.PlayerEngine.DisconnectEvent(OnCreateVideoWindow);
     NowPlayingContents.CreateVideoDisplay();
 }