~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to tests/test-gobject-greeter.c

  • Committer: Robert Ancell
  • Date: 2011-06-06 01:19:32 UTC
  • Revision ID: robert.ancell@canonical.com-20110606011932-ub772nrgi6v8vhh7
Start working on tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <lightdm/greeter.h>
 
3
 
 
4
static void connected_cb (LdmGreeter *greeter)
 
5
{
 
6
    printf ("CONNECTED\n");
 
7
}
 
8
 
 
9
int main (int argc, char **argv)
 
10
{
 
11
    LdmGreeter *greeter;
 
12
  
 
13
    g_type_init ();
 
14
 
 
15
    greeter = ldm_greeter_new ();
 
16
    g_object_connect (greeter, "connected", G_CALLBACK (connected_cb), NULL);
 
17
    ldm_greeter_connect_to_server (greeter);
 
18
 
 
19
    g_main_loop_run (g_main_loop_new (NULL, FALSE));
 
20
 
 
21
    return 0;
 
22
}