This file is indexed.

/usr/lib/python2.7/dist-packages/kiwi/interfaces.py is in python-kiwi 1.9.22-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
#
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2005-2006 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
# USA
#
# Author(s): Lorenzo Gil Sanchez <lgs@sicem.biz>
#            Johan Dahlin <jdahlin@async.com.br>
#

"""Interface specifications and utilities"""

from kiwi.component import Interface

class IProxyWidget(Interface):
    """
    IProxyWidget is a widget that can be attached to a proxy.

    Signals::
       content-changed: This must be emitted when the content changes

    Properties::
       data-type: string, data type of the model
       model-attribute: string, name of the attribute in the model
    """

    def read():
        """
        Reads the content of the widget and returns in an appropriate
        data type.
        ValueUnset is returned when the user has not modified the entry
        """
        pass

    def update(value):
        """
        Updates the content of the widget with a value
        """
        pass

class IValidatableProxyWidget(IProxyWidget):
    """
    IValidatableProxyWidget extends IProxyWidget with validation support

    Signals::
       validate: This emitted so each widget can provide it's own
         custom validation.
       validation-changed: This is emitted when the validation status
         changes, mainly used by the proxy.

    Properties::
       mandatory: bool, if the widget is mandatory
    """

    def is_valid():
        pass

    def validate(force=False):
        pass

class IEasyCombo(Interface):

    def prefill(itemdata, sort=False):
        """Fills the Combo with listitems corresponding to the itemdata
        provided.

        Parameters:
          - itemdata is a list of strings or tuples, each item corresponding
            to a listitem. The simple list format is as follows::

            >>> [ label0, label1, label2 ]

            If you require a data item to be specified for each item, use a
            2-item tuple for each element. The format is as follows::

            >>> [ ( label0, data0 ), (label1, data1), ... ]

          - Sort is a boolean that specifies if the list is to be sorted by
            label or not. By default it is not sorted
        """

    def append_item(label, data=None):
        """Adds a single item to the Combo.
        @param label: a string with the text to be added
        @param data: the data to be associated with that item
        """

    def clear():
        """Removes all items from the widget"""

    def select(data):
        """
        Select an item giving data which could be an object or text.
        @param data: data or text to select
        """

    def select_item_by_position(position):
        """
        Selects an item in the combo from a integer where 0
        represents the first item.
        @param position: an integer
        """

    def select_item_by_label(text):
        """
        Select item given text.
        @param text: text to select
        """

    def select_item_by_data(data):
        """
        Select item given data.
        @param data: object to select
        """

    def get_selected_label():
        """
        Gets the label of the currently selected item.
        @returns: the selected label.
        """

    def get_selected_data():
        """
        Gets the data of the the currently selected item.
        @returns: the selected data.
        """

    def get_selected():
        """
        Get  the text or item  of the currently selected item
        or None if nothing is selected.
        @returns: selected text or item or None.
        """

    def get_model_strings():
        pass

    def get_model_items():
        pass

class AbstractGladeAdaptor(Interface):
    """Abstract class that define the functionality an class that handle
    glade files should provide."""

    def get_widget(self, widget_name):
        """Return the widget in the glade file that has that name"""

    def get_widgets(self):
        """Return a tuple with all the widgets in the glade file"""

    def attach_slave(self, name, slave):
        """Attaches a slaveview to the view this adaptor belongs to,
        substituting the widget specified by name.
        The widget specified *must* be a eventbox; its child widget will be
        removed and substituted for the specified slaveview's toplevel widget
        """

    def signal_autoconnect(self, dic):
        """Connect the signals in the keys of dict with the objects in the
        values of dic
        """

class ISearchFilter(Interface):

    def get_state():
        """
        Gets the state.
        @rtype: L{QueryState}
        """