comparison dep/animia/src/win/wayland.cc @ 221:53211cb1e7f5

library: add initial library stuff nice
author Paper <paper@paper.us.eu.org>
date Mon, 08 Jan 2024 13:21:08 -0500
parents 2f6d27fcdf7d
children 84e0a3c4737a
comparison
equal deleted inserted replaced
220:79a87a6dd39d 221:53211cb1e7f5
54 .output_enter = zwlr_foreign_handle_handle_output_enter, 54 .output_enter = zwlr_foreign_handle_handle_output_enter,
55 .output_leave = zwlr_foreign_handle_handle_output_leave, 55 .output_leave = zwlr_foreign_handle_handle_output_leave,
56 .state = zwlr_foreign_handle_handle_state, 56 .state = zwlr_foreign_handle_handle_state,
57 .done = zwlr_foreign_handle_handle_done, 57 .done = zwlr_foreign_handle_handle_done,
58 .closed = zwlr_foreign_handle_handle_closed, 58 .closed = zwlr_foreign_handle_handle_closed,
59 .parent = zwlr_foreign_handle_handle_parent}; 59 .parent = zwlr_foreign_handle_handle_parent
60 };
60 61
61 static void zwlr_toplevel_manager_handle_toplevel(void* data, struct zwlr_foreign_toplevel_manager_v1* manager, 62 static void zwlr_toplevel_manager_handle_toplevel(void* data, struct zwlr_foreign_toplevel_manager_v1* manager,
62 struct zwlr_foreign_toplevel_handle_v1* handle) { 63 struct zwlr_foreign_toplevel_handle_v1* handle) {
63 std::vector<Window>* windows = reinterpret_cast<std::vector<Window>*>(data); 64 std::vector<Window>* windows = reinterpret_cast<std::vector<Window>*>(data);
64 if (!windows) 65 if (!windows)
87 const char* title) { 88 const char* title) {
88 if (title) 89 if (title)
89 reinterpret_cast<Window*>(data)->text = title; 90 reinterpret_cast<Window*>(data)->text = title;
90 } 91 }
91 92
93 static void ext_foreign_handle_handle_identifier(void*, ext_foreign_toplevel_handle_v1*, const char* identifier) {
94 if (identifier)
95 reinterpret_cast<Window*>(data)->id = identifier;
96 }
97
92 static void ext_foreign_handle_handle_done(void* data, struct ext_foreign_toplevel_handle_v1* handle) { 98 static void ext_foreign_handle_handle_done(void* data, struct ext_foreign_toplevel_handle_v1* handle) {
93 if (handle) 99 if (handle)
94 ext_foreign_toplevel_handle_v1_destroy(handle); 100 ext_foreign_toplevel_handle_v1_destroy(handle);
95 } 101 }
96 102
97 static void ext_foreign_handle_handle_closed(void*, struct ext_foreign_toplevel_handle_v1*) { 103 static void ext_foreign_handle_handle_closed(void*, struct ext_foreign_toplevel_handle_v1*) {
98 }
99
100 static void ext_foreign_handle_handle_identifier(void*, ext_foreign_toplevel_handle_v1*, const char*) {
101 } 104 }
102 105
103 static const struct ext_foreign_toplevel_handle_v1_listener ext_handle_listener = { 106 static const struct ext_foreign_toplevel_handle_v1_listener ext_handle_listener = {
104 .closed = ext_foreign_handle_handle_closed, 107 .closed = ext_foreign_handle_handle_closed,
105 .done = ext_foreign_handle_handle_done, 108 .done = ext_foreign_handle_handle_done,