<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-caja-python-location-widget-provider">
  <refnamediv>
    <refname>Caja.LocationWidgetProvider</refname>
    <refpurpose>Caja.LocationWidgetProvider Reference</refpurpose>
  </refnamediv>

<!-- ******************************* -->
<!-- BEGIN OF SYNOPSIS -->
<!-- ******************************* -->

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>Caja.LocationWidgetProvider</classname></ooclass>

      <methodsynopsis language="python">
        <methodname><link linkend="method-caja-location-widget-provider--get-widget">get_widget</link></methodname>
        <methodparam><parameter role="keyword">uri</parameter></methodparam>
        <methodparam><parameter role="keyword">window</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>
  </refsect1>

<!-- ********************************** -->
<!-- BEGIN OF DESCRIPTION -->
<!-- ********************************** -->

  <refsect1 id="description-location-widget-provider">
    <title>Description</title>

      <para>
      If subclassed, Caja will request a widget to be displayed at the top of the directory listing.
      </para>

<example>
    <title>Caja.LocationWidgetProvider Example</title>
    <programlisting>
from gi.repository import Caja, GObject, Gtk

class ColumnExtension(GObject.GObject, Caja.LocationWidgetProvider):
    def __init__(self):
        pass
    
    def get_widget(self, uri, window):
        entry = Gtk.Entry()
        entry.set_text(uri)
        entry.show()
        return entry
    </programlisting>
</example>
        
  </refsect1>

<!-- ****************************** -->
<!-- BEGIN OF METHODS -->
<!-- ****************************** -->

  <refsect1>
        <title>Passive Methods</title>

        <refsect2 id="method-caja-location-widget-provider--get-widget">
          <title>Caja.LocationWidgetProvider.get_widget</title>

          <programlisting><methodsynopsis language="python">
            <methodname>get_widget</methodname>
            <methodparam><parameter role="keyword">uri</parameter></methodparam>
            <methodparam><parameter role="keyword">window</parameter></methodparam>
          </methodsynopsis></programlisting>

          <variablelist>
            <varlistentry>
	            <term><parameter role="keyword">uri</parameter>&nbsp;:</term>
	            <listitem><simpara>the current folder uri</simpara></listitem>
            </varlistentry>
            <varlistentry>
                <term><parameter role="keyword">window</parameter>&nbsp;:</term>
                <listitem><simpara>the current <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> instance</simpara></listitem>
            </varlistentry>
            <varlistentry>
              <term><emphasis>Returns</emphasis>&nbsp;:</term>
              <listitem><simpara>a <link linkend="class-gtk-widget"><classname>gtk.Widget</classname></link> object</simpara></listitem>
            </varlistentry>
          </variablelist>

          <para>
                This function is called by Caja when it wants a location widget from the extension.  
                It is called in the main thread before a directory listing is shown, so it should return quickly.
          </para>
        </refsect2>
    </refsect1>

</refentry>

