| Thunar Extensions Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#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);
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);
};
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:
1 2 |
g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list); |
|
a ThunarxMenuProvider. |
|
the GtkWindow within which the actions will be used. |
|
the list of ThunarxFileInfos to which the actions will be applied. |
Returns : |
the list of GtkActions that provider has to offer
for files. |
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:
1 2 |
g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list); |
|
a ThunarxMenuProvider. |
|
the GtkWindow within which the actions will be used. |
|
the folder to which the actions should will be applied. |
Returns : |
the list of GtkActions that provider has to offer
for folder. |
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:
1 2 |
g_list_foreach (list, (GFunc) g_object_unref, NULL); g_list_free (list); |
|
a ThunarxMenuProvider. |
|
the GtkWindow within which the actions will be used. |
|
the folder into which the files are being dropped |
|
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