/usr/share/gtk-doc/html/libgwyddion/GwyInventory.html is in libgwyddion20-doc 2.34-3ubuntu1.
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 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gwyddion Library Reference Manual: GwyInventory</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="prev" href="GwyEnum.html" title="GwyEnum">
<link rel="next" href="GwyResource.html" title="GwyResource">
<meta name="generator" content="GTK-Doc V1.19 (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="10"><tr valign="middle">
<td width="100%" align="left">
<a href="#" class="shortcut">Top</a>
|
<a href="#GwyInventory.description" class="shortcut">Description</a>
|
<a href="#GwyInventory.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#GwyInventory.signals" class="shortcut">Signals</a>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="GwyEnum.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GwyResource.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GwyInventory"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GwyInventory.top_of_page"></a>GwyInventory</span></h2>
<p>GwyInventory — Ordered item inventory, indexed by both name and
position.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GwyInventory.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libgwyddion/gwyddion.h>
struct <a class="link" href="GwyInventory.html#GwyInventory-struct" title="struct GwyInventory">GwyInventory</a>;
struct <a class="link" href="GwyInventory.html#GwyInventoryClass" title="struct GwyInventoryClass">GwyInventoryClass</a>;
struct <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType">GwyInventoryItemType</a>;
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * <a class="link" href="GwyInventory.html#gwy-inventory-new" title="gwy_inventory_new ()">gwy_inventory_new</a> (<em class="parameter"><code>const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> *itype</code></em>);
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * <a class="link" href="GwyInventory.html#gwy-inventory-new-filled" title="gwy_inventory_new_filled ()">gwy_inventory_new_filled</a> (<em class="parameter"><code>const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> *itype</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> nitems</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> *items</code></em>);
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * <a class="link" href="GwyInventory.html#gwy-inventory-new-from-array" title="gwy_inventory_new_from_array ()">gwy_inventory_new_from_array</a> (<em class="parameter"><code>const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> *itype</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> item_size</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> nitems</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> items</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-get-n-items" title="gwy_inventory_get_n_items ()">gwy_inventory_get_n_items</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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="GwyInventory.html#gwy-inventory-can-make-copies" title="gwy_inventory_can_make_copies ()">gwy_inventory_can_make_copies</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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="GwyInventory.html#gwy-inventory-is-const" title="gwy_inventory_is_const ()">gwy_inventory_is_const</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);
const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="returnvalue">GwyInventoryItemType</span></a> * <a class="link" href="GwyInventory.html#gwy-inventory-get-item-type" title="gwy_inventory_get_item_type ()">gwy_inventory_get_item_type</a>
(<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-get-item" title="gwy_inventory_get_item ()">gwy_inventory_get_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-get-item-or-default" title="gwy_inventory_get_item_or_default ()">gwy_inventory_get_item_or_default</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-get-nth-item" title="gwy_inventory_get_nth_item ()">gwy_inventory_get_nth_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-get-item-position" title="gwy_inventory_get_item_position ()">gwy_inventory_get_item_position</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>);
<span class="returnvalue">void</span> <a class="link" href="GwyInventory.html#gwy-inventory-foreach" title="gwy_inventory_foreach ()">gwy_inventory_foreach</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHFunc"><span class="type">GHFunc</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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-find" title="gwy_inventory_find ()">gwy_inventory_find</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHRFunc"><span class="type">GHRFunc</span></a> predicate</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>);
<span class="returnvalue">void</span> <a class="link" href="GwyInventory.html#gwy-inventory-set-default-item-name" title="gwy_inventory_set_default_item_name ()">gwy_inventory_set_default_item_name</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>);
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GwyInventory.html#gwy-inventory-get-default-item-name" title="gwy_inventory_get_default_item_name ()">gwy_inventory_get_default_item_name</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-get-default-item" title="gwy_inventory_get_default_item ()">gwy_inventory_get_default_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GwyInventory.html#gwy-inventory-item-updated" title="gwy_inventory_item_updated ()">gwy_inventory_item_updated</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>);
<span class="returnvalue">void</span> <a class="link" href="GwyInventory.html#gwy-inventory-nth-item-updated" title="gwy_inventory_nth_item_updated ()">gwy_inventory_nth_item_updated</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GwyInventory.html#gwy-inventory-restore-order" title="gwy_inventory_restore_order ()">gwy_inventory_restore_order</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GwyInventory.html#gwy-inventory-forget-order" title="gwy_inventory_forget_order ()">gwy_inventory_forget_order</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-insert-item" title="gwy_inventory_insert_item ()">gwy_inventory_insert_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> item</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-insert-nth-item" title="gwy_inventory_insert_nth_item ()">gwy_inventory_insert_nth_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> item</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</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="GwyInventory.html#gwy-inventory-delete-item" title="gwy_inventory_delete_item ()">gwy_inventory_delete_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-delete-nth-item" title="gwy_inventory_delete_nth_item ()">gwy_inventory_delete_nth_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-rename-item" title="gwy_inventory_rename_item ()">gwy_inventory_rename_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> *newname</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="GwyInventory.html#gwy-inventory-new-item" title="gwy_inventory_new_item ()">gwy_inventory_new_item</a> (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> *newname</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GwyInventory.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----GwyInventory
</pre>
</div>
<div class="refsect1">
<a name="GwyInventory.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="GwyInventory.html#GwyInventory-default-changed" title='The "default-changed" signal'>default-changed</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
"<a class="link" href="GwyInventory.html#GwyInventory-item-deleted" title='The "item-deleted" signal'>item-deleted</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
"<a class="link" href="GwyInventory.html#GwyInventory-item-inserted" title='The "item-inserted" signal'>item-inserted</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
"<a class="link" href="GwyInventory.html#GwyInventory-item-updated" title='The "item-updated" signal'>item-updated</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
"<a class="link" href="GwyInventory.html#GwyInventory-items-reordered" title='The "items-reordered" signal'>items-reordered</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GwyInventory.description"></a><h2>Description</h2>
<p>
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> is a uniform container that offers both hash table and array
(sorted or unsorted) interfaces. Both types of read access are fast,
operations that modify it may be slower. Inventory can also maintain a
notion of default item.
</p>
<p>
<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> can be used both as an actual container for some data, or just
wrap a static array with a the same interface so the actual storage is
opaque to inventory user. The former kind of inventories can be created
with <a class="link" href="GwyInventory.html#gwy-inventory-new" title="gwy_inventory_new ()"><code class="function">gwy_inventory_new()</code></a> or <a class="link" href="GwyInventory.html#gwy-inventory-new-filled" title="gwy_inventory_new_filled ()"><code class="function">gwy_inventory_new_filled()</code></a>; constant inventory
is created with <a class="link" href="GwyInventory.html#gwy-inventory-new-from-array" title="gwy_inventory_new_from_array ()"><code class="function">gwy_inventory_new_from_array()</code></a>. Contantess of an inventory
can be tested with <a class="link" href="GwyInventory.html#gwy-inventory-is-const" title="gwy_inventory_is_const ()"><code class="function">gwy_inventory_is_const()</code></a>.
</p>
<p>
Possible operations with data items stored in an inventory are specified
upon inventory creation with <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> structure. Not all
fields are mandatory, with items allowing more operations the inventory is
more capable too. For example, if items offer a method to make copies,
<a class="link" href="GwyInventory.html#gwy-inventory-new-item" title="gwy_inventory_new_item ()"><code class="function">gwy_inventory_new_item()</code></a> can be used to directly create new items in the
inventory (this capability can be tested with
<a class="link" href="GwyInventory.html#gwy-inventory-can-make-copies" title="gwy_inventory_can_make_copies ()"><code class="function">gwy_inventory_can_make_copies()</code></a>).
</p>
<p>
Item can have `traits', that is data that can be obtained generically. They
are similar to <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> properties. Actually, if items are objects, they
should simply map object properties to traits. But it is possible to define
traits for simple structures too.
</p>
</div>
<div class="refsect1">
<a name="GwyInventory.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GwyInventory-struct"></a><h3>struct GwyInventory</h3>
<pre class="programlisting">struct GwyInventory;</pre>
<p>
The <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> struct contains private data only and should be accessed
using the functions below.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GwyInventoryClass"></a><h3>struct GwyInventoryClass</h3>
<pre class="programlisting">struct GwyInventoryClass {
GObjectClass parent_class;
/* Signals */
void (*item_inserted)(GwyInventory *inventory,
guint position);
void (*item_deleted)(GwyInventory *inventory,
guint position);
void (*item_updated)(GwyInventory *inventory,
guint position);
void (*items_reordered)(GwyInventory *inventory,
const gint *new_order);
void (*default_changed)(GwyInventory *inventory);
void (*reserved1)(void);
void (*reserved2)(void);
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GwyInventoryItemType"></a><h3>struct GwyInventoryItemType</h3>
<pre class="programlisting">struct GwyInventoryItemType {
GType type;
const gchar *watchable_signal;
gboolean (*is_fixed) (gconstpointer item);
const gchar* (*get_name) (gpointer item);
gint (*compare) (gconstpointer item1,
gconstpointer item2);
void (*rename) (gpointer item,
const gchar *newname);
void (*dismantle) (gpointer item);
gpointer (*copy) (gpointer item);
const GType* (*get_traits) (gint *ntraits);
const gchar* (*get_trait_name) (gint i);
void (*get_trait_value)(gpointer item,
gint i,
GValue *value);
};
</pre>
<p>
Infromation about a <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> item type.
</p>
<p>
Note only one of the fields must be always defined: <em class="parameter"><code>get_name</code></em>. All the
others give inventory (and thus inventory users) some additional powers over
items. They may be set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or 0 if particular item type does not
(want to) support this operation.
</p>
<p>
The three trait methods are not used by <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> itself, but allows
<a href="../libgwydgets/GwyInventoryStore.html"><span class="type">GwyInventoryStore</span></a> to generically map item properties to virtual columns
of a <a href="/usr/share/gtk-doc/html/gtk3/GtkTreeModel.html"><span class="type">GtkTreeModel</span></a>. If items are objects, you will usually want to
directly map some or all <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> properties to item traits. If they are
plain C structs or something else, you can easily export their data members
as virtual <a href="/usr/share/gtk-doc/html/gtk3/GtkTreeModel.html"><span class="type">GtkTreeModel</span></a> columns by defining traits for them.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GwyInventoryItemType.type"></a>type</code></em>;</span></p></td>
<td>Object type, if item is object or other type with registered GType.
May be zero to indicate an unregistered item type.
If items are objects, inventory takes a reference on them.</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="GwyInventoryItemType.watchable-signal"></a>watchable_signal</code></em>;</span></p></td>
<td>Item signal name to watch, used only for objects.
When item emits this signal, inventory emits
"item-updated" signal for it.
May be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to indicate no signal should be watched,
you can still emit "item-updated" with
<a class="link" href="GwyInventory.html#gwy-inventory-item-updated" title="gwy_inventory_item_updated ()"><code class="function">gwy_inventory_item_updated()</code></a> or
<a class="link" href="GwyInventory.html#gwy-inventory-nth-item-updated" title="gwy_inventory_nth_item_updated ()"><code class="function">gwy_inventory_nth_item_updated()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.is-fixed"></a>is_fixed</code></em> ()</span></p></td>
<td>If not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for some item, such an item
cannot be removed from inventory, fixed items can be only
added. This is checked each time an attempt is made to remove
an item.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.get-name"></a>get_name</code></em> ()</span></p></td>
<td>Returns item name (the string is owned by item and it is assumed
to exist until item ceases to exist or is renamed). This
function is obligatory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.compare"></a>compare</code></em> ()</span></p></td>
<td>Item comparation function for sorting.
If <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, inventory never attempts to keep any item order
and <a class="link" href="GwyInventory.html#gwy-inventory-restore-order" title="gwy_inventory_restore_order ()"><code class="function">gwy_inventory_restore_order()</code></a> does nothing.
Otherwise inventory is sorted unless sorting is (temporarily)
disabled with <a class="link" href="GwyInventory.html#gwy-inventory-forget-order" title="gwy_inventory_forget_order ()"><code class="function">gwy_inventory_forget_order()</code></a> or it was created
with <a class="link" href="GwyInventory.html#gwy-inventory-new-filled" title="gwy_inventory_new_filled ()"><code class="function">gwy_inventory_new_filled()</code></a> and the initial array was
not sorted according to <em class="parameter"><code>compare</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.rename"></a>rename</code></em> ()</span></p></td>
<td>Function to rename an item. If not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, calls to
<a class="link" href="GwyInventory.html#gwy-inventory-rename-item" title="gwy_inventory_rename_item ()"><code class="function">gwy_inventory_rename_item()</code></a> are possible. Note items must not
be renamed by any other means than this method, because when
an item is renamed and inventory does not know it, very bad
things will happen and you will lose all your good karma.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.dismantle"></a>dismantle</code></em> ()</span></p></td>
<td>Called on item before it's removed from inventory. May be
<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="structfield"><code><a name="GwyInventoryItemType.copy"></a>copy</code></em> ()</span></p></td>
<td>Method to create a copy of an item. If this function and <em class="parameter"><code>rename</code></em> are
defined, calls to <a class="link" href="GwyInventory.html#gwy-inventory-new-item" title="gwy_inventory_new_item ()"><code class="function">gwy_inventory_new_item()</code></a> are possible. Inventory
sets the copy's name immediately after creation, so it normally
does not matter which name <em class="parameter"><code>copy</code></em> gives it.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.get-traits"></a>get_traits</code></em> ()</span></p></td>
<td>Function to get item traits. It returns array of item trait
<a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GTypes</span></a> (keeping its ownership) and if <em class="parameter"><code>nitems</code></em> is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
it stores the length of returned array there.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.get-trait-name"></a>get_trait_name</code></em> ()</span></p></td>
<td>Returns name of <em class="parameter"><code>i</code></em>-th trait (keeping ownership of the
returned string). It is not obligatory, but advisable to
give traits names.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GwyInventoryItemType.get-trait-value"></a>get_trait_value</code></em> ()</span></p></td>
<td>Sets <em class="parameter"><code>value</code></em> to value of <em class="parameter"><code>i</code></em>-th trait of item.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-new"></a><h3>gwy_inventory_new ()</h3>
<pre class="programlisting"><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * gwy_inventory_new (<em class="parameter"><code>const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> *itype</code></em>);</pre>
<p>
Creates a new inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>itype</code></em> :</span></p></td>
<td>Type of items the inventory will contain.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly created inventory.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-new-filled"></a><h3>gwy_inventory_new_filled ()</h3>
<pre class="programlisting"><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * gwy_inventory_new_filled (<em class="parameter"><code>const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> *itype</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> nitems</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> *items</code></em>);</pre>
<p>
Creates a new inventory and fills it with items.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>itype</code></em> :</span></p></td>
<td>Type of items the inventory will contain.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nitems</code></em> :</span></p></td>
<td>The number of pointers in <em class="parameter"><code>items</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items</code></em> :</span></p></td>
<td>Item pointers to fill the newly created inventory with.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly created inventory.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-new-from-array"></a><h3>gwy_inventory_new_from_array ()</h3>
<pre class="programlisting"><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="returnvalue">GwyInventory</span></a> * gwy_inventory_new_from_array (<em class="parameter"><code>const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="type">GwyInventoryItemType</span></a> *itype</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> item_size</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> nitems</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> items</code></em>);</pre>
<p>
Creates a new inventory from static item array.
</p>
<p>
The inventory is neither modifiable nor sortable, it simply serves as an
adaptor for the array <em class="parameter"><code>items</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>itype</code></em> :</span></p></td>
<td>Type of items the inventory will contain. Inventory keeps a copy
of it, so it can be an automatic variable.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item_size</code></em> :</span></p></td>
<td>Item size in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nitems</code></em> :</span></p></td>
<td>The number of items in <em class="parameter"><code>items</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items</code></em> :</span></p></td>
<td>An array with items. It will be directly used as thus must
exist through the whole lifetime of inventory.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly created inventory.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-n-items"></a><h3>gwy_inventory_get_n_items ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gwy_inventory_get_n_items (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Returns the number of items in an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of items.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-can-make-copies"></a><h3>gwy_inventory_can_make_copies ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_inventory_can_make_copies (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Returns whether an inventory can create new items itself.
</p>
<p>
The prerequistie is that item type is a serializable object. It enables
functions like <a class="link" href="GwyInventory.html#gwy-inventory-new-item" title="gwy_inventory_new_item ()"><code class="function">gwy_inventory_new_item()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</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 inventory can create new items itself.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-is-const"></a><h3>gwy_inventory_is_const ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_inventory_is_const (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Returns whether an inventory is an constant inventory.
</p>
<p>
Not only you cannot modify a constant inventory, but functions like
<a class="link" href="GwyInventory.html#gwy-inventory-get-item" title="gwy_inventory_get_item ()"><code class="function">gwy_inventory_get_item()</code></a> may return pointers to constant memory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</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 inventory is constant.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-item-type"></a><h3>gwy_inventory_get_item_type ()</h3>
<pre class="programlisting">const <a class="link" href="GwyInventory.html#GwyInventoryItemType" title="struct GwyInventoryItemType"><span class="returnvalue">GwyInventoryItemType</span></a> * gwy_inventory_get_item_type
(<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Returns the type of item an inventory holds.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The item type. It is owned by inventory and must not be modified
or freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-item"></a><h3>gwy_inventory_get_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_get_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>
Looks up an item in an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Item name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Item called <em class="parameter"><code>name</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 is no such item.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-item-or-default"></a><h3>gwy_inventory_get_item_or_default ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_get_item_or_default (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>
Looks up an item in an inventory, eventually falling back to default.
</p>
<p>
The lookup order is: item of requested name, default item (if set), any
inventory item, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> (can happen only when inventory is empty).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Item name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Item called <em class="parameter"><code>name</code></em>, or default item.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-nth-item"></a><h3>gwy_inventory_get_nth_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_get_nth_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
Returns item on given position in an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Item position. It must be between zero and the number of items in
inventory, inclusive. If it is equal to the number of items, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
is returned. In other words, inventory behaves like a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
array, you can simply iterate over it until <a class="link" href="GwyInventory.html#gwy-inventory-get-nth-item" title="gwy_inventory_get_nth_item ()"><code class="function">gwy_inventory_get_nth_item()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Item at given position.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-item-position"></a><h3>gwy_inventory_get_item_position ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gwy_inventory_get_item_position (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>
Finds position of an item in an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Item name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Item position, or -1 if there is no such item.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-foreach"></a><h3>gwy_inventory_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_inventory_foreach (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHFunc"><span class="type">GHFunc</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 on each item of an inventory, in order.
</p>
<p>
<em class="parameter"><code>function</code></em>'s first argument is item position (transformed with
<a href="/usr/share/gtk-doc/html/glib/glib-Type-Conversion-Macros.html#GUINT-TO-POINTER:CAPS"><code class="function">GUINT_TO_POINTER()</code></a>), second is item pointer, and the last is <em class="parameter"><code>user_data</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>function</code></em> :</span></p></td>
<td>A function to call on each item. It must not modify <em class="parameter"><code>inventory</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data passed to <em class="parameter"><code>function</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-find"></a><h3>gwy_inventory_find ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_find (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHRFunc"><span class="type">GHRFunc</span></a> predicate</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>
Finds an inventory item using user-specified predicate function.
</p>
<p>
<em class="parameter"><code>predicate</code></em> is called for each item in <em class="parameter"><code>inventory</code></em> (in order) until it returns
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. Its arguments are the same as in <a class="link" href="GwyInventory.html#gwy-inventory-foreach" title="gwy_inventory_foreach ()"><code class="function">gwy_inventory_foreach()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>predicate</code></em> :</span></p></td>
<td>A function testing some item property. It must not modify
<em class="parameter"><code>inventory</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Data passed to <em class="parameter"><code>predicate</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The item for which <em class="parameter"><code>predicate</code></em> returned <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. If there is no
such item in the inventory, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-set-default-item-name"></a><h3>gwy_inventory_set_default_item_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_inventory_set_default_item_name (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>
Sets the default of an inventory.
</p>
<p>
Item <em class="parameter"><code>name</code></em> must already exist in the inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Item name, pass <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset default item.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-default-item-name"></a><h3>gwy_inventory_get_default_item_name ()</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_inventory_get_default_item_name (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Returns the name of the default item of an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The default item name, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no default name is set.
Item of this name may or may not exist in the inventory.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-get-default-item"></a><h3>gwy_inventory_get_default_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_get_default_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Returns the default item of an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The default item. If there is no default item, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-item-updated"></a><h3>gwy_inventory_item_updated ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_inventory_item_updated (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>
Notifies inventory an item was updated.
</p>
<p>
This function makes sense primarily for non-object items, as object items
can notify inventory via signals.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Item name.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-nth-item-updated"></a><h3>gwy_inventory_nth_item_updated ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_inventory_nth_item_updated (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
Notifies inventory item on given position was updated.
</p>
<p>
This function makes sense primarily for non-object items, as object items
can implement <span class="type">GwyWatchable</span> interface.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Item position.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-restore-order"></a><h3>gwy_inventory_restore_order ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_inventory_restore_order (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Assures an inventory is sorted.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-forget-order"></a><h3>gwy_inventory_forget_order ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gwy_inventory_forget_order (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>);</pre>
<p>
Forces an inventory to be unsorted.
</p>
<p>
Item positions don't change, but future <a class="link" href="GwyInventory.html#gwy-inventory-insert-item" title="gwy_inventory_insert_item ()"><code class="function">gwy_inventory_insert_item()</code></a> won't
try to insert items in order.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-insert-item"></a><h3>gwy_inventory_insert_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_insert_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> item</code></em>);</pre>
<p>
Inserts an item into an inventory.
</p>
<p>
Item of the same name must not exist yet.
</p>
<p>
If the inventory is sorted, item is inserted to keep order. If the
inventory is unsorted, item is simply added to the end.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>An item to insert.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>item</code></em>, for convenience.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-insert-nth-item"></a><h3>gwy_inventory_insert_nth_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_insert_nth_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> item</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
Inserts an item to an explicit position in an inventory.
</p>
<p>
Item of the same name must not exist yet.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>An item to insert.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Position to insert <em class="parameter"><code>item</code></em> to.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>item</code></em>, for convenience.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-delete-item"></a><h3>gwy_inventory_delete_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_inventory_delete_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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>
Deletes an item from an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name of item to delete.</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 item was deleted.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-delete-nth-item"></a><h3>gwy_inventory_delete_nth_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gwy_inventory_delete_nth_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>);</pre>
<p>
Deletes an item on given position from an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>Position of <em class="parameter"><code>item</code></em> to delete.</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 item was deleted.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-rename-item"></a><h3>gwy_inventory_rename_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_rename_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> *newname</code></em>);</pre>
<p>
Renames an inventory item.
</p>
<p>
If an item of name <em class="parameter"><code>newname</code></em> is already present in <em class="parameter"><code>inventory</code></em>, the rename
will fail.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name of item to rename.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newname</code></em> :</span></p></td>
<td>New name of item.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The item, for convenience.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-inventory-new-item"></a><h3>gwy_inventory_new_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> gwy_inventory_new_item (<em class="parameter"><code><a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *inventory</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> *newname</code></em>);</pre>
<p>
Creates a new item as a copy of existing one and inserts it to inventory.
</p>
<p>
The newly created item can be called differently than <em class="parameter"><code>newname</code></em> if that
already exists.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>inventory</code></em> :</span></p></td>
<td>An inventory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name of item to duplicate, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use default item (the
same happens when <em class="parameter"><code>name</code></em> does not exist).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newname</code></em> :</span></p></td>
<td>Name of new item, it must not exist yet. It may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the
new name is based on <em class="parameter"><code>name</code></em> then.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly added item.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GwyInventory.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GwyInventory-default-changed"></a><h3>The <code class="literal">"default-changed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *gwyinventory,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
<p>
The ::default-changed signal is emitted when either
default inventory item name changes or the presence of such an item
in the inventory changes.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gwyinventory</code></em> :</span></p></td>
<td>The <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyInventory-item-deleted"></a><h3>The <code class="literal">"item-deleted"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *gwyinventory,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg1,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
<p>
The ::item-deleted signal is emitted when an item is deleted from
an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gwyinventory</code></em> :</span></p></td>
<td>The <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>Position an item was deleted from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyInventory-item-inserted"></a><h3>The <code class="literal">"item-inserted"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *gwyinventory,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg1,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
<p>
The ::item-inserted signal is emitted when an item is inserted into
an inventory.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gwyinventory</code></em> :</span></p></td>
<td>The <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>Position an item was inserted at.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyInventory-item-updated"></a><h3>The <code class="literal">"item-updated"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *gwyinventory,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg1,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
<p>
The ::item-updated signal is emitted when an item in an inventory
is updated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gwyinventory</code></em> :</span></p></td>
<td>The <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>Position of updated item.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GwyInventory-items-reordered"></a><h3>The <code class="literal">"items-reordered"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> *gwyinventory,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> arg1,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
<p>
The ::items-reordered signal is emitted when item in an inventory
are reordered.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gwyinventory</code></em> :</span></p></td>
<td>The <a class="link" href="GwyInventory.html" title="GwyInventory"><span class="type">GwyInventory</span></a> which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>New item order map as in <a href="/usr/share/gtk-doc/html/gtk3/GtkTreeModel.html"><span class="type">GtkTreeModel</span></a>,
<em class="parameter"><code>arg1</code></em>[new_position] = old_position.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GwyInventory.see-also"></a><h2>See Also</h2>
<a class="link" href="GwyContainer.html" title="GwyContainer"><span class="type">GwyContainer</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|