Skip to content

Commit 57baedd

Browse files
committed
revise doc comments in foreign
1 parent f44fb49 commit 57baedd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+988
-895
lines changed

doc/rename.sed

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
s/vips_\(amiMSBfirst\)/apple_\1_apple/g
2+
s/vips_\(error_freeze\)/apple_\1_apple/g
3+
s/vips_\(error_thaw\)/apple_\1_apple/g
4+
s/vips_\(error_buffer\)/apple_\1_apple/g
5+
s/vips_\(image_new\)/apple_\1_apple/g
6+
s/vips_\(target_new_to_memory\)/apple_\1_apple/g
7+
s/vips_\(.*\)_get_type/apple_\1_get_type_apple/g
8+
19
s/See also: \([^.]\)/::: seealso\n * \1/g
210

311
s/#VipsImage::\(width\)/[property@Image:\1]/g
@@ -163,6 +171,8 @@ s/vips_\(falsecolour\)()/[method@Image.\1]/g
163171
s/vips_\(fastcor\)()/[method@Image.\1]/g
164172
s/vips_\(fill_nearest\)()/[method@Image.\1]/g
165173
s/vips_\(find_trim\)()/[method@Image.\1]/g
174+
s/vips_\(vipsload\)()/[ctor@Image.\1]/g
175+
s/vips_\(radload\)()/[ctor@Image.\1]/g
166176
s/vips_\(fitsload\)()/[ctor@Image.\1]/g
167177
s/vips_\(fitsload_source\)()/[ctor@Image.\1]/g
168178
s/vips_\(fitssave\)()/[method@Image.\1]/g
@@ -253,6 +263,15 @@ s/vips_\(log\)()/[method@Image.\1]/g
253263
s/vips_\(lshift_const1\)()/[method@Image.\1]/g
254264
s/vips_\(lshift_const\)()/[method@Image.\1]/g
255265
s/vips_\(lshift\)()/[method@Image.\1]/g
266+
s/vips_\(pngload\)()/[ctor@Image.\1]/g
267+
s/vips_\(ppmload\)()/[ctor@Image.\1]/g
268+
s/vips_\(openslideload\)()/[ctor@Image.\1]/g
269+
s/vips_\(tiffload\)()/[ctor@Image.\1]/g
270+
s/vips_\(gifload\)()/[ctor@Image.\1]/g
271+
s/vips_\(niftiload\)()/[ctor@Image.\1]/g
272+
s/vips_\(matrixload\)()/[ctor@Image.\1]/g
273+
s/vips_\(svgload\)()/[ctor@Image.\1]/g
274+
s/vips_\(magickload\)()/[ctor@Image.\1]/g
256275
s/vips_\(magicksave_buffer\)()/[method@Image.\1]/g
257276
s/vips_\(magicksave\)()/[method@Image.\1]/g
258277
s/vips_\(mapim\)()/[method@Image.\1]/g
@@ -390,6 +409,11 @@ s/vips_\(transpose3d\)()/[method@Image.\1]/g
390409
s/vips_\(unpremultiply\)()/[method@Image.\1]/g
391410
s/vips_\(vipssave\)()/[method@Image.\1]/g
392411
s/vips_\(vipssave_target\)()/[method@Image.\1]/g
412+
s/vips_\(jpegload\)()/[ctor@Image.\1]/g
413+
s/vips_\(jpegload_buffer\)()/[ctor@Image.\1]/g
414+
s/vips_\(heifload\)()/[ctor@Image.\1]/g
415+
s/vips_\(csvload\)()/[ctor@Image.\1]/g
416+
s/vips_\(webpload\)()/[ctor@Image.\1]/g
393417
s/vips_\(webpsave_buffer\)()/[method@Image.\1]/g
394418
s/vips_\(webpsave\)()/[method@Image.\1]/g
395419
s/vips_\(webpsave_mime\)()/[method@Image.\1]/g
@@ -411,12 +435,20 @@ s/vips_\([^(]*\)()/[func@\1]/g
411435
s/#Vips\(SdfShape\)/[enum@\1]/g
412436
s/#Vips\(CombineMode\)/[enum@\1]/g
413437
s/#Vips\(Access\)/[enum@\1]/g
438+
s/#Vips\(RegionShrink\)/[enum@\1]/g
414439
s/#Vips\(BandFormat\)/[enum@\1]/g
415440
s/#Vips\(Interpretation\)/[enum@\1]/g
416441
s/#Vips\(Coding\)/[enum@\1]/g
417442
s/#Vips\(DemandStyle\)/[enum@\1]/g
418443
s/#Vips\(Precision\)/[enum@\1]/g
419444
s/#Vips\(ArgumentFlags\)/[flags@\1]/g
445+
s/#Vips\(ForeignPngFilter\)/[flags@\1]/g
446+
s/#Vips\(ForeignPpmFormat\)/[enum@\1]/g
447+
s/#Vips\(ForeignTiffCompression\)/[enum@\1]/g
448+
s/#Vips\(ForeignTiffPredictor\)/[enum@\1]/g
449+
s/#Vips\(ForeignTiffResUnit\)/[enum@\1]/g
450+
s/#Vips\(ForeignDzDepth\)/[enum@\1]/g
451+
s/#Vips\(ForeignWebpPreset\)/[enum@\1]/g
420452

421453
s/#Vips\(Rect\)/[struct@\1]/g
422454
s/#Vips\(Progress\)/[struct@\1]/g
@@ -464,6 +496,8 @@ s/#VIPS_INTERPRETATION_\([^ ,.]*\)/[enum@Vips.Interpretation.\1]/g
464496
s/#VIPS_ACCESS_\([^ ,.]*\)/[enum@Vips.Access.\1]/g
465497
s/#VIPS_CODING_\([^ ,.]*\)/[enum@Vips.Coding.\1]/g
466498

499+
s/apple_\(.*\)_apple/vips_\1/g
500+
467501
s/g_\(assert_not_reached\)/banana_\1_banana/g
468502

469503
s/g_thread_\([^(]*new\)()/[ctor@GLib.Thread.\1]/g

libvips/foreign/analyzeload.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ vips_foreign_load_analyze_init(VipsForeignLoadAnalyze *analyze)
166166
* loaded lazilly and byte-swapped, if necessary. The Analyze metadata is read
167167
* and attached.
168168
*
169-
* See also: vips_image_new_from_file().
169+
* ::: seealso
170+
* vips_image_new_from_file().
170171
*
171172
* Returns: 0 on success, -1 on error.
172173
*/

libvips/foreign/cgifsave.c

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,19 +1134,6 @@ vips_foreign_save_cgif_buffer_init(VipsForeignSaveCgifBuffer *buffer)
11341134
* @filename: file to write to
11351135
* @...: %NULL-terminated list of optional named arguments
11361136
*
1137-
* Optional arguments:
1138-
*
1139-
* * @dither: %gdouble, quantisation dithering level
1140-
* * @effort: %gint, quantisation CPU effort
1141-
* * @bitdepth: %gint, number of bits per pixel
1142-
* * @interframe_maxerror: %gdouble, maximum inter-frame error for transparency
1143-
* * @reuse: %gboolean, reuse palette from input
1144-
* * @interlace: %gboolean, write an interlaced (progressive) GIF
1145-
* * @interpalette_maxerror: %gdouble, maximum inter-palette error for palette
1146-
* reusage
1147-
* * @keep_duplicate_frames: %boolean, keep duplicate frames in the output
1148-
* instead of combining them
1149-
*
11501137
* Write to a file in GIF format.
11511138
*
11521139
* Use @dither to set the degree of Floyd-Steinberg dithering
@@ -1177,7 +1164,21 @@ vips_foreign_save_cgif_buffer_init(VipsForeignSaveCgifBuffer *buffer)
11771164
* If @keep_duplicate_frames is TRUE, duplicate frames in the input will be
11781165
* kept in the output instead of combining them.
11791166
*
1180-
* See also: vips_image_new_from_file().
1167+
* ::: tip "Optional arguments"
1168+
* * @dither: %gdouble, quantisation dithering level
1169+
* * @effort: %gint, quantisation CPU effort
1170+
* * @bitdepth: %gint, number of bits per pixel
1171+
* * @interframe_maxerror: %gdouble, maximum inter-frame error for
1172+
* transparency
1173+
* * @reuse: %gboolean, reuse palette from input
1174+
* * @interlace: %gboolean, write an interlaced (progressive) GIF
1175+
* * @interpalette_maxerror: %gdouble, maximum inter-palette error for
1176+
* palette * reusage
1177+
* * @keep_duplicate_frames: %boolean, keep duplicate frames in the output
1178+
* instead of combining them
1179+
*
1180+
* ::: seealso
1181+
* vips_image_new_from_file().
11811182
*
11821183
* Returns: 0 on success, -1 on error.
11831184
*/
@@ -1201,26 +1202,27 @@ vips_gifsave(VipsImage *in, const char *filename, ...)
12011202
* @len: (type gsize): return output length here
12021203
* @...: %NULL-terminated list of optional named arguments
12031204
*
1204-
* Optional arguments:
1205-
*
1206-
* * @dither: %gdouble, quantisation dithering level
1207-
* * @effort: %gint, quantisation CPU effort
1208-
* * @bitdepth: %gint, number of bits per pixel
1209-
* * @interframe_maxerror: %gdouble, maximum inter-frame error for transparency
1210-
* * @reuse: %gboolean, reuse palette from input
1211-
* * @interlace: %gboolean, write an interlaced (progressive) GIF
1212-
* * @interpalette_maxerror: %gdouble, maximum inter-palette error for palette
1213-
* reusage
1214-
* * @keep_duplicate_frames: %boolean, keep duplicate frames in the output
1215-
* instead of combining them
1216-
*
1217-
* As vips_gifsave(), but save to a memory buffer.
1205+
* As [method@Image.gifsave], but save to a memory buffer.
12181206
*
12191207
* The address of the buffer is returned in @buf, the length of the buffer in
1220-
* @len. You are responsible for freeing the buffer with g_free() when you
1208+
* @len. You are responsible for freeing the buffer with [func@GLib.free] when you
12211209
* are done with it.
12221210
*
1223-
* See also: vips_gifsave(), vips_image_write_to_file().
1211+
* ::: tip "Optional arguments"
1212+
* * @dither: %gdouble, quantisation dithering level
1213+
* * @effort: %gint, quantisation CPU effort
1214+
* * @bitdepth: %gint, number of bits per pixel
1215+
* * @interframe_maxerror: %gdouble, maximum inter-frame error for
1216+
* transparency
1217+
* * @reuse: %gboolean, reuse palette from input
1218+
* * @interlace: %gboolean, write an interlaced (progressive) GIF
1219+
* * @interpalette_maxerror: %gdouble, maximum inter-palette error for
1220+
* palette * reusage
1221+
* * @keep_duplicate_frames: %boolean, keep duplicate frames in the output
1222+
* instead of combining them
1223+
*
1224+
* ::: seealso
1225+
* [method@Image.gifsave], [method@Image.write_to_file].
12241226
*
12251227
* Returns: 0 on success, -1 on error.
12261228
*/
@@ -1258,22 +1260,23 @@ vips_gifsave_buffer(VipsImage *in, void **buf, size_t *len, ...)
12581260
* @target: save image to this target
12591261
* @...: %NULL-terminated list of optional named arguments
12601262
*
1261-
* Optional arguments:
1262-
*
1263-
* * @dither: %gdouble, quantisation dithering level
1264-
* * @effort: %gint, quantisation CPU effort
1265-
* * @bitdepth: %gint, number of bits per pixel
1266-
* * @interframe_maxerror: %gdouble, maximum inter-frame error for transparency
1267-
* * @reuse: %gboolean, reuse palette from input
1268-
* * @interlace: %gboolean, write an interlaced (progressive) GIF
1269-
* * @interpalette_maxerror: %gdouble, maximum inter-palette error for palette
1270-
* reusage
1271-
* * @keep_duplicate_frames: %boolean, keep duplicate frames in the output
1272-
* instead of combining them
1263+
* As [method@Image.gifsave], but save to a target.
12731264
*
1274-
* As vips_gifsave(), but save to a target.
1265+
* ::: tip "Optional arguments"
1266+
* * @dither: %gdouble, quantisation dithering level
1267+
* * @effort: %gint, quantisation CPU effort
1268+
* * @bitdepth: %gint, number of bits per pixel
1269+
* * @interframe_maxerror: %gdouble, maximum inter-frame error for
1270+
* transparency
1271+
* * @reuse: %gboolean, reuse palette from input
1272+
* * @interlace: %gboolean, write an interlaced (progressive) GIF
1273+
* * @interpalette_maxerror: %gdouble, maximum inter-palette error for
1274+
* palette * reusage
1275+
* * @keep_duplicate_frames: %boolean, keep duplicate frames in the output
1276+
* instead of combining them
12751277
*
1276-
* See also: vips_gifsave(), vips_image_write_to_target().
1278+
* ::: seealso
1279+
* [method@Image.gifsave], [method@Image.write_to_target].
12771280
*
12781281
* Returns: 0 on success, -1 on error.
12791282
*/

libvips/foreign/csvload.c

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -676,16 +676,10 @@ vips_foreign_load_csv_source_init(VipsForeignLoadCsvSource *source)
676676
* @out: (out): output image
677677
* @...: %NULL-terminated list of optional named arguments
678678
*
679-
* Optional arguments:
679+
* Load a CSV (comma-separated values) file.
680680
*
681-
* * @skip: skip this many lines at start of file
682-
* * @lines: read this many lines from file
683-
* * @whitespace: set of whitespace characters
684-
* * @separator: set of separator characters
685-
* * @fail_on: #VipsFailOn, types of read error to fail on
686-
*
687-
* Load a CSV (comma-separated values) file. The output image is always 1
688-
* band (monochrome), #VIPS_FORMAT_DOUBLE. Use vips_bandfold() to turn
681+
* The output image is always 1 band (monochrome),
682+
* [enum@Vips.BandFormat.DOUBLE]. Use [method@Image.bandfold] to turn
689683
* RGBRGBRGB mono images into colour images.
690684
*
691685
* Items in lines can be either floating point numbers in the C locale, or
@@ -709,7 +703,15 @@ vips_foreign_load_csv_source_init(VipsForeignLoadCsvSource *source)
709703
* Use @fail_on to set the type of error that will cause load to fail. By
710704
* default, loaders are permissive, that is, #VIPS_FAIL_ON_NONE.
711705
*
712-
* See also: vips_image_new_from_file(), vips_bandfold().
706+
* ::: tip "Optional arguments"
707+
* * @skip: %gint, skip this many lines at start of file
708+
* * @lines: %gint, read this many lines from file
709+
* * @whitespace: %gchararray, set of whitespace characters
710+
* * @separator: %gchararray, set of separator characters
711+
* * @fail_on: [enum@FailOn], types of read error to fail on
712+
*
713+
* ::: seealso
714+
* vips_image_new_from_file(), [method@Image.bandfold].
713715
*
714716
* Returns: 0 on success, -1 on error.
715717
*/
@@ -732,17 +734,17 @@ vips_csvload(const char *filename, VipsImage **out, ...)
732734
* @out: (out): output image
733735
* @...: %NULL-terminated list of optional named arguments
734736
*
735-
* Optional arguments:
736-
*
737-
* * @skip: skip this many lines at start of file
738-
* * @lines: read this many lines from file
739-
* * @whitespace: set of whitespace characters
740-
* * @separator: set of separator characters
741-
* * @fail_on: #VipsFailOn, types of read error to fail on
737+
* Exactly as [ctor@Image.csvload], but read from a source.
742738
*
743-
* Exactly as vips_csvload(), but read from a source.
739+
* ::: tip "Optional arguments"
740+
* * @skip: %gint, skip this many lines at start of file
741+
* * @lines: %gint, read this many lines from file
742+
* * @whitespace: %gchararray, set of whitespace characters
743+
* * @separator: %gchararray, set of separator characters
744+
* * @fail_on: [enum@FailOn], types of read error to fail on
744745
*
745-
* See also: vips_csvload().
746+
* ::: seealso
747+
* [ctor@Image.csvload].
746748
*
747749
* Returns: 0 on success, -1 on error.
748750
*/

libvips/foreign/csvsave.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,8 @@ vips_foreign_save_csv_target_init(VipsForeignSaveCsvTarget *target)
340340
* @filename: file to write to
341341
* @...: %NULL-terminated list of optional named arguments
342342
*
343-
* Optional arguments:
344-
*
345-
* * @separator: separator string
346-
*
347343
* Writes the pixels in @in to the @filename as CSV (comma-separated values).
344+
*
348345
* The image is written
349346
* one line of text per scanline. Complex numbers are written as
350347
* "(real,imaginary)" and will need extra parsing I guess. Only the first band
@@ -353,7 +350,11 @@ vips_foreign_save_csv_target_init(VipsForeignSaveCsvTarget *target)
353350
* @separator gives the string to use to separate numbers in the output.
354351
* The default is "\\t" (tab).
355352
*
356-
* See also: vips_image_write_to_file().
353+
* ::: tip "Optional arguments"
354+
* * @separator: separator string
355+
*
356+
* ::: seealso
357+
* [method@Image.write_to_file].
357358
*
358359
* Returns: 0 on success, -1 on error.
359360
*/
@@ -376,13 +377,13 @@ vips_csvsave(VipsImage *in, const char *filename, ...)
376377
* @target: save image to this target
377378
* @...: %NULL-terminated list of optional named arguments
378379
*
379-
* Optional arguments:
380-
*
381-
* * @separator: separator string
380+
* As [method@Image.csvsave], but save to a target.
382381
*
383-
* As vips_csvsave(), but save to a target.
382+
* ::: tip "Optional arguments"
383+
* * @separator: separator string
384384
*
385-
* See also: vips_csvsave().
385+
* ::: seealso
386+
* [method@Image.csvsave].
386387
*
387388
* Returns: 0 on success, -1 on error.
388389
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy