General fixes for pictures, picture rendering and picture operations.
[geda-gaf/whiteaudio.git] / libgeda / include / prototype_priv.h
bloba6edf75974bc0516bc299d1b489f9e54174a477e
1 /* a_basic.c */
2 gchar *o_save_objects(TOPLEVEL *toplevel, const GList *object_list, gboolean save_attribs);
4 /* f_print.c */
5 void f_print_set_line_width(FILE *fp, int width);
6 int f_print_set_color(TOPLEVEL *toplevel, FILE *fp, int color);
7 int f_print_header(TOPLEVEL *toplevel, PAGE *page, FILE *fp, int paper_size_x, int paper_size_y, int eps);
8 void f_print_footer(FILE *fp);
9 void f_print_objects(TOPLEVEL *toplevel, FILE *fp, const GList *obj_list, int start_x, int start_y, float scale, int unicode_count, gunichar *unicode_table);
10 int f_print_initialize_glyph_table(void);
12 /* g_rc.c */
13 int vstbl_lookup_str(const vstbl_entry *table, int size, const char *str);
14 int vstbl_get_val(const vstbl_entry *table, int index);
15 SCM g_rc_component_library(SCM path, SCM name);
16 SCM g_rc_component_library_command (SCM listcmd, SCM getcmd, SCM name);
17 SCM g_rc_component_library_funcs (SCM listfunc, SCM getfunc, SCM name);
18 SCM g_rc_component_library_search(SCM path);
19 SCM g_rc_source_library(SCM path);
20 SCM g_rc_source_library_search(SCM path);
21 SCM g_rc_world_size(SCM width, SCM height, SCM border);
22 SCM g_rc_reset_component_library(void);
23 SCM g_rc_reset_source_library(void);
24 SCM g_rc_untitled_name(SCM name);
25 SCM g_rc_bitmap_directory(SCM path);
26 SCM g_rc_scheme_directory(SCM path);
27 SCM g_rc_bus_ripper_symname(SCM scmsymname);
28 SCM g_rc_postscript_prolog(SCM scmsymname);
29 SCM g_rc_map_font_character_to_file(SCM character_param, SCM file_param);
30 SCM g_rc_attribute_promotion(SCM mode);
31 SCM g_rc_promote_invisible(SCM mode);
32 SCM g_rc_keep_invisible(SCM mode);
33 SCM g_rc_always_promote_attributes(SCM scmsymname);
34 SCM g_rc_print_color_map (SCM scm_map);
36 /* g_register.c */
37 void g_register_libgeda_funcs(void);
38 void g_register_libgeda_dirs (void);
40 /* m_bounds.c */
41 void m_bounds_init(BOUNDS *bounds);
42 void m_bounds_of_points(BOUNDS *bounds, sPOINT points[], gint count);
44 /* m_box.c */
45 double m_box_shortest_distance (BOX *box, int x, int y, int solid);
47 /* m_circle.c */
48 double m_circle_shortest_distance (CIRCLE *circle, int x, int y, int solid);
50 /* m_hatch.c */
51 void m_hatch_polygon(GArray *points, gint angle, gint pitch, GArray *lines);
53 /* m_line.c */
54 double m_line_shortest_distance (LINE *circle, int x, int y);
56 /* m_polygon.c */
57 gboolean m_polygon_interior_point(GArray *points, int x, int y);
58 double m_polygon_shortest_distance(GArray *points, int x, int y, gboolean closed);
60 /* m_transform.c */
61 void m_transform_combine(TRANSFORM *result, TRANSFORM *a, TRANSFORM *b );
62 void m_transform_init(TRANSFORM *transform);
63 void m_transform_invert(TRANSFORM *transform, TRANSFORM *inverse);
64 void m_transform_line(TRANSFORM *transform, LINE *line );
65 void m_transform_lines(TRANSFORM *transform, GArray *lines);
66 void m_transform_point(TRANSFORM *transform, gint *x, gint *y);
67 void m_transform_points(TRANSFORM *transform, GArray *points);
68 void m_transform_rotate(TRANSFORM *transform, gdouble angle);
69 void m_transform_scale(TRANSFORM *transform, gdouble factor);
70 void m_transform_translate(TRANSFORM *transform, gdouble dx, gdouble dy);
72 /* o_arc_basic.c */
73 OBJECT *o_arc_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
74 char *o_arc_save(TOPLEVEL *toplevel, OBJECT *object);
75 void o_arc_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
76 void o_arc_print_solid(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
77 void o_arc_print_dotted(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
78 void o_arc_print_dashed(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
79 void o_arc_print_center(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
80 void o_arc_print_phantom(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int angle1, int angle2, int color, int arc_width, int length, int space, int origin_x, int origin_y);
81 double o_arc_shortest_distance(OBJECT *object, int x, int y, int force_soild);
82 gboolean o_arc_within_sweep(ARC *arc, gint x, gint y);
83 void world_get_arc_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
84 gboolean o_arc_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
85 void o_arc_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
87 /* o_attrib.c */
88 GList *o_read_attribs(TOPLEVEL *toplevel,
89 GList *list,
90 OBJECT *object_to_get_attribs,
91 TextBuffer *tb,
92 unsigned int release_ver,
93 unsigned int fileformat_ver);
94 OBJECT *o_attrib_find_attrib_by_name(const GList *list, char *name, int count);
96 /* o_basic.c */
97 void o_bounds_invalidate(TOPLEVEL *toplevel, OBJECT *object);
98 double o_shortest_distance_full(OBJECT *object, int x, int y, int force_solid);
99 PAGE *o_get_page_compat (TOPLEVEL *toplevel, OBJECT *object) G_GNUC_DEPRECATED;
100 void o_emit_pre_change_notify(TOPLEVEL *toplevel, OBJECT *object);
101 void o_emit_change_notify(TOPLEVEL *toplevel, OBJECT *object);
103 /* o_box_basic.c */
104 OBJECT *o_box_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
105 char *o_box_save(TOPLEVEL *toplevel, OBJECT *object);
106 void o_box_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
107 void o_box_print_solid(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int line_width, int length, int space, int origin_x, int origin_y);
108 void o_box_print_dotted(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int line_width, int length, int space, int origin_x, int origin_y);
109 void o_box_print_dashed(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int line_width, int length, int space, int origin_x, int origin_y);
110 void o_box_print_center(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int line_width, int length, int space, int origin_x, int origin_y);
111 void o_box_print_phantom(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int line_width, int length, int space, int origin_x, int origin_y);
112 void o_box_print_filled(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
113 void o_box_print_mesh(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
114 void o_box_print_hatch(TOPLEVEL *toplevel, FILE *fp, int x, int y, int width, int height, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
115 double o_box_shortest_distance(OBJECT *object, int x, int y, int force_soild);
116 void world_get_box_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
117 gboolean o_box_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
118 void o_box_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
120 /* o_bus_basic.c */
121 OBJECT *o_bus_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
122 char *o_bus_save(TOPLEVEL *toplevel, OBJECT *object);
123 void o_bus_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
124 void world_get_bus_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
125 gboolean o_bus_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
126 void o_bus_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
128 /* o_circle_basic.c */
129 OBJECT *o_circle_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
130 char *o_circle_save(TOPLEVEL *toplevel, OBJECT *object);
131 void o_circle_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
132 void o_circle_print_solid(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int circle_width, int length, int space, int origin_x, int origin_y);
133 void o_circle_print_dotted(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int circle_width, int length, int space, int origin_x, int origin_y);
134 void o_circle_print_dashed(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int circle_width, int length, int space, int origin_x, int origin_y);
135 void o_circle_print_center(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int circle_width, int length, int space, int origin_x, int origin_y);
136 void o_circle_print_phantom(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int circle_width, int length, int space, int origin_x, int origin_y);
137 void o_circle_print_filled(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
138 void o_circle_print_mesh(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
139 void o_circle_print_hatch(TOPLEVEL *toplevel, FILE *fp, int x, int y, int radius, int color, int fill_width, int angle1, int pitch1, int angle2, int pitch2, int origin_x, int origin_y);
140 double o_circle_shortest_distance(OBJECT *object, int x, int y, int force_soild);
141 void world_get_circle_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
142 gboolean o_circle_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
143 void o_circle_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
145 /* o_complex_basic.c */
146 OBJECT *o_complex_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
147 char *o_complex_save(TOPLEVEL *toplevel, OBJECT *object);
148 double o_complex_shortest_distance(OBJECT *object, int x, int y, int force_soild);
149 void world_get_complex_bounds(TOPLEVEL *toplevel, OBJECT *complex, int *left, int *top, int *right, int *bottom);
150 gboolean o_complex_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
151 void o_complex_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
152 GList *o_complex_get_promotable (TOPLEVEL *toplevel, OBJECT *object, int detach);
154 /* o_line_basic.c */
155 OBJECT *o_line_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
156 char *o_line_save(TOPLEVEL *toplevel, OBJECT *object);
157 void o_line_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
158 void o_line_print_solid(TOPLEVEL *toplevel, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
159 void o_line_print_dotted(TOPLEVEL *toplevel, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
160 void o_line_print_dashed(TOPLEVEL *toplevel, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
161 void o_line_print_center(TOPLEVEL *toplevel, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
162 void o_line_print_phantom(TOPLEVEL *toplevel, FILE *fp, int x1, int y1, int x2, int y2, int color, int line_width, int length, int space, int origin_x, int origin_y);
163 double o_line_shortest_distance(OBJECT *object, int x, int y, int force_soild);
164 void world_get_line_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
165 gboolean o_line_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
166 void o_line_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
168 /* o_net_basic.c */
169 OBJECT *o_net_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
170 char *o_net_save(TOPLEVEL *toplevel, OBJECT *object);
171 void o_net_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
172 void world_get_net_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
173 gboolean o_net_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
174 void o_net_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
176 /* o_path_basic.c */
177 OBJECT *o_path_read(TOPLEVEL *toplevel, const char *first_line, TextBuffer *tb, unsigned int release_ver, unsigned int fileformat_ver);
178 char *o_path_save(TOPLEVEL *toplevel, OBJECT *object);
179 void o_path_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
180 double o_path_shortest_distance(OBJECT *object, int x, int y, int force_soild);
181 void world_get_path_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
182 gboolean o_path_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
183 void o_path_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
186 /* o_picture.c */
187 OBJECT *o_picture_read(TOPLEVEL *toplevel, const char *first_line, TextBuffer *tb, unsigned int release_ver, unsigned int fileformat_ver);
188 char *o_picture_save(TOPLEVEL *toplevel, OBJECT *object);
189 void o_picture_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
190 int origin_x, int origin_y);
191 double o_picture_shortest_distance(OBJECT *object, int x, int y, int force_soild);
192 void world_get_picture_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
193 gboolean o_picture_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
194 void o_picture_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
195 void o_picture_embed(TOPLEVEL *toplevel, OBJECT *object);
196 void o_picture_unembed(TOPLEVEL *toplevel, OBJECT *object);
198 /* o_pin_basic.c */
199 OBJECT *o_pin_read(TOPLEVEL *toplevel, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
200 char *o_pin_save(TOPLEVEL *toplevel, OBJECT *object);
201 void o_pin_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y);
202 void world_get_pin_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
203 gboolean o_pin_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
204 void o_pin_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
206 /* o_text_basic.c */
207 OBJECT *o_text_read(TOPLEVEL *toplevel, const char *first_line, TextBuffer *tb, unsigned int release_ver, unsigned int fileformat_ver);
208 char *o_text_save(TOPLEVEL *toplevel, OBJECT *object);
209 void o_text_print_text_string(FILE *fp, char *string, int unicode_count, gunichar *unicode_table);
210 void o_text_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y, int unicode_count, gunichar *unicode_table);
211 double o_text_shortest_distance(OBJECT *object, int x, int y, int force_soild);
212 int world_get_text_bounds(TOPLEVEL *toplevel, OBJECT *o_current, int *left, int *top, int *right, int *bottom);
213 gboolean o_text_get_position(TOPLEVEL *toplevel, gint *x, gint *y, OBJECT *object);
214 void o_text_recalc(TOPLEVEL *toplevel, OBJECT *o_current);
216 /* s_clib.c */
217 void s_clib_init (void);
219 /* s_color.c */
220 void s_color_init(void);
221 gchar *s_color_ps_string(gint color);
223 /* s_conn.c */
224 CONN *s_conn_return_new(OBJECT *other_object, int type, int x, int y, int whichone, int other_whichone);
225 int s_conn_uniq(GList *conn_list, CONN *input_conn);
226 int s_conn_remove_other(TOPLEVEL *toplevel, OBJECT *other_object, OBJECT *to_remove);
227 OBJECT *s_conn_check_midpoint(OBJECT *o_current, int x, int y);
228 void s_conn_print(GList *conn_list);
230 /* s_encoding.c */
231 gchar* s_encoding_base64_encode (gchar* src, guint srclen, guint* dstlenp, gboolean strict);
232 gchar* s_encoding_base64_decode (gchar* src, guint srclen, guint* dstlenp);
234 /* s_path.c */
235 int s_path_to_polygon(PATH *path, GArray *points);
236 double s_path_shortest_distance (PATH *path, int x, int y, int solid);
238 /* s_textbuffer.c */
239 TextBuffer *s_textbuffer_new (gchar *data, const gint size);
240 TextBuffer *s_textbuffer_free (TextBuffer *tb);
241 void s_textbuffer_seek (TextBuffer *tb, const gint offset);
242 gchar *s_textbuffer_next (TextBuffer *tb, const gsize count);
243 gchar *s_textbuffer_next_line (TextBuffer *tb);
245 /* s_tile.c */
246 void s_tile_init(TOPLEVEL *toplevel, PAGE *p_current);
247 void s_tile_add_object(TOPLEVEL *toplevel, OBJECT *object);
248 void s_tile_remove_object(OBJECT *object);
249 void s_tile_print(TOPLEVEL *toplevel, PAGE *page);
250 void s_tile_free_all(PAGE *p_current);
252 /* s_weakref.c */
253 void s_weakref_notify (void *dead_ptr, GList *weak_refs);
254 GList *s_weakref_add (GList *weak_refs, void (*notify_func)(void *, void *), void *user_data);
255 GList *s_weakref_remove (GList *weak_refs, void (*notify_func)(void *, void *), void *user_data);
256 GList *s_weakref_add_ptr (GList *weak_refs, void **weak_pointer_loc);
257 GList *s_weakref_remove_ptr (GList *weak_refs, void **weak_pointer_loc);