1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
//! # Fireplace Window Manager Library
//!
//! Fireplace is a modular wayland window manager.
//! This library can be used to build your own window manager by
//!
//! * adding additional functionality to fireplace
//! * replacing functionality of fireplace
//! * or just build upon the concepts of fireplace
//!
//! As a starting point you might want to fork the [`fireplace`](../fireplace)
//! binary
//! to get a functional window manager and use this library to implement your
//! changes.
//! By keeping your changes in the binary or even additional libraries you can
//! make
//! your changes/additions easier accessible to a broder audicence and your
//! fork does
//! not need to maintain a whole window manager with most of the functionality
//! still
//! kept in the unmodified `fireplace_lib` library.
//!
//! For a more low level wayland Rust Library take a look at:
//!
//! * [wlc](https://github.com/Drakulix/wlc) (used by fireplace)
//! * or even
//! [wayland-server](https://github.
//! com/vberger/wayland-client-rs/tree/master/wayland-server)
//!
//! # Concepts
//!
//! ## The `Callback` trait
//! To understand why fireplace was build the way it was, you need to
//! understand basics
//! of the underlying library [wlc](../wlc/):
//!
//! * The [`Callback`](../wlc/trait.Callback.html) Trait
//! * The [`View`](../wlc/struct.View.html) Struct
//! * The [`Output`](../wlc/struct.Output.html) Struct
//!
//! ### [`Output`](../wlc/struct.Output.html)
//! An `Output` represents a Display or the X Window when running Fireplace
//! nested in X.
//! In future there may be even more options. An Output is basically everthing
//! `wlc`
//! and therefor fireplace may render on.
//!
//! ### [`View`](../wlc/struct.View.html)
//! A `View` represents an Application Window in the most basic way.
//! Everything rendered by a wayland client is represented as a `View`.
//!
//! ### [`Callback`](../wlc/struct.Callback.html)
//! Any object implementing the `Callback` trait can be used by `wlc` to drive
//! the compositor.
//! It includes many optionally handled functions that represents events
//! changing the state
//! of the compositor.
//!
//! Some examples might be:
//!
//! * [`output_created`](../wlc/trait.Callback.html#method.output_created)
//! * [`output_destroyed`](../wlc/trait.Callback.html#method.output_destroyed)
//! * [`view_created`](../wlc/trait.Callback.html#method.view_created)
//! * [`view_destroyed`](../wlc/trait.Callback.html#method.view_destroyed)
//! * [`pointer_motion`](../wlc/trait.Callback.html#method.pointer_motion)
//! * [`keyboard_key`](../wlc/trait.Callback.html#method.keyboard_key)
//!
//! In `wlc` you may only use one callback to drive the compositor.
//! Fireplace breaks this restriction by providing `Callback` implementations
//! that might
//! split the calls onto two or even more other `Callback`s and implementations
//! that may
//! wrap existing `Callback`s modifing parameters, injecting calls or blocking
//! calls
//! however you want.
//!
//! Using this functionality every complex process might be split into multiple
//! self-contained so called `handlers` that can be recombined to create new
//! functionality
//! and can be composed in the end to provide a fully functional window manager.
//!
//! ## Handlers
//!
//! All `handlers` implement the `Callback` trait in some way:
//!
//! * directly
//! * by implementing [`AsWrapper`](./callback/trait.AsWrapper.html) - Wrapping
//! existing handlers
//! * by implementing [`AsSplit`](./callback/trait.AsSplit.html) - Splitting
//! calls between up to two handlers
//! * by implementing [`AsVec`](./callback/trait.AsVec.html) - Splitting calls
//! onto an arbitrary number of handlers
//!
//! All these traits can be found in the [`callback`](./callback/index.html)
//! module
//!
//! All handlers provided and used by fireplace and a more specific
//! introduction can be found
//! in the [`handlers`](./handlers/) module.
//!
extern crate wlc;
extern crate anymap;
extern crate typemap;
extern crate linked_hash_map;
extern crate id_tree;
extern crate serde;
extern crate serde_derive;
extern crate slog;
extern crate slog_scope;
extern crate conrod;
extern crate image;
extern crate texture;
extern crate chrono;
extern crate font_loader;
extern crate graphics;
extern crate opengles_graphics;
extern crate egli;