PgmGtk

## PgmGtk PgmGtk — A GTK+ widget embedding viewports. |

## Synopsis

    #include <pgm/gtk/pgmgtk.h>

                        PgmGtk;
    GtkWidget *         pgm_gtk_new                         (void);
    gboolean            pgm_gtk_set_viewport                (PgmGtk *gtk,
                                                             PgmViewport *viewport);
    PgmError            pgm_gtk_get_viewport                (PgmGtk *gtk,
                                                             PgmViewport **viewport);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkSocket
                                     +----PgmGtk

## Implemented Interfaces

PgmGtk implements AtkImplementorIface and GtkBuildable.

## Description

PgmGtk is a GTK+ widget allowing to embed a PgmViewport inside a GTK+ application.

Last reviewed on 2007-11-09 (0.3.2)

## Details

### PgmGtk

    typedef struct _PgmGtk PgmGtk;

The opaque PgmGtk data structure.

### pgm_gtk_new ()

    GtkWidget *         pgm_gtk_new                         (void);

Creates a new PgmGtk object.

Returns : | a new PgmGtk instance.

### pgm_gtk_set_viewport ()

    gboolean            pgm_gtk_set_viewport                (PgmGtk *gtk,
                                                             PgmViewport *viewport);

Embeds `viewport` in the GTK+ widget `gtk`. `viewport` must support application embedding for the function to success.

`gtk` : | A PgmGtk object.
`viewport` : | A PgmViewport object.
Returns : | `TRUE` if `viewport` has been embedded successfully, `FALSE` otherwise.

### pgm_gtk_get_viewport ()

    PgmError            pgm_gtk_get_viewport                (PgmGtk *gtk,
                                                             PgmViewport **viewport);

Retrieves the `viewport` of `gtk`.

`gtk` : | a PgmViewport object.
`viewport` : | a pointer to a PgmViewport pointer where the `viewport` is going to be stored. Unref after usage.
Returns : | a PgmError indicating success/failure.