~ubuntu-branches/ubuntu/raring/lightdm/raring-updates

« back to all changes in this revision

Viewing changes to src/xdisplay.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2011-09-28 16:00:20 UTC
  • mto: (45.1.1 oneiric-proposed)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20110928160020-5begtcf2pe4s0mzv
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2010-2011 Robert Ancell.
3
 
 * Author: Robert Ancell <robert.ancell@canonical.com>
4
 
 * 
5
 
 * This program is free software: you can redistribute it and/or modify it under
6
 
 * the terms of the GNU General Public License as published by the Free Software
7
 
 * Foundation, either version 3 of the License, or (at your option) any later
8
 
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
9
 
 * license.
10
 
 */
11
 
 
12
 
#include <config.h>
13
 
 
14
 
#include "xdisplay.h"
15
 
#include "xsession.h"
16
 
 
17
 
G_DEFINE_TYPE (XDisplay, xdisplay, DISPLAY_TYPE);
18
 
 
19
 
XDisplay *
20
 
xdisplay_new (XServer *server)
21
 
{
22
 
    XDisplay *self = g_object_new (XDISPLAY_TYPE, NULL);
23
 
 
24
 
    g_return_val_if_fail (server != NULL, NULL);
25
 
 
26
 
    display_set_display_server (DISPLAY (self), DISPLAY_SERVER (server));
27
 
 
28
 
    return self;
29
 
}
30
 
 
31
 
static Session *
32
 
xdisplay_create_session (Display *display)
33
 
{
34
 
    return SESSION (xsession_new (XSERVER (display_get_display_server (display))));
35
 
}
36
 
 
37
 
static void
38
 
xdisplay_init (XDisplay *display)
39
 
{
40
 
}
41
 
 
42
 
static void
43
 
xdisplay_class_init (XDisplayClass *klass)
44
 
{
45
 
    DisplayClass *display_class = DISPLAY_CLASS (klass);
46
 
 
47
 
    display_class->create_session = xdisplay_create_session;
48
 
}