MCPcopy Index your code
hub / github.com/RustPython/RustPython / selection_handle

Method selection_handle

Lib/tkinter/__init__.py:1126–1140  ·  view source on GitHub ↗

Specify a function COMMAND to call if the X selection owned by this widget is queried by another application. This function must return the contents of the selection. The function will be called with the arguments OFFSET and LENGTH which allows the chunking

(self, command, **kw)

Source from the content-addressed store, hash-verified

1124 return self.tk.call(('selection', 'get') + self._options(kw))
1125
1126 def selection_handle(self, command, **kw):
1127 """Specify a function COMMAND to call if the X
1128 selection owned by this widget is queried by another
1129 application.
1130
1131 This function must return the contents of the
1132 selection. The function will be called with the
1133 arguments OFFSET and LENGTH which allows the chunking
1134 of very long selections. The following keyword
1135 parameters can be provided:
1136 selection - name of the selection (default PRIMARY),
1137 type - type of the selection (e.g. STRING, FILE_NAME)."""
1138 name = self._register(command)
1139 self.tk.call(('selection', 'handle') + self._options(kw)
1140 + (self._w, name))
1141
1142 def selection_own(self, **kw):
1143 """Become owner of X selection.

Callers

nothing calls this directly

Calls 3

_registerMethod · 0.95
_optionsMethod · 0.95
callMethod · 0.45

Tested by

no test coverage detected