<?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="GObject" version="2.0"/>
  <include name="Gtk" version="3.0"/>
  <package name="unique-3.0"/>
  <c:include name="unique/unique.h"/>
  <namespace name="Unique"
             version="3.0"
             shared-library="libunique-3.0.so.0.0"
             c:identifier-prefixes="Unique"
             c:symbol-prefixes="unique">
    <class name="App"
           c:symbol-prefix="app"
           c:type="UniqueApp"
           parent="GObject.Object"
           glib:type-name="UniqueApp"
           glib:get-type="unique_app_get_type"
           glib:type-struct="AppClass">
      <doc xml:space="preserve">The base class for every single instance application. The #UniqueApp
structure contains only private data and should be manipulated only
with the provided functions.</doc>
      <constructor name="new" c:identifier="unique_app_new">
        <doc xml:space="preserve">Creates a new #UniqueApp instance for @name passing a start-up notification
id @startup_id.  The name must be a unique identifier for the application,
and it must be in form of a domain name, like
&lt;literal&gt;org.gnome.YourApplication&lt;/literal&gt;.

If @startup_id is %NULL the &lt;literal&gt;DESKTOP_STARTUP_ID&lt;/literal&gt;
environment variable will be check, and if that fails a "fake" startup
notification id will be created.

Once you have created a #UniqueApp instance, you should check if
any other instance is running, using unique_app_is_running().
If another instance is running you can send a command to it, using
the unique_app_send_message() function; after that, the second instance
should quit. If no other instance is running, the usual logic for
creating the application can follow.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the newly created #UniqueApp instance.</doc>
          <type name="App" c:type="UniqueApp*"/>
        </return-value>
        <parameters>
          <parameter name="name" transfer-ownership="none">
            <doc xml:space="preserve">the name of the application's instance</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="startup_id"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">the startup notification id, or %NULL</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </constructor>
      <constructor name="new_with_commands"
                   c:identifier="unique_app_new_with_commands"
                   introspectable="0">
        <doc xml:space="preserve">Creates a new #UniqueApp instance, with @name and @startup_id,
and registers a list of custom commands. See unique_app_new() and
unique_app_add_command().</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the newly created #UniqueApp instance.</doc>
          <type name="App" c:type="UniqueApp*"/>
        </return-value>
        <parameters>
          <parameter name="name" transfer-ownership="none">
            <doc xml:space="preserve">the name of the application</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="startup_id"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">startup notification id, or %NULL</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="first_command_name" transfer-ownership="none">
            <doc xml:space="preserve">first custom command</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="..." transfer-ownership="none">
            <doc xml:space="preserve">%NULL terminated list of command names and command ids</doc>
            <varargs/>
          </parameter>
        </parameters>
      </constructor>
      <virtual-method name="message_received">
        <return-value transfer-ownership="none">
          <type name="Response" c:type="UniqueResponse"/>
        </return-value>
        <parameters>
          <instance-parameter name="app" transfer-ownership="none">
            <type name="App" c:type="UniqueApp*"/>
          </instance-parameter>
          <parameter name="command" transfer-ownership="none">
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="message_data" transfer-ownership="none">
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </parameter>
          <parameter name="time_" transfer-ownership="none">
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </virtual-method>
      <method name="add_command" c:identifier="unique_app_add_command">
        <doc xml:space="preserve">Adds @command_name as a custom command that can be used by @app. You
must call unique_app_add_command() before unique_app_send_message() in
order to use the newly added command.

The command name is used internally: you need to use the command's logical
id in unique_app_send_message() and inside the UniqueApp::message-received
signal.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="app" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueApp</doc>
            <type name="App" c:type="UniqueApp*"/>
          </instance-parameter>
          <parameter name="command_name" transfer-ownership="none">
            <doc xml:space="preserve">command name</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="command_id" transfer-ownership="none">
            <doc xml:space="preserve">command logical id</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
        </parameters>
      </method>
      <method name="is_running" c:identifier="unique_app_is_running">
        <doc xml:space="preserve">Checks whether another instance of @app is running.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if there already is an instance running</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="app" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueApp</doc>
            <type name="App" c:type="UniqueApp*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="send_message" c:identifier="unique_app_send_message">
        <doc xml:space="preserve">Sends @command to a running instance of @app. If you need to pass data
to the instance, you should create a #UniqueMessageData object using
unique_message_data_new() and then fill it with the data you intend to
pass.

The running application will receive a UniqueApp::message-received signal
and will call the various signal handlers attach to it. If any handler
returns a #UniqueResponse different than %UNIQUE_RESPONSE_OK, the emission
will stop.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">The #UniqueResponse returned by the running instance</doc>
          <type name="Response" c:type="UniqueResponse"/>
        </return-value>
        <parameters>
          <instance-parameter name="app" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueApp</doc>
            <type name="App" c:type="UniqueApp*"/>
          </instance-parameter>
          <parameter name="command_id" transfer-ownership="none">
            <doc xml:space="preserve">command to send</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="message_data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">#UniqueMessageData, or %NULL</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </parameter>
        </parameters>
      </method>
      <method name="watch_window" c:identifier="unique_app_watch_window">
        <doc xml:space="preserve">Makes @app "watch" a window. Every watched window will receive
startup notification changes automatically.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="app" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueApp</doc>
            <type name="App" c:type="UniqueApp*"/>
          </instance-parameter>
          <parameter name="window" transfer-ownership="none">
            <doc xml:space="preserve">the #GtkWindow to watch</doc>
            <type name="Gtk.Window" c:type="GtkWindow*"/>
          </parameter>
        </parameters>
      </method>
      <property name="is-running" transfer-ownership="none">
        <doc xml:space="preserve">Whether another instance of the application is running.</doc>
        <type name="gboolean" c:type="gboolean"/>
      </property>
      <property name="name"
                writable="1"
                construct-only="1"
                transfer-ownership="none">
        <doc xml:space="preserve">The unique name of the application. It must be in form of
a domain-like string, like &lt;literal&gt;org.gnome.MyApplication&lt;/literal&gt;.</doc>
        <type name="utf8" c:type="gchar*"/>
      </property>
      <property name="screen"
                writable="1"
                construct="1"
                transfer-ownership="none">
        <doc xml:space="preserve">The #GdkScreen of the application.</doc>
        <type name="Gdk.Screen"/>
      </property>
      <property name="startup-id"
                writable="1"
                construct-only="1"
                transfer-ownership="none">
        <doc xml:space="preserve">The startup notification id, needed to complete the startup
notification sequence. If not set, a default id will be
automatically given.</doc>
        <type name="utf8" c:type="gchar*"/>
      </property>
      <field name="parent_instance" readable="0" private="1">
        <type name="GObject.Object" c:type="GObject"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="AppPrivate" c:type="UniqueAppPrivate*"/>
      </field>
      <glib:signal name="message-received"
                   when="last"
                   no-recurse="1"
                   no-hooks="1">
        <doc xml:space="preserve">The ::message-received signal is emitted each time a second instance
of #UniqueApp with the same name as @app is launched and sends a
message using unique_app_send_message(). The currently running instance
should check @command for the action to execute and @message_data for
eventual other parameters (see #UniqueMessageData).

The signal handler should return a #UniqueResponse value depending on
whether the command was successfully completed or not. If the
%UNIQUE_RESPONSE_PASSTHROUGH return value is used, the signal
emission chain will continue until another handler will return another
response code.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a #UniqueResponse</doc>
          <type name="Response"/>
        </return-value>
        <parameters>
          <parameter name="command" transfer-ownership="none">
            <doc xml:space="preserve">command received</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">message data</doc>
            <type name="MessageData"/>
          </parameter>
          <parameter name="time_" transfer-ownership="none">
            <doc xml:space="preserve">timestamp of the command</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </glib:signal>
    </class>
    <record name="AppClass"
            c:type="UniqueAppClass"
            glib:is-gtype-struct-for="App">
      <doc xml:space="preserve">Base class for every single instance application.</doc>
      <field name="parent_class" readable="0" private="1">
        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
      </field>
      <field name="message_received">
        <callback name="message_received">
          <return-value transfer-ownership="none">
            <type name="Response" c:type="UniqueResponse"/>
          </return-value>
          <parameters>
            <parameter name="app" transfer-ownership="none">
              <type name="App" c:type="UniqueApp*"/>
            </parameter>
            <parameter name="command" transfer-ownership="none">
              <type name="gint" c:type="gint"/>
            </parameter>
            <parameter name="message_data" transfer-ownership="none">
              <type name="MessageData" c:type="UniqueMessageData*"/>
            </parameter>
            <parameter name="time_" transfer-ownership="none">
              <type name="guint" c:type="guint"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="_unique_reserved1" introspectable="0">
        <callback name="_unique_reserved1">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved2" introspectable="0">
        <callback name="_unique_reserved2">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved3" introspectable="0">
        <callback name="_unique_reserved3">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved4" introspectable="0">
        <callback name="_unique_reserved4">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
    </record>
    <record name="AppPrivate" c:type="UniqueAppPrivate" disguised="1">
    </record>
    <class name="Backend"
           c:symbol-prefix="backend"
           c:type="UniqueBackend"
           parent="GObject.Object"
           abstract="1"
           glib:type-name="UniqueBackend"
           glib:get-type="unique_backend_get_type"
           glib:type-struct="BackendClass">
      <doc xml:space="preserve">The #UniqueBackend structure contains only private data and should only
be accessed using the provided functions.</doc>
      <function name="create" c:identifier="unique_backend_create">
        <doc xml:space="preserve">Creates a #UniqueBackend using the default backend defined at
compile time. You can override the default backend by setting the
&lt;literal&gt;UNIQUE_BACKEND&lt;/literal&gt; environment variable with the
name of the desired backend.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the newly created #UniqueBackend instance</doc>
          <type name="Backend" c:type="UniqueBackend*"/>
        </return-value>
      </function>
      <virtual-method name="request_name" invoker="request_name">
        <doc xml:space="preserve">Requests the name set using unique_backend_set_name() using @backend.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the name was assigned to us, %FALSE if there
  already is a registered name</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueBackend</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
        </parameters>
      </virtual-method>
      <virtual-method name="send_message" invoker="send_message">
        <doc xml:space="preserve">Sends @command_id, and optionally @message_data, to a running instance
using @backend.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a #UniqueResponse value sent by the running instance</doc>
          <type name="Response" c:type="UniqueResponse"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueBackend</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
          <parameter name="command_id" transfer-ownership="none">
            <doc xml:space="preserve">command to send</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">message to send, or %NULL</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </parameter>
          <parameter name="time_" transfer-ownership="none">
            <doc xml:space="preserve">time of the command emission, or 0 for the current time</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </virtual-method>
      <method name="get_name" c:identifier="unique_backend_get_name">
        <doc xml:space="preserve">FIXME</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">FIXME</doc>
          <type name="utf8" c:type="const gchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_screen" c:identifier="unique_backend_get_screen">
        <doc xml:space="preserve">FIXME</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">FIXME</doc>
          <type name="Gdk.Screen" c:type="GdkScreen*"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_startup_id"
              c:identifier="unique_backend_get_startup_id">
        <doc xml:space="preserve">FIXME</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">FIXME</doc>
          <type name="utf8" c:type="const gchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_workspace" c:identifier="unique_backend_get_workspace">
        <doc xml:space="preserve">Retrieves the current workspace.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a workspace number</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueBackend</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="request_name" c:identifier="unique_backend_request_name">
        <doc xml:space="preserve">Requests the name set using unique_backend_set_name() using @backend.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the name was assigned to us, %FALSE if there
  already is a registered name</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueBackend</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="send_message" c:identifier="unique_backend_send_message">
        <doc xml:space="preserve">Sends @command_id, and optionally @message_data, to a running instance
using @backend.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a #UniqueResponse value sent by the running instance</doc>
          <type name="Response" c:type="UniqueResponse"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueBackend</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
          <parameter name="command_id" transfer-ownership="none">
            <doc xml:space="preserve">command to send</doc>
            <type name="gint" c:type="gint"/>
          </parameter>
          <parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">message to send, or %NULL</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </parameter>
          <parameter name="time_" transfer-ownership="none">
            <doc xml:space="preserve">time of the command emission, or 0 for the current time</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_name" c:identifier="unique_backend_set_name">
        <doc xml:space="preserve">FIXME</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
          <parameter name="name" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_screen" c:identifier="unique_backend_set_screen">
        <doc xml:space="preserve">FIXME</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
          <parameter name="screen" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Gdk.Screen" c:type="GdkScreen*"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_startup_id"
              c:identifier="unique_backend_set_startup_id">
        <doc xml:space="preserve">FIXME</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="backend" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="Backend" c:type="UniqueBackend*"/>
          </instance-parameter>
          <parameter name="startup_id" transfer-ownership="none">
            <doc xml:space="preserve">FIXME</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <field name="parent_instance">
        <type name="GObject.Object" c:type="GObject"/>
      </field>
      <field name="parent" readable="0" private="1">
        <type name="App" c:type="UniqueApp*"/>
      </field>
      <field name="name" readable="0" private="1">
        <type name="utf8" c:type="gchar*"/>
      </field>
      <field name="startup_id" readable="0" private="1">
        <type name="utf8" c:type="gchar*"/>
      </field>
      <field name="screen" readable="0" private="1">
        <type name="Gdk.Screen" c:type="GdkScreen*"/>
      </field>
      <field name="workspace" readable="0" private="1">
        <type name="guint" c:type="guint"/>
      </field>
    </class>
    <record name="BackendClass"
            c:type="UniqueBackendClass"
            glib:is-gtype-struct-for="Backend">
      <doc xml:space="preserve">The class that should be implemented by every backend for #UniqueApp.</doc>
      <field name="parent_instance" readable="0" private="1">
        <type name="GObject.ObjectClass" c:type="GObjectClass"/>
      </field>
      <field name="request_name">
        <callback name="request_name">
          <return-value transfer-ownership="none">
            <doc xml:space="preserve">%TRUE if the name was assigned to us, %FALSE if there
  already is a registered name</doc>
            <type name="gboolean" c:type="gboolean"/>
          </return-value>
          <parameters>
            <parameter name="backend" transfer-ownership="none">
              <doc xml:space="preserve">a #UniqueBackend</doc>
              <type name="Backend" c:type="UniqueBackend*"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="send_message">
        <callback name="send_message">
          <return-value transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueResponse value sent by the running instance</doc>
            <type name="Response" c:type="UniqueResponse"/>
          </return-value>
          <parameters>
            <parameter name="backend" transfer-ownership="none">
              <doc xml:space="preserve">a #UniqueBackend</doc>
              <type name="Backend" c:type="UniqueBackend*"/>
            </parameter>
            <parameter name="command_id" transfer-ownership="none">
              <doc xml:space="preserve">command to send</doc>
              <type name="gint" c:type="gint"/>
            </parameter>
            <parameter name="message_data" transfer-ownership="none">
              <doc xml:space="preserve">message to send, or %NULL</doc>
              <type name="MessageData" c:type="UniqueMessageData*"/>
            </parameter>
            <parameter name="time_" transfer-ownership="none">
              <doc xml:space="preserve">time of the command emission, or 0 for the current time</doc>
              <type name="guint" c:type="guint"/>
            </parameter>
          </parameters>
        </callback>
      </field>
      <field name="_unique_reserved1" introspectable="0">
        <callback name="_unique_reserved1">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved2" introspectable="0">
        <callback name="_unique_reserved2">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved3" introspectable="0">
        <callback name="_unique_reserved3">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved4" introspectable="0">
        <callback name="_unique_reserved4">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved5" introspectable="0">
        <callback name="_unique_reserved5">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
      <field name="_unique_reserved6" introspectable="0">
        <callback name="_unique_reserved6">
          <return-value transfer-ownership="none">
            <type name="none" c:type="void"/>
          </return-value>
        </callback>
      </field>
    </record>
    <enumeration name="Command"
                 glib:type-name="UniqueCommand"
                 glib:get-type="unique_command_get_type"
                 c:type="UniqueCommand">
      <doc xml:space="preserve">Command to send to a currently active instance. User defined commands
should be positive integers, and should be added using the
unique_app_add_command() function after creating a #UniqueApp instance</doc>
      <member name="invalid"
              value="0"
              c:identifier="UNIQUE_INVALID"
              glib:nick="invalid">
        <doc xml:space="preserve">used internally</doc>
      </member>
      <member name="activate"
              value="-1"
              c:identifier="UNIQUE_ACTIVATE"
              glib:nick="activate">
        <doc xml:space="preserve">request to activate a currently active instance; this
  usually means calling gtk_window_present() on the application window.</doc>
      </member>
      <member name="new" value="-2" c:identifier="UNIQUE_NEW" glib:nick="new">
        <doc xml:space="preserve">request to create a new file.</doc>
      </member>
      <member name="open"
              value="-3"
              c:identifier="UNIQUE_OPEN"
              glib:nick="open">
        <doc xml:space="preserve">request to open a file.</doc>
      </member>
      <member name="close"
              value="-4"
              c:identifier="UNIQUE_CLOSE"
              glib:nick="close">
        <doc xml:space="preserve">requests to close the currently running instance.</doc>
      </member>
    </enumeration>
    <record name="MessageData"
            c:type="UniqueMessageData"
            glib:type-name="UniqueMessageData"
            glib:get-type="unique_message_data_get_type"
            c:symbol-prefix="message_data">
      <doc xml:space="preserve">#UniqueMessageData contains the data passed between instances of
a #UniqueApp. The #UniqueMessageData structure received inside
the signal handlers for UniqueApp::message-received is guaranteed
to contain the #GdkScreen, the workspace and the startup notification
id of the instance sending the message.</doc>
      <constructor name="new" c:identifier="unique_message_data_new">
        <doc xml:space="preserve">Creates a new #UniqueMessageData structure. This structure holds the
message data passed between running instances with
unique_app_send_message().</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">the newly created #UniqueMessageData</doc>
          <type name="MessageData" c:type="UniqueMessageData*"/>
        </return-value>
      </constructor>
      <method name="copy" c:identifier="unique_message_data_copy">
        <doc xml:space="preserve">Copies @message_data.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a copy of the passed #UniqueMessageData</doc>
          <type name="MessageData" c:type="UniqueMessageData*"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="free" c:identifier="unique_message_data_free">
        <doc xml:space="preserve">Frees all the resources allocated by @message_data.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get"
              c:identifier="unique_message_data_get"
              version="1.0.2">
        <doc xml:space="preserve">Retrieves the raw contents of @message_data set using
unique_messaget_data_set().</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the contents of the message data or %NULL. The
  returned string is owned by the #UniqueMessageData and should
  never be modified or freed</doc>
          <type name="guint8" c:type="const guchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
          <parameter name="length"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full">
            <doc xml:space="preserve">return location for the length of the contents</doc>
            <type name="gsize" c:type="gsize*"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_filename"
              c:identifier="unique_message_data_get_filename"
              version="1.0.2">
        <doc xml:space="preserve">Retrieves the filename set with unique_message_data_set_filename().</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a newly allocated string containing the
  filename. Use g_free() to free the resources used by the returned
  value.</doc>
          <type name="utf8" c:type="gchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_screen" c:identifier="unique_message_data_get_screen">
        <doc xml:space="preserve">Returns a pointer to the screen from where the message came. You
can use gtk_window_set_screen() to move windows or dialogs to the
right screen. This field is always set by the Unique library.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a #GdkScreen</doc>
          <type name="Gdk.Screen" c:type="GdkScreen*"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_startup_id"
              c:identifier="unique_message_data_get_startup_id">
        <doc xml:space="preserve">Retrieves the startup notification id set inside @message_data. This
field is always set by the Unique library.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the startup notification id. The returned string is
  owned by the #UniqueMessageData structure and should not be
  modified or freed</doc>
          <type name="utf8" c:type="const gchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_text" c:identifier="unique_message_data_get_text">
        <doc xml:space="preserve">Retrieves the text set using unique_message_data_set_text().</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a newly-allocated string.</doc>
          <type name="utf8" c:type="gchar*"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_uris" c:identifier="unique_message_data_get_uris">
        <doc xml:space="preserve">Retrieves a %NULL-terminated string vector containing the URIs set with
unique_message_data_set_uris().</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a newly-allocated,
  %NULL-terminated list of URIs. Use g_strfreev() to free it.</doc>
          <array c:type="gchar**">
            <type name="utf8"/>
          </array>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="get_workspace"
              c:identifier="unique_message_data_get_workspace">
        <doc xml:space="preserve">Retrieves the workspace number from where the message came. This
field is always set by the Unique library.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the workspace number</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="set" c:identifier="unique_message_data_set">
        <doc xml:space="preserve">Sets @data as the payload of @message_data. Any other data is removed
from the message data. If @data is %NULL, a @length of -1 will unset
the payload, while a @length of 0 will set the payload to an empty
string.

You can use unique_message_data_get() to retrieve the data.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
          <parameter name="data"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">binary blob to set, or %NULL</doc>
            <type name="guint8" c:type="const guchar*"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">length of @data</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_filename"
              c:identifier="unique_message_data_set_filename"
              version="1.0.2">
        <doc xml:space="preserve">Sets @filename as the contents of @message_data.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
          <parameter name="filename" transfer-ownership="none">
            <doc xml:space="preserve">a filename</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_text" c:identifier="unique_message_data_set_text">
        <doc xml:space="preserve">Sets @str as the plain text payload of @message_data, converting it
to UTF-8 if needed. If @length is -1, the length of the string will
be used. Use unique_message_data_get_text() to retrieve the text.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the text was successfully converted to UTF-8</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
          <parameter name="str" transfer-ownership="none">
            <doc xml:space="preserve">plain text to be set as payload</doc>
            <type name="utf8" c:type="const gchar*"/>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <doc xml:space="preserve">length of the text, or -1</doc>
            <type name="gssize" c:type="gssize"/>
          </parameter>
        </parameters>
      </method>
      <method name="set_uris" c:identifier="unique_message_data_set_uris">
        <doc xml:space="preserve">Converts @uris to a valid URI list and sets it as payload of
@message_data. You can use unique_message_data_get_uris() to
retrieve the list from a #UniqueMessageData.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the URIs were successfully converted</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="message_data" transfer-ownership="none">
            <doc xml:space="preserve">a #UniqueMessageData</doc>
            <type name="MessageData" c:type="UniqueMessageData*"/>
          </instance-parameter>
          <parameter name="uris" transfer-ownership="none">
            <doc xml:space="preserve">a list of URIs
  in a %NULL-terminated string vector</doc>
            <array c:type="gchar**">
              <type name="utf8"/>
            </array>
          </parameter>
        </parameters>
      </method>
    </record>
    <enumeration name="Response"
                 glib:type-name="UniqueResponse"
                 glib:get-type="unique_response_get_type"
                 c:type="UniqueResponse">
      <doc xml:space="preserve">Response that a currently active instance of the application should
return to the caller which sent a command.</doc>
      <member name="invalid"
              value="0"
              c:identifier="UNIQUE_RESPONSE_INVALID"
              glib:nick="invalid">
        <doc xml:space="preserve">Internal error code, should never be used.</doc>
      </member>
      <member name="ok"
              value="1"
              c:identifier="UNIQUE_RESPONSE_OK"
              glib:nick="ok">
        <doc xml:space="preserve">The command was successfully executed.</doc>
      </member>
      <member name="cancel"
              value="2"
              c:identifier="UNIQUE_RESPONSE_CANCEL"
              glib:nick="cancel">
        <doc xml:space="preserve">The command was cancelled by the user.</doc>
      </member>
      <member name="fail"
              value="3"
              c:identifier="UNIQUE_RESPONSE_FAIL"
              glib:nick="fail">
        <doc xml:space="preserve">The command failed due to a IPC failure.</doc>
      </member>
      <member name="passthrough"
              value="4"
              c:identifier="UNIQUE_RESPONSE_PASSTHROUGH"
              glib:nick="passthrough">
        <doc xml:space="preserve">The command was not handled</doc>
      </member>
    </enumeration>
  </namespace>
</repository>
