RetroArch
Classes | Macros | Functions | Variables
video_state_python.c File Reference
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <Python.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <streams/file_stream.h>
#include <libretro.h>
#include "video_state_python.h"
#include "../../configuration.h"
#include "../../dynamic.h"
#include "../../core.h"
#include "../../verbosity.h"
#include "../../input/input_driver.h"
Include dependency graph for video_state_python.c:

Classes

struct  py_state
 

Macros

#define DECL_ATTR_RETRO(attr)   PyObject_SetAttrString(mod, #attr, PyLong_FromLong(RETRO_DEVICE_ID_JOYPAD_##attr))
 

Functions

static PyObject * py_read_wram (PyObject *self, PyObject *args)
 
static PyObject * py_read_vram (PyObject *self, PyObject *args)
 
static PyObject * py_read_input (PyObject *self, PyObject *args)
 
static PyObject * py_read_analog (PyObject *self, PyObject *args)
 
static void py_set_attrs (PyObject *mod)
 
static PyObject * PyInit_Retro (void)
 
static char * dupe_newline (const char *str)
 
static char * align_program (const char *program)
 
py_state_tpy_state_new (const char *script, unsigned is_file, const char *pyclass)
 
void py_state_free (py_state_t *handle)
 
float py_state_get (py_state_t *handle, const char *id, unsigned frame_count)
 

Variables

static PyMethodDef RarchMethods []
 
static PyModuleDef RarchModule
 

Macro Definition Documentation

◆ DECL_ATTR_RETRO

#define DECL_ATTR_RETRO (   attr)    PyObject_SetAttrString(mod, #attr, PyLong_FromLong(RETRO_DEVICE_ID_JOYPAD_##attr))

Function Documentation

◆ align_program()

static char* align_program ( const char *  program)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dupe_newline()

static char* dupe_newline ( const char *  str)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ py_read_analog()

static PyObject* py_read_analog ( PyObject *  self,
PyObject *  args 
)
static
Here is the call graph for this function:

◆ py_read_input()

static PyObject* py_read_input ( PyObject *  self,
PyObject *  args 
)
static
Here is the call graph for this function:

◆ py_read_vram()

static PyObject* py_read_vram ( PyObject *  self,
PyObject *  args 
)
static
Here is the call graph for this function:

◆ py_read_wram()

static PyObject* py_read_wram ( PyObject *  self,
PyObject *  args 
)
static
Here is the call graph for this function:

◆ py_set_attrs()

static void py_set_attrs ( PyObject *  mod)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ py_state_free()

void py_state_free ( py_state_t handle)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ py_state_get()

float py_state_get ( py_state_t handle,
const char *  id,
unsigned  frame_count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ py_state_new()

py_state_t* py_state_new ( const char *  script,
unsigned  is_file,
const char *  pyclass 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PyInit_Retro()

static PyObject* PyInit_Retro ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ RarchMethods

PyMethodDef RarchMethods[]
static
Initial value:
= {
{ "read_wram", py_read_wram, METH_VARARGS, "Read WRAM from system." },
{ "read_vram", py_read_vram, METH_VARARGS, "Read VRAM from system." },
{ "input", py_read_input, METH_VARARGS, "Read input state from system." },
{ "input_analog", py_read_analog, METH_VARARGS, "Read analog input state from system." },
{ NULL, NULL, 0, NULL }
}
static PyObject * py_read_wram(PyObject *self, PyObject *args)
Definition: video_state_python.c:37
static PyObject * py_read_vram(PyObject *self, PyObject *args)
Definition: video_state_python.c:72
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static PyObject * py_read_analog(PyObject *self, PyObject *args)
Definition: video_state_python.c:137
static PyObject * py_read_input(PyObject *self, PyObject *args)
Definition: video_state_python.c:108

◆ RarchModule

PyModuleDef RarchModule
static
Initial value:
= {
PyModuleDef_HEAD_INIT, "rarch", NULL, -1, RarchMethods,
}
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static PyMethodDef RarchMethods[]
Definition: video_state_python.c:165