ThunarxPropertyPageProvider

## ThunarxPropertyPageProvider ThunarxPropertyPageProvider — The interface to extensions that provide additional property pages |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

    #include <thunarx/thunarx.h>

                ThunarxPropertyPageProvider;
                ThunarxPropertyPageProviderIface;
    GList*      thunarx_property_page_provider_get_pages
                                                (ThunarxPropertyPageProvider *provider,
                                                 GList *files);

## Object Hierarchy

      GInterface
       +----ThunarxPropertyPageProvider

## Prerequisites

ThunarxPropertyPageProvider requires GObject.

## Description

To add a property page to the file properties dialog, extensions must implement the ThunarxPropertyPageProvider interface. This interface has only one virtual method, `get_pages`, that is passed a list of ThunarxFileInfo objects and returns a list of ThunarxPropertyPage objects.

## Details

### ThunarxPropertyPageProvider

    typedef struct _ThunarxPropertyPageProvider ThunarxPropertyPageProvider;

Property page provider type.

### ThunarxPropertyPageProviderIface

    typedef struct {
      GList *(*get_pages) (ThunarxPropertyPageProvider *provider,
                           GList                       *files);
    } ThunarxPropertyPageProviderIface;

Interface with virtual methods implemented by extensions that provide additional pages for the file properties dialog.

`get_pages` () | See `thunarx_property_page_provider_get_pages()`.

### thunarx_property_page_provider_get_pages ()

    GList*      thunarx_property_page_provider_get_pages
                                                (ThunarxPropertyPageProvider *provider,
                                                 GList *files);

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

As a special note, this method automatically takes a reference on the `provider` for every ThunarxPropertyPage 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 pages 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 pages using something like this when no longer needed:

    g_list_foreach (list, (GFunc) g_object_ref, NULL);
    g_list_foreach (list, (GFunc) gtk_object_sink, NULL);
    g_list_foreach (list, (GFunc) g_object_unref, NULL);
    g_list_free (list);

`provider` : | a ThunarxPropertyPageProvider.
`files` : | the list of ThunarxFileInfos for which a properties dialog will be displayed.
Returns : | the list of ThunarxPropertyPages that `provider` has to offer for `files`.

## See Also

The description of the ThunarxPropertyPage class.