2021-11-20 19:34:34 +00:00
|
|
|
#ifndef _STATE_H
|
|
|
|
#define _STATE_H
|
|
|
|
|
2021-12-04 17:14:07 +00:00
|
|
|
#include "geom.h"
|
|
|
|
|
2021-11-20 20:01:49 +00:00
|
|
|
#include <stdbool.h>
|
2021-11-20 19:48:37 +00:00
|
|
|
|
2021-11-20 20:22:36 +00:00
|
|
|
/*****************
|
|
|
|
* Pointer types *
|
|
|
|
*****************/
|
2021-11-20 19:34:34 +00:00
|
|
|
|
2021-11-20 20:22:36 +00:00
|
|
|
typedef struct ClientSizeHints *ClientSizeHints;
|
2021-11-20 20:27:23 +00:00
|
|
|
typedef struct ClientState *ClientState;
|
2021-11-20 20:22:36 +00:00
|
|
|
|
|
|
|
/**************
|
|
|
|
* Structures *
|
|
|
|
**************/
|
|
|
|
|
|
|
|
struct ClientSizeHints {
|
2021-11-20 19:34:34 +00:00
|
|
|
float mina, maxa;
|
|
|
|
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
|
2021-11-20 20:22:36 +00:00
|
|
|
};
|
2021-11-20 19:34:34 +00:00
|
|
|
|
2021-11-20 20:22:36 +00:00
|
|
|
struct ClientState {
|
2021-11-20 19:34:34 +00:00
|
|
|
char name[256];
|
2021-12-04 17:44:06 +00:00
|
|
|
struct WinGeom geom;
|
2021-11-20 20:01:49 +00:00
|
|
|
bool is_fixed, is_floating, is_urgent, never_focus, is_fullscreen;
|
2021-11-20 20:22:36 +00:00
|
|
|
};
|
|
|
|
|
2021-11-21 00:32:59 +00:00
|
|
|
/**************************
|
|
|
|
* Default init functions *
|
|
|
|
**************************/
|
2021-11-20 20:16:53 +00:00
|
|
|
|
|
|
|
void client_size_hints_init(ClientSizeHints client_size_hints);
|
|
|
|
void client_state_init(ClientState client_state);
|
2021-11-20 19:34:34 +00:00
|
|
|
|
2021-11-21 00:32:59 +00:00
|
|
|
/***********************
|
|
|
|
* Modifying functions *
|
|
|
|
***********************/
|
|
|
|
|
2021-11-20 19:48:37 +00:00
|
|
|
void client_size_hints_update(
|
|
|
|
ClientSizeHints size_hints,
|
|
|
|
const XSizeHints *size
|
|
|
|
);
|
|
|
|
|
2021-11-20 19:34:34 +00:00
|
|
|
#endif // _STATE_H
|