68 static const char *_keywords[] = {
"range",
nullptr};
69 static _PyArg_Parser _parser = {
77 if (!_PyArg_ParseTupleAndKeywordsFast(
78 args, kwds, &_parser, ®ion.
curl, ®ion.
curc, ®ion.
sell, ®ion.
selc))
83 if (kwds && PyDict_GET_SIZE(kwds) > 0) {
89 return PyUnicode_FromString(
"");
92 PyObject *sel_text = PyUnicode_FromString(buf);
bool txt_has_sel(const struct Text *text)
void txt_sel_set(struct Text *text, int startl, int startc, int endl, int endc)
char * txt_sel_to_buf(const struct Text *text, size_t *r_buf_strlen)
void txt_insert_buf(struct Text *text, const char *in_buffer, int in_buffer_len) ATTR_NONNULL(1
static PyObject * bpy_rna_region_from_string(PyObject *self, PyObject *args, PyObject *kwds)
PyMethodDef BPY_rna_region_from_string_method_def
PyMethodDef BPY_rna_region_as_string_method_def
static PyObject * bpy_rna_region_as_string(PyObject *self, PyObject *args, PyObject *kwds)
PyDoc_STRVAR(bpy_rna_region_as_string_doc, ".. method:: region_as_string(*, range=None)\n" "\n" " :arg range: The region of text to be returned, " "defaulting to the selection when no range is passed.\n" " Each int pair represents a line and column: " "((start_line, start_column), (end_line, end_column))\n" " The values match Python's slicing logic " "(negative values count backwards from the end, the end value is not inclusive).\n" " :type range: tuple[tuple[int, int], tuple[int, int]]\n" " :return: The specified region as a string.\n" " :rtype: str\n")