2010-08-07 12:05:16 -04:00
|
|
|
/*
|
|
|
|
* i3bar - an xcb-based status- and ws-bar for i3
|
|
|
|
*
|
2011-07-31 10:16:17 -04:00
|
|
|
* © 2010-2011 Axel Wagner and contributors
|
2010-08-07 12:05:16 -04:00
|
|
|
*
|
|
|
|
* See file LICNSE for license information
|
|
|
|
*
|
|
|
|
*/
|
2010-07-21 19:15:18 -04:00
|
|
|
#ifndef OUTPUTS_H_
|
|
|
|
#define OUTPUTS_H_
|
|
|
|
|
|
|
|
#include <xcb/xcb.h>
|
|
|
|
|
2010-07-29 21:11:54 -04:00
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
typedef struct i3_output i3_output;
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-07-29 21:11:54 -04:00
|
|
|
SLIST_HEAD(outputs_head, i3_output);
|
|
|
|
struct outputs_head *outputs;
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-08-06 20:10:05 -04:00
|
|
|
/*
|
|
|
|
* Start parsing the received json-string
|
|
|
|
*
|
|
|
|
*/
|
2011-08-12 12:43:09 -04:00
|
|
|
void parse_outputs_json(char* json);
|
2010-08-06 20:10:05 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Initiate the output-list
|
|
|
|
*
|
|
|
|
*/
|
2011-08-12 12:43:09 -04:00
|
|
|
void init_outputs();
|
2010-08-06 20:10:05 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Returns the output with the given name
|
|
|
|
*
|
|
|
|
*/
|
2011-08-12 12:43:09 -04:00
|
|
|
i3_output* get_output_by_name(char* name);
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2010-07-29 21:11:54 -04:00
|
|
|
struct i3_output {
|
2011-08-12 12:43:09 -04:00
|
|
|
char* name; /* Name of the output */
|
|
|
|
bool active; /* If the output is active */
|
|
|
|
int ws; /* The number of the currently visible ws */
|
|
|
|
rect rect; /* The rect (relative to the root-win) */
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2011-08-12 12:43:09 -04:00
|
|
|
xcb_window_t bar; /* The id of the bar of the output */
|
|
|
|
xcb_pixmap_t buffer; /* An extra pixmap for double-buffering */
|
|
|
|
xcb_gcontext_t bargc; /* The graphical context of the bar */
|
2010-07-21 19:15:18 -04:00
|
|
|
|
2011-08-12 12:43:09 -04:00
|
|
|
struct ws_head *workspaces; /* The workspaces on this output */
|
2011-08-15 09:57:52 -04:00
|
|
|
struct tc_head *trayclients; /* The tray clients on this output */
|
2010-07-29 21:11:54 -04:00
|
|
|
|
2011-08-12 12:43:09 -04:00
|
|
|
SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
|
2010-07-21 19:15:18 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|