Mercurial > minori
comparison dep/animia/src/win/wayland.cc @ 223:84e0a3c4737a
library: implement menu bar buttons
I also went ahead and put the links from Taiga in so I don't have to
worry about it later...
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 08 Jan 2024 16:54:16 -0500 |
parents | 53211cb1e7f5 |
children |
comparison
equal
deleted
inserted
replaced
222:b9f111d84d95 | 223:84e0a3c4737a |
---|---|
1 #include "animia/win/wayland.h" | 1 #include "animia/win/wayland.h" |
2 #include "animia.h" | 2 #include "animia.h" |
3 #include "animia/win.h" | 3 #include "animia/win.h" |
4 #include "animia/util.h" | |
4 | 5 |
5 #include <cstring> | 6 #include <cstring> |
6 #include <iostream> | 7 #include <iostream> |
7 | 8 |
8 #include "animia/win/wayland/ext-foreign-toplevel-list-v1.h" | 9 #include "animia/win/wayland/ext-foreign-toplevel-list-v1.h" |
88 const char* title) { | 89 const char* title) { |
89 if (title) | 90 if (title) |
90 reinterpret_cast<Window*>(data)->text = title; | 91 reinterpret_cast<Window*>(data)->text = title; |
91 } | 92 } |
92 | 93 |
93 static void ext_foreign_handle_handle_identifier(void*, ext_foreign_toplevel_handle_v1*, const char* identifier) { | 94 static void ext_foreign_handle_handle_identifier(void* data, ext_foreign_toplevel_handle_v1* handle, const char* identifier) { |
94 if (identifier) | 95 if (identifier) { |
95 reinterpret_cast<Window*>(data)->id = identifier; | 96 reinterpret_cast<Window*>(data)->id = util::StringToInt(identifier, 0); |
97 } | |
96 } | 98 } |
97 | 99 |
98 static void ext_foreign_handle_handle_done(void* data, struct ext_foreign_toplevel_handle_v1* handle) { | 100 static void ext_foreign_handle_handle_done(void* data, struct ext_foreign_toplevel_handle_v1* handle) { |
99 if (handle) | 101 if (handle) |
100 ext_foreign_toplevel_handle_v1_destroy(handle); | 102 ext_foreign_toplevel_handle_v1_destroy(handle); |