pub struct Login {
navigation: TemplateChild<NavigationView>,
greeter: TemplateChild<Greeter>,
homeserver_page: TemplateChild<LoginHomeserverPage>,
method_page: TemplateChild<LoginMethodPage>,
in_browser_page: TemplateChild<LoginInBrowserPage>,
done_button: TemplateChild<Button>,
autodiscovery: Cell<bool>,
client: RefCell<Option<Client>>,
session: RefCell<Option<Session>>,
}Fields§
§greeter: TemplateChild<Greeter>§homeserver_page: TemplateChild<LoginHomeserverPage>§method_page: TemplateChild<LoginMethodPage>§in_browser_page: TemplateChild<LoginInBrowserPage>§autodiscovery: Cell<bool>Whether auto-discovery is enabled.
client: RefCell<Option<Client>>The Matrix client used to log in.
session: RefCell<Option<Session>>The session that was just logged in.
Implementations§
Source§impl Login
impl Login
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl Login
impl Login
Sourcepub(super) fn visible_page(&self) -> LoginPage
pub(super) fn visible_page(&self) -> LoginPage
The visible page of the view.
Sourcepub fn set_autodiscovery(&self, autodiscovery: bool)
pub fn set_autodiscovery(&self, autodiscovery: bool)
Set whether auto-discovery is enabled.
Sourcepub(super) fn session_setup(&self) -> Option<SessionSetupView>
pub(super) fn session_setup(&self) -> Option<SessionSetupView>
Get the session setup view, if any.
Sourcefn visible_page_changed(&self)
fn visible_page_changed(&self)
The visible page changed.
Sourcepub(super) fn set_client(&self, client: Option<Client>)
pub(super) fn set_client(&self, client: Option<Client>)
Set the Matrix client.
Sourcepub(super) fn drop_client(&self)
pub(super) fn drop_client(&self)
Drop the Matrix client.
Sourcefn drop_session(&self)
fn drop_session(&self)
Drop the session and clean up its data from the system.
Sourceasync fn open_advanced_dialog(&self)
async fn open_advanced_dialog(&self)
Open the login advanced dialog.
Sourcepub(super) async fn init_oauth_login(&self)
pub(super) async fn init_oauth_login(&self)
Prepare to log in via the OAuth 2.0 API.
Sourcepub(super) async fn init_matrix_login(&self)
pub(super) async fn init_matrix_login(&self)
Prepare to log in via the Matrix native API.
Sourcepub(super) async fn init_matrix_sso_login(&self, idp: Option<String>)
pub(super) async fn init_matrix_sso_login(&self, idp: Option<String>)
Prepare to log in via the Matrix SSO API.
Sourceasync fn spawn_local_server(
&self,
) -> Result<(Url, LocalServerRedirectHandle), ()>
async fn spawn_local_server( &self, ) -> Result<(Url, LocalServerRedirectHandle), ()>
Spawn a local server for listening to redirects.
Sourcefn show_method_page(
&self,
homeserver: &Url,
server_name: Option<&OwnedServerName>,
login_types: Vec<LoginType>,
)
fn show_method_page( &self, homeserver: &Url, server_name: Option<&OwnedServerName>, login_types: Vec<LoginType>, )
Show the page to chose a login method with the given data.
Sourcefn show_in_browser_page(
&self,
local_server_handle: LocalServerRedirectHandle,
data: LoginInBrowserData,
)
fn show_in_browser_page( &self, local_server_handle: LocalServerRedirectHandle, data: LoginInBrowserData, )
Show the page to log in with the browser with the given data.
Sourcepub(super) async fn create_session(&self)
pub(super) async fn create_session(&self)
Create the session after a successful login.
Sourceasync fn init_session(&self, session: Session)
async fn init_session(&self, session: Session)
Initialize the given session.
Sourcefn finish_login(&self)
fn finish_login(&self)
Finish the login process and show the session.
Trait Implementations§
Source§impl AccessibleImpl for Login
impl AccessibleImpl for Login
fn platform_state(&self, state: AccessiblePlatformState) -> bool
fn bounds(&self) -> Option<(i32, i32, i32, i32)>
fn at_context(&self) -> Option<ATContext>
fn accessible_parent(&self) -> Option<Accessible>
fn first_accessible_child(&self) -> Option<Accessible>
fn next_accessible_sibling(&self) -> Option<Accessible>
Source§impl CompositeTemplate for Login
impl CompositeTemplate for Login
fn bind_template(klass: &mut Self::Class)
fn check_template_children(widget: &<Self as ObjectSubclass>::Type)
Source§impl CompositeTemplateCallbacks for Login
impl CompositeTemplateCallbacks for Login
const CALLBACKS: &'static [TemplateCallback]
Source§fn bind_template_callbacks<T>(klass: &mut T)where
T: WidgetClassExt,
fn bind_template_callbacks<T>(klass: &mut T)where
T: WidgetClassExt,
klass.Source§fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)where
T: WidgetClassExt,
fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)where
T: WidgetClassExt,
klass, prepending prefix to each callback name.Source§fn add_callbacks_to_scope(scope: &BuilderRustScope)
fn add_callbacks_to_scope(scope: &BuilderRustScope)
scope.Source§fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
scope, prepending
prefix to each callback name.Source§impl DerivedObjectProperties for Login
impl DerivedObjectProperties for Login
Source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
Source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl but auto-generated by the Properties macro
to allow handling more complex use-cases.Source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl but auto-generated by the Properties macro
to allow handling more complex use-cases.Source§impl ObjectImpl for Login
impl ObjectImpl for Login
Source§fn constructed(&self)
fn constructed(&self)
Source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
Source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
Source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property").fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for Login
impl ObjectSubclass for Login
Source§type Interfaces = ()
type Interfaces = ()
Source§type ParentType = Bin
type ParentType = Bin
Source§fn class_init(klass: &mut Self::Class)
fn class_init(klass: &mut Self::Class)
Source§fn instance_init(obj: &InitializingObject<Self>)
fn instance_init(obj: &InitializingObject<Self>)
Source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
Source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
Source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
Source§impl ObjectSubclassType for Login
impl ObjectSubclassType for Login
Source§impl WidgetImpl for Login
impl WidgetImpl for Login
fn grab_focus(&self) -> bool
fn compute_expand(&self, hexpand: &mut bool, vexpand: &mut bool)
fn contains(&self, x: f64, y: f64) -> bool
fn direction_changed(&self, previous_direction: TextDirection)
fn focus(&self, direction_type: DirectionType) -> bool
fn request_mode(&self) -> SizeRequestMode
fn map(&self)
fn measure( &self, orientation: Orientation, for_size: i32, ) -> (i32, i32, i32, i32)
fn mnemonic_activate(&self, group_cycling: bool) -> bool
fn move_focus(&self, direction_type: DirectionType)
fn query_tooltip( &self, x: i32, y: i32, keyboard_tooltip: bool, tooltip: &Tooltip, ) -> bool
fn realize(&self)
fn root(&self)
fn set_focus_child(&self, child: Option<&Widget>)
fn size_allocate(&self, width: i32, height: i32, baseline: i32)
fn snapshot(&self, snapshot: &Snapshot)
fn state_flags_changed(&self, state_flags: &StateFlags)
fn system_setting_changed(&self, settings: &SystemSetting)
fn unmap(&self)
fn unrealize(&self)
fn unroot(&self)
impl BinImpl for Login
Auto Trait Implementations§
impl !Freeze for Login
impl !RefUnwindSafe for Login
impl !Send for Login
impl !Sync for Login
impl Unpin for Login
impl !UnwindSafe for Login
Blanket Implementations§
Source§impl<T> AccessibleImplExt for Twhere
T: AccessibleImpl,
impl<T> AccessibleImplExt for Twhere
T: AccessibleImpl,
fn parent_platform_state(&self, state: AccessiblePlatformState) -> bool
fn parent_bounds(&self) -> Option<(i32, i32, i32, i32)>
fn parent_at_context(&self) -> Option<ATContext>
fn parent_accessible_parent(&self) -> Option<Accessible>
fn parent_first_accessible_child(&self) -> Option<Accessible>
fn parent_next_accessible_sibling(&self) -> Option<Accessible>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CompositeTemplateDisposeExt for Twhere
T: WidgetImpl + CompositeTemplate,
impl<T> CompositeTemplateDisposeExt for Twhere
T: WidgetImpl + CompositeTemplate,
fn dispose_template(&self)
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
Source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed().Source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify().Source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed().Source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
Source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
Source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self.