2008-11-30 22:31:20 +00:00
|
|
|
/** \file server/screenlist.h
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* This file is part of LCDd, the lcdproc server.
|
2001-12-27 23:30:36 +00:00
|
|
|
*
|
2008-11-30 22:31:20 +00:00
|
|
|
* This file is released under the GNU General Public License.
|
|
|
|
|
* Refer to the COPYING file distributed with this package.
|
2001-12-27 23:30:36 +00:00
|
|
|
*
|
2011-01-05 23:34:37 +00:00
|
|
|
* Copyright (c) 1999, William Ferrell, Selene Scriven
|
2003-02-27 21:20:20 +00:00
|
|
|
* 2003, Joris Robijn
|
2001-12-27 23:30:36 +00:00
|
|
|
*/
|
|
|
|
|
|
1999-12-09 23:15:14 +00:00
|
|
|
#ifndef SCREENLIST_H
|
|
|
|
|
#define SCREENLIST_H
|
|
|
|
|
|
|
|
|
|
#include "screen.h"
|
|
|
|
|
|
2011-01-19 19:08:37 +00:00
|
|
|
#define AUTOROTATE_OFF 0
|
|
|
|
|
#define AUTOROTATE_ON 1
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2011-01-19 19:08:37 +00:00
|
|
|
extern bool autorotate; /**< If enabled, screens will rotate */
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
int screenlist_init(void);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Initializes the screenlist. */
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
int screenlist_shutdown(void);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Shuts down the screenlist. */
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
int screenlist_add(Screen *s);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Adds a screen to the screenlist. */
|
1999-12-09 23:15:14 +00:00
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
int screenlist_remove(Screen *s);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Removes a screen from the screenlist. */
|
|
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
void screenlist_process(void);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Processes the screenlist. Decides if we need to switch to an other
|
|
|
|
|
* screen. */
|
|
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
void screenlist_switch(Screen *s);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Switches to an other screen in the proper way. Informs clients of
|
|
|
|
|
* the switch. ALWAYS USE THIS FUNCTION TO SWITCH SCREENS. */
|
|
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
Screen *screenlist_current(void);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Returns the currently active screen. */
|
|
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
int screenlist_goto_next(void);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Moves on to the next screen. */
|
|
|
|
|
|
2007-04-02 21:29:53 +00:00
|
|
|
int screenlist_goto_prev(void);
|
2003-02-27 21:20:20 +00:00
|
|
|
/* Moves on to the previous screen. */
|
1999-12-09 23:15:14 +00:00
|
|
|
|
|
|
|
|
#endif
|