Blender V5.3
bpy_rna_wm.cc File Reference
#include <Python.h>
#include <cstring>
#include <optional>
#include "MEM_guardedalloc.h"
#include "DNA_vec_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_math_base_c.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_rect.hh"
#include "BLI_utildefines.hh"
#include "BKE_global.hh"
#include "WM_api.hh"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"
#include "bpy_capi_utils.hh"
#include "bpy_rna.hh"
#include "bpy_rna_callback.hh"
#include "bpy_rna_wm.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define PY_SSIZE_T_CLEAN

Functions

Window Manager Clipboard Property

Avoid using the RNA API because this value may change between checking its length and creating the buffer, causing writes past the allocated length.

 blender::PyDoc_STRVAR (pyrna_WindowManager_clipboard_doc, "Clipboard text storage.\n" "\n" ":type: str\n")
static PyObject * blender::pyrna_WindowManager_clipboard_get (PyObject *, void *)
static int blender::pyrna_WindowManager_clipboard_set (PyObject *, PyObject *value, void *)

Window Manager Type

PyMethodDef blender::BPY_rna_windowmanager_draw_cursor_add_method_def
PyMethodDef blender::BPY_rna_windowmanager_draw_cursor_remove_method_def
PyGetSetDef blender::BPY_rna_windowmanager_clipboard_getset_def
 blender::PyDoc_STRVAR (pyrna_draw_cursor_add_doc, ".. classmethod:: draw_cursor_add(callback, args, space_type, region_type)\n" "\n" " Add a new draw cursor handler to this space type.\n" " It will be called every time the cursor for the specified region in the space " "type will be drawn.\n" " Note: All arguments are positional only for now.\n" "\n" " :param callback:\n" " A function that will be called when the cursor is drawn.\n" " It gets the specified arguments as input with the mouse position " "(``tuple[int, int]``) as last argument.\n" " :type callback: Callable[..., Any]\n" " :param args: Arguments that will be passed to the callback.\n" " :type args: tuple[Any, ...]\n" " :param space_type: The space type the callback draws in; for example ``VIEW_3D``. " "(:class:`bpy.types.Space.type`)\n" " :type space_type: str\n" " :param region_type: The region type the callback draws in; usually ``WINDOW``. " "(:class:`bpy.types.Region.type`)\n" " :type region_type: str\n" " :return: Handler that can be removed later on.\n" " :rtype: object\n")
 blender::PyDoc_STRVAR (pyrna_draw_cursor_remove_doc, ".. classmethod:: draw_cursor_remove(handler)\n" "\n" " Remove a draw cursor handler that was added previously.\n" "\n" " :param handler: The draw cursor handler that should be removed.\n" " :type handler: object\n")

Window Screenshot

PyMethodDef blender::BPY_rna_window_screenshot_method_def
 blender::PyDoc_STRVAR (bpy_rna_window_screenshot_doc, ".. method:: screenshot(*, region=None, use_alpha=False)\n" "\n" " Capture the windows pixel data.\n" "\n" " :param region: The region to capture, or ``None`` to capture all.\n" " Each int pair represents a pixel coordinate " "(the end value is not inclusive, matching Python slicing): " "((min_x, min_y), (max_x, max_y))\n" " :type region: tuple[tuple[int, int], tuple[int, int]] | None\n" " :param use_alpha: When false the alpha channel is fully opaque. " "Otherwise alpha values from the window's frame-buffer are returned as-is.\n" " :type use_alpha: bool\n" " :return: A read-only :class:`memoryview` of shape ``(height, width, 4)`` " "and format ``'B'``, viewing the captured RGBA pixels (rows ordered from bottom to top).\n" " :rtype: memoryview\n")
static PyObject * blender::bpy_rna_window_screenshot (PyObject *self, PyObject *args, PyObject *kwds)

Detailed Description

This file extends the window-manager with C/Python API methods and attributes.

Definition in file bpy_rna_wm.cc.

Macro Definition Documentation

◆ PY_SSIZE_T_CLEAN

#define PY_SSIZE_T_CLEAN

Definition at line 11 of file bpy_rna_wm.cc.