<?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:doc="http://www.gtk.org/introspection/doc/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"/>
  <doc:format name="unknown"/>
  <namespace name="Gtk4SessionLock"
             version="1.0"
             shared-library="libgtk4-layer-shell.so.1.0"
             c:identifier-prefixes="GtkSessionLock"
             c:symbol-prefixes="gtk_session_lock">
    <class name="Instance"
           c:symbol-prefix="instance"
           c:type="GtkSessionLockInstance"
           version="1.1"
           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="39">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="48"/>
      <constructor name="new" c:identifier="gtk_session_lock_instance_new">
        <source-position filename="include/gtk4-session-lock.h" line="93"/>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve"
               filename="include/gtk4-session-lock.h"
               line="91">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="124">This must be called with a different unrealized 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 is not allowed (may result in a Wayland protocol error). The window will be unmapped and gtk_window_destroy()
called on it when the current lock ends.</doc>
        <source-position filename="include/gtk4-session-lock.h" line="135"/>
        <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="126">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="127">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="128">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="116">Returns if this instance currently holds a lock.</doc>
        <source-position filename="include/gtk4-session-lock.h" line="122"/>
        <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="118">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="95">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="106"/>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve"
               filename="include/gtk4-session-lock.h"
               line="104">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="97">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="108">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="114"/>
        <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="110">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="73">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="66">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="monitor" when="first" version="1.2">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="50">The ::monitor signal is fired once for each monitor that exists when a lock is started, and then whenever a new
monitor is detected during the lock. You generally want to call gtk_session_lock_instance_assign_window_to_monitor()
once in the handler for this signal with a newly created window and the given monitor.

This API does not directly tell you when a monitor is removed (GTK APIs can be used for that), however the window you
send to gtk_session_lock_instance_assign_window_to_monitor() will be automatically unmapped and dereferenced when its
monitor is removed or the screen is unlocked.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="monitor" transfer-ownership="none">
            <doc xml:space="preserve"
                 filename="include/gtk4-session-lock.h"
                 line="53">the #GdkMonitor that exists or was added</doc>
            <type name="Gdk.Monitor"/>
          </parameter>
        </parameters>
      </glib:signal>
      <glib:signal name="unlocked" when="first">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="80">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="48"/>
      <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="29">May block for a Wayland roundtrip the first time it's called.</doc>
      <source-position filename="include/gtk4-session-lock.h" line="37"/>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve"
             filename="include/gtk4-session-lock.h"
             line="34">%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>
