## CajaMenuProvider

CajaMenuProvider — Interface to provide additional menu items

## Functions

GList * | caja_menu_provider_get_file_items ()
GList * | caja_menu_provider_get_background_items ()
GList * | caja_menu_provider_get_toolbar_items ()
void | caja_menu_provider_emit_items_updated_signal ()

## Signals

void | items-updated | Run Last

## Types and Values

| CajaMenuProvider
struct | CajaMenuProviderIface

## Object Hierarchy

        GInterface
        ╰── CajaMenuProvider

## Prerequisites

CajaMenuProvider requires GObject.

## Includes

    #include <libcaja-extension/caja-menu-provider.h>

## Description

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

## Functions

### caja_menu_provider_get_file_items ()

    GList *
    caja_menu_provider_get_file_items (CajaMenuProvider *provider,
                                       GtkWidget *window,
                                       GList *files);

#### Parameters

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

#### Returns

the provided list of CajaMenuItem.

[element-type CajaMenuItem][transfer full]

### caja_menu_provider_get_background_items ()

    GList *
    caja_menu_provider_get_background_items
                                   (CajaMenuProvider *provider,
                                    GtkWidget *window,
                                    CajaFileInfo *current_folder);

#### Parameters

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

#### Returns

the provided list of CajaMenuItem.

[element-type CajaMenuItem][transfer full]

### caja_menu_provider_get_toolbar_items ()

    GList *
    caja_menu_provider_get_toolbar_items (CajaMenuProvider *provider,
                                          GtkWidget *window,
                                          CajaFileInfo *current_folder);

#### Parameters

provider | a CajaMenuProvider |
window | the parent GtkWidget window |
current_folder | the folder for which toolbar items are requested |

#### Returns

the provided list of CajaMenuItem.

[element-type CajaMenuItem][transfer full]

### caja_menu_provider_emit_items_updated_signal ()

    void
    caja_menu_provider_emit_items_updated_signal
                                   (CajaMenuProvider *provider);

## Types and Values

### CajaMenuProvider

    typedef struct _CajaMenuProvider CajaMenuProvider;

### struct CajaMenuProviderIface

    struct CajaMenuProviderIface {
        GTypeInterface g_iface;

        GList *(*get_file_items)       (CajaMenuProvider *provider,
                                        GtkWidget        *window,
                                        GList            *files);
        GList *(*get_background_items) (CajaMenuProvider *provider,
                                        GtkWidget        *window,
                                        CajaFileInfo     *current_folder);
        GList *(*get_toolbar_items)    (CajaMenuProvider *provider,
                                        GtkWidget        *window,
                                        CajaFileInfo     *current_folder);
    };

Interface for extensions to provide additional menu items.

#### Members

GTypeInterface `g_iface`; | The parent interface. |
`get_file_items` () | Returns a GList of CajaMenuItem. See `caja_menu_provider_get_file_items()` for details. |
`get_background_items` () | Returns a GList of CajaMenuItem. See `caja_menu_provider_get_background_items()` for details. |
`get_toolbar_items` () | Returns a GList of CajaMenuItem. See `caja_menu_provider_get_toolbar_items()` for details. |

## Signal Details

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

    void
    user_function (CajaMenuProvider *cajamenuprovider,
                   gpointer          user_data)

#### Parameters

cajamenuprovider | the object which received the signal. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last