1
/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
3
* Copyright (C) 2011 Canonical Ltd
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 3 as
7
* published by the Free Software Foundation.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Authored by: Robert Ancell <robert.ancell@canonical.com>
20
public const int grid_size = 40;
22
public class UnityGreeter
24
public static UnityGreeter singleton;
26
public signal void show_message (string text, LightDM.MessageType type);
27
public signal void show_prompt (string text, LightDM.PromptType type);
28
public signal void authentication_complete ();
30
public bool test_mode = false;
31
public bool session_started = false;
32
public string last_respond_response;
34
public bool is_authenticated ()
39
public void authenticate (string? userid = null)
43
public void authenticate_as_guest ()
47
public void authenticate_remote (string? session, string? userid)
51
public void cancel_authentication ()
55
public void respond (string response)
57
last_respond_response = response;
60
public string authentication_user ()
65
public string default_session_hint ()
70
public string select_user_hint ()
75
public bool show_manual_login_hint ()
80
public bool hide_users_hint ()
85
public bool has_guest_account_hint ()
90
public void start_session (string? session)
92
session_started = true;
95
public void push_list (GreeterList widget)
99
public void pop_list ()
103
public string? get_state (string key)
108
public void set_state (string key, string value)
112
public static LightDM.Layout? get_layout_by_name (string name)
114
foreach (var layout in LightDM.get_layouts ())
116
if (layout.name == name)
122
public static void add_style_class (Gtk.Widget widget)
124
/* Add style context class lightdm-user-list */
125
var ctx = widget.get_style_context ();
126
ctx.add_class ("lightdm");