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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XfceMenu</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="libxfce4menu Reference Manual">
<link rel="up" href="menus.html" title="Part III. Menus">
<link rel="prev" href="menus.html" title="Part III. Menus">
<link rel="next" href="XfceMenuDirectory.html" title="XfceMenuDirectory">
<meta name="generator" content="GTK-Doc V1.14 (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="menus.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="menus.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">libxfce4menu Reference Manual</th>
<td><a accesskey="n" href="XfceMenuDirectory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#XfceMenu.synopsis" class="shortcut">Top</a>
|
<a href="#XfceMenu.description" class="shortcut">Description</a>
|
<a href="#XfceMenu.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#XfceMenu.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
|
<a href="#XfceMenu.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry" title="XfceMenu">
<a name="XfceMenu"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="XfceMenu.top_of_page"></a>XfceMenu</span></h2>
<p>XfceMenu</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="XfceMenu.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libxfce4menu/libxfce4menu.h>
<a class="link" href="XfceMenu.html#XfceMenuPrivate" title="XfceMenuPrivate">XfceMenuPrivate</a>;
<a class="link" href="XfceMenu.html#XfceMenuClass" title="XfceMenuClass">XfceMenuClass</a>;
<a class="link" href="XfceMenu.html#XfceMenu-struct" title="XfceMenu">XfceMenu</a>;
<a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * <a class="link" href="XfceMenu.html#xfce-menu-get-root" title="xfce_menu_get_root ()">xfce_menu_get_root</a> (<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * <a class="link" href="XfceMenu.html#xfce-menu-new" title="xfce_menu_new ()">xfce_menu_new</a> (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-filename" title="xfce_menu_get_filename ()">xfce_menu_get_filename</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span> <a class="link" href="XfceMenu.html#xfce-menu-set-filename" title="xfce_menu_set_filename ()">xfce_menu_set_filename</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-name" title="xfce_menu_get_name ()">xfce_menu_get_name</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span> <a class="link" href="XfceMenu.html#xfce-menu-set-name" title="xfce_menu_set_name ()">xfce_menu_set_name</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="returnvalue">XfceMenuDirectory</span></a> * <a class="link" href="XfceMenu.html#xfce-menu-get-directory" title="xfce_menu_get_directory ()">xfce_menu_get_directory</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span> <a class="link" href="XfceMenu.html#xfce-menu-set-directory" title="xfce_menu_set_directory ()">xfce_menu_set_directory</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a> *directory</code></em>);
<span class="returnvalue">GSList</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-directory-dirs" title="xfce_menu_get_directory_dirs ()">xfce_menu_get_directory_dirs</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">GSList</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-legacy-dirs" title="xfce_menu_get_legacy_dirs ()">xfce_menu_get_legacy_dirs</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">GSList</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-app-dirs" title="xfce_menu_get_app_dirs ()">xfce_menu_get_app_dirs</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="XfceMenu.html#xfce-menu-get-only-unallocated" title="xfce_menu_get_only_unallocated ()">xfce_menu_get_only_unallocated</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span> <a class="link" href="XfceMenu.html#xfce-menu-set-only-unallocated" title="xfce_menu_set_only_unallocated ()">xfce_menu_set_only_unallocated</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> only_unallocated</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="XfceMenu.html#xfce-menu-get-deleted" title="xfce_menu_get_deleted ()">xfce_menu_get_deleted</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span> <a class="link" href="XfceMenu.html#xfce-menu-set-deleted" title="xfce_menu_set_deleted ()">xfce_menu_set_deleted</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> deleted</code></em>);
<span class="returnvalue">GSList</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-menus" title="xfce_menu_get_menus ()">xfce_menu_get_menus</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span> <a class="link" href="XfceMenu.html#xfce-menu-add-menu" title="xfce_menu_add_menu ()">xfce_menu_add_menu</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *submenu</code></em>);
<a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * <a class="link" href="XfceMenu.html#xfce-menu-get-menu-with-name" title="xfce_menu_get_menu_with_name ()">xfce_menu_get_menu_with_name</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
<a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * <a class="link" href="XfceMenu.html#xfce-menu-get-parent" title="xfce_menu_get_parent ()">xfce_menu_get_parent</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<a class="link" href="XfceMenuItemPool.html" title="XfceMenuItemPool"><span class="returnvalue">XfceMenuItemPool</span></a> * <a class="link" href="XfceMenu.html#xfce-menu-get-item-pool" title="xfce_menu_get_item_pool ()">xfce_menu_get_item_pool</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">GSList</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-items" title="xfce_menu_get_items ()">xfce_menu_get_items</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="XfceMenu.html#xfce-menu-has-layout" title="xfce_menu_has_layout ()">xfce_menu_has_layout</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
<span class="returnvalue">GSList</span> * <a class="link" href="XfceMenu.html#xfce-menu-get-layout-elements" title="xfce_menu_get_layout_elements ()">xfce_menu_get_layout_elements</a> (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="XfceMenu.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GObject
+----XfceMenu
</pre>
</div>
<div class="refsect1" title="Implemented Interfaces">
<a name="XfceMenu.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
XfceMenu implements
<a class="link" href="XfceMenuElement.html" title="XfceMenuElement">XfceMenuElement</a>.</p>
</div>
<div class="refsect1" title="Properties">
<a name="XfceMenu.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="XfceMenu.html#XfceMenu--deleted" title='The "deleted" property'>deleted</a>" <span class="type">gboolean</span> : Read / Write
"<a class="link" href="XfceMenu.html#XfceMenu--directory" title='The "directory" property'>directory</a>" <a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a>* : Read / Write
"<a class="link" href="XfceMenu.html#XfceMenu--filename" title='The "filename" property'>filename</a>" <span class="type">gchar</span>* : Read / Write
"<a class="link" href="XfceMenu.html#XfceMenu--name" title='The "name" property'>name</a>" <span class="type">gchar</span>* : Read / Write
"<a class="link" href="XfceMenu.html#XfceMenu--only-unallocated" title='The "only-unallocated" property'>only-unallocated</a>" <span class="type">gboolean</span> : Read / Write
</pre>
</div>
<div class="refsect1" title="Description">
<a name="XfceMenu.description"></a><h2>Description</h2>
<p>
XfceMenu is the most important part of libxfce4menu. In almost all use
cases the first thing to be created is an XfceMenu based on a filename.
</p>
</div>
<div class="refsect1" title="Details">
<a name="XfceMenu.details"></a><h2>Details</h2>
<div class="refsect2" title="XfceMenuPrivate">
<a name="XfceMenuPrivate"></a><h3>XfceMenuPrivate</h3>
<pre class="programlisting">typedef struct _XfceMenuPrivate XfceMenuPrivate;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="XfceMenuClass">
<a name="XfceMenuClass"></a><h3>XfceMenuClass</h3>
<pre class="programlisting">typedef struct _XfceMenuClass XfceMenuClass;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="XfceMenu">
<a name="XfceMenu-struct"></a><h3>XfceMenu</h3>
<pre class="programlisting">typedef struct _XfceMenu XfceMenu;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_root ()">
<a name="xfce-menu-get-root"></a><h3>xfce_menu_get_root ()</h3>
<pre class="programlisting"><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * xfce_menu_get_root (<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Loads the system's root menu. This may take some time as it involves
parsing and merging a lot of files. So if you call this function from a GUI
program it should be done in a way that won't block the user interface (e.g.
by using a worker thread).
The returned pointer needs to be released using
</p>
<div class="informalexample"><pre class="programlisting">
g_object_unref (menu);
</pre></div>
<p>
when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for errors or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.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 system root menu. The menu has to be released when no
longer needed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_new ()">
<a name="xfce-menu-new"></a><h3>xfce_menu_new ()</h3>
<pre class="programlisting"><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * xfce_menu_new (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Parses a file and returns the menu structure found in this file. This
may involve parsing and merging of a lot of other files. So if you call this
function from a GUI program it should be done in a way that won't block the
user interface (e.g. by using a worker thread).
The returned pointer needs to be released using
</p>
<div class="informalexample"><pre class="programlisting">
g_object_unref (menu);
</pre></div>
<p>
when it is not used anymore.
</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>filename containing the menu structure you want to load.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for errors or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.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> Menu structure found in <em class="parameter"><code>filename</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_filename ()">
<a name="xfce-menu-get-filename"></a><h3>xfce_menu_get_filename ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * xfce_menu_get_filename (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
Returns the filename from which <em class="parameter"><code>menu</code></em> was loaded.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> filename from which <em class="parameter"><code>menu</code></em> was loaded.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_set_filename ()">
<a name="xfce-menu-set-filename"></a><h3>xfce_menu_set_filename ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_set_filename (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>);</pre>
<p>
Sets the menu filename. It should not be necessary to call this
function anywhere - it's only of internal use.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>new filename of the menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_name ()">
<a name="xfce-menu-get-name"></a><h3>xfce_menu_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * xfce_menu_get_name (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
Returns the name of <em class="parameter"><code>menu</code></em>. In most cases this will be the
contents of the <Menu> element. It may be useful for providing
a display name for the menu if it does not have a menu
directory.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> name of <em class="parameter"><code>menu</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_set_name ()">
<a name="xfce-menu-set-name"></a><h3>xfce_menu_set_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_set_name (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
Sets the name of <em class="parameter"><code>menu</code></em>. This might come in handy if you want
to replace certain menu names with your own names. However, in
most cases this function won't be useful.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>new name of the menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_directory ()">
<a name="xfce-menu-get-directory"></a><h3>xfce_menu_get_directory ()</h3>
<pre class="programlisting"><a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="returnvalue">XfceMenuDirectory</span></a> * xfce_menu_get_directory (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
Returns the <a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a> of <em class="parameter"><code>menu</code></em> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. The menu
directory may contain a lot of useful information about
the menu, like display name, desktop environments it should
show up in etc.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a> of <em class="parameter"><code>menu</code></em> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_set_directory ()">
<a name="xfce-menu-set-directory"></a><h3>xfce_menu_set_directory ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_set_directory (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a> *directory</code></em>);</pre>
<p>
Replaces the <a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a> of <em class="parameter"><code>menu</code></em> with <em class="parameter"><code>directory</code></em>. This
may be useful if <em class="parameter"><code>menu</code></em> has no directory or if you want to
define your own directory for menus. Usually, there's no need
to call this function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>directory</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_directory_dirs ()">
<a name="xfce-menu-get-directory-dirs"></a><h3>xfce_menu_get_directory_dirs ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> * xfce_menu_get_directory_dirs (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
Returns a list with all directory dirs of <em class="parameter"><code>menu</code></em>. Collects directory
dirs from <em class="parameter"><code>menu</code></em> up to the root menu so that the root menu directory
dirs come first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> List with all relevant directory dirs of <em class="parameter"><code>menu</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_legacy_dirs ()">
<a name="xfce-menu-get-legacy-dirs"></a><h3>xfce_menu_get_legacy_dirs ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> * xfce_menu_get_legacy_dirs (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_app_dirs ()">
<a name="xfce-menu-get-app-dirs"></a><h3>xfce_menu_get_app_dirs ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> * xfce_menu_get_app_dirs (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_only_unallocated ()">
<a name="xfce-menu-get-only-unallocated"></a><h3>xfce_menu_get_only_unallocated ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> xfce_menu_get_only_unallocated (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
Returns whether <em class="parameter"><code>menu</code></em> only contains <a class="link" href="XfceMenuItem.html" title="XfceMenuItem"><span class="type">XfceMenuItem</span></a>s which
are not already included in other menus.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Whether the menu contains only items not used already
included in other menus.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_set_only_unallocated ()">
<a name="xfce-menu-set-only-unallocated"></a><h3>xfce_menu_set_only_unallocated ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_set_only_unallocated (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> only_unallocated</code></em>);</pre>
<p>
Since all items are resolved directly after parsing the
menu file, this won't be useful other than internally.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>only_unallocated</code></em> :</span></p></td>
<td>Whether to include only unused
<a class="link" href="XfceMenuItem.html" title="XfceMenuItem"><span class="type">XfceMenuItem</span></a>s
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_deleted ()">
<a name="xfce-menu-get-deleted"></a><h3>xfce_menu_get_deleted ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> xfce_menu_get_deleted (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_set_deleted ()">
<a name="xfce-menu-set-deleted"></a><h3>xfce_menu_set_deleted ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_set_deleted (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> deleted</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>deleted</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_menus ()">
<a name="xfce-menu-get-menus"></a><h3>xfce_menu_get_menus ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> * xfce_menu_get_menus (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_add_menu ()">
<a name="xfce-menu-add-menu"></a><h3>xfce_menu_add_menu ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_add_menu (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *submenu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>submenu</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_menu_with_name ()">
<a name="xfce-menu-get-menu-with-name"></a><h3>xfce_menu_get_menu_with_name ()</h3>
<pre class="programlisting"><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * xfce_menu_get_menu_with_name (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_parent ()">
<a name="xfce-menu-get-parent"></a><h3>xfce_menu_get_parent ()</h3>
<pre class="programlisting"><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="returnvalue">XfceMenu</span></a> * xfce_menu_get_parent (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_item_pool ()">
<a name="xfce-menu-get-item-pool"></a><h3>xfce_menu_get_item_pool ()</h3>
<pre class="programlisting"><a class="link" href="XfceMenuItemPool.html" title="XfceMenuItemPool"><span class="returnvalue">XfceMenuItemPool</span></a> * xfce_menu_get_item_pool (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_items ()">
<a name="xfce-menu-get-items"></a><h3>xfce_menu_get_items ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> * xfce_menu_get_items (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
Convenience wrapper around <a class="link" href="XfceMenu.html#xfce-menu-get-item-pool" title="xfce_menu_get_item_pool ()"><code class="function">xfce_menu_get_item_pool()</code></a>, which simply returns the
<a class="link" href="XfceMenuItem.html" title="XfceMenuItem"><span class="type">XfceMenuItem</span></a>s contained within the associated item pool as singly linked
list.
</p>
<p>
The caller is responsible to free the returned list using
</p>
<div class="informalexample"><pre class="programlisting">
g_slist_free (list);
</pre></div>
<p>
when no longer needed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>a <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the list of <a class="link" href="XfceMenuItem.html" title="XfceMenuItem"><span class="type">XfceMenuItem</span></a>s within this menu.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_has_layout ()">
<a name="xfce-menu-has-layout"></a><h3>xfce_menu_has_layout ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> xfce_menu_has_layout (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="xfce_menu_get_layout_elements ()">
<a name="xfce-menu-get-layout-elements"></a><h3>xfce_menu_get_layout_elements ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> * xfce_menu_get_layout_elements (<em class="parameter"><code><a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a> *menu</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="XfceMenu.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "deleted" property'>
<a name="XfceMenu--deleted"></a><h3>The <code class="literal">"deleted"</code> property</h3>
<pre class="programlisting"> "deleted" <span class="type">gboolean</span> : Read / Write</pre>
<p>
Whether this menu should be ignored.
</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" title='The "directory" property'>
<a name="XfceMenu--directory"></a><h3>The <code class="literal">"directory"</code> property</h3>
<pre class="programlisting"> "directory" <a class="link" href="XfceMenuDirectory.html" title="XfceMenuDirectory"><span class="type">XfceMenuDirectory</span></a>* : Read / Write</pre>
<p>
The directory entry associated with this menu.
</p>
</div>
<hr>
<div class="refsect2" title='The "filename" property'>
<a name="XfceMenu--filename"></a><h3>The <code class="literal">"filename"</code> property</h3>
<pre class="programlisting"> "filename" <span class="type">gchar</span>* : Read / Write</pre>
<p>
The filename of an <a class="link" href="XfceMenu.html" title="XfceMenu"><code class="literal">XfceMenu</code></a> object. Whenever this is redefined, the
menu is reloaded.
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" title='The "name" property'>
<a name="XfceMenu--name"></a><h3>The <code class="literal">"name"</code> property</h3>
<pre class="programlisting"> "name" <span class="type">gchar</span>* : Read / Write</pre>
<p>
The name of the menu.
</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" title='The "only-unallocated" property'>
<a name="XfceMenu--only-unallocated"></a><h3>The <code class="literal">"only-unallocated"</code> property</h3>
<pre class="programlisting"> "only-unallocated" <span class="type">gboolean</span> : Read / Write</pre>
<p>
Whether this menu should only contain desktop entries not used by other
menus.
</p>
<p>Default value: FALSE</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|