BaulMenuProvider: Baul Extension Reference Manual

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

## Functions

GList * | baul_menu_provider_get_file_items ()
GList * | baul_menu_provider_get_background_items ()
GList * | baul_menu_provider_get_toolbar_items ()
void | baul_menu_provider_emit_items_updated_signal ()

## Signals

void | items-updated | Run Last

## Types and Values

| BaulMenuProvider
struct | BaulMenuProviderIface

## Object Hierarchy

        GInterface
        ╰── BaulMenuProvider

## Prerequisites

BaulMenuProvider requires GObject.

## Includes

    #include <libbaul-extension/baul-menu-provider.h>

## Description

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

## Functions

### baul_menu_provider_get_file_items ()

    GList *
    baul_menu_provider_get_file_items (BaulMenuProvider *provider,
                                       CtkWidget *window,
                                       GList *files);

#### Parameters

provider | a BaulMenuProvider |
window | the parent CtkWidget window |
files | a list of BaulFileInfo. | [element-type BaulFileInfo]

#### Returns

the provided list of BaulMenuItem.

[element-type BaulMenuItem][transfer full]

### baul_menu_provider_get_background_items ()

    GList *
    baul_menu_provider_get_background_items
                                   (BaulMenuProvider *provider,
                                    CtkWidget *window,
                                    BaulFileInfo *current_folder);

#### Parameters

provider | a BaulMenuProvider |
window | the parent CtkWidget window |
current_folder | the folder for which background items are requested |

#### Returns

the provided list of BaulMenuItem.

[element-type BaulMenuItem][transfer full]

### baul_menu_provider_get_toolbar_items ()

    GList *
    baul_menu_provider_get_toolbar_items (BaulMenuProvider *provider,
                                          CtkWidget *window,
                                          BaulFileInfo *current_folder);

#### Parameters

provider | a BaulMenuProvider |
window | the parent CtkWidget window |
current_folder | the folder for which toolbar items are requested |

#### Returns

the provided list of BaulMenuItem.

[element-type BaulMenuItem][transfer full]

### baul_menu_provider_emit_items_updated_signal ()

    void
    baul_menu_provider_emit_items_updated_signal
                                   (BaulMenuProvider *provider);

## Types and Values

### BaulMenuProvider

    typedef struct _BaulMenuProvider BaulMenuProvider;

### struct BaulMenuProviderIface

    struct BaulMenuProviderIface {
        GTypeInterface g_iface;

        GList *(*get_file_items)       (BaulMenuProvider *provider,
                                        CtkWidget        *window,
                                        GList            *files);
        GList *(*get_background_items) (BaulMenuProvider *provider,
                                        CtkWidget        *window,
                                        BaulFileInfo     *current_folder);
        GList *(*get_toolbar_items)    (BaulMenuProvider *provider,
                                        CtkWidget        *window,
                                        BaulFileInfo     *current_folder);
    };

Interface for extensions to provide additional menu items.

#### Members

`get_file_items` () | Returns a GList of BaulMenuItem. See `baul_menu_provider_get_file_items()` for details. |
`get_background_items` () | Returns a GList of BaulMenuItem. See `baul_menu_provider_get_background_items()` for details. |
`get_toolbar_items` () | Returns a GList of BaulMenuItem. See `baul_menu_provider_get_toolbar_items()` for details. |

## Signal Details

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

    void
    user_function (BaulMenuProvider *baulmenuprovider,
                   gpointer          user_data)

Flags: Run Last