## PhoshToplevelManager

PhoshToplevelManager — Tracks and interacts with toplevel surfaces for window management purposes.

## Functions

PhoshToplevel * | phosh_toplevel_manager_get_toplevel ()
guint | phosh_toplevel_manager_get_num_toplevels ()
PhoshToplevelManager * | phosh_toplevel_manager_new ()

## Properties

int | num-toplevels | Read

## Signals

void | toplevel-added | Run Last
void | toplevel-changed | Run Last

## Types and Values

#define | PHOSH_TYPE_TOPLEVEL_MANAGER
| PhoshToplevelManager

## Object Hierarchy

        GObject
        ╰── PhoshToplevelManager

## Description

## Functions

### phosh_toplevel_manager_get_toplevel ()

    PhoshToplevel *
    phosh_toplevel_manager_get_toplevel (PhoshToplevelManager *self,
                                         guint num);

### phosh_toplevel_manager_get_num_toplevels ()

    guint
    phosh_toplevel_manager_get_num_toplevels
                                   (PhoshToplevelManager *self);

### phosh_toplevel_manager_new ()

    PhoshToplevelManager *
    phosh_toplevel_manager_new (void);

## Types and Values

### PHOSH_TYPE_TOPLEVEL_MANAGER

    #define PHOSH_TYPE_TOPLEVEL_MANAGER (phosh_toplevel_manager_get_type())

### PhoshToplevelManager

    typedef struct _PhoshToplevelManager PhoshToplevelManager;

## Property Details

### The `“num-toplevels”` property

      “num-toplevels”            int

The current number of toplevels.

Owner: PhoshToplevelManager

Flags: Read

Allowed values: >= 0

Default value: 0

## Signal Details

### The `“toplevel-added”` signal

    void
    user_function (PhoshToplevelManager *manager,
                   PhoshToplevel        *toplevel,
                   gpointer              user_data)

Emitted whenever a toplevel has been added to the list.

#### Parameters

manager | The PhoshToplevelManager emitting the signal. |
toplevel | The PhoshToplevel being added to the list. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“toplevel-changed”` signal

    void
    user_function (PhoshToplevelManager *manager,
                   PhoshToplevel        *toplevel,
                   gpointer              user_data)

Emitted whenever a toplevel has changed properties.

#### Parameters

manager | The PhoshToplevelManager emitting the signal. |
toplevel | The PhoshToplevel that changed properties. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last