OK
Rating:
1.00
Thread Listing » AWN Applets
[Announcement] libawn-extras
#18911 by moonbeam (1.0000) posted on 9:41am Tuesday, January 08th, 2008
( no avatar )
As some have noticed there has been a libawn-extras library sitting in my branch for the last few weeks. It's basically a collection of useful utility functions though there is nothing to keep it from acquiring more focused elements.
[Q]



As of today libawn-extras has acquired python bindings courtesy of malept.
[Q]



The purpose of this library is to provided awn-extra devs a place to put commonly used code without as high of a hurdle to cross as there is for libawn.
[Q]



I encourage anyone who is interested to check it out. It is only in my branch at the moment but it will be moving in trunk at some point in the relatively near future.
[Q]



C:
[Q]



-urls.
char* urlencode(const char *source, char *dest, unsigned max);
char *urldecode(char *source, char *dest);
[Q]



-convert a cairo surface to a pixbuf.
GdkPixbuf * surface_2_pixbuf( GdkPixbuf * pixbuf, cairo_surface_t * surface);
GdkPixbuf * get_pixbuf_from_surface(cairo_surface_t * surface);
[Q]



-some colour conversion stuff.
gchar * awncolor_to_string(AwnColor * colour);
AwnColor gdkcolor_to_awncolor_with_alpha( GdkColor * gdk_color,double alpha);
AwnColor gdkcolor_to_awncolor( GdkColor * gdk_colour);
[Q]



-Canned functions to send a message to a notifiication daemon.
gboolean notify_message(gchar * summary, gchar * body,gchar * icon_str,glong timeout);
void notify_message_async(gchar * summary, gchar * body,gchar * icon_str,glong timeout);
[Q]





Python bindings:
[Q]



dict_to_rgba_string()
[Q]



gdkcolor_to_dict()
[Q]



notify_message()
[Q]



surface_to_pixbuf()
[Q]



--
http://moon-shiny.blogspot.com/

*Edited at 10:08am, 01/08/08
Score: 0 points
Any particular reason?
#18915 by malept (1.0000) posted on 11:04am Tuesday, January 08th, 2008
( no avatar )
Some clarifications:
[Q]



* "dict" is basically my version of AwnColor, which is basically a dictionary with the following keys defined: red, green, blue, alpha
[Q]



* rgba_string is what it sounds like: RRGGBBAA, where each section is a hex value between 00 and FF.
[Q]



* surface_to_pixbuf() takes a surface as a parameter, and returns a new gtk.gdk.Pixbuf object.
[Q]



* urlencode and urldecode are not in the python bindings because the functionality is already in the libraries included with Python. urlencode exists in the urllib module, and urldecode exists in the cgi module as "parse_qs", or "parse_qsl", depending on what you want as the return value:
[Q]



Score: 0 points
Any particular reason?
#18978 by pavpanchekha (1.0000) posted on 9:10am Sunday, January 13th, 2008
Any news on the python bindings? Just post a short list of modules and functions (I'm assuming its the same as the C ones?) Also, what branches are these improvements currently in?
[Q]

Score: 0 points
Any particular reason?
#18981 by moonbeam (1.0000) posted on 9:51am Sunday, January 13th, 2008
( no avatar )
pavpanchekha said:
Any news on the python bindings? Just post a short list of modules and functions (I'm assuming its the same as the C ones?) Also, what branches are these improvements currently in?
[Q]



The Python bindings are:
[Q]



dict_to_rgba_string()
[Q]



gdkcolor_to_dict()
[Q]



notify_message()
[Q]



surface_to_pixbuf()
[Q]



malept has short post above about he specifics of using them.
[Q]




Currently they're only in my branch. Once awn-testing gets a few more things merged in, then I'm hoping the see the new build system go into awn-extras-testing. Then the new code can get pushed into extras.
[Q]



Score: 0 points
Any particular reason?
#18982 by pavpanchekha (1.0000) posted on 10:24am Sunday, January 13th, 2008
So we must first import awn.extras?
[Q]



moonbeam said:

Currently they're only in my branch. Once awn-testing gets a few more things merged in, then I'm hoping the see the new build system go into awn-extras-testing. Then the new code can get pushed into extras.
[Q]



I'll wait till then. I really hate jumping branches.
[Q]



I'll be adding all of these to AWNLib as soon as these and DA get merged to AWN-Testing
[Q]

Score: 0 points
Any particular reason?
Thread Listing » AWN Applets » [Announcement] libawn-extras

Post A Reply:

Anonymous posting has been disabled. Please register first before attempting to post.
Powered by Metaforum ©2004-2010
Get your own Free AJAX Forum Messageboard by visiting the offical site.
.