Example #1
0
    def display(self, arg, type=TYPE_STRING, line=0):
        """ Display a string/bargraph/percentage using information from init()

        arg: a string or integer from 1-100, depending on the type
        -- defaults --
        type(TYPE_STRING): one of TYPE_STRING, TYPE_PERCENT, or TYPE_SLIDER
        line(0): the line to display text on

        The underlying library currently doesn't zero out previous lines that
        aren't being used, so if you wish to display something on, say, line 1,
        make sure you simultaneously display "" on line 0.
        """

        if line >= self.get_number_lines() or line < 0:
            raise ValueError, "specified line is out of range"

        if type==TYPE_STRING:
            _pyosd.display_string(self._osd, line, arg)

        elif type==TYPE_PERCENT:
            _pyosd.display_perc(self._osd, line, int(arg))

        elif type==TYPE_SLIDER:
            _pyosd.display_slider(self._osd, line, int(arg))

        else:
            raise ValueError, "type not in list of valid values!"
Example #2
0
 def display(self, val):
     _pyosd.display_perc(self._osd, 0, val)
Example #3
0
 def display(self, val):
     _pyosd.display_perc(self._osd, 0, val)