LibrePCB Developers Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ffi.h
Go to the documentation of this file.
1// WARNING: This file is autogenerated by cbindgen, don't modify it manually.
2// clang-format off
3
4#pragma once
5
6#include <cstdarg>
7#include <cstddef>
8#include <cstdint>
9#include <cstdlib>
10#include <ostream>
11#include <new>
12#include <QtCore>
13#define NONNULL
14
15namespace librepcb {
16namespace rs {
17
35
61
79
87 Front,
91 Back,
92};
93
101 Front,
105 Back,
109 Both,
110};
111
119 BomOnly,
123 LeftRight,
127 TopBottom,
128};
129
204struct InteractiveHtmlBom;
205
209struct ZipArchive;
210
214struct ZipWriter;
215
223 bool front;
227 bool back;
231 float pos_x;
235 float pos_y;
239 float angle;
243 const QString *svgpath;
259 const QString *net;
263 bool pin1;
264};
265
273 const QString *reference;
277 size_t id;
278};
279
280extern "C" {
281
282extern size_t ffi_qbytearray_len(const QByteArray * NONNULL obj);
283
284extern const uint8_t *ffi_qbytearray_data(const QByteArray * NONNULL obj);
285
286extern uint8_t *ffi_qbytearray_data_mut(QByteArray * NONNULL obj);
287
288extern void ffi_qbytearray_resize(QByteArray * NONNULL obj,
289 size_t len,
290 uint8_t value);
291
292extern size_t ffi_qstring_len(const QString * NONNULL obj);
293
294extern const uint16_t *ffi_qstring_utf16(const QString * NONNULL obj);
295
296extern void ffi_qstring_set(QString * NONNULL obj, const char *s, size_t len);
297
298extern size_t ffi_qstringlist_len(const QStringList * NONNULL obj);
299
300extern const QString *ffi_qstringlist_at(const QStringList * NONNULL obj,
301 size_t index);
302
307 const QString * NONNULL company,
308 const QString * NONNULL revision,
309 const QString * NONNULL date,
310 float bottom_left_x,
311 float bottom_left_y,
312 float top_right_x,
313 float top_right_y);
314
319
327 bool dark);
328
334 float angle,
335 bool offset_back);
336
341
346
351
356 const QStringList * NONNULL checkboxes);
357
362 const QStringList * NONNULL fields);
363
370 const QString * NONNULL svgpath,
371 float width,
372 bool filled);
373
379 float pos_x,
380 float pos_y,
381 float angle,
382 float bottom_left_x,
383 float bottom_left_y,
384 float top_right_x,
385 float top_right_y,
386 bool mount,
387 const QStringList * NONNULL fields,
388 const InteractiveHtmlBomPad *pads_array,
389 size_t pads_size);
390
397 const InteractiveHtmlBomRefMap *parts_array,
398 size_t parts_size);
399
405 float start_x,
406 float start_y,
407 float end_x,
408 float end_y,
409 float width,
410 const QString *net_name);
411
416 const InteractiveHtmlBomLayer *layers_array,
417 size_t layers_size,
418 float pos_x,
419 float pos_y,
420 float diameter,
421 float drill_diameter,
422 const QString *net_name);
423
429 const QString * NONNULL svgpath,
430 const QString *net_name);
431
436 QString * NONNULL out,
437 QString * NONNULL err);
438
443
448 QString * NONNULL err);
449
454 QString * NONNULL err);
455
460
465
470 size_t index,
471 QString * NONNULL name,
472 QString * NONNULL err);
473
478 size_t index,
479 QByteArray * NONNULL buf,
480 QString * NONNULL err);
481
486 const QString * NONNULL dir);
487
492 QString * NONNULL err);
493
498
503
508 const QString * NONNULL name,
509 const QByteArray * NONNULL data,
510 uint32_t mode,
511 QString * NONNULL err);
512
517
518} // extern "C"
519
520} // namespace rs
521} // namespace librepcb
522
523// clang-format on
Zip file reader.
Definition interactivehtmlbom.h:55
Zip file reader.
Definition ziparchive.h:52
Zip file writer.
Definition zipwriter.h:50
#define NONNULL
Definition ffi.h:13
void ffi_ibom_set_fields(InteractiveHtmlBom *NONNULL obj, const QStringList *NONNULL fields)
void ffi_ibom_set_show_silkscreen(InteractiveHtmlBom *NONNULL obj, bool show)
void ffi_qbytearray_resize(QByteArray *obj, std::size_t len, uint8_t value)
Definition ffi.cpp:47
void ffi_zipwriter_delete(ZipWriter *obj)
InteractiveHtmlBomDrawingKind
Definition ffi.h:21
InteractiveHtmlBomSides
Definition ffi.h:97
bool ffi_ziparchive_name_for_index(ZipArchive *NONNULL obj, size_t index, QString *NONNULL name, QString *NONNULL err)
InteractiveHtmlBomDrawingLayer
Definition ffi.h:39
void ffi_ibom_add_zone(InteractiveHtmlBom *NONNULL obj, InteractiveHtmlBomLayer layer, const QString *NONNULL svgpath, const QString *net_name)
InteractiveHtmlBomViewMode
Definition ffi.h:115
InteractiveHtmlBom * ffi_ibom_new(const QString *NONNULL title, const QString *NONNULL company, const QString *NONNULL revision, const QString *NONNULL date, float bottom_left_x, float bottom_left_y, float top_right_x, float top_right_y)
bool ffi_zipwriter_write_file(ZipWriter *NONNULL obj, const QString *NONNULL name, const QByteArray *NONNULL data, uint32_t mode, QString *NONNULL err)
const QString * ffi_qstringlist_at(const QStringList *obj, std::size_t index)
Definition ffi.cpp:76
std::size_t ffi_qstring_len(const QString *obj)
Definition ffi.cpp:60
void ffi_ibom_set_view_config(InteractiveHtmlBom *NONNULL obj, InteractiveHtmlBomViewMode mode, InteractiveHtmlBomHighlightPin1Mode highlight_pin1, bool dark)
void ffi_qstring_set(QString *obj, const char *s, std::size_t len)
Definition ffi.cpp:68
void ffi_ibom_add_drawing(InteractiveHtmlBom *NONNULL obj, InteractiveHtmlBomDrawingKind kind, InteractiveHtmlBomDrawingLayer layer, const QString *NONNULL svgpath, float width, bool filled)
void ffi_ibom_add_via(InteractiveHtmlBom *NONNULL obj, const InteractiveHtmlBomLayer *layers_array, size_t layers_size, float pos_x, float pos_y, float diameter, float drill_diameter, const QString *net_name)
size_t ffi_ibom_add_footprint(InteractiveHtmlBom *NONNULL obj, InteractiveHtmlBomLayer layer, float pos_x, float pos_y, float angle, float bottom_left_x, float bottom_left_y, float top_right_x, float top_right_y, bool mount, const QStringList *NONNULL fields, const InteractiveHtmlBomPad *pads_array, size_t pads_size)
bool ffi_ziparchive_extract(ZipArchive *NONNULL obj, const QString *NONNULL dir)
uint8_t * ffi_qbytearray_data_mut(QByteArray *obj)
Definition ffi.cpp:43
void ffi_ibom_set_rotation(InteractiveHtmlBom *NONNULL obj, float angle, bool offset_back)
bool ffi_ibom_generate_html(const InteractiveHtmlBom *NONNULL obj, QString *NONNULL out, QString *NONNULL err)
ZipWriter * ffi_zipwriter_new_to_file(const QString *NONNULL path, QString *NONNULL err)
void ffi_ibom_delete(InteractiveHtmlBom *obj)
InteractiveHtmlBomLayer
Definition ffi.h:83
void ffi_ibom_add_bom_line(InteractiveHtmlBom *NONNULL obj, InteractiveHtmlBomSides sides, const InteractiveHtmlBomRefMap *parts_array, size_t parts_size)
bool ffi_zipwriter_finish(ZipWriter *NONNULL obj, QString *NONNULL err)
bool ffi_ziparchive_read_by_index(ZipArchive *NONNULL obj, size_t index, QByteArray *NONNULL buf, QString *NONNULL err)
ZipArchive * ffi_ziparchive_new_from_file(const QString *NONNULL path, QString *NONNULL err)
void ffi_ibom_add_track(InteractiveHtmlBom *NONNULL obj, InteractiveHtmlBomLayer layer, float start_x, float start_y, float end_x, float end_y, float width, const QString *net_name)
void ffi_ibom_set_checkboxes(InteractiveHtmlBom *NONNULL obj, const QStringList *NONNULL checkboxes)
void ffi_increment_number_in_string(QString *NONNULL s)
std::size_t ffi_qbytearray_len(const QByteArray *obj)
Definition ffi.cpp:35
const uint8_t * ffi_qbytearray_data(const QByteArray *obj)
Definition ffi.cpp:39
InteractiveHtmlBomHighlightPin1Mode
Definition ffi.h:65
void ffi_ibom_set_show_pads(InteractiveHtmlBom *NONNULL obj, bool show)
std::size_t ffi_qstringlist_len(const QStringList *obj)
Definition ffi.cpp:72
void ffi_ziparchive_delete(ZipArchive *obj)
const uint16_t * ffi_qstring_utf16(const QString *obj)
Definition ffi.cpp:64
ZipArchive * ffi_ziparchive_new_from_mem(const QByteArray *NONNULL data, QString *NONNULL err)
ZipWriter * ffi_zipwriter_new_to_mem(QByteArray *NONNULL data)
void ffi_ibom_set_show_fabrication(InteractiveHtmlBom *NONNULL obj, bool show)
size_t ffi_ziparchive_len(const ZipArchive *NONNULL obj)
Definition occmodel.cpp:77
bool has_drill
Definition ffi.h:247
bool front
Definition ffi.h:223
float drillsize_y
Definition ffi.h:255
float pos_y
Definition ffi.h:235
const QString * net
Definition ffi.h:259
float drillsize_x
Definition ffi.h:251
float angle
Definition ffi.h:239
bool back
Definition ffi.h:227
bool pin1
Definition ffi.h:263
const QString * svgpath
Definition ffi.h:243
float pos_x
Definition ffi.h:231
size_t id
Definition ffi.h:277
const QString * reference
Definition ffi.h:273