Escape code a client sends to request data (t=r:x=idx) or finish the drop (t=r with no x). *idx*: 1-based index into the list of MIME types. 0 or omitted means finish.
(idx: int = 0, client_id: int = 0)
| 64 | |
| 65 | |
| 66 | def client_request_data(idx: int = 0, client_id: int = 0) -> bytes: |
| 67 | """Escape code a client sends to request data (t=r:x=idx) or finish the drop (t=r with no x). |
| 68 | |
| 69 | *idx*: 1-based index into the list of MIME types. 0 or omitted means finish. |
| 70 | """ |
| 71 | meta = f'{DND_CODE};t=r' |
| 72 | if idx > 0: |
| 73 | meta += f':x={idx}' |
| 74 | if client_id: |
| 75 | meta += f':i={client_id}' |
| 76 | return _osc(meta) |
| 77 | |
| 78 | |
| 79 | def client_request_uri_data(mime_idx: int, file_idx: int, client_id: int = 0) -> bytes: |