wlroots-rs
wlroots-rs copied to clipboard
DataDevice
This is one of the globals that the compositor needs to create at startup.
Either it needs to be provided in the constructor (like the I/O managers) or it needs to be passed in later (like the extension protocols).
I'm up for either, leaning towards the latter since this is sort of an "extension" and it's possible that a compositor may not want to implement this interface (and we should take a page out of wlroots' book and let the user decide).
Either way, it needs to live as long as the compositor and destroyed before it disconnects.
Need to also ensure only one global is registered at a time of this type.
Functions
- [ ]
send_selectionNeeds to only be possible if the DnD global has been made (so if an instance was made of the struct). Needs SeatClient to be made first. - [ ]
set_selection
DataOffer
Events
- [ ]
destroy
Functions
- [ ]
dnd_actionsReturn bitfield, please wrap in abitfield! - [ ] preferred_dnd_action`
- [ ]
in_ask - [ ]
resource(unsafe) - [ ]
data_source(ReturnDataSource)
DataSource
Events
- [ ]
destroy
Functions
- [ ]
resource(unsafe) - [ ]
offer(ReturnDataOffer - [ ]
seat_client(Return SeatClient) - [ ]
mime_types(Wrap inVec) - [ ]
accepted - [ ]
current_dnd_action - [ ]
dnd_actionsReturn bitfield, like inDataOffer - [ ]
compositor_actionsReturn bitfield, like inDataOffer - [ ]
actions_set
Global Callbacks
They should be callable, setting them may be unsafe but probably not. They are already initialized in global creation. Double check because this could be safe.
- [ ]
accept - [ ]
send - [ ]
cancel
Global Cleanup
- ~Blocked by this issue~ clean up global
For resource, do we just want to return the pointer or the wl_resource? I've got code implemented that returns the wl_resource. It's mainly semantics but mainly wondering..
Honestly for those it's not a big deal since it'll probably never be used by the library user.
Just make an unsafe function that returns whatever is in the struct. Eg if it's a pointer don't dereference it just return it.