## GarconMenuDirectory GarconMenuDirectory — Garcon element for .directory files. |

## Functions

GarconMenuDirectory * | garcon_menu_directory_new ()
GFile * | garcon_menu_directory_get_file ()
const gchar * | garcon_menu_directory_get_name ()
void | garcon_menu_directory_set_name ()
const gchar * | garcon_menu_directory_get_comment ()
void | garcon_menu_directory_set_comment ()
const gchar * | garcon_menu_directory_get_icon_name ()
void | garcon_menu_directory_set_icon_name ()
gboolean | garcon_menu_directory_get_no_display ()
void | garcon_menu_directory_set_no_display ()
gboolean | garcon_menu_directory_get_hidden ()
gboolean | garcon_menu_directory_get_show_in_environment ()
gboolean | garcon_menu_directory_get_visible ()
gboolean | garcon_menu_directory_equal ()

## Properties

gchar * | comment | Read / Write
GFile * | file | Read / Write / Construct Only
gchar * | icon-name | Read / Write
gchar * | name | Read / Write
gboolean | no-display | Read / Write

## Object Hierarchy

        GObject
        ╰── GarconMenuDirectory

## Includes

    #include <garcon/garcon.h>

## Description

Element that represents a .directory file in the menu configurations. Each menu (except for the root menu) has a GarconMenuDirectory, see `garcon_menu_get_directory()`.

## Functions

### garcon_menu_directory_new ()

    GarconMenuDirectory *
    garcon_menu_directory_new (GFile *file);

Create a new GarconMenuDirectory for `file` . You most likely never use this, but retrieve the info from `garcon_menu_get_directory()`.

#### Parameters

file | a GFile |

#### Returns

a GarconMenuDirectory.

### garcon_menu_directory_get_file ()

    GFile *
    garcon_menu_directory_get_file (GarconMenuDirectory *directory);

Get the file for `directory` .

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

a GFile. The returned object should be unreffed with `g_object_unref()` when no longer needed.

### garcon_menu_directory_get_name ()

    const gchar *
    garcon_menu_directory_get_name (GarconMenuDirectory *directory);

Get the name of `directory` .

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

a the name for `directory` .

### garcon_menu_directory_set_name ()

    void
    garcon_menu_directory_set_name (GarconMenuDirectory *directory,
                                    const gchar *name);

Set the name of `directory` .

#### Parameters

directory | a GarconMenuDirectory |
name | the new name for `directory` . |

### garcon_menu_directory_get_comment ()

    const gchar *
    garcon_menu_directory_get_comment (GarconMenuDirectory *directory);

Get the comment of `directory` .

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

a the description for `directory` .

### garcon_menu_directory_set_comment ()

    void
    garcon_menu_directory_set_comment (GarconMenuDirectory *directory,
                                       const gchar *comment);

Set the comment of `directory` .

#### Parameters

directory | a GarconMenuDirectory |
comment | the new description for `directory` . |

### garcon_menu_directory_get_icon_name ()

    const gchar *
    garcon_menu_directory_get_icon_name (GarconMenuDirectory *directory);

Get the icon name of `directory` .

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

a the icon-name key for `directory` .

### garcon_menu_directory_set_icon_name ()

    void
    garcon_menu_directory_set_icon_name (GarconMenuDirectory *directory,
                                         const gchar *icon);

Set the icon name of `directory` .

#### Parameters

directory | a GarconMenuDirectory |
icon_name | the new icon name for `directory` . |

### garcon_menu_directory_get_no_display ()

    gboolean
    garcon_menu_directory_get_no_display (GarconMenuDirectory *directory);

Whether `directory` should be displayed. For applications you want to call `garcon_menu_directory_get_visible()`.

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

a the no-display key for `directory` .

### garcon_menu_directory_set_no_display ()

    void
    garcon_menu_directory_set_no_display (GarconMenuDirectory *directory,
                                          gboolean no_display);

Set the NoDisplay key of `directory` .

#### Parameters

directory | a GarconMenuDirectory |
no_display | whether `directory` should be displayed. |

### garcon_menu_directory_get_hidden ()

    gboolean
    garcon_menu_directory_get_hidden (GarconMenuDirectory *directory);

Whether `directory` should be hidden. For applications you want to call `garcon_menu_directory_get_visible()`.

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

a the hidden key for `directory` .

### garcon_menu_directory_get_show_in_environment ()

    gboolean
    garcon_menu_directory_get_show_in_environment
                                   (GarconMenuDirectory *directory);

Whether `directory` is visible in the current environment which has been set by `garcon_set_environment()`. For applications you want to call `garcon_menu_directory_get_visible()`.

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

`TRUE` is visible in environment, else `FALSE`.

### garcon_menu_directory_get_visible ()

    gboolean
    garcon_menu_directory_get_visible (GarconMenuDirectory *directory);

Check which runs the following checks: `garcon_menu_directory_get_show_in_environment()`, `garcon_menu_directory_get_hidden()` and `garcon_menu_directory_get_no_display()`.

#### Parameters

directory | a GarconMenuDirectory |

#### Returns

if visible `TRUE`, else `FALSE`.

### garcon_menu_directory_equal ()

    gboolean
    garcon_menu_directory_equal (GarconMenuDirectory *directory,
                                 GarconMenuDirectory *other);

Checks if both directories point to the same file.

#### Parameters

directory | a GarconMenuDirectory |
other | a GarconMenuDirectory |

#### Returns

if files are equal `TRUE`, else `FALSE`.

## Types and Values

## Property Details

### The `“comment”` property

      “comment”                  gchar *

Directory description (comment).

Flags: Read / Write

Default value: NULL

### The `“file”` property

      “file”                     GFile *

File.

Flags: Read / Write / Construct Only

### The `“icon-name”` property

      “icon-name”                gchar *

Icon associated with this directory.

Flags: Read / Write

Default value: NULL

### The `“name”` property

      “name”                     gchar *

Name of the directory.

Flags: Read / Write

Default value: NULL

### The `“no-display”` property

      “no-display”               gboolean

Whether this menu item is hidden in menus.

Flags: Read / Write

Default value: FALSE