Exemple #1
0
void playerWindow::on_fullscreen_clicked
(
	void
)
{
	// hide all useless stuff for fullscreen mode
	menubar->set_visible(!menubar->get_visible());
	borderleft->set_visible(!borderleft->get_visible());
	borderright->set_visible(!borderright->get_visible());
	// show/hide window decoration 
	set_decorated(!get_decorated());
	// switch between the fullscreen and the unfullscreen button
	unfullscreenBtn->set_visible(!unfullscreenBtn->get_visible());
	fullscreenBtn->set_visible(!fullscreenBtn->get_visible());
	// switch between fullscreen and a decorated window 
	(get_decorated()) ? unmaximize () : maximize ();
	(get_decorated()) ? unfullscreen() : fullscreen();
	// set the fullscreen state
	isFullscreen = !isFullscreen;
	/* Call timeout function at a 3000ms interval to hide or show 
	player controls when it is in fullscreen mode. When the window 
	is no more in the fullscreen mode, timeout signals are
	disconnected motion detector */
	if (isFullscreen) { 
		// set the timer to call periodically the timeout function
		timeout_fullscreen =  Glib::signal_timeout().connect
		(
			sigc::mem_fun
			(
				*this, 
				&playerWindow::on_timeout_fullscreen
			), 
			3000
		);
		// set a motion detector into the drawing area
		mouse_motion_signal_drawingArea = 
			videoDrawingArea->signal_motion_notify_event().connect
		(
			sigc::mem_fun
			(
				*this, 
				&playerWindow::on_mousemove
			)
		);
		/* set the focus into the drawing area. Without the focus, 
		the motion detection doesn't occurs when a movie is playing*/
		videoDrawingArea->set_can_focus
		(
			!videoDrawingArea->get_can_focus()
		);
		// next trigger to attempt to hide the mediaplayer controler
		nextmotiondetection = time(NULL)+3;
	} else {
		// disconnect signals
		timeout_fullscreen.disconnect() ;
		mouse_motion_signal_drawingArea.disconnect();
		// remove the focus
		videoDrawingArea->set_can_focus(!videoDrawingArea->get_can_focus());
	}
}
Exemple #2
0
void MainWindow::on_view_fullscreen() {
	if(m_itemViewFullscreen->property_active()) {
		fullscreen();
	}
	else {
		unfullscreen();
	}
}
void Window::vToggleFullscreen()
{
    if (!m_bFullscreen) {
        fullscreen();
        m_poMenuBar->hide();
    } else {
        unfullscreen();
        m_poMenuBar->show();
    }
}
Exemple #4
0
void mixer_window::toggle_fullscreen()
{
    fullscreen_state_ = !fullscreen_state_;

    if(fullscreen_state_)
    {
    	fullscreen();
    } else {
    	unfullscreen();
    }
}