6
6
* COPYING file distributed with this package.
8
8
* Copyright (c) 1999, William Ferrell, Scott Scriven
16
/* These headers are placed here on purpose ! (circular references) */
15
21
#include "shared/LL.h"
18
typedef struct screen {
24
typedef enum { PRI_HIDDEN, PRI_BACKGROUND, PRI_INFO, PRI_FOREGROUND,
28
typedef struct Screen {
41
LinkedList *widgetlist;
42
struct Client *client;
32
48
extern int default_duration ;
33
49
extern int default_priority ;
35
screen *screen_create ();
36
int screen_destroy (screen * s);
38
screen *screen_find (client * c, char *id);
40
int screen_add (client * c, char *id);
41
int screen_remove (client * c, char *id);
53
/* Creates a new screen */
54
Screen * screen_create (char * id, Client * client);
56
/* Destroys a screen */
57
int screen_destroy (Screen * s);
59
/* Add a widget to a screen */
60
int screen_add_widget (Screen * s, Widget * w);
62
/* Remove a widget from a screen (does not destroy it) */
63
int screen_remove_widget (Screen * s, Widget * w);
66
static inline Widget * screen_getfirst_widget (Screen * s)
68
return (Widget *) ((s != NULL)
69
? LL_GetFirst(s->widgetlist)
73
static inline Widget * screen_getnext_widget (Screen * s)
75
return (Widget *) ((s != NULL)
76
? LL_GetNext(s->widgetlist)
81
/* Find a widget in a screen */
82
Widget *screen_find_widget (Screen * s, char *id);
84
/* Convert priority names to priority and vv */
85
Priority screen_pri_name_to_pri (char * pri_name);
86
char * screen_pri_to_pri_name (Priority pri);