## WnckHandle WnckHandle — an object representing a handle. |

## Functions

WnckHandle * | wnck_handle_new ()
WnckScreen * | wnck_handle_get_default_screen ()
WnckScreen * | wnck_handle_get_screen ()
WnckScreen * | wnck_handle_get_screen_for_root ()
void | wnck_handle_set_default_icon_size ()
void | wnck_handle_set_default_mini_icon_size ()
WnckClassGroup * | wnck_handle_get_class_group ()
WnckApplication * | wnck_handle_get_application ()
WnckWindow * | wnck_handle_get_window ()

## Properties

WnckClientType | client-type | Read / Write / Construct

## Types and Values

#define | WNCK_TYPE_HANDLE
| WnckHandle

## Object Hierarchy

        GObject
        ╰── WnckHandle

## Description

This is the main entry point into the libwnck library.

## Functions

### wnck_handle_new ()

    WnckHandle *
    wnck_handle_new (WnckClientType client_type);

Creates a new WnckHandle object with a given `client_type` .

#### Parameters

client_type | a role for the client |

#### Returns

newly created WnckHandle.

[transfer full]

### wnck_handle_get_default_screen ()

    WnckScreen *
    wnck_handle_get_default_screen (WnckHandle *self);

Gets the default WnckScreen on the default display.

#### Parameters

self | a WnckHandle |

#### Returns

the default WnckScreen. The returned WnckScreen is owned by WnckHandle and must not be referenced or unreferenced. This can return `NULL` if not on X11.

[transfer none][nullable]

### wnck_handle_get_screen ()

    WnckScreen *
    wnck_handle_get_screen (WnckHandle *self,
                            int index);

Gets the WnckScreen for a given screen on the default display.

#### Parameters

self | a WnckHandle |
index | screen number, starting from 0. |

#### Returns

the WnckScreen for screen `index` , or `NULL` if no such screen exists. The returned WnckScreen is owned by WnckHandle and must not be referenced or unreferenced.

[transfer none]

### wnck_handle_get_screen_for_root ()

    WnckScreen *
    wnck_handle_get_screen_for_root (WnckHandle *self,
                                     gulong root_window_id);

Gets the WnckScreen for the root window at `root_window_id` , or `NULL` if no WnckScreen exists for this root window.

This function does not work if `wnck_handle_get_screen()` was not called for the sought WnckScreen before, and returns `NULL`.

#### Parameters

self | a WnckHandle |
root_window_id | an X window ID. |

#### Returns

the WnckScreen for the root window at `root_window_id` , or `NULL`. The returned WnckScreen is owned by WnckHandle and must not be referenced or unreferenced.

[transfer none]

### wnck_handle_set_default_icon_size ()

    void
    wnck_handle_set_default_icon_size (WnckHandle *self,
                                       gsize icon_size);

The default main icon size is `WNCK_DEFAULT_ICON_SIZE`. This function allows to change this value.

#### Parameters

self | a WnckHandle |
icon_size | the default size for windows and application standard icons. |

### wnck_handle_set_default_mini_icon_size ()

    void
    wnck_handle_set_default_mini_icon_size
                                   (WnckHandle *self,
                                    gsize icon_size);

The default main icon size is `WNCK_DEFAULT_MINI_ICON_SIZE`. This function allows to change this value.

#### Parameters

self | a WnckHandle |
icon_size | the default size for windows and application mini icons. |

### wnck_handle_get_class_group ()

    WnckClassGroup *
    wnck_handle_get_class_group (WnckHandle *self,
                                 const char *id);

Gets the WnckClassGroup corresponding to `id` .

#### Parameters

self | a WnckHandle |
id | identifier name of the sought resource class. |

#### Returns

the WnckClassGroup corresponding to `id` , or `NULL` if there is no WnckClassGroup with the specified `id` . The returned WnckClassGroup is owned by libwnck and must not be referenced or unreferenced.

[transfer none]

### wnck_handle_get_application ()

    WnckApplication *
    wnck_handle_get_application (WnckHandle *self,
                                 gulong xwindow);

Gets the WnckApplication corresponding to the group leader with `xwindow` as X window ID.

#### Parameters

self | a WnckHandle |
xwindow | the X window ID of a group leader. |

#### Returns

the WnckApplication corresponding to `xwindow` , or `NULL` if there no such WnckApplication could be found. The returned WnckApplication is owned by libwnck and must not be referenced or unreferenced.

[transfer none]

### wnck_handle_get_window ()

    WnckWindow *
    wnck_handle_get_window (WnckHandle *self,
                            gulong xwindow);

Gets a preexisting WnckWindow for the X window `xwindow` . This will not create a WnckWindow if none exists. The function is robust against bogus window IDs.

#### Parameters

self | a WnckHandle |
xwindow | an X window ID. |

#### Returns

the WnckWindow for `xwindow` . The returned WnckWindow is owned by libwnck and must not be referenced or unreferenced.

[transfer none]

## Types and Values

### WNCK_TYPE_HANDLE

    #define WNCK_TYPE_HANDLE (wnck_handle_get_type ())

### WnckHandle

    typedef struct _WnckHandle WnckHandle;

The WnckHandle struct contains only private fields and should not be directly accessed.

## Property Details

### The `“client-type”` property

      “client-type”              WnckClientType

client-type.

Owner: WnckHandle

Flags: Read / Write / Construct

Default value: WNCK_CLIENT_TYPE_APPLICATION