Blender  V3.3
Functions | Variables
bpy_app_icons.c File Reference
#include <Python.h>
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BKE_icons.h"
#include "../generic/py_capi_utils.h"
#include "bpy_app_icons.h"

Go to the source code of this file.

Functions

 PyDoc_STRVAR (bpy_app_icons_new_triangles_doc, ".. function:: new_triangles(range, coords, colors)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg range: Pair of ints.\n" " :type range: tuple.\n" " :arg coords: Sequence of bytes (6 floats for one triangle) for (X, Y) coordinates.\n" " :type coords: byte sequence.\n" " :arg colors: Sequence of ints (12 for one triangles) for RGBA.\n" " :type colors: byte sequence.\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n")
 
static PyObject * bpy_app_icons_new_triangles (PyObject *UNUSED(self), PyObject *args, PyObject *kw)
 
 PyDoc_STRVAR (bpy_app_icons_new_triangles_from_file_doc, ".. function:: new_triangles_from_file(filename)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg filename: File path.\n" " :type filename: string.\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n")
 
static PyObject * bpy_app_icons_new_triangles_from_file (PyObject *UNUSED(self), PyObject *args, PyObject *kw)
 
 PyDoc_STRVAR (bpy_app_icons_release_doc, ".. function:: release(icon_id)\n" "\n" " Release the icon.\n")
 
static PyObject * bpy_app_icons_release (PyObject *UNUSED(self), PyObject *args, PyObject *kw)
 
PyObject * BPY_app_icons_module (void)
 

Variables

static struct PyMethodDef M_AppIcons_methods []
 
static struct PyModuleDef M_AppIcons_module_def
 

Detailed Description

Runtime defined icons.

Definition in file bpy_app_icons.c.

Function Documentation

◆ BPY_app_icons_module()

PyObject* BPY_app_icons_module ( void  )

Definition at line 175 of file bpy_app_icons.c.

References M_AppIcons_module_def, and mod().

Referenced by make_app_info().

◆ bpy_app_icons_new_triangles()

static PyObject* bpy_app_icons_new_triangles ( PyObject *  UNUSEDself,
PyObject *  args,
PyObject *  kw 
)
static

◆ bpy_app_icons_new_triangles_from_file()

static PyObject* bpy_app_icons_new_triangles_from_file ( PyObject *  UNUSEDself,
PyObject *  args,
PyObject *  kw 
)
static

◆ bpy_app_icons_release()

static PyObject* bpy_app_icons_release ( PyObject *  UNUSEDself,
PyObject *  args,
PyObject *  kw 
)
static

Definition at line 126 of file bpy_app_icons.c.

References BKE_icon_delete_unmanaged(), Icon_Geom::icon_id, and NULL.

◆ PyDoc_STRVAR() [1/3]

PyDoc_STRVAR ( bpy_app_icons_new_triangles_doc  ,
".. function:: new_triangles(range, coords, colors)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg range: Pair of ints.\n" " :type range: tuple.\n" " :arg coords: Sequence of bytes (6 floats for one triangle) for (X, Y) coordinates.\n" " :type coords: byte sequence.\n" " :arg colors: Sequence of ints (12 for one triangles) for RGBA.\n" " :type colors: byte sequence.\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n"   
)

◆ PyDoc_STRVAR() [2/3]

PyDoc_STRVAR ( bpy_app_icons_new_triangles_from_file_doc  ,
".. function:: new_triangles_from_file(filename)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg filename: File path.\n" " :type filename: string.\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n"   
)

◆ PyDoc_STRVAR() [3/3]

PyDoc_STRVAR ( bpy_app_icons_release_doc  ,
".. function:: release(icon_id)\n" "\n" " Release the icon.\n"   
)

Variable Documentation

◆ M_AppIcons_methods

struct PyMethodDef M_AppIcons_methods[]
static
Initial value:
= {
{"new_triangles",
METH_VARARGS | METH_KEYWORDS,
bpy_app_icons_new_triangles_doc},
{"new_triangles_from_file",
METH_VARARGS | METH_KEYWORDS,
bpy_app_icons_new_triangles_from_file_doc},
{"release",
(PyCFunction)bpy_app_icons_release,
METH_VARARGS | METH_KEYWORDS,
bpy_app_icons_release_doc},
{NULL, NULL, 0, NULL},
}
static PyObject * bpy_app_icons_release(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
static PyObject * bpy_app_icons_new_triangles(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
Definition: bpy_app_icons.c:36
static PyObject * bpy_app_icons_new_triangles_from_file(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
Definition: bpy_app_icons.c:95

Definition at line 126 of file bpy_app_icons.c.

◆ M_AppIcons_module_def

struct PyModuleDef M_AppIcons_module_def
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"bpy.app.icons",
NULL,
0,
NULL,
NULL,
NULL,
NULL,
}
static struct PyMethodDef M_AppIcons_methods[]

Definition at line 126 of file bpy_app_icons.c.

Referenced by BPY_app_icons_module().