aboutsummaryrefslogtreecommitdiffstats
path: root/xenwatch.c
blob: 6f56c74f5f1e6c426101391f8211ac9430b570c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <signal.h>

#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>

#include "xenviews.h"
#include "mdns.h"

/* ------------------------------------------------------------------ */

static Display   *dpy;

/* ------------------------------------------------------------------ */

int
main(int argc, char *argv[])
{
    setlocale(LC_ALL,"");

    gtk_init(&argc, &argv);
    dpy = gdk_x11_display_get_xdisplay(gdk_display_get_default());
    fcntl(ConnectionNumber(dpy),F_SETFD,FD_CLOEXEC);

    xen_doms_create_window();
    gtk_widget_show_all(xd_toplevel);

    mdns_init();
    mdns_browse("_ssh._tcp", NULL);

    gtk_main();

    mdns_fini();
    fprintf(stderr,"bye...\n");
    exit(0);
}