gimarshallingtests.h 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948
  1. /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
  2. * vim: tabstop=4 shiftwidth=4 expandtab
  3. */
  4. #include <glib-object.h>
  5. #include "gitestmacros.h"
  6. #ifndef __GI_MARSHALLING_TESTS_H__
  7. #define __GI_MARSHALLING_TESTS_H__
  8. typedef struct _GIMarshallingTestsSimpleStruct GIMarshallingTestsSimpleStruct;
  9. typedef struct _GIMarshallingTestsBoxedStruct GIMarshallingTestsBoxedStruct;
  10. /* Constants */
  11. #define GI_MARSHALLING_TESTS_CONSTANT_NUMBER 42
  12. #define GI_MARSHALLING_TESTS_CONSTANT_UTF8 "const \xe2\x99\xa5 utf8"
  13. /* Booleans */
  14. _GI_TEST_EXTERN
  15. gboolean gi_marshalling_tests_boolean_return_true (void);
  16. _GI_TEST_EXTERN
  17. gboolean gi_marshalling_tests_boolean_return_false (void);
  18. _GI_TEST_EXTERN
  19. void gi_marshalling_tests_boolean_in_true (gboolean v);
  20. _GI_TEST_EXTERN
  21. void gi_marshalling_tests_boolean_in_false (gboolean v);
  22. _GI_TEST_EXTERN
  23. void gi_marshalling_tests_boolean_out_true (gboolean *v);
  24. _GI_TEST_EXTERN
  25. void gi_marshalling_tests_boolean_out_false (gboolean *v);
  26. _GI_TEST_EXTERN
  27. void gi_marshalling_tests_boolean_inout_true_false (gboolean *v);
  28. _GI_TEST_EXTERN
  29. void gi_marshalling_tests_boolean_inout_false_true (gboolean *v);
  30. /* Integers */
  31. _GI_TEST_EXTERN
  32. gint8 gi_marshalling_tests_int8_return_max (void);
  33. _GI_TEST_EXTERN
  34. gint8 gi_marshalling_tests_int8_return_min (void);
  35. _GI_TEST_EXTERN
  36. void gi_marshalling_tests_int8_in_max (gint8 v);
  37. _GI_TEST_EXTERN
  38. void gi_marshalling_tests_int8_in_min (gint8 v);
  39. _GI_TEST_EXTERN
  40. void gi_marshalling_tests_int8_out_max (gint8 *v);
  41. _GI_TEST_EXTERN
  42. void gi_marshalling_tests_int8_out_min (gint8 *v);
  43. _GI_TEST_EXTERN
  44. void gi_marshalling_tests_int8_inout_max_min (gint8 *v);
  45. _GI_TEST_EXTERN
  46. void gi_marshalling_tests_int8_inout_min_max (gint8 *v);
  47. _GI_TEST_EXTERN
  48. guint8 gi_marshalling_tests_uint8_return (void);
  49. _GI_TEST_EXTERN
  50. void gi_marshalling_tests_uint8_in (guint8 v);
  51. _GI_TEST_EXTERN
  52. void gi_marshalling_tests_uint8_out (guint8 *v);
  53. _GI_TEST_EXTERN
  54. void gi_marshalling_tests_uint8_inout (guint8 *v);
  55. _GI_TEST_EXTERN
  56. gint16 gi_marshalling_tests_int16_return_max (void);
  57. _GI_TEST_EXTERN
  58. gint16 gi_marshalling_tests_int16_return_min (void);
  59. _GI_TEST_EXTERN
  60. void gi_marshalling_tests_int16_in_max (gint16 v);
  61. _GI_TEST_EXTERN
  62. void gi_marshalling_tests_int16_in_min (gint16 v);
  63. _GI_TEST_EXTERN
  64. void gi_marshalling_tests_int16_out_max (gint16 *v);
  65. _GI_TEST_EXTERN
  66. void gi_marshalling_tests_int16_out_min (gint16 *v);
  67. _GI_TEST_EXTERN
  68. void gi_marshalling_tests_int16_inout_max_min (gint16 *v);
  69. _GI_TEST_EXTERN
  70. void gi_marshalling_tests_int16_inout_min_max (gint16 *v);
  71. _GI_TEST_EXTERN
  72. guint16 gi_marshalling_tests_uint16_return (void);
  73. _GI_TEST_EXTERN
  74. void gi_marshalling_tests_uint16_in (guint16 v);
  75. _GI_TEST_EXTERN
  76. void gi_marshalling_tests_uint16_out (guint16 *v);
  77. _GI_TEST_EXTERN
  78. void gi_marshalling_tests_uint16_inout (guint16 *v);
  79. _GI_TEST_EXTERN
  80. gint32 gi_marshalling_tests_int32_return_max (void);
  81. _GI_TEST_EXTERN
  82. gint32 gi_marshalling_tests_int32_return_min (void);
  83. _GI_TEST_EXTERN
  84. void gi_marshalling_tests_int32_in_max (gint32 v);
  85. _GI_TEST_EXTERN
  86. void gi_marshalling_tests_int32_in_min (gint32 v);
  87. _GI_TEST_EXTERN
  88. void gi_marshalling_tests_int32_out_max (gint32 *v);
  89. _GI_TEST_EXTERN
  90. void gi_marshalling_tests_int32_out_min (gint32 *v);
  91. _GI_TEST_EXTERN
  92. void gi_marshalling_tests_int32_inout_max_min (gint32 *v);
  93. _GI_TEST_EXTERN
  94. void gi_marshalling_tests_int32_inout_min_max (gint32 *v);
  95. _GI_TEST_EXTERN
  96. guint32 gi_marshalling_tests_uint32_return (void);
  97. _GI_TEST_EXTERN
  98. void gi_marshalling_tests_uint32_in (guint32 v);
  99. _GI_TEST_EXTERN
  100. void gi_marshalling_tests_uint32_out (guint32 *v);
  101. _GI_TEST_EXTERN
  102. void gi_marshalling_tests_uint32_inout (guint32 *v);
  103. _GI_TEST_EXTERN
  104. gint64 gi_marshalling_tests_int64_return_max (void);
  105. _GI_TEST_EXTERN
  106. gint64 gi_marshalling_tests_int64_return_min (void);
  107. _GI_TEST_EXTERN
  108. void gi_marshalling_tests_int64_in_max (gint64 v);
  109. _GI_TEST_EXTERN
  110. void gi_marshalling_tests_int64_in_min (gint64 v);
  111. _GI_TEST_EXTERN
  112. void gi_marshalling_tests_int64_out_max (gint64 *v);
  113. _GI_TEST_EXTERN
  114. void gi_marshalling_tests_int64_out_min (gint64 *v);
  115. _GI_TEST_EXTERN
  116. void gi_marshalling_tests_int64_inout_max_min (gint64 *v);
  117. _GI_TEST_EXTERN
  118. void gi_marshalling_tests_int64_inout_min_max (gint64 *v);
  119. _GI_TEST_EXTERN
  120. guint64 gi_marshalling_tests_uint64_return (void);
  121. _GI_TEST_EXTERN
  122. void gi_marshalling_tests_uint64_in (guint64 v);
  123. _GI_TEST_EXTERN
  124. void gi_marshalling_tests_uint64_out (guint64 *v);
  125. _GI_TEST_EXTERN
  126. void gi_marshalling_tests_uint64_inout (guint64 *v);
  127. _GI_TEST_EXTERN
  128. gshort gi_marshalling_tests_short_return_max (void);
  129. _GI_TEST_EXTERN
  130. gshort gi_marshalling_tests_short_return_min (void);
  131. _GI_TEST_EXTERN
  132. void gi_marshalling_tests_short_in_max (gshort short_);
  133. _GI_TEST_EXTERN
  134. void gi_marshalling_tests_short_in_min (gshort short_);
  135. _GI_TEST_EXTERN
  136. void gi_marshalling_tests_short_out_max (gshort *short_);
  137. _GI_TEST_EXTERN
  138. void gi_marshalling_tests_short_out_min (gshort *short_);
  139. _GI_TEST_EXTERN
  140. void gi_marshalling_tests_short_inout_max_min (gshort *short_);
  141. _GI_TEST_EXTERN
  142. void gi_marshalling_tests_short_inout_min_max (gshort *short_);
  143. _GI_TEST_EXTERN
  144. gushort gi_marshalling_tests_ushort_return (void);
  145. _GI_TEST_EXTERN
  146. void gi_marshalling_tests_ushort_in (gushort ushort_);
  147. _GI_TEST_EXTERN
  148. void gi_marshalling_tests_ushort_out (gushort *ushort_);
  149. _GI_TEST_EXTERN
  150. void gi_marshalling_tests_ushort_inout (gushort *ushort_);
  151. _GI_TEST_EXTERN
  152. gint gi_marshalling_tests_int_return_max (void);
  153. _GI_TEST_EXTERN
  154. gint gi_marshalling_tests_int_return_min (void);
  155. _GI_TEST_EXTERN
  156. void gi_marshalling_tests_int_in_max (gint int_);
  157. _GI_TEST_EXTERN
  158. void gi_marshalling_tests_int_in_min (gint int_);
  159. _GI_TEST_EXTERN
  160. void gi_marshalling_tests_int_out_max (gint *int_);
  161. _GI_TEST_EXTERN
  162. void gi_marshalling_tests_int_out_min (gint *int_);
  163. _GI_TEST_EXTERN
  164. void gi_marshalling_tests_int_inout_max_min (gint *int_);
  165. _GI_TEST_EXTERN
  166. void gi_marshalling_tests_int_inout_min_max (gint *int_);
  167. _GI_TEST_EXTERN
  168. guint gi_marshalling_tests_uint_return (void);
  169. _GI_TEST_EXTERN
  170. void gi_marshalling_tests_uint_in (guint uint_);
  171. _GI_TEST_EXTERN
  172. void gi_marshalling_tests_uint_out (guint *uint_);
  173. _GI_TEST_EXTERN
  174. void gi_marshalling_tests_uint_inout (guint *uint_);
  175. _GI_TEST_EXTERN
  176. glong gi_marshalling_tests_long_return_max (void);
  177. _GI_TEST_EXTERN
  178. glong gi_marshalling_tests_long_return_min (void);
  179. _GI_TEST_EXTERN
  180. void gi_marshalling_tests_long_in_max (glong long_);
  181. _GI_TEST_EXTERN
  182. void gi_marshalling_tests_long_in_min (glong long_);
  183. _GI_TEST_EXTERN
  184. void gi_marshalling_tests_long_out_max (glong *long_);
  185. _GI_TEST_EXTERN
  186. void gi_marshalling_tests_long_out_min (glong *long_);
  187. _GI_TEST_EXTERN
  188. void gi_marshalling_tests_long_inout_max_min (glong *long_);
  189. _GI_TEST_EXTERN
  190. void gi_marshalling_tests_long_inout_min_max (glong *long_);
  191. _GI_TEST_EXTERN
  192. gulong gi_marshalling_tests_ulong_return (void);
  193. _GI_TEST_EXTERN
  194. void gi_marshalling_tests_ulong_in (gulong ulong_);
  195. _GI_TEST_EXTERN
  196. void gi_marshalling_tests_ulong_out (gulong *ulong_);
  197. _GI_TEST_EXTERN
  198. void gi_marshalling_tests_ulong_inout (gulong *ulong_);
  199. _GI_TEST_EXTERN
  200. gssize gi_marshalling_tests_ssize_return_max (void);
  201. _GI_TEST_EXTERN
  202. gssize gi_marshalling_tests_ssize_return_min (void);
  203. _GI_TEST_EXTERN
  204. void gi_marshalling_tests_ssize_in_max (gssize ssize);
  205. _GI_TEST_EXTERN
  206. void gi_marshalling_tests_ssize_in_min (gssize ssize);
  207. _GI_TEST_EXTERN
  208. void gi_marshalling_tests_ssize_out_max (gssize *ssize);
  209. _GI_TEST_EXTERN
  210. void gi_marshalling_tests_ssize_out_min (gssize *ssize);
  211. _GI_TEST_EXTERN
  212. void gi_marshalling_tests_ssize_inout_max_min (gssize *ssize);
  213. _GI_TEST_EXTERN
  214. void gi_marshalling_tests_ssize_inout_min_max (gssize *ssize);
  215. _GI_TEST_EXTERN
  216. gsize gi_marshalling_tests_size_return (void);
  217. _GI_TEST_EXTERN
  218. void gi_marshalling_tests_size_in (gsize size);
  219. _GI_TEST_EXTERN
  220. void gi_marshalling_tests_size_out (gsize *size);
  221. _GI_TEST_EXTERN
  222. void gi_marshalling_tests_size_inout (gsize *size);
  223. /* Floating-point */
  224. _GI_TEST_EXTERN
  225. gfloat gi_marshalling_tests_float_return (void);
  226. _GI_TEST_EXTERN
  227. void gi_marshalling_tests_float_in (gfloat v);
  228. _GI_TEST_EXTERN
  229. void gi_marshalling_tests_float_out (gfloat *v);
  230. _GI_TEST_EXTERN
  231. void gi_marshalling_tests_float_inout (gfloat *v);
  232. _GI_TEST_EXTERN
  233. gdouble gi_marshalling_tests_double_return (void);
  234. _GI_TEST_EXTERN
  235. void gi_marshalling_tests_double_in (gdouble v);
  236. _GI_TEST_EXTERN
  237. void gi_marshalling_tests_double_out (gdouble *v);
  238. _GI_TEST_EXTERN
  239. void gi_marshalling_tests_double_inout (gdouble *v);
  240. /* Timestamps */
  241. _GI_TEST_EXTERN
  242. time_t gi_marshalling_tests_time_t_return (void);
  243. _GI_TEST_EXTERN
  244. void gi_marshalling_tests_time_t_in (time_t v);
  245. _GI_TEST_EXTERN
  246. void gi_marshalling_tests_time_t_out (time_t *v);
  247. _GI_TEST_EXTERN
  248. void gi_marshalling_tests_time_t_inout (time_t *v);
  249. /* GType */
  250. _GI_TEST_EXTERN
  251. GType gi_marshalling_tests_gtype_return (void);
  252. _GI_TEST_EXTERN
  253. GType gi_marshalling_tests_gtype_string_return (void);
  254. _GI_TEST_EXTERN
  255. void gi_marshalling_tests_gtype_in (GType gtype);
  256. _GI_TEST_EXTERN
  257. void gi_marshalling_tests_gtype_string_in (GType gtype);
  258. _GI_TEST_EXTERN
  259. void gi_marshalling_tests_gtype_out (GType *gtype);
  260. _GI_TEST_EXTERN
  261. void gi_marshalling_tests_gtype_string_out (GType *gtype);
  262. _GI_TEST_EXTERN
  263. void gi_marshalling_tests_gtype_inout (GType *gtype);
  264. /* UTF-8 */
  265. _GI_TEST_EXTERN
  266. const gchar *gi_marshalling_tests_utf8_none_return (void);
  267. _GI_TEST_EXTERN
  268. gchar *gi_marshalling_tests_utf8_full_return (void);
  269. _GI_TEST_EXTERN
  270. void gi_marshalling_tests_utf8_none_in (const gchar *utf8);
  271. _GI_TEST_EXTERN
  272. void gi_marshalling_tests_utf8_full_in (gchar *utf8);
  273. _GI_TEST_EXTERN
  274. void gi_marshalling_tests_utf8_none_out (gchar **utf8);
  275. _GI_TEST_EXTERN
  276. void gi_marshalling_tests_utf8_full_out (gchar **utf8);
  277. _GI_TEST_EXTERN
  278. void gi_marshalling_tests_utf8_dangling_out (gchar **utf8);
  279. _GI_TEST_EXTERN
  280. void gi_marshalling_tests_utf8_none_inout (gchar **utf8);
  281. _GI_TEST_EXTERN
  282. void gi_marshalling_tests_utf8_full_inout (gchar **utf8);
  283. _GI_TEST_EXTERN
  284. GSList *gi_marshalling_tests_filename_list_return (void);
  285. _GI_TEST_EXTERN
  286. void gi_marshalling_tests_utf8_as_uint8array_in (const guint8 *array,
  287. gsize len);
  288. /* Enum */
  289. typedef enum
  290. {
  291. GI_MARSHALLING_TESTS_ENUM_VALUE1,
  292. GI_MARSHALLING_TESTS_ENUM_VALUE2,
  293. GI_MARSHALLING_TESTS_ENUM_VALUE3 = 42
  294. } GIMarshallingTestsEnum;
  295. typedef enum
  296. {
  297. GI_MARSHALLING_TESTS_SECOND_ENUM_SECONDVALUE1,
  298. GI_MARSHALLING_TESTS_SECOND_ENUM_SECONDVALUE2,
  299. } GIMarshallingTestsSecondEnum;
  300. _GI_TEST_EXTERN
  301. GIMarshallingTestsEnum gi_marshalling_tests_enum_returnv (void);
  302. _GI_TEST_EXTERN
  303. void gi_marshalling_tests_enum_in (GIMarshallingTestsEnum v);
  304. _GI_TEST_EXTERN
  305. void gi_marshalling_tests_enum_out (GIMarshallingTestsEnum *v);
  306. _GI_TEST_EXTERN
  307. void gi_marshalling_tests_enum_inout (GIMarshallingTestsEnum *v);
  308. /* GEnum */
  309. typedef enum
  310. {
  311. GI_MARSHALLING_TESTS_GENUM_VALUE1,
  312. GI_MARSHALLING_TESTS_GENUM_VALUE2,
  313. GI_MARSHALLING_TESTS_GENUM_VALUE3 = 42
  314. } GIMarshallingTestsGEnum;
  315. _GI_TEST_EXTERN
  316. GType gi_marshalling_tests_genum_get_type (void) G_GNUC_CONST;
  317. #define GI_MARSHALLING_TESTS_TYPE_GENUM (gi_marshalling_tests_genum_get_type ())
  318. _GI_TEST_EXTERN
  319. GIMarshallingTestsGEnum gi_marshalling_tests_genum_returnv (void);
  320. _GI_TEST_EXTERN
  321. void gi_marshalling_tests_genum_in (GIMarshallingTestsGEnum v);
  322. _GI_TEST_EXTERN
  323. void gi_marshalling_tests_genum_out (GIMarshallingTestsGEnum *v);
  324. _GI_TEST_EXTERN
  325. void gi_marshalling_tests_genum_inout (GIMarshallingTestsGEnum *v);
  326. /* GFlags */
  327. typedef enum
  328. {
  329. GI_MARSHALLING_TESTS_FLAGS_VALUE1 = 1 << 0,
  330. GI_MARSHALLING_TESTS_FLAGS_VALUE2 = 1 << 1,
  331. GI_MARSHALLING_TESTS_FLAGS_VALUE3 = 1 << 2,
  332. GI_MARSHALLING_TESTS_FLAGS_MASK = GI_MARSHALLING_TESTS_FLAGS_VALUE1 |
  333. GI_MARSHALLING_TESTS_FLAGS_VALUE2,
  334. GI_MARSHALLING_TESTS_FLAGS_MASK2 = GI_MARSHALLING_TESTS_FLAGS_MASK
  335. } GIMarshallingTestsFlags;
  336. _GI_TEST_EXTERN
  337. GType gi_marshalling_tests_flags_get_type (void) G_GNUC_CONST;
  338. #define GI_MARSHALLING_TESTS_TYPE_FLAGS (gi_marshalling_tests_flags_get_type ())
  339. _GI_TEST_EXTERN
  340. GIMarshallingTestsFlags gi_marshalling_tests_flags_returnv (void);
  341. _GI_TEST_EXTERN
  342. void gi_marshalling_tests_flags_in (GIMarshallingTestsFlags v);
  343. _GI_TEST_EXTERN
  344. void gi_marshalling_tests_flags_in_zero (GIMarshallingTestsFlags v);
  345. _GI_TEST_EXTERN
  346. void gi_marshalling_tests_flags_out (GIMarshallingTestsFlags *v);
  347. _GI_TEST_EXTERN
  348. void gi_marshalling_tests_flags_inout (GIMarshallingTestsFlags *v);
  349. /* Flags with no GType */
  350. typedef enum
  351. {
  352. GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1 = 1 << 0,
  353. GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2 = 1 << 1,
  354. GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE3 = 1 << 2,
  355. GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_MASK = GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE1 |
  356. GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_VALUE2,
  357. GI_MARSHALLING_TESTS_NO_TYPE_FLAGS_MASK2 = GI_MARSHALLING_TESTS_FLAGS_MASK
  358. } GIMarshallingTestsNoTypeFlags;
  359. _GI_TEST_EXTERN
  360. GIMarshallingTestsNoTypeFlags gi_marshalling_tests_no_type_flags_returnv (void);
  361. _GI_TEST_EXTERN
  362. void gi_marshalling_tests_no_type_flags_in (GIMarshallingTestsNoTypeFlags v);
  363. _GI_TEST_EXTERN
  364. void gi_marshalling_tests_no_type_flags_in_zero (GIMarshallingTestsNoTypeFlags v);
  365. _GI_TEST_EXTERN
  366. void gi_marshalling_tests_no_type_flags_out (GIMarshallingTestsNoTypeFlags *v);
  367. _GI_TEST_EXTERN
  368. void gi_marshalling_tests_no_type_flags_inout (GIMarshallingTestsNoTypeFlags *v);
  369. /* Arrays */
  370. _GI_TEST_EXTERN
  371. gboolean gi_marshalling_tests_init_function (gint *n_args, char ***argv);
  372. /* Fixed-size */
  373. _GI_TEST_EXTERN
  374. const gint *gi_marshalling_tests_array_fixed_int_return (void);
  375. _GI_TEST_EXTERN
  376. const gshort *gi_marshalling_tests_array_fixed_short_return (void);
  377. _GI_TEST_EXTERN
  378. void gi_marshalling_tests_array_fixed_int_in (const gint *ints);
  379. _GI_TEST_EXTERN
  380. void gi_marshalling_tests_array_fixed_short_in (const gshort *shorts);
  381. _GI_TEST_EXTERN
  382. void gi_marshalling_tests_array_fixed_out (gint **ints);
  383. _GI_TEST_EXTERN
  384. void gi_marshalling_tests_array_fixed_out_struct (GIMarshallingTestsSimpleStruct **structs);
  385. _GI_TEST_EXTERN
  386. void gi_marshalling_tests_array_fixed_inout (gint **ints);
  387. /* Variable-size */
  388. _GI_TEST_EXTERN
  389. const gint *gi_marshalling_tests_array_return (gint *length);
  390. _GI_TEST_EXTERN
  391. const gint *gi_marshalling_tests_array_return_etc (gint first, gint *length, gint last, gint *sum);
  392. _GI_TEST_EXTERN
  393. void gi_marshalling_tests_array_in (const gint *ints, gint length);
  394. _GI_TEST_EXTERN
  395. void gi_marshalling_tests_array_in_len_before (gint length, const gint *ints);
  396. _GI_TEST_EXTERN
  397. void gi_marshalling_tests_array_in_len_zero_terminated (const gint *ints, gint length);
  398. _GI_TEST_EXTERN
  399. void gi_marshalling_tests_array_string_in (const gchar **strings, gint length);
  400. _GI_TEST_EXTERN
  401. void gi_marshalling_tests_array_uint8_in (const guint8 *chars, gint length);
  402. _GI_TEST_EXTERN
  403. void gi_marshalling_tests_array_struct_in (GIMarshallingTestsBoxedStruct **structs, gint length);
  404. _GI_TEST_EXTERN
  405. void gi_marshalling_tests_array_struct_value_in (GIMarshallingTestsBoxedStruct *structs, gint length);
  406. _GI_TEST_EXTERN
  407. void gi_marshalling_tests_array_struct_take_in (GIMarshallingTestsBoxedStruct **structs, gint length);
  408. _GI_TEST_EXTERN
  409. void gi_marshalling_tests_array_simple_struct_in (GIMarshallingTestsSimpleStruct *structs, gint length);
  410. _GI_TEST_EXTERN
  411. void gi_marshalling_tests_multi_array_key_value_in (gint length, const gchar **keys, const GValue *values);
  412. _GI_TEST_EXTERN
  413. void gi_marshalling_tests_array_enum_in (GIMarshallingTestsEnum *_enum, gint length);
  414. _GI_TEST_EXTERN
  415. void gi_marshalling_tests_array_in_guint64_len (const gint *ints, guint64 length);
  416. _GI_TEST_EXTERN
  417. void gi_marshalling_tests_array_in_guint8_len (const gint *ints, guint8 length);
  418. _GI_TEST_EXTERN
  419. void gi_marshalling_tests_array_out (gint **ints, gint *length);
  420. _GI_TEST_EXTERN
  421. void gi_marshalling_tests_array_out_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
  422. _GI_TEST_EXTERN
  423. void gi_marshalling_tests_array_inout (gint **ints, gint *length);
  424. _GI_TEST_EXTERN
  425. void gi_marshalling_tests_array_inout_etc (gint first, gint **ints, gint *length, gint last, gint *sum);
  426. _GI_TEST_EXTERN
  427. void gi_marshalling_tests_array_in_nonzero_nonlen (gint first, const guint8 *chars);
  428. /* Zero-terminated */
  429. _GI_TEST_EXTERN
  430. gchar **gi_marshalling_tests_array_zero_terminated_return (void);
  431. _GI_TEST_EXTERN
  432. gchar **gi_marshalling_tests_array_zero_terminated_return_null (void);
  433. _GI_TEST_EXTERN
  434. GIMarshallingTestsBoxedStruct **gi_marshalling_tests_array_zero_terminated_return_struct (void);
  435. _GI_TEST_EXTERN
  436. void gi_marshalling_tests_array_zero_terminated_in (gchar **utf8s);
  437. _GI_TEST_EXTERN
  438. void gi_marshalling_tests_array_zero_terminated_out (gchar ***utf8s);
  439. _GI_TEST_EXTERN
  440. void gi_marshalling_tests_array_zero_terminated_inout (gchar ***utf8s);
  441. _GI_TEST_EXTERN
  442. GVariant **gi_marshalling_tests_array_gvariant_none_in (GVariant **variants);
  443. _GI_TEST_EXTERN
  444. GVariant **gi_marshalling_tests_array_gvariant_container_in (GVariant **variants);
  445. _GI_TEST_EXTERN
  446. GVariant **gi_marshalling_tests_array_gvariant_full_in (GVariant **variants);
  447. /* GArray */
  448. _GI_TEST_EXTERN
  449. GArray *gi_marshalling_tests_garray_int_none_return (void);
  450. _GI_TEST_EXTERN
  451. GArray *gi_marshalling_tests_garray_uint64_none_return (void);
  452. _GI_TEST_EXTERN
  453. GArray *gi_marshalling_tests_garray_utf8_none_return (void);
  454. _GI_TEST_EXTERN
  455. GArray *gi_marshalling_tests_garray_utf8_container_return (void);
  456. _GI_TEST_EXTERN
  457. GArray *gi_marshalling_tests_garray_utf8_full_return (void);
  458. _GI_TEST_EXTERN
  459. void gi_marshalling_tests_garray_int_none_in (GArray *array_);
  460. _GI_TEST_EXTERN
  461. void gi_marshalling_tests_garray_uint64_none_in (GArray *array_);
  462. _GI_TEST_EXTERN
  463. void gi_marshalling_tests_garray_utf8_none_in (GArray *array_);
  464. _GI_TEST_EXTERN
  465. void gi_marshalling_tests_garray_utf8_none_out (GArray **array_);
  466. _GI_TEST_EXTERN
  467. void gi_marshalling_tests_garray_utf8_container_out (GArray **array_);
  468. _GI_TEST_EXTERN
  469. void gi_marshalling_tests_garray_utf8_full_out (GArray **array_);
  470. _GI_TEST_EXTERN
  471. void gi_marshalling_tests_garray_utf8_full_out_caller_allocated (GArray *array_);
  472. _GI_TEST_EXTERN
  473. void gi_marshalling_tests_garray_utf8_none_inout (GArray **array_);
  474. _GI_TEST_EXTERN
  475. void gi_marshalling_tests_garray_utf8_container_inout (GArray **array_);
  476. _GI_TEST_EXTERN
  477. void gi_marshalling_tests_garray_utf8_full_inout (GArray **array_);
  478. /* GPtrArray */
  479. _GI_TEST_EXTERN
  480. GPtrArray *gi_marshalling_tests_gptrarray_utf8_none_return (void);
  481. _GI_TEST_EXTERN
  482. GPtrArray *gi_marshalling_tests_gptrarray_utf8_container_return (void);
  483. _GI_TEST_EXTERN
  484. GPtrArray *gi_marshalling_tests_gptrarray_utf8_full_return (void);
  485. _GI_TEST_EXTERN
  486. void gi_marshalling_tests_gptrarray_utf8_none_in (GPtrArray *parray_);
  487. _GI_TEST_EXTERN
  488. void gi_marshalling_tests_gptrarray_utf8_none_out (GPtrArray **parray_);
  489. _GI_TEST_EXTERN
  490. void gi_marshalling_tests_gptrarray_utf8_container_out (GPtrArray **parray_);
  491. _GI_TEST_EXTERN
  492. void gi_marshalling_tests_gptrarray_utf8_full_out (GPtrArray **parray_);
  493. _GI_TEST_EXTERN
  494. void gi_marshalling_tests_gptrarray_utf8_none_inout (GPtrArray **parray_);
  495. _GI_TEST_EXTERN
  496. void gi_marshalling_tests_gptrarray_utf8_container_inout (GPtrArray **parray_);
  497. _GI_TEST_EXTERN
  498. void gi_marshalling_tests_gptrarray_utf8_full_inout (GPtrArray **parray_);
  499. /* GByteArray */
  500. _GI_TEST_EXTERN
  501. GByteArray *gi_marshalling_tests_bytearray_full_return (void);
  502. _GI_TEST_EXTERN
  503. void gi_marshalling_tests_bytearray_none_in (GByteArray* v);
  504. /* GBytes */
  505. _GI_TEST_EXTERN
  506. GBytes *gi_marshalling_tests_gbytes_full_return (void);
  507. _GI_TEST_EXTERN
  508. void gi_marshalling_tests_gbytes_none_in (GBytes* v);
  509. /* GStrv */
  510. _GI_TEST_EXTERN
  511. GStrv gi_marshalling_tests_gstrv_return (void);
  512. _GI_TEST_EXTERN
  513. void gi_marshalling_tests_gstrv_in (GStrv g_strv);
  514. _GI_TEST_EXTERN
  515. void gi_marshalling_tests_gstrv_out (GStrv *g_strv);
  516. _GI_TEST_EXTERN
  517. void gi_marshalling_tests_gstrv_inout (GStrv *g_strv);
  518. /* GList */
  519. _GI_TEST_EXTERN
  520. GList *gi_marshalling_tests_glist_int_none_return (void);
  521. _GI_TEST_EXTERN
  522. GList *gi_marshalling_tests_glist_uint32_none_return (void);
  523. _GI_TEST_EXTERN
  524. GList *gi_marshalling_tests_glist_utf8_none_return (void);
  525. _GI_TEST_EXTERN
  526. GList *gi_marshalling_tests_glist_utf8_container_return (void);
  527. _GI_TEST_EXTERN
  528. GList *gi_marshalling_tests_glist_utf8_full_return (void);
  529. _GI_TEST_EXTERN
  530. void gi_marshalling_tests_glist_int_none_in (GList *list);
  531. _GI_TEST_EXTERN
  532. void gi_marshalling_tests_glist_uint32_none_in (GList *list);
  533. _GI_TEST_EXTERN
  534. void gi_marshalling_tests_glist_utf8_none_in (GList *list);
  535. _GI_TEST_EXTERN
  536. void gi_marshalling_tests_glist_utf8_none_out (GList **list);
  537. _GI_TEST_EXTERN
  538. void gi_marshalling_tests_glist_utf8_container_out (GList **list);
  539. _GI_TEST_EXTERN
  540. void gi_marshalling_tests_glist_utf8_full_out (GList **list);
  541. _GI_TEST_EXTERN
  542. void gi_marshalling_tests_glist_utf8_none_inout (GList **list);
  543. _GI_TEST_EXTERN
  544. void gi_marshalling_tests_glist_utf8_container_inout (GList **list);
  545. _GI_TEST_EXTERN
  546. void gi_marshalling_tests_glist_utf8_full_inout (GList **list);
  547. /* GSList */
  548. _GI_TEST_EXTERN
  549. GSList *gi_marshalling_tests_gslist_int_none_return (void);
  550. _GI_TEST_EXTERN
  551. GSList *gi_marshalling_tests_gslist_utf8_none_return (void);
  552. _GI_TEST_EXTERN
  553. GSList *gi_marshalling_tests_gslist_utf8_container_return (void);
  554. _GI_TEST_EXTERN
  555. GSList *gi_marshalling_tests_gslist_utf8_full_return (void);
  556. _GI_TEST_EXTERN
  557. void gi_marshalling_tests_gslist_int_none_in (GSList *list);
  558. _GI_TEST_EXTERN
  559. void gi_marshalling_tests_gslist_utf8_none_in (GSList *list);
  560. _GI_TEST_EXTERN
  561. void gi_marshalling_tests_gslist_utf8_none_out (GSList **list);
  562. _GI_TEST_EXTERN
  563. void gi_marshalling_tests_gslist_utf8_container_out (GSList **list);
  564. _GI_TEST_EXTERN
  565. void gi_marshalling_tests_gslist_utf8_full_out (GSList **list);
  566. _GI_TEST_EXTERN
  567. void gi_marshalling_tests_gslist_utf8_none_inout (GSList **list);
  568. _GI_TEST_EXTERN
  569. void gi_marshalling_tests_gslist_utf8_container_inout (GSList **list);
  570. _GI_TEST_EXTERN
  571. void gi_marshalling_tests_gslist_utf8_full_inout (GSList **list);
  572. /* GHashTable */
  573. _GI_TEST_EXTERN
  574. GHashTable *gi_marshalling_tests_ghashtable_int_none_return (void);
  575. _GI_TEST_EXTERN
  576. GHashTable *gi_marshalling_tests_ghashtable_utf8_none_return (void);
  577. _GI_TEST_EXTERN
  578. GHashTable *gi_marshalling_tests_ghashtable_utf8_container_return (void);
  579. _GI_TEST_EXTERN
  580. GHashTable *gi_marshalling_tests_ghashtable_utf8_full_return (void);
  581. _GI_TEST_EXTERN
  582. void gi_marshalling_tests_ghashtable_int_none_in (GHashTable *hash_table);
  583. _GI_TEST_EXTERN
  584. void gi_marshalling_tests_ghashtable_utf8_none_in (GHashTable *hash_table);
  585. _GI_TEST_EXTERN
  586. void gi_marshalling_tests_ghashtable_utf8_container_in (GHashTable *hash_table);
  587. _GI_TEST_EXTERN
  588. void gi_marshalling_tests_ghashtable_utf8_full_in (GHashTable *hash_table);
  589. _GI_TEST_EXTERN
  590. void gi_marshalling_tests_ghashtable_utf8_none_out (GHashTable **hash_table);
  591. _GI_TEST_EXTERN
  592. void gi_marshalling_tests_ghashtable_utf8_container_out (GHashTable **hash_table);
  593. _GI_TEST_EXTERN
  594. void gi_marshalling_tests_ghashtable_utf8_full_out (GHashTable **hash_table);
  595. _GI_TEST_EXTERN
  596. void gi_marshalling_tests_ghashtable_utf8_none_inout (GHashTable **hash_table);
  597. _GI_TEST_EXTERN
  598. void gi_marshalling_tests_ghashtable_utf8_container_inout (GHashTable **hash_table);
  599. _GI_TEST_EXTERN
  600. void gi_marshalling_tests_ghashtable_utf8_full_inout (GHashTable **hash_table);
  601. /* GValue */
  602. _GI_TEST_EXTERN
  603. GValue *gi_marshalling_tests_gvalue_return (void);
  604. _GI_TEST_EXTERN
  605. void gi_marshalling_tests_gvalue_in (GValue *value);
  606. _GI_TEST_EXTERN
  607. void gi_marshalling_tests_gvalue_int64_in (GValue *value);
  608. _GI_TEST_EXTERN
  609. void gi_marshalling_tests_gvalue_in_with_type (GValue *value, GType type);
  610. _GI_TEST_EXTERN
  611. void gi_marshalling_tests_gvalue_in_with_modification (GValue *value);
  612. _GI_TEST_EXTERN
  613. void gi_marshalling_tests_gvalue_in_enum (GValue *value);
  614. _GI_TEST_EXTERN
  615. void gi_marshalling_tests_gvalue_out (GValue **value);
  616. _GI_TEST_EXTERN
  617. void gi_marshalling_tests_gvalue_int64_out (GValue **value);
  618. _GI_TEST_EXTERN
  619. void gi_marshalling_tests_gvalue_out_caller_allocates (GValue *value);
  620. _GI_TEST_EXTERN
  621. void gi_marshalling_tests_gvalue_inout (GValue **value);
  622. _GI_TEST_EXTERN
  623. void gi_marshalling_tests_gvalue_flat_array (guint n_values,
  624. const GValue *values);
  625. _GI_TEST_EXTERN
  626. GValue *gi_marshalling_tests_return_gvalue_flat_array (void);
  627. _GI_TEST_EXTERN
  628. GValue *gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one,
  629. const GValue two,
  630. const GValue three);
  631. /* GClosure */
  632. _GI_TEST_EXTERN
  633. void gi_marshalling_tests_gclosure_in (GClosure *closure);
  634. _GI_TEST_EXTERN
  635. GClosure *gi_marshalling_tests_gclosure_return (void);
  636. /* Callback return values */
  637. /**
  638. * GIMarshallingTestsCallbackReturnValueOnly:
  639. */
  640. typedef glong (* GIMarshallingTestsCallbackReturnValueOnly) (void);
  641. _GI_TEST_EXTERN
  642. glong gi_marshalling_tests_callback_return_value_only (GIMarshallingTestsCallbackReturnValueOnly callback);
  643. /**
  644. * GIMarshallingTestsCallbackOneOutParameter:
  645. * @a: (out):
  646. */
  647. typedef void (* GIMarshallingTestsCallbackOneOutParameter) (gfloat *a);
  648. _GI_TEST_EXTERN
  649. void gi_marshalling_tests_callback_one_out_parameter (GIMarshallingTestsCallbackOneOutParameter callback,
  650. gfloat *a);
  651. /**
  652. * GIMarshallingTestsCallbackMultipleOutParameters:
  653. * @a: (out):
  654. * @b: (out):
  655. */
  656. typedef void (* GIMarshallingTestsCallbackMultipleOutParameters) (gfloat *a, gfloat *b);
  657. _GI_TEST_EXTERN
  658. void gi_marshalling_tests_callback_multiple_out_parameters (GIMarshallingTestsCallbackMultipleOutParameters callback,
  659. gfloat *a,
  660. gfloat *b);
  661. /**
  662. * GIMarshallingTestsCallbackReturnValueAndOneOutParameter:
  663. * @a: (out):
  664. */
  665. typedef glong (* GIMarshallingTestsCallbackReturnValueAndOneOutParameter) (glong *a);
  666. _GI_TEST_EXTERN
  667. glong gi_marshalling_tests_callback_return_value_and_one_out_parameter (GIMarshallingTestsCallbackReturnValueAndOneOutParameter callback,
  668. glong *a);
  669. /**
  670. * GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters:
  671. * @a: (out):
  672. * @b: (out):
  673. */
  674. typedef glong (* GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters) (glong *a, glong *b);
  675. _GI_TEST_EXTERN
  676. glong gi_marshalling_tests_callback_return_value_and_multiple_out_parameters (GIMarshallingTestsCallbackReturnValueAndMultipleOutParameters callback,
  677. glong *a,
  678. glong *b);
  679. /**
  680. * GIMarshallingTestsCallbackOwnedBoxed
  681. * @box: (transfer none): the boxed structure.
  682. */
  683. typedef void (* GIMarshallingTestsCallbackOwnedBoxed) (GIMarshallingTestsBoxedStruct *box,
  684. void *user_data);
  685. _GI_TEST_EXTERN
  686. glong gi_marshalling_tests_callback_owned_boxed (GIMarshallingTestsCallbackOwnedBoxed callback,
  687. void *callback_data);
  688. /* Pointer */
  689. _GI_TEST_EXTERN
  690. gpointer gi_marshalling_tests_pointer_in_return (gpointer pointer);
  691. /* Structure */
  692. struct _GIMarshallingTestsSimpleStruct {
  693. glong long_;
  694. gint8 int8;
  695. };
  696. typedef struct {
  697. GIMarshallingTestsSimpleStruct simple_struct;
  698. } GIMarshallingTestsNestedStruct;
  699. typedef struct {
  700. GIMarshallingTestsNestedStruct *pointer;
  701. } GIMarshallingTestsNotSimpleStruct;
  702. _GI_TEST_EXTERN
  703. GIMarshallingTestsSimpleStruct *gi_marshalling_tests_simple_struct_returnv (void);
  704. _GI_TEST_EXTERN
  705. void gi_marshalling_tests_simple_struct_inv (GIMarshallingTestsSimpleStruct *struct_);
  706. _GI_TEST_EXTERN
  707. void gi_marshalling_tests_simple_struct_method (GIMarshallingTestsSimpleStruct *struct_);
  708. typedef struct {
  709. glong long_;
  710. } GIMarshallingTestsPointerStruct;
  711. _GI_TEST_EXTERN
  712. GType gi_marshalling_tests_pointer_struct_get_type (void) G_GNUC_CONST;
  713. _GI_TEST_EXTERN
  714. GIMarshallingTestsPointerStruct *gi_marshalling_tests_pointer_struct_returnv (void);
  715. _GI_TEST_EXTERN
  716. void gi_marshalling_tests_pointer_struct_inv (GIMarshallingTestsPointerStruct *struct_);
  717. struct _GIMarshallingTestsBoxedStruct {
  718. glong long_;
  719. gchar *string_;
  720. GStrv g_strv;
  721. };
  722. _GI_TEST_EXTERN
  723. GType gi_marshalling_tests_boxed_struct_get_type (void) G_GNUC_CONST;
  724. _GI_TEST_EXTERN
  725. GIMarshallingTestsBoxedStruct *gi_marshalling_tests_boxed_struct_new (void);
  726. _GI_TEST_EXTERN
  727. GIMarshallingTestsBoxedStruct *gi_marshalling_tests_boxed_struct_returnv (void);
  728. _GI_TEST_EXTERN
  729. void gi_marshalling_tests_boxed_struct_inv (GIMarshallingTestsBoxedStruct *struct_);
  730. _GI_TEST_EXTERN
  731. void gi_marshalling_tests_boxed_struct_out (GIMarshallingTestsBoxedStruct **struct_);
  732. _GI_TEST_EXTERN
  733. void gi_marshalling_tests_boxed_struct_inout (GIMarshallingTestsBoxedStruct **struct_);
  734. typedef union {
  735. glong long_;
  736. } GIMarshallingTestsUnion;
  737. _GI_TEST_EXTERN
  738. GType gi_marshalling_tests_union_get_type (void) G_GNUC_CONST;
  739. _GI_TEST_EXTERN
  740. GIMarshallingTestsUnion *gi_marshalling_tests_union_returnv (void);
  741. _GI_TEST_EXTERN
  742. void gi_marshalling_tests_union_inv (GIMarshallingTestsUnion *union_);
  743. _GI_TEST_EXTERN
  744. void gi_marshalling_tests_union_out (GIMarshallingTestsUnion **union_);
  745. _GI_TEST_EXTERN
  746. void gi_marshalling_tests_union_inout (GIMarshallingTestsUnion **union_);
  747. _GI_TEST_EXTERN
  748. void gi_marshalling_tests_union_method (GIMarshallingTestsUnion *union_);
  749. /* Object */
  750. #define GI_MARSHALLING_TESTS_TYPE_OBJECT (gi_marshalling_tests_object_get_type ())
  751. #define GI_MARSHALLING_TESTS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObject))
  752. #define GI_MARSHALLING_TESTS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObjectClass))
  753. #define GI_MARSHALLING_TESTS_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT))
  754. #define GI_MARSHALLING_TESTS_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_OBJECT))
  755. #define GI_MARSHALLING_TESTS_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_OBJECT, GIMarshallingTestsObjectClass))
  756. typedef struct _GIMarshallingTestsObjectClass GIMarshallingTestsObjectClass;
  757. typedef struct _GIMarshallingTestsObject GIMarshallingTestsObject;
  758. typedef int (* GIMarshallingTestsCallbackIntInt) (int val, void *user_data);
  759. struct _GIMarshallingTestsObjectClass
  760. {
  761. GObjectClass parent_class;
  762. /**
  763. * GIMarshallingTestsObjectClass::method_int8_in:
  764. * @in: (in):
  765. */
  766. void (* method_int8_in) (GIMarshallingTestsObject *self, gint8 in);
  767. /**
  768. * GIMarshallingTestsObjectClass::method_int8_out:
  769. * @out: (out):
  770. */
  771. void (* method_int8_out) (GIMarshallingTestsObject *self, gint8 *out);
  772. /**
  773. * GIMarshallingTestsObjectClass::method_int8_arg_and_out_caller:
  774. * @out: (out caller-allocates):
  775. */
  776. void (* method_int8_arg_and_out_caller) (GIMarshallingTestsObject *self, gint8 arg, gint8 *out);
  777. /**
  778. * GIMarshallingTestsObjectClass::method_int8_arg_and_out_callee:
  779. * @out: (out):
  780. */
  781. void (* method_int8_arg_and_out_callee) (GIMarshallingTestsObject *self, gint8 arg, gint8 **out);
  782. /**
  783. * GIMarshallingTestsObjectClass::method_str_arg_out_ret:
  784. * @out: (out caller-allocates):
  785. *
  786. * Returns: (transfer none)
  787. */
  788. const gchar* (* method_str_arg_out_ret) (GIMarshallingTestsObject *self, const gchar* arg, guint *out);
  789. /**
  790. * GIMarshallingTestsObjectClass::method_with_default_implementation:
  791. * @in: (in):
  792. */
  793. void (* method_with_default_implementation) (GIMarshallingTestsObject *self, gint8 in);
  794. /**
  795. * GIMarshallingTestsObjectClass::method_deep_hierarchy:
  796. * @in: (in):
  797. */
  798. void (* method_deep_hierarchy) (GIMarshallingTestsObject *self, gint8 in);
  799. void (* vfunc_with_callback) (GIMarshallingTestsObject *self,
  800. GIMarshallingTestsCallbackIntInt callback,
  801. void *callback_data);
  802. /**
  803. * GIMarshallingTestsObjectClass::vfunc_return_value_only:
  804. */
  805. glong (* vfunc_return_value_only) (GIMarshallingTestsObject *self);
  806. /**
  807. * GIMarshallingTestsObjectClass::vfunc_one_out_parameter:
  808. * @a: (out):
  809. */
  810. void (* vfunc_one_out_parameter) (GIMarshallingTestsObject *self, gfloat *a);
  811. /**
  812. * GIMarshallingTestsObjectClass::vfunc_multiple_out_parameters:
  813. * @a: (out):
  814. * @b: (out):
  815. */
  816. void (* vfunc_multiple_out_parameters) (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
  817. /**
  818. * GIMarshallingTestsObjectClass::vfunc_caller_allocated_out_parameter:
  819. * @a: (out):
  820. */
  821. void (* vfunc_caller_allocated_out_parameter) (GIMarshallingTestsObject *self, GValue *a);
  822. /**
  823. * GIMarshallingTestsObjectClass::vfunc_array_out_parameter:
  824. * @a: (out) (array zero-terminated):
  825. */
  826. void (* vfunc_array_out_parameter) (GIMarshallingTestsObject *self, gfloat **a);
  827. /**
  828. * GIMarshallingTestsObjectClass::vfunc_return_value_and_one_out_parameter:
  829. * @a: (out):
  830. */
  831. glong (* vfunc_return_value_and_one_out_parameter) (GIMarshallingTestsObject *self, glong *a);
  832. /**
  833. * GIMarshallingTestsObjectClass::vfunc_return_value_and_multiple_out_parameters:
  834. * @a: (out):
  835. * @b: (out):
  836. */
  837. glong (* vfunc_return_value_and_multiple_out_parameters) (GIMarshallingTestsObject *self, glong *a, glong *b);
  838. /**
  839. * GIMarshallingTestsObjectClass::vfunc_meth_with_err:
  840. * @x:
  841. * @error: A #GError
  842. */
  843. gboolean (*vfunc_meth_with_err) (GIMarshallingTestsObject *object, gint x, GError **error);
  844. /**
  845. * GIMarshallingTestsObjectClass::vfunc_return_enum:
  846. */
  847. GIMarshallingTestsEnum (* vfunc_return_enum) (GIMarshallingTestsObject *self);
  848. /**
  849. * GIMarshallingTestsObjectClass::vfunc_out_enum:
  850. * @_enum: (out):
  851. */
  852. void (* vfunc_out_enum) (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum);
  853. /**
  854. * GIMarshallingTestsObjectClass::vfunc_return_object_transfer_none:
  855. *
  856. * Returns: (transfer none)
  857. */
  858. GObject* (* vfunc_return_object_transfer_none) (GIMarshallingTestsObject *self);
  859. /**
  860. * GIMarshallingTestsObjectClass::vfunc_return_object_transfer_full:
  861. *
  862. * Returns: (transfer full)
  863. */
  864. GObject* (* vfunc_return_object_transfer_full) (GIMarshallingTestsObject *self);
  865. /**
  866. * GIMarshallingTestsObjectClass::vfunc_out_object_transfer_none:
  867. * @object: (out) (transfer none):
  868. */
  869. void (* vfunc_out_object_transfer_none) (GIMarshallingTestsObject *self, GObject **object);
  870. /**
  871. * GIMarshallingTestsObjectClass::vfunc_out_object_transfer_full:
  872. * @object: (out) (transfer full):
  873. */
  874. void (* vfunc_out_object_transfer_full) (GIMarshallingTestsObject *self, GObject **object);
  875. /**
  876. * GIMarshallingTestsObjectClass::vfunc_in_object_transfer_none:
  877. * @object: (in) (transfer none):
  878. */
  879. void (* vfunc_in_object_transfer_none) (GIMarshallingTestsObject *self, GObject *object);
  880. /**
  881. * GIMarshallingTestsObjectClass::vfunc_in_object_transfer_full:
  882. * @object: (in) (transfer full):
  883. */
  884. void (* vfunc_in_object_transfer_full) (GIMarshallingTestsObject *self, GObject *object);
  885. };
  886. struct _GIMarshallingTestsObject
  887. {
  888. GObject parent_instance;
  889. gint int_;
  890. };
  891. _GI_TEST_EXTERN
  892. GType gi_marshalling_tests_object_get_type (void) G_GNUC_CONST;
  893. _GI_TEST_EXTERN
  894. void gi_marshalling_tests_object_static_method (void);
  895. _GI_TEST_EXTERN
  896. void gi_marshalling_tests_object_method (GIMarshallingTestsObject *object);
  897. _GI_TEST_EXTERN
  898. void gi_marshalling_tests_object_overridden_method (GIMarshallingTestsObject *object);
  899. _GI_TEST_EXTERN
  900. GIMarshallingTestsObject *gi_marshalling_tests_object_new (gint int_);
  901. GIMarshallingTestsObject *gi_marshalling_tests_object_new_fail (gint int_, GError **error);
  902. _GI_TEST_EXTERN
  903. void gi_marshalling_tests_object_method_array_in (GIMarshallingTestsObject *object, const gint *ints, gint length);
  904. _GI_TEST_EXTERN
  905. void gi_marshalling_tests_object_method_array_out (GIMarshallingTestsObject *object, gint **ints, gint *length);
  906. _GI_TEST_EXTERN
  907. void gi_marshalling_tests_object_method_array_inout (GIMarshallingTestsObject *object, gint **ints, gint *length);
  908. _GI_TEST_EXTERN
  909. const gint *gi_marshalling_tests_object_method_array_return (GIMarshallingTestsObject *object, gint *length);
  910. _GI_TEST_EXTERN
  911. void gi_marshalling_tests_object_method_int8_in (GIMarshallingTestsObject *object, gint8 in);
  912. _GI_TEST_EXTERN
  913. void gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *object, gint8 *out);
  914. _GI_TEST_EXTERN
  915. void gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *object, gint8 arg, gint8 *out);
  916. _GI_TEST_EXTERN
  917. void gi_marshalling_tests_object_method_int8_arg_and_out_callee (GIMarshallingTestsObject *object, gint8 arg, gint8 **out);
  918. _GI_TEST_EXTERN
  919. const gchar* gi_marshalling_tests_object_method_str_arg_out_ret (GIMarshallingTestsObject *object, const gchar* arg, guint *out);
  920. _GI_TEST_EXTERN
  921. void gi_marshalling_tests_object_method_with_default_implementation (GIMarshallingTestsObject *object, gint8 in);
  922. _GI_TEST_EXTERN
  923. void gi_marshalling_tests_object_method_variant_array_in (GIMarshallingTestsObject *object, GVariant **in, gsize n_in);
  924. _GI_TEST_EXTERN
  925. glong gi_marshalling_tests_object_vfunc_return_value_only (GIMarshallingTestsObject *self);
  926. _GI_TEST_EXTERN
  927. void gi_marshalling_tests_object_vfunc_one_out_parameter (GIMarshallingTestsObject *self, gfloat *a);
  928. _GI_TEST_EXTERN
  929. void gi_marshalling_tests_object_vfunc_multiple_out_parameters (GIMarshallingTestsObject *self, gfloat *a, gfloat *b);
  930. _GI_TEST_EXTERN
  931. void gi_marshalling_tests_object_vfunc_caller_allocated_out_parameter (GIMarshallingTestsObject *self, GValue *a);
  932. _GI_TEST_EXTERN
  933. void gi_marshalling_tests_object_vfunc_array_out_parameter (GIMarshallingTestsObject *self, gfloat **a);
  934. _GI_TEST_EXTERN
  935. glong gi_marshalling_tests_object_vfunc_return_value_and_one_out_parameter (GIMarshallingTestsObject *self, glong *a);
  936. _GI_TEST_EXTERN
  937. glong gi_marshalling_tests_object_vfunc_return_value_and_multiple_out_parameters (GIMarshallingTestsObject *self, glong *a, glong *b);
  938. _GI_TEST_EXTERN
  939. gboolean gi_marshalling_tests_object_vfunc_meth_with_error (GIMarshallingTestsObject *object, gint x, GError **error);
  940. _GI_TEST_EXTERN
  941. GIMarshallingTestsEnum gi_marshalling_tests_object_vfunc_return_enum (GIMarshallingTestsObject *self);
  942. _GI_TEST_EXTERN
  943. void gi_marshalling_tests_object_vfunc_out_enum (GIMarshallingTestsObject *self, GIMarshallingTestsEnum *_enum);
  944. _GI_TEST_EXTERN
  945. void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating);
  946. _GI_TEST_EXTERN
  947. void gi_marshalling_tests_object_get_ref_info_for_vfunc_return_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating);
  948. _GI_TEST_EXTERN
  949. void gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_none (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating);
  950. _GI_TEST_EXTERN
  951. void gi_marshalling_tests_object_get_ref_info_for_vfunc_out_object_transfer_full (GIMarshallingTestsObject *self, guint *ref_count, gboolean *is_floating);
  952. _GI_TEST_EXTERN
  953. void gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_none (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating);
  954. _GI_TEST_EXTERN
  955. void gi_marshalling_tests_object_get_ref_info_for_vfunc_in_object_transfer_full (GIMarshallingTestsObject *self, GType type, guint *ref_count, gboolean *is_floating);
  956. _GI_TEST_EXTERN
  957. GIMarshallingTestsObject *gi_marshalling_tests_object_none_return (void);
  958. _GI_TEST_EXTERN
  959. GIMarshallingTestsObject *gi_marshalling_tests_object_full_return (void);
  960. _GI_TEST_EXTERN
  961. void gi_marshalling_tests_object_none_in (GIMarshallingTestsObject *object);
  962. _GI_TEST_EXTERN
  963. void gi_marshalling_tests_object_full_in (GIMarshallingTestsObject *object);
  964. _GI_TEST_EXTERN
  965. void gi_marshalling_tests_object_none_out (GIMarshallingTestsObject **object);
  966. _GI_TEST_EXTERN
  967. void gi_marshalling_tests_object_full_out (GIMarshallingTestsObject **object);
  968. _GI_TEST_EXTERN
  969. void gi_marshalling_tests_object_none_inout (GIMarshallingTestsObject **object);
  970. _GI_TEST_EXTERN
  971. void gi_marshalling_tests_object_full_inout (GIMarshallingTestsObject **object);
  972. _GI_TEST_EXTERN
  973. void gi_marshalling_tests_object_int8_in (GIMarshallingTestsObject *object, gint8 in);
  974. _GI_TEST_EXTERN
  975. void gi_marshalling_tests_object_int8_out (GIMarshallingTestsObject *object, gint8 *out);
  976. _GI_TEST_EXTERN
  977. void gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *object,
  978. GIMarshallingTestsCallbackIntInt callback,
  979. void *callback_data);
  980. _GI_TEST_EXTERN
  981. void gi_marshalling_tests_object_call_vfunc_with_callback (GIMarshallingTestsObject *object);
  982. #define GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT (gi_marshalling_tests_sub_object_get_type ())
  983. #define GI_MARSHALLING_TESTS_SUB_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObject))
  984. #define GI_MARSHALLING_TESTS_SUB_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObjectClass))
  985. #define GI_MARSHALLING_TESTS_IS_SUB_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT))
  986. #define GI_MARSHALLING_TESTS_IS_SUB_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT))
  987. #define GI_MARSHALLING_TESTS_SUB_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_OBJECT, GIMarshallingTestsSubObjectClass))
  988. typedef struct _GIMarshallingTestsSubObjectClass GIMarshallingTestsSubObjectClass;
  989. typedef struct _GIMarshallingTestsSubObject GIMarshallingTestsSubObject;
  990. struct _GIMarshallingTestsSubObjectClass
  991. {
  992. GIMarshallingTestsObjectClass parent_class;
  993. };
  994. struct _GIMarshallingTestsSubObject
  995. {
  996. GIMarshallingTestsObject parent_instance;
  997. };
  998. _GI_TEST_EXTERN
  999. GType gi_marshalling_tests_sub_object_get_type (void) G_GNUC_CONST;
  1000. _GI_TEST_EXTERN
  1001. void gi_marshalling_tests_sub_object_sub_method (GIMarshallingTestsSubObject *object);
  1002. _GI_TEST_EXTERN
  1003. void gi_marshalling_tests_sub_object_overwritten_method (GIMarshallingTestsSubObject *object);
  1004. #define GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT (gi_marshalling_tests_sub_sub_object_get_type ())
  1005. #define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObject))
  1006. #define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObjectClass))
  1007. #define GI_MARSHALLING_TESTS_IS_SUB_SUB_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT))
  1008. #define GI_MARSHALLING_TESTS_IS_SUB_SUB_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT))
  1009. #define GI_MARSHALLING_TESTS_SUB_SUB_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_SUB_SUB_OBJECT, GIMarshallingTestsSubSubObjectClass))
  1010. typedef struct _GIMarshallingTestsSubSubObjectClass GIMarshallingTestsSubSubObjectClass;
  1011. typedef struct _GIMarshallingTestsSubSubObject GIMarshallingTestsSubSubObject;
  1012. struct _GIMarshallingTestsSubSubObjectClass
  1013. {
  1014. GIMarshallingTestsSubObjectClass parent_class;
  1015. };
  1016. struct _GIMarshallingTestsSubSubObject
  1017. {
  1018. GIMarshallingTestsSubObject parent_instance;
  1019. };
  1020. _GI_TEST_EXTERN
  1021. GType gi_marshalling_tests_sub_sub_object_get_type (void) G_GNUC_CONST;
  1022. /* Interfaces */
  1023. #define GI_MARSHALLING_TESTS_TYPE_INTERFACE (gi_marshalling_tests_interface_get_type ())
  1024. #define GI_MARSHALLING_TESTS_INTERFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE, GIMarshallingTestsInterface))
  1025. #define GI_MARSHALLING_TESTS_IS_INTERFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE))
  1026. #define GI_MARSHALLING_TESTS_INTERFACE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE, GIMarshallingTestsInterfaceIface))
  1027. typedef struct _GIMarshallingTestsInterface GIMarshallingTestsInterface;
  1028. typedef struct _GIMarshallingTestsInterfaceIface GIMarshallingTestsInterfaceIface;
  1029. struct _GIMarshallingTestsInterfaceIface {
  1030. GTypeInterface base_iface;
  1031. /**
  1032. * GIMarshallingTestsInterfaceIface::test_int8_in:
  1033. * @in: (in):
  1034. */
  1035. void (* test_int8_in) (GIMarshallingTestsInterface *self, gint8 in);
  1036. };
  1037. _GI_TEST_EXTERN
  1038. GType gi_marshalling_tests_interface_get_type (void) G_GNUC_CONST;
  1039. _GI_TEST_EXTERN
  1040. void gi_marshalling_tests_interface_test_int8_in (GIMarshallingTestsInterface *self, gint8 in);
  1041. _GI_TEST_EXTERN
  1042. void gi_marshalling_tests_test_interface_test_int8_in (GIMarshallingTestsInterface *test_iface, gint8 in);
  1043. /* GIMarshallingTestsInterfaceImpl is a class that implements
  1044. GIMarshallingTestsInterface */
  1045. #define GI_MARSHALLING_TESTS_TYPE_INTERFACE_IMPL (gi_marshalling_tests_interface_impl_get_type ())
  1046. #define GI_MARSHALLING_TESTS_INTERFACE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE_IMPL, GIMarshallingTestsInterfaceImpl))
  1047. #define GI_MARSHALLING_TESTS_INTERFACE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_INTERFACE_IMPL, GIMarshallingTestsInterfaceImplClass))
  1048. #define GI_MARSHALLING_TESTS_IS_INTERFACE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE_IMPL))
  1049. #define GI_MARSHALLING_TESTS_IS_INTERFACE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_INTERFACE_IMPL))
  1050. #define GI_MARSHALLING_TESTS_INTERFACE_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE_IMPL, GIMarshallingTestsInterfaceImplClass))
  1051. typedef struct _GIMarshallingTestsInterfaceImplClass GIMarshallingTestsInterfaceImplClass;
  1052. typedef struct _GIMarshallingTestsInterfaceImpl GIMarshallingTestsInterfaceImpl;
  1053. struct _GIMarshallingTestsInterfaceImplClass
  1054. {
  1055. GObjectClass parent_class;
  1056. };
  1057. struct _GIMarshallingTestsInterfaceImpl
  1058. {
  1059. GObject parent_instance;
  1060. gint int_;
  1061. };
  1062. _GI_TEST_EXTERN
  1063. GType gi_marshalling_tests_interface_impl_get_type (void) G_GNUC_CONST;
  1064. _GI_TEST_EXTERN
  1065. GIMarshallingTestsInterface *gi_marshalling_tests_interface_impl_get_as_interface (GIMarshallingTestsInterfaceImpl *self);
  1066. /* GIMarshallingTestsInterface2 allows us testing vfunc clashes when a class'
  1067. vfunc implementation ambiguously relates to its prototype */
  1068. #define GI_MARSHALLING_TESTS_TYPE_INTERFACE2 (gi_marshalling_tests_interface2_get_type ())
  1069. #define GI_MARSHALLING_TESTS_INTERFACE2(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2))
  1070. #define GI_MARSHALLING_TESTS_IS_INTERFACE2(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE2))
  1071. #define GI_MARSHALLING_TESTS_INTERFACE2_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE2, GIMarshallingTestsInterface2Iface))
  1072. typedef struct _GIMarshallingTestsInterface2 GIMarshallingTestsInterface2;
  1073. typedef struct _GIMarshallingTestsInterface2Iface GIMarshallingTestsInterface2Iface;
  1074. struct _GIMarshallingTestsInterface2Iface {
  1075. GTypeInterface base_iface;
  1076. /**
  1077. * GIMarshallingTestsInterface2Iface::test_int8_in:
  1078. * @in: (in):
  1079. */
  1080. void (* test_int8_in) (GIMarshallingTestsInterface2 *self, gint8 in);
  1081. };
  1082. _GI_TEST_EXTERN
  1083. GType gi_marshalling_tests_interface2_get_type (void) G_GNUC_CONST;
  1084. /* GIMarshallingTestsInterface3 tests passing arrays of variants from C to @lang */
  1085. #define GI_MARSHALLING_TESTS_TYPE_INTERFACE3 (gi_marshalling_tests_interface3_get_type ())
  1086. #define GI_MARSHALLING_TESTS_INTERFACE3(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE3, GIMarshallingTestsInterface3))
  1087. #define GI_MARSHALLING_TESTS_IS_INTERFACE3(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GI_MARSHALLING_TESTS_TYPE_INTERFACE3))
  1088. #define GI_MARSHALLING_TESTS_INTERFACE3_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GI_MARSHALLING_TESTS_TYPE_INTERFACE3, GIMarshallingTestsInterface3Iface))
  1089. typedef struct _GIMarshallingTestsInterface3 GIMarshallingTestsInterface3;
  1090. typedef struct _GIMarshallingTestsInterface3Iface GIMarshallingTestsInterface3Iface;
  1091. struct _GIMarshallingTestsInterface3Iface {
  1092. GTypeInterface base_iface;
  1093. /**
  1094. * GIMarshallingTestsInterface3::test_variant_array_in:
  1095. * @in: (in) (array length=n_in):
  1096. */
  1097. void (* test_variant_array_in) (GIMarshallingTestsInterface3 *self, GVariant **in, gsize n_in);
  1098. };
  1099. _GI_TEST_EXTERN
  1100. GType gi_marshalling_tests_interface3_get_type (void) G_GNUC_CONST;
  1101. _GI_TEST_EXTERN
  1102. void gi_marshalling_tests_interface3_test_variant_array_in (GIMarshallingTestsInterface3 *self, GVariant **in, gsize n_in);
  1103. /* Multiple output arguments */
  1104. _GI_TEST_EXTERN
  1105. void gi_marshalling_tests_int_out_out (gint *int0, gint *int1);
  1106. _GI_TEST_EXTERN
  1107. void gi_marshalling_tests_int_three_in_three_out(gint a, gint b, gint c,
  1108. gint *out0, gint *out1, gint *out2);
  1109. _GI_TEST_EXTERN
  1110. gint gi_marshalling_tests_int_return_out (gint *int_);
  1111. /* Default arguments */
  1112. _GI_TEST_EXTERN
  1113. void gi_marshalling_tests_int_two_in_utf8_two_in_with_allow_none (gint a, gint b, const gchar *c, const gchar *d);
  1114. _GI_TEST_EXTERN
  1115. void gi_marshalling_tests_int_one_in_utf8_two_in_one_allows_none (gint a, const gchar *b, const gchar *c);
  1116. _GI_TEST_EXTERN
  1117. void gi_marshalling_tests_array_in_utf8_two_in (const gint *ints, gint length, const gchar *a, const gchar *b);
  1118. _GI_TEST_EXTERN
  1119. void gi_marshalling_tests_array_in_utf8_two_in_out_of_order (gint length, const gchar *a, const gint *ints, const gchar *b);
  1120. /* GError */
  1121. #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN "gi-marshalling-tests-gerror-domain"
  1122. #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE 5
  1123. #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE "gi-marshalling-tests-gerror-message"
  1124. #define GI_MARSHALLING_TESTS_CONSTANT_GERROR_DEBUG_MESSAGE "we got an error, life is shit"
  1125. _GI_TEST_EXTERN
  1126. void gi_marshalling_tests_gerror(GError **error);
  1127. _GI_TEST_EXTERN
  1128. void gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error);
  1129. _GI_TEST_EXTERN
  1130. void gi_marshalling_tests_gerror_out(GError **error, gchar **debug);
  1131. _GI_TEST_EXTERN
  1132. void gi_marshalling_tests_gerror_out_transfer_none(GError **err, const gchar **debug);
  1133. _GI_TEST_EXTERN
  1134. GError *gi_marshalling_tests_gerror_return(void);
  1135. /* GParamSpec */
  1136. _GI_TEST_EXTERN
  1137. void gi_marshalling_tests_param_spec_in_bool(const GParamSpec *param);
  1138. _GI_TEST_EXTERN
  1139. GParamSpec *gi_marshalling_tests_param_spec_return (void);
  1140. _GI_TEST_EXTERN
  1141. void gi_marshalling_tests_param_spec_out(GParamSpec **param);
  1142. /* Overrides */
  1143. #define GI_MARSHALLING_TESTS_OVERRIDES_CONSTANT 42
  1144. typedef struct {
  1145. glong long_;
  1146. } GIMarshallingTestsOverridesStruct;
  1147. _GI_TEST_EXTERN
  1148. GType gi_marshalling_tests_overrides_struct_get_type (void) G_GNUC_CONST;
  1149. _GI_TEST_EXTERN
  1150. GIMarshallingTestsOverridesStruct *gi_marshalling_tests_overrides_struct_new (void);
  1151. _GI_TEST_EXTERN
  1152. glong gi_marshalling_tests_overrides_struct_method (GIMarshallingTestsOverridesStruct *struct_);
  1153. _GI_TEST_EXTERN
  1154. GIMarshallingTestsOverridesStruct *gi_marshalling_tests_overrides_struct_returnv (void);
  1155. #define GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT (gi_marshalling_tests_overrides_object_get_type ())
  1156. #define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObject))
  1157. #define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObjectClass))
  1158. #define GI_MARSHALLING_TESTS_IS_OVERRIDES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT))
  1159. #define GI_MARSHALLING_TESTS_IS_OVERRIDES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT))
  1160. #define GI_MARSHALLING_TESTS_OVERRIDES_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_OVERRIDES_OBJECT, GIMarshallingTestsOverridesObjectClass))
  1161. typedef struct _GIMarshallingTestsOverridesObjectClass GIMarshallingTestsOverridesObjectClass;
  1162. typedef struct _GIMarshallingTestsOverridesObject GIMarshallingTestsOverridesObject;
  1163. struct _GIMarshallingTestsOverridesObjectClass
  1164. {
  1165. GObjectClass parent_class;
  1166. };
  1167. struct _GIMarshallingTestsOverridesObject
  1168. {
  1169. GObject parent_instance;
  1170. glong long_;
  1171. };
  1172. _GI_TEST_EXTERN
  1173. GType gi_marshalling_tests_overrides_object_get_type (void) G_GNUC_CONST;
  1174. _GI_TEST_EXTERN
  1175. GIMarshallingTestsOverridesObject *gi_marshalling_tests_overrides_object_new (void);
  1176. _GI_TEST_EXTERN
  1177. glong gi_marshalling_tests_overrides_object_method (GIMarshallingTestsOverridesObject *object);
  1178. _GI_TEST_EXTERN
  1179. GIMarshallingTestsOverridesObject *gi_marshalling_tests_overrides_object_returnv (void);
  1180. /* Properties Object */
  1181. #define GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT (gi_marshalling_tests_properties_object_get_type ())
  1182. #define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObject))
  1183. #define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObjectClass))
  1184. #define GI_MARSHALLING_TESTS_IS_PROPERTIES_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT))
  1185. #define GI_MARSHALLING_TESTS_IS_PROPERTIES_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT))
  1186. #define GI_MARSHALLING_TESTS_PROPERTIES_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GI_MARSHALLING_TESTS_TYPE_PROPERTIES_OBJECT, GIMarshallingTestsPropertiesObjectClass))
  1187. typedef struct _GIMarshallingTestsPropertiesObject GIMarshallingTestsPropertiesObject;
  1188. typedef struct _GIMarshallingTestsPropertiesObjectClass GIMarshallingTestsPropertiesObjectClass;
  1189. struct _GIMarshallingTestsPropertiesObject {
  1190. GObject parent_instance;
  1191. gboolean some_boolean;
  1192. gchar some_char;
  1193. guchar some_uchar;
  1194. gint some_int;
  1195. guint some_uint;
  1196. glong some_long;
  1197. gulong some_ulong;
  1198. gint64 some_int64;
  1199. guint64 some_uint64;
  1200. gfloat some_float;
  1201. gdouble some_double;
  1202. gchar **some_strv;
  1203. GIMarshallingTestsBoxedStruct* some_boxed_struct;
  1204. GList* some_boxed_glist;
  1205. GVariant *some_variant;
  1206. GObject *some_object;
  1207. };
  1208. struct _GIMarshallingTestsPropertiesObjectClass {
  1209. GObjectClass parent_class;
  1210. };
  1211. _GI_TEST_EXTERN
  1212. GType gi_marshalling_tests_properties_object_get_type (void) G_GNUC_CONST;
  1213. _GI_TEST_EXTERN
  1214. GIMarshallingTestsPropertiesObject *gi_marshalling_tests_properties_object_new (void);
  1215. #endif /* _GI_MARSHALLING_TESTS_H_ */