CicmWrapper  Beta 0.4
A wrapper for Pure Data
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
epdmax.h
1 /*
2  * CicmWrapper
3  * Copyright (C) 2013 Pierre Guillot, CICM - Université Paris 8
4  * All rights reserved.
5  * Website : https://github.com/CICM/CicmWrapper
6  * Contacts : cicm.mshparisnord@gmail.com
7  * For information on usage and redistribution, and for a DISCLAIMER OF ALL
8  * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
9  */
10 
11 #ifndef DEF_EPD_MAX
12 #define DEF_EPD_MAX
13 
14 typedef t_typ_method method;
15 typedef t_matrix t_jmatrix;
16 typedef t_elayer t_jgraphics;
17 typedef t_rgba t_jrgba;
18 typedef t_etext t_jtextlayout;
19 typedef t_efont t_jfont;
20 typedef t_epopup t_jpopupmenu;
22 typedef t_pd_err t_max_err;
23 typedef t_ebox t_jbox;
24 typedef t_edspobj t_pxobject;
25 typedef t_edspbox t_pxjbox;
26 typedef t_binbuf t_dictionary;
27 
28 #define A_LONG A_FLOAT
29 #define A_SYM A_SYMBOL
30 #define atom_getsym(atom) atom_getsymbol(atom)
31 
32 #define outlet_int(outlet, val) outlet_float(outlet, (float)val)
33 #define bangout(x) outlet_new((t_object *)x, &s_bang)
34 #define floatout(x) outlet_new((t_object *)x, &s_float)
35 #define symbolout(x) outlet_new((t_object *)x, &s_symbol)
36 #define listout(x) outlet_new((t_object *)x, &s_list)
37 #define anythingout(x) outlet_new((t_object *)x, &s_anything)
38 
39 #define object_attr_setvalueof eobj_attr_setvalueof
40 #define object_attr_getvalueof eobj_attr_getvalueof
41 
42 /*
43 #define pd_library_add_folder epd_add_folder
44 #define object_error pd_error
45 
46 #define ASSIST_INLET 1
47 #define ASSIST_OUTLET 2
48 #define sys_getdspstate() canvas_dspstate
49 
50 #define JGRAPHICS_2PI EPD_2PI
51 #define JGRAPHICS_PI EPD_PI
52 
53 #define JBOX_DRAWFIRSTIN 0
54 #define JBOX_NODRAWBOX 0
55 #define JBOX_DRAWINLAST 0
56 #define JBOX_TRANSPARENT 0
57 #define JBOX_NOGROW EBOX_GROWNO
58 #define JBOX_GROWY EBOX_GROWLINK
59 #define JBOX_GROWBOTH EBOX_GROWINDI
60 #define JBOX_IGNORELOCKCLICK EBOX_IGNORELOCKCLICK
61 #define JBOX_HILITE 0
62 #define JBOX_BACKGROUND 0
63 #define JBOX_NOFLOATINSPECTOR 0
64 #define JBOX_TEXTFIELD 0
65 #define JBOX_FIXWIDTH 0
66 #define JBOX_FONTATTR 0
67 #define JBOX_TEXTJUSTIFICATIONATTR 0
68 #define JBOX_BINBUF 0
69 #define JBOX_MOUSEDRAGDELTA 0
70 #define JBOX_COLOR 0
71 #define JBOX_DRAWIOLOCKED 0
72 #define JBOX_DRAWBACKGROUND 0
73 #define JBOX_NOINSPECTFIRSTIN 0
74 
75 #define Z_NO_INPLACE E_NO_INPLACE
76 #define Z_PUT_LAST 2
77 #define Z_PUT_FIRST 4
78 #define Z_IGNORE_DISABLE 8
79 
80 
81 //#define class_new eclass_new
82 //#define class_addmethod eclass_addmethod
83 
84 #define jbox_initclass(class, flags) eclass_guiinit(class, flags)
85 #define class_dspinit(class) eclass_dspinit(class)
86 #define class_dspinitjbox(class) eclass_dspinit(class)
87 #define class_register(name, class)
88 #define object_alloc(class) eobj_new(class)
89 #define jbox_new(t_jbox, flags, argc, argv) ebox_new(t_jbox, flags)
90 #define dsp_setupjbox(t_jbox, nins, nouts) eobj_dspsetup(t_jbox, nins, nouts)
91 #define jbox_ready(t_jbox) ebox_ready(t_jbox)
92 #define jbox_free(t_jbox) ebox_free(t_jbox)
93 #define dsp_freejbox(t_jbox) ebox_free(t_jbox)
94 #define jbox_redraw(t_jbox) ebox_redraw(t_jbox)
95 #define jbox_resize_inputs(t_jbox, nins) eobj_resize_inputs(t_jbox, nins)
96 #define jbox_resize_outputs(t_jbox, nouts)
97 #define jbox_get_rect_for_view(t_object, view, rect) ebox_get_rect_for_view(t_object, view, rect)
98 #define jmouse_setcursor(patcherview, t_jbox, mode) ebox_set_cursor(t_jbox, mode)
99 #define jbox_start_layer(box, view, name, x, y) ebox_start_layer((t_ebox *)box, name, x, y)
100 #define jbox_end_layer(box, view, name) ebox_end_layer((t_ebox *)box, name)
101 #define jbox_invalidate_layer(box, view, name) ebox_invalidate_layer((t_ebox *)box, name)
102 #define jbox_paint_layer(box, view, name, x, y) ebox_paint_layer((t_ebox *)box, name, x, y)
103 #define jbox_notify(object, s, msg, sender, data) ebox_notify(object, s, msg, sender, data)
104 
105 #define jbox_get_fontname(object) ebox_getfontname(object)
106 #define jbox_get_font_slant(object) ebox_getfontslant(object)
107 #define jbox_get_font_weight(object) ebox_getfontweight(object)
108 #define jbox_get_fontsize(object) ebox_getfontsize(object)
109 
110 
111 #define dictionary_new binbuf_new
112 #define dictionary_free binbuf_free
113 #define dictionary_write(dict, filename, dir) binbuf_write(dict, filename, dir, 0)
114 #define attr_dictionary_process(object, dict) ebox_attrprocess_viabinbuf(object, dict)
115 #define object_dictionaryarg(ac, av) binbuf_via_atoms(ac, av)
116 #define dictionary_copyatoms(d, key, argc, argv) binbuf_get_attribute(d, key, argc, argv)
117 
118 #define jgraphics_set_line_width egraphics_set_line_width
119 #define jgraphics_set_source_jrgba egraphics_set_color_rgba
120 #define jgraphics_fill egraphics_fill
121 #define jgraphics_fill_preserve egraphics_fill_preserve
122 #define jgraphics_stroke egraphics_stroke
123 #define jgraphics_stroke_preserve egraphics_stroke_preserve
124 
125 #define jgraphics_rotate egraphics_rotate
126 
127 // POPUP MENU //
128 #define jpopupmenu_create(jbox, name) epopupmenu_create(jbox, name)
129 #define jpopupmenu_setfont(menu, font) epopupmenu_setfont(menu, font)
130 #define jpopupmenu_popup(menu, screen, defitemid) epopupmenu_popup(menu, screen, defitemid)
131 #define jpopupmenu_destroy(menu) (menu = menu) // Useless...
132 #define jpopupmenu_addseperator(menu) epopupmenu_addseperator(menu)
133 #define jpopupmenu_additem(menu, itemid, text, textColor, checked, disabled, icon) epopupmenu_additem(menu, itemid, text, checked, disabled)
134 
135 #define jgraphics_set_line_width egraphics_set_line_width
136 #define jgraphics_fill egraphics_fill
137 #define jgraphics_fill_preserve egraphics_fill_preserve
138 #define jgraphics_stroke egraphics_stroke
139 #define jgraphics_stroke_preserve egraphics_stroke_preserve
140 
141 #define jgraphics_rotate egraphics_rotate
142 #define jgraphics_set_matrix egraphics_set_matrix
143 
144 #define jgraphics_rectangle(graphics, x, y, width, height) egraphics_rectangle(graphics, x, y, width, height)
145 #define jgraphics_arc(graphics, xc, yc, radius, angle1, angle2) egraphics_arc(graphics, xc, yc, radius, angle1, angle2)
146 
147 #define jgraphics_line_to(graphics, x, y) egraphics_line_to(graphics, x, y)
148 #define jgraphics_move_to(graphics, x, y) egraphics_move_to(graphics, x, y)
149 
150 #define jgraphics_close_path(graphics) egraphics_close_path(graphics)
151 
152 #define jgraphics_matrix_init(matrix, xx, yx, xy, yy, x0, y0) egraphics_matrix_init(matrix, xx, yx, xy, yy, x0, y0)
153 
154 #define jrgba_addContrast(color, contrast) rgba_addContrast(color, contrast)
155 
156 #define jtextlayout_create() etext_layout_create()
157 #define jtextlayout_destroy(textlayout) etext_layout_destroy(textlayout)
158 #define jtextlayout_set(textlayout, text, jfont, x, y, width, height, justification, wrap) etext_layout_set(textlayout, text, jfont, x, y, width, height, justification, wrap)
159 #define jtextlayout_settextcolor(textlayout, color) etext_layout_settextcolor(textlayout, color)
160 #define jtextlayout_draw(textlayout, g) etext_layout_draw(textlayout, g)
161 #define jfont_create(family, slant, weight, size) efont_create(family, slant, weight, size)
162 #define jfont_destroy(font) efont_destroy(font)
163 
164 #define cicm_rgba_addContrast(color, contrast) rgba_addContrast(color, contrast)
165 
166 */
167 #endif
168 
The t_binbuf struture.
Definition: enative.h:58
The popup structure.
Definition: edefine.h:403
The DSP object.
Definition: edefine.h:589
void(* t_typ_method)(void *x,...)
The standart method.
Definition: edefine.h:71
long t_pd_err
The error type.
Definition: edefine.h:69
The font structure.
Definition: edefine.h:322
The drawing layer.
Definition: edefine.h:373
A rgba color structure.
Definition: edefine.h:267
The text structure.
Definition: edefine.h:336
A matrix structure.
Definition: edefine.h:240
The drawing parameters.
Definition: edefine.h:686
The GUI DSP object.
Definition: edefine.h:745
The GUI object.
Definition: edefine.h:701