1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-21 05:18:07 +01:00
Commit Graph

57 Commits

Author SHA1 Message Date
mfrasca
6d70762f4a 1595052: writing strings
I've added the class pywmgeneral.Drawable, offering an interface to pixmaps.

this way a wmdocklib application can have more than one drawable: not only
the main window, but as many pixmaps as are necessary.

the first use of pywmgeneral.Drawable is to hold the graphical
representation of the labels in an application.  Labels are also new to the
library and the intention is that they substitute the putString methods.

Application.addLabel() is used to create a new named label.  the label takes
care of the specified area, or of the area necessary to show the specified
string.

Application.setLabelText() is used to specify a new text for a label.  if
necessary, a new pixmap is created.  the area taken care of by a label
cannot be modified.

during the update cycle, labels that span an area which is too small for
their text are scrolled a pixel at a time.

pywmradio.py uses this functionality.
2007-05-21 12:32:16 +00:00
mfrasca
f45d2f9a58 1722440 missing 'mute' button
1722442  	  stale mplayer processes

removed the 'exit' button in favour of the 'mute' one.
no more killing of the player, but communication with it.
2007-05-21 09:23:16 +00:00
mfrasca
6971f5260e 1714519: object oriented library
example pywmphoto rewritten.

modified initializer of pixmap: you can give the name of the pixmap
containing the background/patterns, so you do not need reading it in
advance.
2007-05-19 20:42:33 +00:00
mfrasca
0b29f6b597 migliorie sul feedback:
se il player muore o viene ammazzato esternamente, il programma se ne accorge.
2007-05-18 17:58:40 +00:00
mfrasca
400bc8eeed migliorie sul feedback:
se il player è messo in pausa, la barra della cache lampeggia.
2007-05-18 09:20:26 +00:00
mfrasca
162f042f02 migliorie sul feedback:
livello della cache: blocco alto tre linee.
 la barra di contacting/buffering si sposta più lentamente.
 scelto un rosso meno scuro.

ancora sul livello della cache:
 corretto errore nella espressione regolare (leggeva il carico cpu invece della cache).
 aggiunto bordino a barra della cache.
 uso dell'indicazione della configurazione per la dimensione della cache.

aggiunto metodo per mettere lo stream in pausa.

lettura del file di configurazione in utf-8.
2007-05-18 05:43:06 +00:00
mfrasca
89b2fdd9ee migliorie minime sul feedback 2007-05-16 17:25:22 +00:00
mfrasca
4b16346067 aggiunto il file di configurazione per pywmradio (che poi è in comune con
pyradio, ma quella non è un'applicazione scritta con pywmdockapps)

modificato Application.update, ora ricalcola il livello di riempimento della
cache solo una volta ogni tre cicli (ogni 0.3 secondi), questo per abbassare
il carico di lavoro sulla cpu.
2007-05-16 14:30:33 +00:00
mfrasca
3cd1d20c66 1714519 - object oriented library
modified the regular expression, to easy the task of the matching it.
2007-05-16 11:33:22 +00:00
mfrasca
80f8aeb7da 1714519 - object oriented library
still on the second working version...
it gives a little more feedback about the running player.
2007-05-15 20:15:50 +00:00
mfrasca
1f09a177af 1714519 - object oriented library
second working version...
it gives a little more feedback about the running player.
2007-05-15 19:55:27 +00:00
mfrasca
5f5dfd16cf 1714519 - object oriented library
first working version...
it gives very little feedback about the running player.
2007-05-15 15:14:24 +00:00
mfrasca
b34c324414 1714519 - object oriented library
separated the library part from the application part.
added wmoo module.
added pywmoonop (object oriented form of the empty dock).
2007-05-15 07:31:09 +00:00
mfrasca
844eecc535 1714519 - object oriented library
added new example application, on the way to the object oriented library.

the idea is to develop this program within one single source, but clearly
separating the general from the specific.  so in this source I will have a
general 'Application' class which will contain no specific 'radio' code.
the radio code will make use of the general application class.

the program is not yet functional.
2007-05-07 19:14:54 +00:00
mfrasca
9dc7d952b4 1647673: program blanks out
added timeout for socket (hard coded to 4 seconds).
removed leading \n in usage string.
not modified anything else.
2007-01-31 12:15:12 +00:00
mfrasca
056bdadb6b 1642056: pywmwet.py
adding the file pywmwet.py to cvs.
also removing an unnecessary parameter in a call to wmdocklib.initPixmap.
2007-01-28 11:33:50 +00:00
mfrasca
620a8e229a adding pywmnop.py and renaming pywmPhoto.py to pywmphoto.py. 2007-01-17 17:02:51 +00:00
mfrasca
41a6ead68b removing unused code 2006-10-31 09:55:51 +00:00
mfrasca
8e926c53f1 adding a new program. it's a very simple clone of wmPhoto, with almost none
of its functionality.  all this program does is show a picture in the tile.
only useful to show how easy it is to use the wmdocklib library.
2006-10-27 11:52:22 +00:00
mfrasca
3c127f9849 1584740: colours messed up
modified the fonts: they start from background colour (None or Black) and go
to full intensity, which ought to be gray100 or white.

the initialization procedure will spread all colour differences between the
requested background and foreground proportionally to the intensity of the
gray char pixel.

most colour code clashes are resolved at initialization stage.  there are
only a few things you should not reuse, such as the space for transparency.
just try out the result and make use of the 'debug' parameter which will
cause the function to print the the generated xpm.
2006-10-26 08:41:00 +00:00
mfrasca
b8b56debee shifting the text one pixel to the right. needed when the leading digit is not a 1. 2006-10-25 06:52:07 +00:00
mfrasca
6b33e26ed2 removed setting the colour palette for symbols in the font: it happens
in the initialization of the pixmap.
2006-10-25 06:01:20 +00:00
mfrasca
8ad2c1dfa0 correzioni sparse riguardanti i font...
l'intenzione sarebbe di riservare i caratteri non alfanumerici ai colori dei font (invece che i soli [ $]).
invece i caratteri alfanumerici ai pattern utente.

magari me ne faccio bastare -diciamo- quattro, di caratteri non alfanumerici per i colori dei font...
tipo
  c None (trasparente)
. c grey quasi background
" c grey intermedio
* c grey quasi foreground
$ c foreground

e anzi, a seconda del foreground e del background, potrei sfumare corrispondentemente...
2006-10-24 21:01:33 +00:00
mfrasca
1c0177acb5 1580293: initialization of pixmask - drawing areas
modified the width of the two areas.
2006-10-22 18:57:33 +00:00
mfrasca
6c71547b58 1580293: initialization of pixmask - drawing areas
more cleaning up...
2006-10-21 07:44:45 +00:00
mfrasca
c89b35ff1e 1580293: initialization of pixmask - drawing areas
marginal corrections...
2006-10-20 20:39:01 +00:00
mfrasca
504b2419f8 1580293: initialization of pixmask - drawing areas
this again is a radical modification...  more or less as requested in pr.
2006-10-20 20:01:54 +00:00
mfrasca
5e7b3c5df4 not necessary: it has been implemented directly in python (pywmhdmon) 2006-10-19 17:37:16 +00:00
mfrasca
8dcf5f4742 1579871: offer antialiasing as option
as required
2006-10-18 17:45:01 +00:00
mfrasca
ad25a18c51 added "condensed" 5x8 font to the suite,
cleaned up the code of pywmdatetime.
2006-10-18 14:46:21 +00:00
mfrasca
92f172da49 1579522: antialiased fonts for digits
just a nice border around the top time string
2006-10-18 12:46:06 +00:00
mfrasca
0065f12b75 1579522: antialiased fonts for digits
I took one of the font definitions from a running wmCalClock and put it in
the 'background' pixelmask.  this works quite good.  the name of the
parameter is rather confusing, it's not a background actually but a
collection of templates...  but that's an other problem.
2006-10-18 09:31:52 +00:00
mfrasca
cf651f617d 1578113: trailing black in text line
a few simple corrections in the defaults and options reading code.
2006-10-16 14:01:30 +00:00
mfrasca
40e45c56ba 1578113: trailing black in text line
rewritten the _scrollAndDisplay method.
2006-10-16 13:12:13 +00:00
mfrasca
111d3f4ed9 modified computation of right hand side area size.
it is now 60% of available width.
right hand side text is now right aligned.
2006-10-16 11:45:45 +00:00
mfrasca
092c3a4def corrected a bug which prevents operation if no %q is found in configuration. 2006-10-16 08:21:50 +00:00
mfrasca
b8afcee3ae behaviour with different character font sizes... 2006-10-16 07:29:49 +00:00
mfrasca
f469f22b59 1577063: fonts are hard coded
added -F, --font option to some examples.
2006-10-15 12:49:19 +00:00
mfrasca
70f3fdf6a2 1577063: fonts are hard coded
cleaning up and preparing the field.
2006-10-14 20:55:00 +00:00
mfrasca
9d1bae6ae6 updated and (more or less) tested. 2006-10-14 20:28:47 +00:00
mfrasca
87b09d0229 1577060: colour choice at command line is lost
palette is now built using the options passed at command line.
2006-10-14 08:17:14 +00:00
mfrasca
c729720b01 1577060: colour choice at command line is lost
palette is now built using the options passed at command line.
2006-10-14 07:51:13 +00:00
mfrasca
0390c834a7 moved mouse region definition into object constructor. 2006-10-13 15:28:36 +00:00
mfrasca
7a34018886 updated the example with the latest library. - removed char_width/height. 2006-10-13 13:54:21 +00:00
mfrasca
84f7b15e81 updated the example with the latest library. 2006-10-13 13:52:15 +00:00
mfrasca
db4f53d257 1575762: initialization of pixmask
removed the definition of defaultRGBFiles from the examples: it is now
hosted in the library.

removed function parseColors from examples.  this is done during initPixmap.

added wmdocklib.defaultRGBFileList

removed wmdocklib.setColor (superseded by wmdocklib.initPixmap)

extended wmdocklib.initPixmap:
 basic 16 colour palette [basic_colours] from rgb.txt (not hard coded)
 alter_palette to (re)define an indexed colour in the xpm.
 bg/fg can be a single character or a number [0..15]
 ' ' as transparent colour.
 some debugging 'if 0:' code.

extended wmdocklib.getColorCode:
 it reads either the given rgb file or the first accessible file from
 defaultRGBFileList

corrected url in setup.py: it used to point to ibo!
2006-10-13 11:58:17 +00:00
mfrasca
651b44127d 1575762: of pixmask
hard coded 3 pixels margin.  it should actually be configurable, but better this than nothing.
2006-10-12 19:14:50 +00:00
mfrasca
70a5bc50ed 1575762: initialization of pixmask
made some mess about borders: the whole tile is now used up by the
application.  colour 0 seems to be reserved for transparency.
2006-10-12 18:27:08 +00:00
mfrasca
ed4b557ab0 1575762: initialization of pixmask
this is an important modification.  I hope it won't break too many programs
based on this library, or at least not in such a way that will make you
upset with me and my work...

well: the library offers now three charsets and a 16 colours palette.
but: you must use them.

there is no support yet for named colours.

the only working examples are pywmdatetime and pywmhdmon.
2006-10-12 17:29:17 +00:00
mfrasca
d26e4815fe 1293224 char font
recalculating the height of the lines.
2006-10-06 16:27:03 +00:00