summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src/m_imp.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/m_imp.h')
-rw-r--r--apps/plugins/pdbox/PDa/src/m_imp.h156
1 files changed, 156 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/PDa/src/m_imp.h b/apps/plugins/pdbox/PDa/src/m_imp.h
new file mode 100644
index 0000000000..7632af1c2d
--- /dev/null
+++ b/apps/plugins/pdbox/PDa/src/m_imp.h
@@ -0,0 +1,156 @@
1/* Copyright (c) 1997-1999 Miller Puckette.
2* For information on usage and redistribution, and for a DISCLAIMER OF ALL
3* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
4
5/* This file contains function prototypes and data types used to implement
6Pd, but not shared with Pd objects. */
7
8/* NOTE: this file describes Pd implementation details which may change
9in future releases. The public (stable) API is in m_pd.h. */
10
11/* LATER consider whether to use 'char' for method arg types to save space */
12
13/* the structure for a method handler ala Max */
14typedef struct _methodentry
15{
16 t_symbol *me_name;
17 t_gotfn me_fun;
18 t_atomtype me_arg[MAXPDARG+1];
19} t_methodentry;
20
21EXTERN_STRUCT _widgetbehavior;
22
23typedef void (*t_bangmethod)(t_pd *x);
24typedef void (*t_pointermethod)(t_pd *x, t_gpointer *gp);
25typedef void (*t_floatmethod)(t_pd *x, t_float f);
26typedef void (*t_symbolmethod)(t_pd *x, t_symbol *s);
27typedef void (*t_listmethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
28typedef void (*t_anymethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
29
30struct _class
31{
32 t_symbol *c_name; /* name (mostly for error reporting) */
33 t_symbol *c_helpname; /* name of help file */
34 t_symbol *c_externdir; /* directory extern was loaded from */
35 size_t c_size; /* size of an instance */
36 t_methodentry *c_methods; /* methods other than bang, etc below */
37 int c_nmethod; /* number of methods */
38 t_method c_freemethod; /* function to call before freeing */
39 t_bangmethod c_bangmethod; /* common methods */
40 t_pointermethod c_pointermethod;
41 t_floatmethod c_floatmethod;
42 t_symbolmethod c_symbolmethod;
43 t_listmethod c_listmethod;
44 t_anymethod c_anymethod;
45 struct _widgetbehavior *c_wb; /* "gobjs" only */
46 struct _parentwidgetbehavior *c_pwb;/* widget behavior in parent */
47 t_savefn c_savefn; /* function to call when saving */
48 t_propertiesfn c_propertiesfn; /* function to start prop dialog */
49 int c_floatsignalin; /* onset to float for signal input */
50 char c_gobj; /* true if is a gobj */
51 char c_patchable; /* true if we have a t_object header */
52 char c_firstin; /* if patchable, true if draw first inlet */
53 char c_drawcommand; /* a drawing command for a template */
54};
55
56
57/* m_obj.c */
58EXTERN int obj_noutlets(t_object *x);
59EXTERN int obj_ninlets(t_object *x);
60EXTERN t_outconnect *obj_starttraverseoutlet(t_object *x, t_outlet **op,
61 int nout);
62EXTERN t_outconnect *obj_nexttraverseoutlet(t_outconnect *lastconnect,
63 t_object **destp, t_inlet **inletp, int *whichp);
64EXTERN t_outconnect *obj_connect(t_object *source, int outno,
65 t_object *sink, int inno);
66EXTERN void obj_disconnect(t_object *source, int outno, t_object *sink,
67 int inno);
68EXTERN void outlet_setstacklim(void);
69EXTERN int obj_issignalinlet(t_object *x, int m);
70EXTERN int obj_issignaloutlet(t_object *x, int m);
71EXTERN int obj_nsiginlets(t_object *x);
72EXTERN int obj_nsigoutlets(t_object *x);
73EXTERN int obj_siginletindex(t_object *x, int m);
74EXTERN int obj_sigoutletindex(t_object *x, int m);
75
76/* misc */
77EXTERN void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
78EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
79/* Copyright (c) 1997-1999 Miller Puckette.
80* For information on usage and redistribution, and for a DISCLAIMER OF ALL
81* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
82
83/* This file contains function prototypes and data types used to implement
84Pd, but not shared with Pd objects. */
85
86/* NOTE: this file describes Pd implementation details which may change
87in future releases. The public (stable) API is in m_pd.h. */
88
89/* LATER consider whether to use 'char' for method arg types to save space */
90
91/* the structure for a method handler ala Max */
92typedef struct _methodentry
93{
94 t_symbol *me_name;
95 t_gotfn me_fun;
96 t_atomtype me_arg[MAXPDARG+1];
97} t_methodentry;
98
99EXTERN_STRUCT _widgetbehavior;
100
101typedef void (*t_bangmethod)(t_pd *x);
102typedef void (*t_pointermethod)(t_pd *x, t_gpointer *gp);
103typedef void (*t_floatmethod)(t_pd *x, t_float f);
104typedef void (*t_symbolmethod)(t_pd *x, t_symbol *s);
105typedef void (*t_listmethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
106typedef void (*t_anymethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
107
108struct _class
109{
110 t_symbol *c_name; /* name (mostly for error reporting) */
111 t_symbol *c_helpname; /* name of help file */
112 t_symbol *c_externdir; /* directory extern was loaded from */
113 size_t c_size; /* size of an instance */
114 t_methodentry *c_methods; /* methods other than bang, etc below */
115 int c_nmethod; /* number of methods */
116 t_method c_freemethod; /* function to call before freeing */
117 t_bangmethod c_bangmethod; /* common methods */
118 t_pointermethod c_pointermethod;
119 t_floatmethod c_floatmethod;
120 t_symbolmethod c_symbolmethod;
121 t_listmethod c_listmethod;
122 t_anymethod c_anymethod;
123 struct _widgetbehavior *c_wb; /* "gobjs" only */
124 struct _parentwidgetbehavior *c_pwb;/* widget behavior in parent */
125 t_savefn c_savefn; /* function to call when saving */
126 t_propertiesfn c_propertiesfn; /* function to start prop dialog */
127 int c_floatsignalin; /* onset to float for signal input */
128 char c_gobj; /* true if is a gobj */
129 char c_patchable; /* true if we have a t_object header */
130 char c_firstin; /* if patchable, true if draw first inlet */
131 char c_drawcommand; /* a drawing command for a template */
132};
133
134
135/* m_obj.c */
136EXTERN int obj_noutlets(t_object *x);
137EXTERN int obj_ninlets(t_object *x);
138EXTERN t_outconnect *obj_starttraverseoutlet(t_object *x, t_outlet **op,
139 int nout);
140EXTERN t_outconnect *obj_nexttraverseoutlet(t_outconnect *lastconnect,
141 t_object **destp, t_inlet **inletp, int *whichp);
142EXTERN t_outconnect *obj_connect(t_object *source, int outno,
143 t_object *sink, int inno);
144EXTERN void obj_disconnect(t_object *source, int outno, t_object *sink,
145 int inno);
146EXTERN void outlet_setstacklim(void);
147EXTERN int obj_issignalinlet(t_object *x, int m);
148EXTERN int obj_issignaloutlet(t_object *x, int m);
149EXTERN int obj_nsiginlets(t_object *x);
150EXTERN int obj_nsigoutlets(t_object *x);
151EXTERN int obj_siginletindex(t_object *x, int m);
152EXTERN int obj_sigoutletindex(t_object *x, int m);
153
154/* misc */
155EXTERN void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
156EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);