/usr/share/gtk-doc/html/libgwymodule/libgwymodule-gwymodule-file.html is in libgwyddion20-doc 2.26-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gwymodule-file</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Gwyddion Module Library Reference Manual">
<link rel="up" href="ModuleLibrary.html" title="Gwyddion Module Library">
<link rel="prev" href="libgwymodule-gwymoduleloader.html" title="gwymoduleloader">
<link rel="next" href="libgwymodule-gwymodule-process.html" title="gwymodule-process">
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libgwymodule-gwymoduleloader.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ModuleLibrary.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Gwyddion Module Library Reference Manual</th>
<td><a accesskey="n" href="libgwymodule-gwymodule-process.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgwymodule-gwymodule-file.synopsis" class="shortcut">Top</a>
|
<a href="#libgwymodule-gwymodule-file.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libgwymodule-gwymodule-file"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwymodule-gwymodule-file.top_of_page"></a>gwymodule-file</span></h2>
<p>gwymodule-file — File loading and saving modules</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgwymodule-gwymodule-file.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libgwymodule/gwymodule.h>
#define <a class="link" href="libgwymodule-gwymodule-file.html#GWY-FILE-DETECT-BUFFER-SIZE:CAPS" title="GWY_FILE_DETECT_BUFFER_SIZE">GWY_FILE_DETECT_BUFFER_SIZE</a>
#define <a class="link" href="libgwymodule-gwymodule-file.html#GWY-MODULE-FILE-ERROR:CAPS" title="GWY_MODULE_FILE_ERROR">GWY_MODULE_FILE_ERROR</a>
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> (<a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectFunc" title="GwyFileDetectFunc ()">*GwyFileDetectFunc</a>) (<em class="parameter"><code>const <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectInfo" title="GwyFileDetectInfo"><span class="type">GwyFileDetectInfo</span></a> *fileinfo</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectInfo" title="GwyFileDetectInfo">GwyFileDetectInfo</a>;
<a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * (<a class="link" href="libgwymodule-gwymodule-file.html#GwyFileLoadFunc" title="GwyFileLoadFunc ()">*GwyFileLoadFunc</a>) (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (<a class="link" href="libgwymodule-gwymodule-file.html#GwyFileSaveFunc" title="GwyFileSaveFunc ()">*GwyFileSaveFunc</a>) (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
enum <a class="link" href="libgwymodule-gwymodule-file.html#GwyModuleFileError" title="enum GwyModuleFileError">GwyModuleFileError</a>;
const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-detect" title="gwy_file_detect ()">gwy_file_detect</a> (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="type">GwyFileOperationType</span></a> operations</code></em>);
const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-detect-with-score" title="gwy_file_detect_with_score ()">gwy_file_detect_with_score</a> (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="type">GwyFileOperationType</span></a> operations</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *score</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-exists" title="gwy_file_func_exists ()">gwy_file_func_exists</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-foreach" title="gwy_file_func_foreach ()">gwy_file_func_foreach</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a> function</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-get-description" title="gwy_file_func_get_description ()">gwy_file_func_get_description</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-get-is-detectable" title="gwy_file_func_get_is_detectable ()">gwy_file_func_get_is_detectable</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="returnvalue">GwyFileOperationType</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-get-operations" title="gwy_file_func_get_operations ()">gwy_file_func_get_operations</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-register" title="gwy_file_func_register ()">gwy_file_func_register</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectFunc" title="GwyFileDetectFunc ()"><span class="type">GwyFileDetectFunc</span></a> detect</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileLoadFunc" title="GwyFileLoadFunc ()"><span class="type">GwyFileLoadFunc</span></a> load</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileSaveFunc" title="GwyFileSaveFunc ()"><span class="type">GwyFileSaveFunc</span></a> save</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileSaveFunc" title="GwyFileSaveFunc ()"><span class="type">GwyFileSaveFunc</span></a> export_</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-run-detect" title="gwy_file_func_run_detect ()">gwy_file_func_run_detect</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-run-export" title="gwy_file_func_run_export ()">gwy_file_func_run_export</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-run-load" title="gwy_file_func_run_load ()">gwy_file_func_run_load</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-run-save" title="gwy_file_func_run_save ()">gwy_file_func_run_save</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-set-is-detectable" title="gwy_file_func_set_is_detectable ()">gwy_file_func_set_is_detectable</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_detectable</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-get-data-info" title="gwy_file_get_data_info ()">gwy_file_get_data_info</a> (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **filename_sys</code></em>);
<a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-load" title="gwy_file_load ()">gwy_file_load</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-load-with-func" title="gwy_file_load_with_func ()">gwy_file_load_with_func</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="returnvalue">GwyFileOperationType</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-save" title="gwy_file_save ()">gwy_file_save</a> (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="returnvalue">GwyFileOperationType</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-save-with-func" title="gwy_file_save_with_func ()">gwy_file_save_with_func</a> (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a> <a class="link" href="libgwymodule-gwymodule-file.html#gwy-module-file-error-quark" title="gwy_module_file_error_quark ()">gwy_module_file_error_quark</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymodule-file.description"></a><h2>Description</h2>
<p>
File modules implement file loading, saving and file type detection
functions. Not all fuctions has to be implemented, a file module can be
import-only or export-only. If it does not implement file type detection,
files of this type can be read/written only on user's explicite request.
</p>
<p>
For file module writers, the only useful function here is the registration
function <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-register" title="gwy_file_func_register ()"><code class="function">gwy_file_func_register()</code></a> and the signatures of particular file
operations: <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectFunc" title="GwyFileDetectFunc ()"><span class="type">GwyFileDetectFunc</span></a>, <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileLoadFunc" title="GwyFileLoadFunc ()"><span class="type">GwyFileLoadFunc</span></a>, and <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileSaveFunc" title="GwyFileSaveFunc ()"><span class="type">GwyFileSaveFunc</span></a>.
</p>
</div>
<div class="refsect1">
<a name="libgwymodule-gwymodule-file.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GWY-FILE-DETECT-BUFFER-SIZE:CAPS"></a><h3>GWY_FILE_DETECT_BUFFER_SIZE</h3>
<pre class="programlisting">#define GWY_FILE_DETECT_BUFFER_SIZE 4096U
</pre>
<p>
The size of <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectInfo" title="GwyFileDetectInfo"><span class="type">GwyFileDetectInfo</span></a> buffer for initial part of file. It should
be enough for any normal kind of magic header test.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GWY-MODULE-FILE-ERROR:CAPS"></a><h3>GWY_MODULE_FILE_ERROR</h3>
<pre class="programlisting">#define GWY_MODULE_FILE_ERROR gwy_module_file_error_quark()
</pre>
<p>
Error domain for file module operations. Errors in this domain will be from
the <a class="link" href="libgwymodule-gwymodule-file.html#GwyModuleFileError" title="enum GwyModuleFileError"><span class="type">GwyModuleFileError</span></a> enumeration. See <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for information on
error domains.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GwyFileDetectFunc"></a><h3>GwyFileDetectFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> (*GwyFileDetectFunc) (<em class="parameter"><code>const <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectInfo" title="GwyFileDetectInfo"><span class="type">GwyFileDetectInfo</span></a> *fileinfo</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
The type of file type detection function.
</p>
<p>
When called with <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> <em class="parameter"><code>only_name</code></em> it should not try to access the file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>fileinfo</code></em> :</span></p></td>
<td>Information about file to detect the filetype of,
see <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectInfo" title="GwyFileDetectInfo"><span class="type">GwyFileDetectInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>only_name</code></em> :</span></p></td>
<td>Whether the type should be guessed only from file name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Function name from as registered with <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-register" title="gwy_file_func_register ()"><code class="function">gwy_file_func_register()</code></a>
(single-function modules can safely ignore this argument).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An integer likehood score (see <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-run-detect" title="gwy_file_func_run_detect ()"><code class="function">gwy_file_func_run_detect()</code></a> for
description).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyFileDetectInfo"></a><h3>GwyFileDetectInfo</h3>
<pre class="programlisting">typedef struct {
const gchar *name;
const gchar *name_lowercase;
gsize file_size;
guint buffer_len;
const guchar *head;
const guchar *tail;
} GwyFileDetectInfo;
</pre>
<p>
File detection data for <a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectFunc" title="GwyFileDetectFunc ()"><span class="type">GwyFileDetectFunc</span></a>.
</p>
<p>
It contains the common information file type detection routines need to
obtain. It is shared between file detection functions and they must not
modify its contents. Some fields are set only when the detection routines
are to check the file contents, these are marked `Undefined if <em class="parameter"><code>only_name</code></em>'.
</p>
<p>
The <em class="parameter"><code>head</code></em> and <em class="parameter"><code>tail</code></em> buffers are always nul-terminated and thus safely usable
with string functions. When file is shorter than
<em class="parameter"><code>GWY_FILE_DETECT_BUFFER_SIZE</code></em> bytes, <code class="literal">'\0'</code> is appended
to the end (therefore <em class="parameter"><code>buffer_len</code></em> = <em class="parameter"><code>file_size</code></em> + 1), otherwise the last
byte is overwritten with <code class="literal">'\0'</code>. In either case the
last byte of <em class="parameter"><code>head</code></em> and <em class="parameter"><code>tail</code></em> cannot be assumed to be identical as in
the file (or being a part of the file at all).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyFileDetectInfo.name"></a>name</code></em>;</span></p></td>
<td>File name, in GLib filename encoding.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GwyFileDetectInfo.name-lowercase"></a>name_lowercase</code></em>;</span></p></td>
<td>File name in lowercase (for eventual case-insensitive
name check).</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="GwyFileDetectInfo.file-size"></a>file_size</code></em>;</span></p></td>
<td>File size in bytes. Undefined if <em class="parameter"><code>only_name</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GwyFileDetectInfo.buffer-len"></a>buffer_len</code></em>;</span></p></td>
<td>The size of <em class="parameter"><code>head</code></em> and <em class="parameter"><code>tail</code></em> in bytes. Normally it's
<em class="parameter"><code>GWY_FILE_DETECT_BUFFER_SIZE</code></em> except when file is shorter than
that. Undefined if <em class="parameter"><code>only_name</code></em>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *<em class="structfield"><code><a name="GwyFileDetectInfo.head"></a>head</code></em>;</span></p></td>
<td>Initial part of file. Undefined if <em class="parameter"><code>only_name</code></em>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *<em class="structfield"><code><a name="GwyFileDetectInfo.tail"></a>tail</code></em>;</span></p></td>
<td>Final part of file. Undefined if <em class="parameter"><code>only_name</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyFileLoadFunc"></a><h3>GwyFileLoadFunc ()</h3>
<pre class="programlisting"><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * (*GwyFileLoadFunc) (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
The type of file loading function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to load data from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode, this is either <em class="parameter"><code>GWY_RUN_NONINTERACTIVE</code></em>
or <em class="parameter"><code>GWY_RUN_INTERACTIVE</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Function name from as registered with <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-register" title="gwy_file_func_register ()"><code class="function">gwy_file_func_register()</code></a>
(single-function modules can safely ignore this argument).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly created data container, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyFileSaveFunc"></a><h3>GwyFileSaveFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> (*GwyFileSaveFunc) (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
The type of file saving function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to save.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to save <em class="parameter"><code>data</code></em> as.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode, this is either <em class="parameter"><code>GWY_RUN_NONINTERACTIVE</code></em>
or <em class="parameter"><code>GWY_RUN_INTERACTIVE</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Function name from as registered with <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-register" title="gwy_file_func_register ()"><code class="function">gwy_file_func_register()</code></a>
(single-function modules can safely ignore this argument).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if file save succeeded, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyModuleFileError"></a><h3>enum GwyModuleFileError</h3>
<pre class="programlisting">typedef enum {
GWY_MODULE_FILE_ERROR_CANCELLED,
GWY_MODULE_FILE_ERROR_UNIMPLEMENTED,
GWY_MODULE_FILE_ERROR_IO,
GWY_MODULE_FILE_ERROR_DATA,
GWY_MODULE_FILE_ERROR_INTERACTIVE,
GWY_MODULE_FILE_ERROR_SPECIFIC
} GwyModuleFileError;
</pre>
<p>
Error codes returned by file module operations.
</p>
<p>
File module functions can return any of these codes, except
<em class="parameter"><code>GWY_MODULE_FILE_ERROR_UNIMPLEMENTED</code></em> which is normally only returned by
high-level functions <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-load" title="gwy_file_load ()"><code class="function">gwy_file_load()</code></a> and <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-save" title="gwy_file_save ()"><code class="function">gwy_file_save()</code></a>. Module functions
can return it only when they are called with a wrong function name.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GWY-MODULE-FILE-ERROR-CANCELLED:CAPS"></a><span class="term"><code class="literal">GWY_MODULE_FILE_ERROR_CANCELLED</code></span></p></td>
<td>Interactive operation was cancelled by
user.
</td>
</tr>
<tr>
<td><p><a name="GWY-MODULE-FILE-ERROR-UNIMPLEMENTED:CAPS"></a><span class="term"><code class="literal">GWY_MODULE_FILE_ERROR_UNIMPLEMENTED</code></span></p></td>
<td>No module implements requested
operation.
</td>
</tr>
<tr>
<td><p><a name="GWY-MODULE-FILE-ERROR-IO:CAPS"></a><span class="term"><code class="literal">GWY_MODULE_FILE_ERROR_IO</code></span></p></td>
<td>Input/output error occured.
</td>
</tr>
<tr>
<td><p><a name="GWY-MODULE-FILE-ERROR-DATA:CAPS"></a><span class="term"><code class="literal">GWY_MODULE_FILE_ERROR_DATA</code></span></p></td>
<td>Data is corrupted or in an unsupported format.
</td>
</tr>
<tr>
<td><p><a name="GWY-MODULE-FILE-ERROR-INTERACTIVE:CAPS"></a><span class="term"><code class="literal">GWY_MODULE_FILE_ERROR_INTERACTIVE</code></span></p></td>
<td>Operation requires user input, but
it was run as GWY_RUN_NONINTERACTIVE.
</td>
</tr>
<tr>
<td><p><a name="GWY-MODULE-FILE-ERROR-SPECIFIC:CAPS"></a><span class="term"><code class="literal">GWY_MODULE_FILE_ERROR_SPECIFIC</code></span></p></td>
<td>Specific module errors that do not fall
into any other category (such as the
failure to initialize a library used to
read the data). Seldom used.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-detect"></a><h3>gwy_file_detect ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gwy_file_detect (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="type">GwyFileOperationType</span></a> operations</code></em>);</pre>
<p>
Detects the type of a file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to detect type of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>only_name</code></em> :</span></p></td>
<td>Whether to use only file name for a guess, or try to actually
access the file.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>operations</code></em> :</span></p></td>
<td>The file operations the file type must support (it must
support all of them to be considered).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The type name (i.e., the same name as passed to
e.g. <code class="function">gwy_run_file_load_func()</code>) of most probable type of <em class="parameter"><code>filename</code></em>,
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there's no probable one.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-detect-with-score"></a><h3>gwy_file_detect_with_score ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gwy_file_detect_with_score (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="type">GwyFileOperationType</span></a> operations</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *score</code></em>);</pre>
<p>
Detects the type of a file and gives the score.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to detect type of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>only_name</code></em> :</span></p></td>
<td>Whether to use only file name for a guess, or try to actually</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>operations</code></em> :</span></p></td>
<td>The file operations the file type must support (it must</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>score</code></em> :</span></p></td>
<td>Location to store the maximum score (corresponding to the returned
type) to.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The type name (i.e., the same name as passed to
e.g. <code class="function">gwy_run_file_load_func()</code>) of most probable type of <em class="parameter"><code>filename</code></em>,
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there's no probable one.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.1</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-exists"></a><h3>gwy_file_func_exists ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_file_func_exists (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Checks whether a file type function exists.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>File type function name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if function <em class="parameter"><code>name</code></em> exists, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-foreach"></a><h3>gwy_file_func_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_file_func_foreach (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GFunc"><span class="type">GFunc</span></a> function</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Calls a function for each file function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>function</code></em> :</span></p></td>
<td>Function to run for each file function. It will get function
name (constant string owned by module system) as its first
argument, <em class="parameter"><code>user_data</code></em> as the second argument.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data to pass to <em class="parameter"><code>function</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-get-description"></a><h3>gwy_file_func_get_description ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gwy_file_func_get_description (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Gets file function description.
</p>
<p>
That is, the <em class="parameter"><code>file_desc</code></em> field of <span class="type">GwyFileFuncInfo</span>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>File type function name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>File function description, as a string owned by module loader.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-get-is-detectable"></a><h3>gwy_file_func_get_is_detectable ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_file_func_get_is_detectable (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Returns if the file format is reasonably detectable.
</p>
<p>
This is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for all file types that define a detection method unless they
explicitly call <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-set-is-detectable" title="gwy_file_func_set_is_detectable ()"><code class="function">gwy_file_func_set_is_detectable()</code></a> to set the file format
non-detectable in spite of providing a detection method.
</p>
<p>
If files that can be actually loaded as a given type form a subset of files
that are detected as this format, which is normaly the case, it makes no
sense to let the user explicitly choose between these formats. Hence,
detectable formats normally are not explicitly offered.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>File type function name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>If the file format is detectable.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-get-operations"></a><h3>gwy_file_func_get_operations ()</h3>
<pre class="programlisting"><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="returnvalue">GwyFileOperationType</span></a> gwy_file_func_get_operations (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Returns operations supported by a file type function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>File type function name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The file operation bit mask, zero if <em class="parameter"><code>name</code></em> does not exist.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-register"></a><h3>gwy_file_func_register ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_file_func_register (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileDetectFunc" title="GwyFileDetectFunc ()"><span class="type">GwyFileDetectFunc</span></a> detect</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileLoadFunc" title="GwyFileLoadFunc ()"><span class="type">GwyFileLoadFunc</span></a> load</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileSaveFunc" title="GwyFileSaveFunc ()"><span class="type">GwyFileSaveFunc</span></a> save</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymodule-file.html#GwyFileSaveFunc" title="GwyFileSaveFunc ()"><span class="type">GwyFileSaveFunc</span></a> export_</code></em>);</pre>
<p>
Registered a file function.
</p>
<p>
At least one of <em class="parameter"><code>load</code></em>, <em class="parameter"><code>save</code></em>, and <em class="parameter"><code>export_</code></em> must be non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. See
<a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="type">GwyFileOperationType</span></a> for differences between save and export.
</p>
<p>
Note: the string arguments are not copied as modules are not expected to
vanish. If they are constructed (non-constant) strings, do not free them.
Should modules ever become unloadable they will get chance to clean-up.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name of function to register. It should be a valid identifier and
if a module registers only one function, module and function names
should be the same.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>description</code></em> :</span></p></td>
<td>File type description (will be used in file type selectors).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>detect</code></em> :</span></p></td>
<td>Detection function. It may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, files of such a type can
can be then loaded and saved only on explict user request.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>load</code></em> :</span></p></td>
<td>File load/import function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>save</code></em> :</span></p></td>
<td>File save function.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>export_</code></em> :</span></p></td>
<td>File export function.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Normally <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-run-detect"></a><h3>gwy_file_func_run_detect ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gwy_file_func_run_detect (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> only_name</code></em>);</pre>
<p>
Runs a file type detection function identified by <em class="parameter"><code>name</code></em>.
</p>
<p>
Value of <em class="parameter"><code>only_name</code></em> should be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file doesn't exist (is to be
written) so its contents can't be used for file type detection.
</p>
<p>
This is a low-level function, consider using <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-detect" title="gwy_file_detect ()"><code class="function">gwy_file_detect()</code></a> if you
simply want to detect a file type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>A file type function name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to detect.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>only_name</code></em> :</span></p></td>
<td>Whether to use only file name for a guess, or try to actually
access the file.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An integer score expressing the likehood of the file being
loadable as this type. A basic scale is 20 for a good extension,
100 for good magic header, more for more thorough tests.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-run-export"></a><h3>gwy_file_func_run_export ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_file_func_run_export (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Runs a file export function identified by <em class="parameter"><code>name</code></em>.
</p>
<p>
It guarantees the container lifetime spans through the actual file saving,
so the module function doesn't have to care about it.
</p>
<p>
This is a low-level function, consider using <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-save" title="gwy_file_save ()"><code class="function">gwy_file_save()</code></a> if you
simply want to save a file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>A file save function name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to save.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to save <em class="parameter"><code>data</code></em> as.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if file save succeeded, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-run-load"></a><h3>gwy_file_func_run_load ()</h3>
<pre class="programlisting"><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * gwy_file_func_run_load (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Runs a file load function identified by <em class="parameter"><code>name</code></em>.
</p>
<p>
This is a low-level function, consider using <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-load" title="gwy_file_load ()"><code class="function">gwy_file_load()</code></a> if you
simply want to load a file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>A file load function name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to load data from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> with data from <em class="parameter"><code>filename</code></em>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-run-save"></a><h3>gwy_file_func_run_save ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_file_func_run_save (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Runs a file save function identified by <em class="parameter"><code>name</code></em>.
</p>
<p>
It guarantees the container lifetime spans through the actual file saving,
so the module function doesn't have to care about it.
</p>
<p>
This is a low-level function, consider using <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-save" title="gwy_file_save ()"><code class="function">gwy_file_save()</code></a> if you
simply want to save a file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>A file save function name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to save.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to save <em class="parameter"><code>data</code></em> as.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if file save succeeded, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-func-set-is-detectable"></a><h3>gwy_file_func_set_is_detectable ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_file_func_set_is_detectable (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> is_detectable</code></em>);</pre>
<p>
Sets the detectability status of a file format.
</p>
<p>
See <a class="link" href="libgwymodule-gwymodule-file.html#gwy-file-func-get-is-detectable" title="gwy_file_func_get_is_detectable ()"><code class="function">gwy_file_func_get_is_detectable()</code></a> for details. The only rare case when
it makes sense to call this function is when a detection function is
provided for some reason, however, this function is not really able to
detect the format. For instance, the fallback detection method of the
Gwyddion rawfile module.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>File type function name.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_detectable</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to define format as detectable, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> as
non-detectable.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-get-data-info"></a><h3>gwy_file_get_data_info ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_file_get_data_info (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **filename_sys</code></em>);</pre>
<p>
Gets file information about a data.
</p>
<p>
The information is set on two ocasions: file load and successful file save.
File export does not set it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Location to store file type (that is file function name) of <em class="parameter"><code>data</code></em>,
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned string is owned by module system.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename_sys</code></em> :</span></p></td>
<td>Location to store file name of <em class="parameter"><code>data</code></em> (in GLib encoding), or
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The returned string is owned by module system and is
valid only until the container is destroyed or saved again.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if information about <em class="parameter"><code>data</code></em> was found and <em class="parameter"><code>name</code></em> and/or
<em class="parameter"><code>filename</code></em> was filled.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-load"></a><h3>gwy_file_load ()</h3>
<pre class="programlisting"><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * gwy_file_load (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Loads a data file, autodetecting its type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to load data from, in GLib encoding.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> with data from <em class="parameter"><code>filename</code></em>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.25</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-load-with-func"></a><h3>gwy_file_load_with_func ()</h3>
<pre class="programlisting"><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="returnvalue">GwyContainer</span></a> * gwy_file_load_with_func (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-save"></a><h3>gwy_file_save ()</h3>
<pre class="programlisting"><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="returnvalue">GwyFileOperationType</span></a> gwy_file_save (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Saves a data file, deciding to save as what type from the file name.
</p>
<p>
It tries to find a module implementing <a class="link" href="libgwymodule-gwymoduleenums.html#GWY-FILE-OPERATION-SAVE:CAPS"><code class="literal">GWY_FILE_OPERATION_SAVE</code></a> first, when
it does not succeed, it falls back to <a class="link" href="libgwymodule-gwymoduleenums.html#GWY-FILE-OPERATION-EXPORT:CAPS"><code class="literal">GWY_FILE_OPERATION_EXPORT</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to save.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to save the data as, in GLib encoding.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The save operation that was actually realized on success, zero
on failure.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-save-with-func"></a><h3>gwy_file_save_with_func ()</h3>
<pre class="programlisting"><a class="link" href="libgwymodule-gwymoduleenums.html#GwyFileOperationType" title="enum GwyFileOperationType"><span class="returnvalue">GwyFileOperationType</span></a> gwy_file_save_with_func (<em class="parameter"><code><a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *data</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a class="link" href="libgwymodule-gwymoduleenums.html#GwyRunType" title="enum GwyRunType"><span class="type">GwyRunType</span></a> mode</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **name</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Saves a data file, deciding to save as what type from the file name.
</p>
<p>
It tries to find a module implementing <a class="link" href="libgwymodule-gwymoduleenums.html#GWY-FILE-OPERATION-SAVE:CAPS"><code class="literal">GWY_FILE_OPERATION_SAVE</code></a> first, when
it does not succeed, it falls back to <a class="link" href="libgwymodule-gwymoduleenums.html#GWY-FILE-OPERATION-EXPORT:CAPS"><code class="literal">GWY_FILE_OPERATION_EXPORT</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>A <a href="./../libgwyddion/libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to save.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file name to save the data as, in GLib encoding.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>Run mode.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Location to store the name of file load function used to save the
file, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If an error occurs outside the module, e.g. failure
to recognise the file type, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is stored to <em class="parameter"><code>name</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> (or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The save operation that was actually realized on success, zero
on failure.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.25</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-module-file-error-quark"></a><h3>gwy_module_file_error_quark ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a> gwy_module_file_error_quark (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Returns error domain for file module functions.
</p>
<p>
See and use <a class="link" href="libgwymodule-gwymodule-file.html#GWY-MODULE-FILE-ERROR:CAPS" title="GWY_MODULE_FILE_ERROR"><code class="literal">GWY_MODULE_FILE_ERROR</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The error domain.</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.8</div>
</body>
</html>
|