---
name: "lqr_progress_set_init"
section: "3"
platform: "linux"
package: "liblqr-1-0-dev"
version: "0.4.1-2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/lqr_progress_set_init"
---

# lqr\_progress\_set\_init(3)

execude custom code before each rescaling operation

## NAME

lqr\_progress\_set\_init - execude custom code before each rescaling operation

## SYNOPSIS

```
#include <lqr.h>
```

**LqrRetVal lqr\_progress\_set\_init(LqrProgress\*** *p***, LqrProgressFuncInit** *init\_func***);**

## DESCRIPTION

The function **lqr\_progress\_set\_init** sets the hook *init\_func* to the LqrProgress object pointed to by *p*.

The function *init\_func* is of type LqrProgressFuncInit, whose prototype is defined by:

```
typedef LqrRetVal (*LqrProgressFuncInit) (const gchar* init_message);
```

Each time that the function [**lqr\_carver\_resize**(3)](/lqr_carver_resize/3.md) performs a rescale operation (recall that it can perform more than one rescale operation at each call) this function will be called first, with a string argument passed through the parameter *init\_message*, which is different for horizontal and vertical rescalings.

The message arguments can be set with the functions [**lqr\_progress\_set\_init\_width\_message**(3)](/lqr_progress_set_init_width_message/3.md) and [**lqr\_progress\_set\_init\_height\_message**(3)](/lqr_progress_set_init_height_message/3.md).

The default values for newly created LqrProgress objects are:

Horizontal:

"Resizing width..."

Vertical:

"Resizing height..."

## RETURN VALUE

The return value follows the Liquid Rescale library signalling system.

## SEE ALSO

[**LqrRetVal**(3)](/LqrRetVal/3.md), [**lqr\_progress\_new**(3)](/lqr_progress_new/3.md), [**lqr\_progress\_set\_update**(3)](/lqr_progress_set_update/3.md), [**lqr\_progress\_set\_end**(3)](/lqr_progress_set_end/3.md), [**lqr\_progress\_set\_init\_width\_message**(3)](/lqr_progress_set_init_width_message/3.md), [**lqr\_progress\_set\_init\_height\_message**(3)](/lqr_progress_set_init_height_message/3.md), [**lqr\_progress\_set\_end\_width\_message**(3)](/lqr_progress_set_end_width_message/3.md), [**lqr\_progress\_set\_end\_height\_message**(3)](/lqr_progress_set_end_height_message/3.md), [**lqr\_progress\_set\_update\_step**(3)](/lqr_progress_set_update_step/3.md), [**lqr\_carver\_set\_progress**(3)](/lqr_carver_set_progress/3.md)

## COPYRIGHT

Copyright © 2007-2009 Carlo Baldassi\
