NautilusMenuProvider: Nautilus Extension Reference Manual

## NautilusMenuProvider NautilusMenuProvider — Interface to provide additional menu items |

## Functions

GList * | nautilus_menu_provider_get_file_items ()
GList * | nautilus_menu_provider_get_background_items ()
void | nautilus_menu_provider_emit_items_updated_signal ()

## Signals

void | items-updated | Run Last

## Types and Values

| NautilusMenuProvider
struct | NautilusMenuProviderIface

## Object Hierarchy

        GInterface
        ╰── NautilusMenuProvider

## Prerequisites

NautilusMenuProvider requires GObject.

## Includes

    #include <libnautilus-extension/nautilus-menu-provider.h>

## Description

NautilusMenuProvider allows extension to provide additional menu items in the file manager menus.

## Functions

### nautilus_menu_provider_get_file_items ()

    GList *
    nautilus_menu_provider_get_file_items (NautilusMenuProvider *provider,
                                           GtkWidget *window,
                                           GList *files);

#### Parameters

provider | a NautilusMenuProvider |
window | the parent GtkWidget window |
files | a list of NautilusFileInfo. | [element-type NautilusFileInfo]

#### Returns

the provided list of NautilusMenuItem.

[element-type NautilusMenuItem][transfer full]

### nautilus_menu_provider_get_background_items ()

    GList *
    nautilus_menu_provider_get_background_items
                                   (NautilusMenuProvider *provider,
                                    GtkWidget *window,
                                    NautilusFileInfo *current_folder);

#### Parameters

provider | a NautilusMenuProvider |
window | the parent GtkWidget window |
current_folder | the folder for which background items are requested |

#### Returns

the provided list of NautilusMenuItem.

[element-type NautilusMenuItem][transfer full]

### nautilus_menu_provider_emit_items_updated_signal ()

    void
    nautilus_menu_provider_emit_items_updated_signal
                                   (NautilusMenuProvider *provider);

## Types and Values

### NautilusMenuProvider

    typedef struct _NautilusMenuProvider NautilusMenuProvider;

### struct NautilusMenuProviderIface

    struct NautilusMenuProviderIface {
    	GTypeInterface g_iface;

    	GList *(*get_file_items)       (NautilusMenuProvider *provider,
    					GtkWidget            *window,
    					GList                *files);
    	GList *(*get_background_items) (NautilusMenuProvider *provider,
    					GtkWidget            *window,
    					NautilusFileInfo     *current_folder);
    };

Interface for extensions to provide additional menu items.

#### Members

GTypeInterface `g_iface`; | The parent interface. |
`get_file_items` () | Returns a GList of NautilusMenuItem. See `nautilus_menu_provider_get_file_items()` for details. |
`get_background_items` () | Returns a GList of NautilusMenuItem. See `nautilus_menu_provider_get_background_items()` for details. |

## Signal Details

### The `“items-updated”` signal

    void
    user_function (NautilusMenuProvider *nautilusmenuprovider,
                   gpointer              user_data)

Flags: Run Last