NemoMenuProvider: Nemo Extension Reference Manual

## NemoMenuProvider NemoMenuProvider — Allows additional menu items to be added to context menus. |

## Functions

GList * | nemo_menu_provider_get_file_items ()
GList * | nemo_menu_provider_get_background_items ()
void | nemo_menu_provider_emit_items_updated_signal ()

## Signals

void | items-updated | Run Last

## Types and Values

| NemoMenuProvider
struct | NemoMenuProviderInterface

## Object Hierarchy

        GInterface
        ╰── NemoMenuProvider

## Prerequisites

NemoMenuProvider requires GObject.

## Description

This interface allows custom menu entries to be inserted in the selection and background context menus. Submenus and separators can also be generated.

## Functions

### nemo_menu_provider_get_file_items ()

    GList *
    nemo_menu_provider_get_file_items (NemoMenuProvider *provider,
                                       GtkWidget *window,
                                       GList *files);

#### Parameters

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

#### Returns

the provided list of NemoMenuItem.

[element-type NemoMenuItem][transfer full]

### nemo_menu_provider_get_background_items ()

    GList *
    nemo_menu_provider_get_background_items
                                   (NemoMenuProvider *provider,
                                    GtkWidget *window,
                                    NemoFileInfo *current_folder);

#### Parameters

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

#### Returns

the provided list of NemoMenuItem.

[element-type NemoMenuItem][transfer full]

### nemo_menu_provider_emit_items_updated_signal ()

    void
    nemo_menu_provider_emit_items_updated_signal
                                   (NemoMenuProvider *provider);

## Types and Values

### NemoMenuProvider

    typedef struct _NemoMenuProvider NemoMenuProvider;

### struct NemoMenuProviderInterface

    struct NemoMenuProviderInterface {
    	GTypeInterface g_iface;

    	GList *(*get_file_items)       (NemoMenuProvider *provider,
    					GtkWidget            *window,
    					GList                *files);
    	GList *(*get_background_items) (NemoMenuProvider *provider,
    					GtkWidget            *window,
    					NemoFileInfo     *current_folder);
    };

## Signal Details

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

    void
    user_function (NemoMenuProvider *nemomenuprovider,
                   gpointer          user_data)

Flags: Run Last