Le Mercredi 07 Janvier 2004 03:28, Rob Shortt a écrit :
Hi,

> Cyril, there doesn't seem to be an obvious way to offset the message 
> horizontally.  For me the 'V' in Volume, and the left side of the bar 
> are right against the left side of my screen because of the overscan.  I 
> added handling of the OSD_OVERSCAN_Y but didn't see a way of handling 
> the X overscan.

Yes, it's implemented onto libxosd, but the binding doesn't yet support it :(
I think, I won't be too hard to add it... but..

from _pyosd.c

static PyObject *
pyosd_set_offset(PyObject *self, PyObject *args)
{
  int offset;
  PyObject *pyc_osd;
  xosd *osd;  

  if(!PyArg_ParseTuple(args, "Oi", &pyc_osd, &offset))
    return NULL;

  osd = (xosd *)PyCObject_AsVoidPtr(pyc_osd);

  if(!assert_osd(osd, "Run init() first!"))
    return NULL;

  xosd_set_vertical_offset(osd, offset);

  Py_INCREF(Py_None);
  return Py_None;
}

I'm not a c master, but I think It would be better to duplicate this to be 
able to change xosd_set_horizontal_offset too.

See http://repose.cx/pyosd/ for details.


I also saw that we can display more than two lines, but lines number must be 
initialized at the begining. So, to do this, must do something like that :

[...]
        self.osd = pyosd.osd(lines=X)

[...]
                # Second line is the progress bar
                self.osd.display(percent, type, line=1)
                # Blank others :
                for i in range(1, X - 1) :
                    self.osd.display('', line=i)

[...]

                if re.search('\n', self.message) :
                    # If message contains one or more \n, display X first 
lines.
                    s_msg = self.message.split('\n')
                    # must see if len(s_msg) is < or > to X here...
                    for i in range(0, X - 1) :
                        self.osd.display(s_msg[i], pyosd.TYPE_STRING, line=i)
                else :
                    # If not, display only the first line
                    self.osd.display(self.message, pyosd.TYPE_STRING, line=0)
                    # Blank others :
                    for i in range(1, X - 1) :
                        self.osd.display('', pyosd.TYPE_STRING, line=i)


can make patch for that...



> > I took a look at this, tried it out, and I think its cool.  It is 
> > definately worth it for those who use X.  
Thank you.

> > Can this be used to draw  
> > arbitrary graphics to the screen as well?  If so then we could 
> > essentially build a Freevo style popup and present it over other apps.
Basicaly, libxosd only displays _text_. 
It uses an artificial way to display percentages : [|||||------].

>> [...]

> > I haven't looked at the mixer patch.  Can somone else (someone who 
> > relies on mixer settings more than me) take a look at this one?

Ok.

> > Thanks again,
You're welcome.

Best Regards,
Cyril.
-- 
BOFH excuse #449:

greenpeace free'd the mallocs

B81AD6A6 -  638E A25A C5A4 C81A 4B98  CCC6 AFF7 FD7A B81A D6A6


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to