Hi, I need some advise related to creating an API.
Would you recommend for GObject-Introspection, structs or boxed types on structs?
I have some code and I really love recent changes
http://savannah.nongnu.org/forum/forum.php?forum_id=9728
Here is an example using structs:
http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/fx/ags_fx_dssi_audio.h?h=3.3.x
Basically I do:
typedef struct _AgsFxDssiAudioScopeData AgsFxDssiAudioScopeData;
Would you make this boxed?
https://developer.gnome.org/gobject/stable/gobject-Boxed-Types.html
1 Like
On IRC we talked about if you need a type, you need to create a boxed struct. Else it would be just a black-box.
jensgeorg
(Jens Georg)
3
1 Like
Hi, a black-box is next to ANSI C structs …
I decided to use the type signature:
https://gi.readthedocs.io/en/latest/annotations/giannotations.html#type-signature
As done here:
http://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/audio/fx/ags_fx_analyse_channel.h?h=3.3.x
This because it contains a GRecMutex and other fields it shall not copy.
best regards,
Joël
system
(system)
Closed
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.