## GladePreview

GladePreview — The glade preview launch/kill interface.

## Functions

GPid | glade_preview_get_pid ()
GladeWidget * | glade_preview_get_widget ()
GladePreview * | glade_preview_launch ()
GObject * | glade_preview_template_object_new ()
void | glade_preview_update ()

## Types and Values

struct | GladePreview
#define | QUIT_TOKEN
#define | QUIT_TOKEN_SIZE
#define | UPDATE_TOKEN
#define | UPDATE_TOKEN_SIZE

## Description

This object owns all data that is needed to keep a preview. It stores the GIOChannel used for communication between glade and glade-previewer, the event source id for a watch (in the case a watch is used to monitor the communication channel), the previewed widget and the pid of the corresponding glade-previewer.

## Functions

### glade_preview_get_pid ()

    GPid
    glade_preview_get_pid (GladePreview *preview);

### glade_preview_get_widget ()

    GladeWidget *
    glade_preview_get_widget (GladePreview *preview);

### glade_preview_launch ()

    GladePreview *
    glade_preview_launch (GladeWidget *widget,
                          const gchar *buffer);

Creates a new GladePreview and launches glade-previewer to preview it.

#### Parameters

widget | Pointer to a local instance of the widget that will be previewed. |
buffer | Contents of an xml definition of the interface which will be previewed |

#### Returns

a new GladePreview or NULL if launch fails.

### glade_preview_template_object_new ()

    GObject *
    glade_preview_template_object_new (const gchar *template_data,
                                       gsize len,
                                       GtkBuilderConnectFunc connect_func,
                                       gpointer connect_data);

### glade_preview_update ()

    void
    glade_preview_update (GladePreview *preview,
                          const gchar *buffer);

## Types and Values

### struct GladePreview

    struct GladePreview {
      GObject parent_instance;

      GladePreviewPrivate *priv;
    };

### QUIT_TOKEN

    #define QUIT_TOKEN "<quit>\n"

### QUIT_TOKEN_SIZE

    #define QUIT_TOKEN_SIZE strlen (QUIT_TOKEN)

### UPDATE_TOKEN

    #define UPDATE_TOKEN "<update>\n"

### UPDATE_TOKEN_SIZE

    #define UPDATE_TOKEN_SIZE strlen (UPDATE_TOKEN)