ThunarxMenuProvider

ThunarxMenuProvider

Synopsis

#include <thunarx/thunarx.h>

struct              ThunarxMenuProviderIface;
                    ThunarxMenuProvider;
GList *             thunarx_menu_provider_get_file_actions
                                                        (ThunarxMenuProvider *provider,
                                                         GtkWidget *window,
                                                         GList *files);
GList *             thunarx_menu_provider_get_folder_actions
                                                        (ThunarxMenuProvider *provider,
                                                         GtkWidget *window,
                                                         ThunarxFileInfo *folder);
GList *             thunarx_menu_provider_get_dnd_actions
                                                        (ThunarxMenuProvider *provider,
                                                         GtkWidget *window,
                                                         ThunarxFileInfo *folder,
                                                         GList *files);

Description

Details

struct ThunarxMenuProviderIface

struct ThunarxMenuProviderIface {
  GList *(*get_file_actions)    (ThunarxMenuProvider *provider,
                                 GtkWidget           *window,
                                 GList               *files);

  GList *(*get_folder_actions)  (ThunarxMenuProvider *provider,
                                 GtkWidget           *window,
                                 ThunarxFileInfo     *folder);

  GList *(*get_dnd_actions)     (ThunarxMenuProvider *provider,
                                 GtkWidget           *window,
                                 ThunarxFileInfo     *folder,
                                 GList               *files);
};


ThunarxMenuProvider

typedef struct _ThunarxMenuProvider ThunarxMenuProvider;


thunarx_menu_provider_get_file_actions ()

GList *             thunarx_menu_provider_get_file_actions
                                                        (ThunarxMenuProvider *provider,
                                                         GtkWidget *window,
                                                         GList *files);

Returns the list of GtkActions that provider has to offer for files.

As a special note, this method automatically takes a reference on the provider for every GtkAction object returned from the real implementation of this method in provider. This is to make sure that the extension stays in memory for atleast the time that the actions are used. If the extension wants to stay in memory for a longer time, it'll need to take care of this itself (e.g. by taking an additional reference on the provider itself, that's released at a later time).

The caller is responsible to free the returned list of actions using something like this when no longer needed:

provider :

a ThunarxMenuProvider.

window :

the GtkWindow within which the actions will be used.

files :

the list of ThunarxFileInfos to which the actions will be applied.

Returns :

the list of GtkActions that provider has to offer for files.

thunarx_menu_provider_get_folder_actions ()

GList *             thunarx_menu_provider_get_folder_actions
                                                        (ThunarxMenuProvider *provider,
                                                         GtkWidget *window,
                                                         ThunarxFileInfo *folder);

Returns the list of GtkActions that provider has to offer for folder.

As a special note, this method automatically takes a reference on the provider for every GtkAction object returned from the real implementation of this method in provider. This is to make sure that the extension stays in memory for atleast the time that the actions are used. If the extension wants to stay in memory for a longer time, it'll need to take care of this itself (e.g. by taking an additional reference on the provider itself, that's released at a later time).

The caller is responsible to free the returned list of actions using something like this when no longer needed:

provider :

a ThunarxMenuProvider.

window :

the GtkWindow within which the actions will be used.

folder :

the folder to which the actions should will be applied.

Returns :

the list of GtkActions that provider has to offer for folder.

thunarx_menu_provider_get_dnd_actions ()

GList *             thunarx_menu_provider_get_dnd_actions
                                                        (ThunarxMenuProvider *provider,
                                                         GtkWidget *window,
                                                         ThunarxFileInfo *folder,
                                                         GList *files);

Returns the list of GtkActions that provider has to offer for dropping the files into the folder. For example, the thunar-archive-plugin provides Extract Here actions when dropping archive files into a folder that is writable by the user.

As a special note, this method automatically takes a reference on the provider for every GtkAction object returned from the real implementation of this method in provider. This is to make sure that the extension stays in memory for atleast the time that the actions are used. If the extension wants to stay in memory for a longer time, it'll need to take care of this itself (e.g. by taking an additional reference on the provider itself, that's released at a later time).

The caller is responsible to free the returned list of actions using something like this when no longer needed:

provider :

a ThunarxMenuProvider.

window :

the GtkWindow within which the actions will be used.

folder :

the folder into which the files are being dropped

files :

the list of ThunarxFileInfos for the files that are being dropped to folder in window.

Returns :

the list of GtkActions that provider has to offer for dropping files to folder.

Since 0.4.1