Back to index

lightdm  1.3.2
Classes | Defines | Typedefs | Functions
display.h File Reference
#include <glib-object.h>
#include "display-server.h"
#include "session.h"
#include "accounts.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Display
struct  DisplayClass

Defines

#define DISPLAY_TYPE   (display_get_type())
#define DISPLAY(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_TYPE, Display))
#define DISPLAY_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DISPLAY_TYPE, DisplayClass))
#define DISPLAY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), DISPLAY_TYPE, DisplayClass))

Typedefs

typedef struct DisplayPrivate

Functions

GType display_get_type (void)
Displaydisplay_new (DisplayServer *display_server)
DisplayServerdisplay_get_display_server (Display *display)
const gchar * display_get_username (Display *display)
Sessiondisplay_get_session (Display *display)
void display_set_greeter_session (Display *display, const gchar *greeter_session)
void display_set_session_wrapper (Display *display, const gchar *session_wrapper)
void display_set_allow_guest (Display *display, gboolean allow_guest)
void display_set_greeter_allow_guest (Display *display, gboolean greeter_allow_guest)
void display_set_autologin_user (Display *display, const gchar *username, gboolean is_guest, gint timeout)
void display_set_select_user_hint (Display *display, const gchar *username, gboolean is_guest)
void display_set_hide_users_hint (Display *display, gboolean hide_users)
void display_set_show_manual_login_hint (Display *display, gboolean show_manual)
void display_set_lock_hint (Display *display, gboolean is_lock)
void display_set_user_session (Display *display, const gchar *session_name)
gboolean display_start (Display *display)
gboolean display_get_is_ready (Display *display)
void display_lock (Display *display)
void display_unlock (Display *display)
void display_stop (Display *display)

Class Documentation

struct Display

Definition at line 30 of file display.h.

Collaboration diagram for Display:
Class Members
GObject parent_instance
DisplayPrivate * priv

Define Documentation

#define DISPLAY (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_TYPE, Display))

Definition at line 24 of file display.h.

#define DISPLAY_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), DISPLAY_TYPE, DisplayClass))

Definition at line 25 of file display.h.

#define DISPLAY_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), DISPLAY_TYPE, DisplayClass))

Definition at line 26 of file display.h.

#define DISPLAY_TYPE   (display_get_type())

Definition at line 23 of file display.h.


Typedef Documentation

typedef struct DisplayPrivate

Definition at line 28 of file display.h.


Function Documentation

Definition at line 128 of file display.c.

{
    g_return_val_if_fail (display != NULL, NULL);
    return display->priv->display_server;
}

Here is the caller graph for this function:

gboolean display_get_is_ready ( Display display)

Definition at line 856 of file display.c.

{
    g_return_val_if_fail (display != NULL, FALSE);

    return display->priv->is_ready;
}

Here is the caller graph for this function:

Definition at line 146 of file display.c.

{
    g_return_val_if_fail (display != NULL, NULL);
    return display->priv->session;
}

Here is the caller graph for this function:

GType display_get_type ( void  )
const gchar* display_get_username ( Display display)

Definition at line 135 of file display.c.

{
    g_return_val_if_fail (display != NULL, NULL);

    if (!display->priv->session || !display->priv->in_user_session)
        return NULL;

    return session_get_username (display->priv->session);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void display_lock ( Display display)

Definition at line 864 of file display.c.

{
    g_return_if_fail (display != NULL);

    if (!display->priv->session)
        return;

    g_debug ("Locking display");

    session_lock (display->priv->session);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Display* display_new ( DisplayServer display_server)

Definition at line 118 of file display.c.

{
    Display *display = g_object_new (DISPLAY_TYPE, NULL);

    display->priv->display_server = g_object_ref (display_server);

    return display;
}

Here is the caller graph for this function:

void display_set_allow_guest ( Display display,
gboolean  allow_guest 
)

Definition at line 169 of file display.c.

{
    g_return_if_fail (display != NULL);
    display->priv->allow_guest = allow_guest;
}

Here is the caller graph for this function:

void display_set_autologin_user ( Display display,
const gchar *  username,
gboolean  is_guest,
gint  timeout 
)

Definition at line 183 of file display.c.

{
    g_return_if_fail (display != NULL);
    g_free (display->priv->autologin_user);
    display->priv->autologin_user = g_strdup (username);
    display->priv->autologin_guest = is_guest;
    display->priv->autologin_timeout = timeout;
}

Here is the caller graph for this function:

void display_set_greeter_allow_guest ( Display display,
gboolean  greeter_allow_guest 
)

Definition at line 176 of file display.c.

{
    g_return_if_fail (display != NULL);
    display->priv->greeter_allow_guest = greeter_allow_guest;
}

Here is the caller graph for this function:

void display_set_greeter_session ( Display display,
const gchar *  greeter_session 
)

Definition at line 153 of file display.c.

{
    g_return_if_fail (display != NULL);
    g_free (display->priv->greeter_session);
    display->priv->greeter_session = g_strdup (greeter_session);
}

Here is the caller graph for this function:

void display_set_hide_users_hint ( Display display,
gboolean  hide_users 
)

Definition at line 202 of file display.c.

{
    g_return_if_fail (display != NULL);
    display->priv->greeter_hide_users = hide_users;
}

Here is the caller graph for this function:

void display_set_lock_hint ( Display display,
gboolean  is_lock 
)

Definition at line 216 of file display.c.

{
    g_return_if_fail (display != NULL);
    display->priv->greeter_is_lock = is_lock;
}

Here is the caller graph for this function:

void display_set_select_user_hint ( Display display,
const gchar *  username,
gboolean  is_guest 
)

Definition at line 193 of file display.c.

{
    g_return_if_fail (display != NULL);
    g_free (display->priv->select_user_hint);
    display->priv->select_user_hint = g_strdup (username);
    display->priv->select_guest_hint = is_guest;
}

Here is the caller graph for this function:

void display_set_session_wrapper ( Display display,
const gchar *  session_wrapper 
)

Definition at line 161 of file display.c.

{
    g_return_if_fail (display != NULL);
    g_free (display->priv->session_wrapper);
    display->priv->session_wrapper = g_strdup (session_wrapper);
}

Here is the caller graph for this function:

void display_set_show_manual_login_hint ( Display display,
gboolean  show_manual 
)

Definition at line 209 of file display.c.

{
    g_return_if_fail (display != NULL);
    display->priv->greeter_show_manual_login = show_manual_login;
}

Here is the caller graph for this function:

void display_set_user_session ( Display display,
const gchar *  session_name 
)

Definition at line 223 of file display.c.

{
    g_return_if_fail (display != NULL);
    g_free (display->priv->user_session);
    display->priv->user_session = g_strdup (session_name);
}

Here is the caller graph for this function:

gboolean display_start ( Display display)

Definition at line 801 of file display.c.

{
    g_return_val_if_fail (display != NULL, FALSE);

    g_signal_connect (G_OBJECT (display->priv->display_server), "ready", G_CALLBACK (display_server_ready_cb), display);
    g_signal_connect (G_OBJECT (display->priv->display_server), "stopped", G_CALLBACK (display_server_stopped_cb), display);

    if (!display_server_start (display->priv->display_server))
        return FALSE;

    return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void display_stop ( Display display)

Definition at line 815 of file display.c.

{
    g_return_if_fail (display != NULL);

    if (display->priv->stopped)
        return;

    if (!display->priv->stopping)
    {
        g_debug ("Stopping display");
        display->priv->stopping = TRUE;
    }

    /* Stop the session first */
    if (display->priv->session)
    {
        session_stop (display->priv->session);
        if (display->priv->session && !session_get_is_stopped (display->priv->session))
            return;
        g_signal_handlers_disconnect_matched (display->priv->session, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, display);
        g_object_unref (display->priv->session);
        display->priv->session = NULL;
    }

    /* Stop the display server after that */
    if (display->priv->display_server)
    {
        display_server_stop (display->priv->display_server);
        if (display->priv->display_server && !display_server_get_is_stopped (display->priv->display_server))
            return;
        g_signal_handlers_disconnect_matched (display->priv->display_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, display);
        g_object_unref (display->priv->display_server);
        display->priv->display_server = NULL;
    }

    display->priv->stopped = TRUE;
    g_debug ("Display stopped");
    g_signal_emit (display, signals[STOPPED], 0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void display_unlock ( Display display)

Definition at line 877 of file display.c.

{
    g_return_if_fail (display != NULL);

    if (!display->priv->session)
        return;

    g_debug ("Unlocking display");

    session_unlock (display->priv->session);
}

Here is the call graph for this function:

Here is the caller graph for this function: