Add more grpc - Asyncstuff
[src/agl-compositor.git] / clients / shell.cpp
1 #include <cstdio>
2 #include <ctime>
3 #include <algorithm>
4 #include <cstring>
5 #include <string>
6 #include <queue>
7
8 #include "main-grpc.h"
9 #include "shell.h"
10
11 void
12 Shell::ActivateApp(const std::string &app_id, const std::string &output_name)
13 {
14         struct window_output *woutput, *w_output;
15         struct agl_shell *shell = this->m_shell.get();
16
17         woutput = nullptr;
18         w_output = nullptr;
19
20         wl_list_for_each(woutput, &m_shell_data->output_list, link) {
21                 if (woutput->name && !strcmp(woutput->name, output_name.c_str())) {
22                         w_output = woutput;
23                         break;
24                 }
25         }
26
27         // else, get the first one available
28         if (!w_output)
29                 w_output = wl_container_of(m_shell_data->output_list.prev,
30                                            w_output, link);
31
32         agl_shell_activate_app(shell, app_id.c_str(), w_output->output);
33         wl_display_flush(m_shell_data->wl_display);
34 }
35
36 void
37 Shell::DeactivateApp(const std::string &app_id)
38 {
39         (void) app_id;
40 }
41
42 void
43 Shell::SetAppFloat(const std::string &app_id)
44 {
45         (void) app_id;
46 }
47
48 void
49 Shell::SetAppSplit(const std::string &app_id, uint32_t orientation)
50 {
51         (void) app_id;
52         (void) orientation;
53 }