9 #include <sigc++/sigc++.h>
25 std::string get_socketpath();
186 std::list< std::shared_ptr<container_t> > nodes;
196 std::shared_ptr<workspace_t>
old;
247 connection(
const std::string& socket_path = get_socketpath());
261 std::vector< std::shared_ptr<workspace_t> >
get_workspaces()
const;
267 std::vector< std::shared_ptr<output_t> >
get_outputs()
const;
279 std::shared_ptr<container_t>
get_tree()
const;
292 std::shared_ptr<bar_config_t>
get_bar_config(
const std::string& name)
const;
335 sigc::signal<void, EventType, const std::shared_ptr<const buf_t>&>
signal_event;
337 void prepare_to_event_handling();
339 const int32_t m_main_socket;
340 int32_t m_event_socket;
341 int32_t m_subscriptions;
342 const std::string m_socket_path;
std::vector< std::shared_ptr< output_t > > get_outputs() const
Request a list of outputs.
bool binding_mode_indicator
Display the mode indicator or not? Defaults to true.
Definition: ipc.hpp:231
bool urgent
Is the workspace is urgent.
Definition: ipc.hpp:45
i3's workspace
Definition: ipc.hpp:40
Output mode event.
Definition: ipc.hpp:78
std::string current_workspace
Name of current workspace.
Definition: ipc.hpp:56
BorderStyle
A style of a container's border.
Definition: ipc.hpp:112
A binding.
Definition: ipc.hpp:212
std::vector< std::string > event_state_mask
The group and modifier keys that were configured with this binding.
Definition: ipc.hpp:214
Output event.
Definition: ipc.hpp:77
int32_t get_event_socket_fd()
Get the fd of the event socket.
rect_t rect
The absolute display coordinates for this container.
Definition: ipc.hpp:179
InputType
A type of the input of bindings.
Definition: ipc.hpp:138
bool send_command(const std::string &command) const
Send a command to i3.
uint64_t id
The internal ID (actually a C pointer value) of this container. Do not make any assumptions about it...
Definition: ipc.hpp:169
Title of window has been changed.
std::string type
Type of this container.
Definition: ipc.hpp:172
WindowEventType
Types of window events.
Definition: ipc.hpp:97
int x
Position on X axis.
Definition: ipc.hpp:31
Definition: ipc-util.hpp:12
std::string font
The font to use for text on the bar.
Definition: ipc.hpp:229
WorkspaceEventType
Types of workspace events.
Definition: ipc.hpp:87
std::string output
An output of the workspace.
Definition: ipc.hpp:47
uint32_t patch
Patch number of i3.
Definition: ipc.hpp:68
A workspace event.
Definition: ipc.hpp:193
bool verbose
Should the bar enable verbose output for debugging? Defaults to false.
Definition: ipc.hpp:232
std::string id
The ID for this bar. Included in case you request multiple configurations and want to differentiate t...
Definition: ipc.hpp:225
bool workspace_buttons
Display workspace buttons or not? Defaults to true.
Definition: ipc.hpp:230
BorderStyle border
A style of the container's border.
Definition: ipc.hpp:173
Primitive of rectangle.
Definition: ipc.hpp:30
float percent
The percentage which this container takes in its parent. A value of < 0 means that the percent proper...
Definition: ipc.hpp:178
std::string name
Name of the workspace.
Definition: ipc.hpp:42
A node of tree of windows.
Definition: ipc.hpp:168
sigc::signal< void > signal_mode_event
Output mode event signal.
Definition: ipc.hpp:331
uint32_t minor
Minor version of i3.
Definition: ipc.hpp:67
void handle_event()
Handle an event from i3.
connection(const std::string &socket_path=get_socketpath())
Connect to the i3.
Version of i3.
Definition: ipc.hpp:63
ContainerLayout
A type of a container's layout.
Definition: ipc.hpp:124
sigc::signal< void, const window_event_t & > signal_window_event
Window event signal.
Definition: ipc.hpp:332
bool subscribe(const int32_t events)
Subscribe on an events of i3.
rect_t rect
Size of the output.
Definition: ipc.hpp:57
i3's output
Definition: ipc.hpp:53
std::string command
The i3 command that is configured to run for this binding.
Definition: ipc.hpp:213
sigc::signal< void > signal_output_event
Output event signal.
Definition: ipc.hpp:330
int y
Position on Y axis.
Definition: ipc.hpp:32
uint32_t current_border_width
Number of pixels of the border width.
Definition: ipc.hpp:175
std::shared_ptr< container_t > container
A container event associated with.
Definition: ipc.hpp:205
std::shared_ptr< workspace_t > current
Current focused workspace.
Definition: ipc.hpp:195
std::string status_command
Command which will be run to generate a statusline. Each line on stdout of this command will be displ...
Definition: ipc.hpp:228
std::shared_ptr< bar_config_t > get_bar_config(const std::string &name) const
Request a barconfig.
std::vector< std::string > get_bar_configs_list() const
Request a list of names of available barconfigs.
std::string border_raw
A "border" field of TREE reply. NOT empty only if border equals BorderStyle::UNKNOWN.
Definition: ipc.hpp:174
The bar does not show unless a specific key is pressed.
Connection to the i3.
Definition: ipc.hpp:241
std::shared_ptr< workspace_t > old
Old (previous) workspace.
Definition: ipc.hpp:196
std::string name
Name of the output.
Definition: ipc.hpp:54
int num
Index of the worksapce.
Definition: ipc.hpp:41
Binding event.
Definition: ipc.hpp:81
std::string loaded_config_file_name
Path to current config of i3.
Definition: ipc.hpp:65
Position
A position (of a bar?)
Definition: ipc.hpp:158
int32_t input_code
If the binding was configured with bindcode, this will be the key code that was given for the binding...
Definition: ipc.hpp:215
A window event.
Definition: ipc.hpp:203
EventType
Types of the events of i3.
Definition: ipc.hpp:75
uint32_t major
Major version of i3.
Definition: ipc.hpp:66
uint64_t xwindow_id
The X11 window ID of the actual client window inside this container. This field is set to null for sp...
Definition: ipc.hpp:170
Window toggled floating mode.
bool active
Is the output currently active.
Definition: ipc.hpp:55
sigc::signal< void, const binding_t & > signal_binding_event
Binding event signal.
Definition: ipc.hpp:334
Window toggled to fullscreen mode.
version_t get_version() const
Request a version of i3.
std::shared_ptr< container_t > get_tree() const
Request a tree of windows.
The bar sets the dock window type.
Window event.
Definition: ipc.hpp:79
std::map< std::string, uint32_t > colors
Contains key/value pairs of colors. Each value is a color code in format 0xRRGGBB.
Definition: ipc.hpp:233
rect_t deco_rect
The coordinates of the window decoration inside its container. These coordinates are relative to the ...
Definition: ipc.hpp:181
BarMode
A mode of a bar.
Definition: ipc.hpp:148
int height
Height of rectangle.
Definition: ipc.hpp:34
ContainerLayout layout
A type of the container's layout.
Definition: ipc.hpp:176
Bar config update event.
Definition: ipc.hpp:80
bool focused
Is the workspace is currently focused.
Definition: ipc.hpp:44
sigc::signal< void, const workspace_event_t & > signal_workspace_event
Workspace event signal.
Definition: ipc.hpp:329
rect_t rect
A size of the workspace.
Definition: ipc.hpp:46
sigc::signal< void, const bar_config_t & > signal_barconfig_update_event
Barconfig update event signal.
Definition: ipc.hpp:333
Workspace event.
Definition: ipc.hpp:76
std::string name
The internal name of this container. For all containers which are part of the tree structure down to ...
Definition: ipc.hpp:171
std::vector< std::shared_ptr< workspace_t > > get_workspaces() const
Request a list of workspaces.
int width
Width of rectangle.
Definition: ipc.hpp:33
A bar configuration.
Definition: ipc.hpp:224
std::string symbol
If this is a keyboard binding that was configured with bindsym, this field will contain the given sym...
Definition: ipc.hpp:216
int32_t get_main_socket_fd()
Get the fd of the main socket.
i3 IPC message buffer
Definition: ipc-util.hpp:95
std::string human_readable
Human redable version string.
Definition: ipc.hpp:64
rect_t geometry
The original geometry the window specified when i3 mapped it. Used when switching a window to floatin...
Definition: ipc.hpp:182
sigc::signal< void, EventType, const std::shared_ptr< const buf_t > & > signal_event
i3 event signal
Definition: ipc.hpp:335
bool visible
Is the workspace visible.
Definition: ipc.hpp:43
rect_t window_rect
The coordinates of the actual client window inside its container. These coordinates are relative to t...
Definition: ipc.hpp:180
std::string layout_raw
A "layout" field of TREE reply. NOT empty only if layout equals ContainerLayout::UNKNOWN.
Definition: ipc.hpp:177