Personal tools
You are here: Home documentation developer PdAPI
Views

m_pd.h

  • string-related

    • binbufs

      • 't_binbuf *binbuf_new(void);' 'void binbuf_free(t_binbuf *x);' 't_binbuf *binbuf_duplicate(t_binbuf *y);' 'void binbuf_text(t_binbuf *x, char *text, size_t size);' 'void binbuf_gettext(t_binbuf *x, char **bufp, int *lengthp);' 'void binbuf_clear(t_binbuf *x);' 'void binbuf_add(t_binbuf *x, int argc, t_atom *argv);' 'void binbuf_addv(t_binbuf *x, char *fmt, ...);' 'void binbuf_addbinbuf(t_binbuf *x, t_binbuf *y);' 'void binbuf_addsemi(t_binbuf *x);' 'void binbuf_restore(t_binbuf *x, int argc, t_atom *argv);' 'void binbuf_print(t_binbuf *x);' 'int binbuf_getnatom(t_binbuf *x);' 't_atom *binbuf_getvec(t_binbuf *x);' 'void binbuf_eval(t_binbuf *x, t_pd *target, int argc, t_atom *argv);' 'int binbuf_read(t_binbuf *b, char *filename, char *dirname, int crflag);' 'int binbuf_read_via_path(t_binbuf *b, char *filename, char *dirname, int crflag);' 'int binbuf_write(t_binbuf *x, char *filename, char *dir, int crflag);' 'void binbuf_evalfile(t_symbol *name, t_symbol *dir);' 't_symbol *binbuf_realizedollsym(t_symbol *s, int ac, t_atom *av, int tonew);'

    GUI-related
    • pointers

      • 'void gpointer_init(t_gpointer *gp);' 'void gpointer_copy(const t_gpointer *gpfrom, t_gpointer *gpto);' 'void gpointer_unset(t_gpointer *gp);' 'int gpointer_check(const t_gpointer *gp, int headok);'

      canvases
      • 'void glob_setfilename(void *dummy, t_symbol *name, t_symbol *dir);' 'void canvas_setargs(int argc, t_atom *argv);' 'void canvas_getargs(int *argcp, t_atom **argvp);' 't_symbol *canvas_getcurrentdir(void);' 't_glist *canvas_getcurrent(void);'

        • Gets the parent canvas of the instance of a class. Always call it from the new() routine; otherwise the current canvas is undefined. You can store the pointer for later (an object's parent canvas is guaranteed never to change).

        'void canvas_makefilename(t_glist *c, char *file, char *result, int resultsize);' 't_symbol *canvas_getdir(t_glist *x);' 'int sys_fontwidth(int fontsize);' 'int sys_fontheight(int fontsize);' 'void canvas_dataproperties(t_glist *x, t_scalar *sc, t_binbuf *b);' 'int canvas_open(t_canvas *x, const char *name, const char *ext, char *dirresult, char **nameresult, unsigned int size, int bin);' canvas_open() is the canvas-local equivalent of open_via_path(). It tries to open a classname using the canvas-local path first. The canvas x can be 0 if there is no current canvas.
    widget behaviors
    • '_STRUCT _widgetbehavior;' '#define t_widgetbehavior struct _widgetbehavior' '_STRUCT _parentwidgetbehavior;' '#define t_parentwidgetbehavior struct _parentwidgetbehavior t_parentwidgetbehavior *pd_getparentwidget(t_pd *x);'

s_stuff.h

  • polling file handling

    • pollfns

      • pollfns are callback functions that are associated with filehandles. When new data appears on the filehandle, then the associated pollfn is called. Internally, pollfns are only used for handling network sockets. 'typedef void (*t_fdpollfn)(void *ptr, int fd);' The prototype for a pollfn. 'void sys_addpollfn(int fd, t_fdpollfn fn, void *ptr);' Associates a pollfn with a filehandle. Pd will monitor that filehandle, then call the pollfn when there is new data. 'void sys_rmpollfn(int fd);' Removes the file handle from being monitored by Pd.

    loaders
    • 'int sys_load_lib(t_canvas *canvas, char *classname)' Try to find the file for a classname and load it. This function goes thru the list of loader functions and calls them in order. canvas can be 0 if there is no current canvas. 'void sys_register_loader(loader_t loader)' This function is generally called in a given loader's setup function to register itself with Pd. 'typedef int (*loader_t)(t_canvas *canvas, char *classname)' The function prototype for loader functions used with sys_register_loader().

    namelists and paths
    • namelists are used to store lists of strings, like the global paths, canvas-local paths, or helppath. 't_namelist' This struct is one element in a namelist linked list. 't_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup);' Append a single string to a namelist. The t_namelist pointer can be NULL in order to create a new namelist. 't_namelist *namelist_append_files(t_namelist *listwas, const char *s);' Add a colon-separated (semi-colon on Windows) list of strings to a namelist 'void namelist_free(t_namelist *listwas)' Free each element in the namelist. 'char *namelist_get(t_namelist *namelist, int n)' Get the nth element in a namelist. 'extern t_namelist *sys_externlist' The list of libraries to load when Pd starts. 'extern t_namelist *sys_searchpath' The search path to look thru when trying to instantiate a class. 'extern t_namelist *sys_helppath' The search path to look thru when trying to open a help patch. 'extern int sys_usestdpath' Boolean to enable/disable the use of the standard "extra" path. 'void sys_setextrapath(const char *p);' Function to set the actual path to the "extra" folder.

    audioapi
    • The audioapi is the operating system audio interface that Pd is configured to use. It is specified in the pdextended configuration file (eg. ~/.pdextended ) as eg. jack: audioapi: 5 The numeric code corresponds to an API defined in s_stuff.h , for example (as of Pd 0.43.4-extended):

        #define API_NONE 0
        #define API_ALSA 1
        #define API_OSS 2
        #define API_MMIO 3
        #define API_PORTAUDIO 4
        #define API_JACK 5
        #define API_SGI 6
        #define API_AUDIOUNIT 7
        #define API_ESD 8
        #define API_DUMMY 9
        

d_delay.c

  • signal delay stuff

    • 'int ugen_getsortno(void)' returns an integer which increases eachtime DSP is restarted. You can add the function call (to the ugen chain for instance) each time you see ugen_getsortno() return an integer greater than the previous one

g_canvas.c



Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser