## Win32 Specific Support

Win32 Specific Support — Win32 specific API

## Functions

void | clutter_win32_disable_event_retrieval ()
gboolean | clutter_win32_set_stage_foreign ()
ClutterStage * | clutter_win32_get_stage_from_window ()
HWND | clutter_win32_get_stage_window ()
gboolean | clutter_win32_handle_event ()

## Description

The Win32 backend for Clutter provides some specific API, allowing integration with the Win32 API for embedding and manipulating the stage window.

The ClutterWin32 API is available since Clutter 0.8

## Functions

### clutter_win32_disable_event_retrieval ()

    void
    clutter_win32_disable_event_retrieval (void);

Disables retrieval of Windows messages in the main loop. Use to create event-less canvas.

This function can only be called before calling `clutter_init()`.

Since: 0.8

### clutter_win32_set_stage_foreign ()

    gboolean
    clutter_win32_set_stage_foreign (ClutterStage *stage,
                                     HWND hwnd);

Target the ClutterStage to use an existing external window handle.

#### Parameters

stage | a ClutterStage |
hwnd | an existing window handle |

#### Returns

`TRUE` if foreign window is valid

Since: 0.8

### clutter_win32_get_stage_from_window ()

    ClutterStage *
    clutter_win32_get_stage_from_window (HWND hwnd);

Gets the stage for a particular window.

#### Parameters

hwnd | a window handle |

#### Returns

The stage or NULL if a stage does not exist for the window.

Since: 0.8

### clutter_win32_get_stage_window ()

    HWND
    clutter_win32_get_stage_window (ClutterStage *stage);

Gets the stage's window handle

#### Parameters

stage | a ClutterStage |

#### Returns

An HWND for the stage window.

Since: 0.8

### clutter_win32_handle_event ()

    gboolean
    clutter_win32_handle_event (const MSG *msg);

This function processes a single Win32 message. It can be used to hook into external windows message processing (for example, a GDK filter function).

If `clutter_win32_disable_event_retrieval()` has been called, you must let this function process events to update Clutter's internal state.

#### Parameters

msg | A pointer to a structure describing a Win32 message. |

#### Returns

`TRUE` if the message was handled entirely by Clutter and no further processing (such as calling the default window procedure) should take place. `FALSE` is returned if is the message was not handled at all or if Clutter expects processing to take place.

Since: 1.6

## Types and Values