FMATimeout: <span class="productname">FileManager-Actions</span>™ Reference Manual

## FMATimeout FMATimeout — The FMATimeout Structure |

## Functions

void | FMATimeoutFunc ()
void | fma_timeout_event ()

## Types and Values

| FMATimeout

## Includes

    #include <filemanager-actions/fma-timeout.h>

## Description

The FMATimeout structure is a convenience structure to manage timeout functions.

## Functions

### FMATimeoutFunc ()

    void
    FMATimeoutFunc (void *user_data);

Prototype of the callback function.

#### Parameters

user_data | data to be passed to the callback function. |

Since: 3.1

### fma_timeout_event ()

    void
    fma_timeout_event (FMATimeout *timeout);

#### Parameters

timeout | the FMATimeout structure which will handle this event. |

## Types and Values

### FMATimeout

    typedef struct {
    	guint          timeout;
    	FMATimeoutFunc handler;
    	gpointer       user_data;
    } FMATimeout;

This structure let the user (i.e. the code which uses it) manage functions which should only be called after some time of inactivity, which is typically the case of 'item-change' handlers.

The structure is supposed to be initialized at construction time with `timeout` in milliseconds, `handler` and `user_data` input parameters. The private data should be set to `NULL`.

Such a structure must be allocated for each managed event.

When an event is detected, the `fma_timeout_event()` function must be called with this structure. The function makes sure that the `handler` callback will be triggered as soon as no event will be recorded after `timeout` milliseconds of inactivity.

#### Members

guint `timeout`; | timeout configurable parameter (ms) |
FMATimeoutFunc `handler`; | handler function |
gpointer `user_data`; | user data |

Since: 3.1