<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations.  -->
<repository version="1.2"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0"
            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  <include name="Gtk" version="4.0"/>
  <package name="gtk4-layer-shell-0"/>
  <c:include name="gtk4-session-lock.h"/>
  <namespace name="Gtk4SessionLock"
             version="1.0"
             shared-library="libgtk4-layer-shell.so.0"
             c:identifier-prefixes="GtkSessionLock"
             c:symbol-prefixes="gtk_session_lock">
    <class name="Instance"
           c:symbol-prefix="instance"
           c:type="GtkSessionLockInstance"
           parent="GObject.Object"
           glib:type-name="GtkSessionLockInstance"
           glib:get-type="gtk_session_lock_instance_get_type"
           glib:type-struct="InstanceClass">
      <doc xml:space="preserve"
           filename="include/gtk4-session-lock.h"
           line="37">An instance of the object used to control locking the screen.
Multiple instances can exist at once, but only one can be locked at a time.</doc>
      <source-position filename="include/gtk4-session-lock.h" line="43"/>
      <constructor name="new" c:identifier="gtk_session_lock_instance_new">
        <source-position filename="include/gtk4-session-lock.h" line="69"/>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve"
               filename="include/gtk4-session-lock.h"
               line="67">new session lock instance</doc>
          <type name="Instance" c:type="GtkSessionLockInstance*"/>
        </return-value>
      </constructor>
      <method name="assign_window_to_monitor"
              c:identifier="gtk_session_lock_instance_assign_window_to_monitor">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="100">This should be called with a different window once for each monitor immediately after calling
gtk_session_lock_lock(). Hiding a window that is active on a monitor or not letting a window be resized by the
library may result in a Wayland protocol error.</doc>
        <source-position filename="include/gtk4-session-lock.h" line="110"/>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="102">the instance to use</doc>
            <type name="Instance" c:type="GtkSessionLockInstance*"/>
          </instance-parameter>
          <parameter name="window" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="103">The GTK Window to use as a lock surface</doc>
            <type name="Gtk.Window" c:type="GtkWindow*"/>
          </parameter>
          <parameter name="monitor" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="104">The monitor to show it on</doc>
            <type name="Gdk.Monitor" c:type="GdkMonitor*"/>
          </parameter>
        </parameters>
      </method>
      <method name="is_locked"
              c:identifier="gtk_session_lock_instance_is_locked">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="92">Returns if this instance currently holds a lock.</doc>
        <source-position filename="include/gtk4-session-lock.h" line="98"/>
        <return-value transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="94">the instance</doc>
            <type name="Instance" c:type="GtkSessionLockInstance*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="lock" c:identifier="gtk_session_lock_instance_lock">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="71">Lock the screen. This should be called before assigning any windows to monitors. If this function fails the ::failed
signal is emitted, if it succeeds the ::locked signal is emitted. The ::failed signal may be emitted before the
function returns (for example, if another #GtkSessionLockInstance holds a lock) or later (if another process holds a
lock). The only case where neither signal is triggered is if the instance is already locked.</doc>
        <source-position filename="include/gtk4-session-lock.h" line="82"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="include/gtk4-session-lock.h"
               line="80">false on immediate fail, true if lock acquisition was successfully started</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="73">the instance to lock</doc>
            <type name="Instance" c:type="GtkSessionLockInstance*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="unlock" c:identifier="gtk_session_lock_instance_unlock">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="84">If the screen is locked by this instance unlocks it and fires ::unlocked. Otherwise has no effect</doc>
        <source-position filename="include/gtk4-session-lock.h" line="90"/>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="self" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="86">the instance to unlock</doc>
            <type name="Instance" c:type="GtkSessionLockInstance*"/>
          </instance-parameter>
        </parameters>
      </method>
      <glib:signal name="failed" when="first">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="51">The ::failed signal is fired when the lock could not be acquired.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
      </glib:signal>
      <glib:signal name="locked" when="first">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="45">The ::locked signal is fired when the screen is successfully locked.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
      </glib:signal>
      <glib:signal name="unlocked" when="first">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="57">The ::unlocked signal is fired when the session is unlocked, which may have been caused by a call to
gtk_session_lock_instance_unlock() or by the compositor.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
      </glib:signal>
    </class>
    <record name="InstanceClass"
            c:type="GtkSessionLockInstanceClass"
            glib:is-gtype-struct-for="Instance">
      <source-position filename="include/gtk4-session-lock.h" line="43"/>
      <field name="parent_class">
        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
      </field>
    </record>
    <docsection name="gtk4-session-lock">
      <doc xml:space="preserve"
           filename="include/gtk4-session-lock.h"
           line="6">[Session Lock](https://wayland.app/protocols/ext-session-lock-v1)
is a Wayland protocol for lock screens. Use it to lock the compositor
and display the lock screen. This library and the underlying Wayland
protocol do not handle authentication.

# Note on popups
Popups (such as menus and tooltips) do not currently display while the screen is locked. Please use alternatives,
such as GtkPopover (which is backed by a subsurface instead of a popup).

# Note On Linking
If you link against libwayland you must link this library before libwayland. See
[linking.md](https://github.com/wmww/gtk4-layer-shell/blob/main/linking.md) for details.</doc>
    </docsection>
    <function name="is_supported" c:identifier="gtk_session_lock_is_supported">
      <doc xml:space="preserve"
           filename="include/gtk4-session-lock.h"
           line="27">May block for a Wayland roundtrip the first time it's called.</doc>
      <source-position filename="include/gtk4-session-lock.h" line="35"/>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="32">%TRUE if the platform is Wayland and Wayland compositor supports the
Session Lock protocol.</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
    </function>
  </namespace>
</repository>
