NATimeout

## NATimeout NATimeout — The NATimeout Structure |

## Functions

void | NATimeoutFunc ()
void | na_timeout_event ()

## Types and Values

| NATimeout

## Includes

    #include <caja-actions/na-timeout.h>

## Description

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

## Functions

### NATimeoutFunc ()

    void
    NATimeoutFunc (void *user_data);

Prototype of the callback function.

#### Parameters

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

Since 3.1

### na_timeout_event ()

    void
    na_timeout_event (NATimeout *timeout);

#### Parameters

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

## Types and Values

### NATimeout

    typedef struct {
    	guint         timeout;
    	NATimeoutFunc handler;
    	gpointer      user_data;
    } NATimeout;

This structure let the user (i.e. the code which uses it) manage functions which should only be called after some time of icactivity, 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 `na_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 icactivity.

#### Members

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

Since 3.1