On Mon, 13 Aug 2007 12:23:04 -0500 "Paul Johnson" <[EMAIL PROTECTED]>
babbled:

> On 8/11/07, The Rasterman Carsten Haitzler <[EMAIL PROTECTED]> wrote:
> > On Mon, 6 Aug 2007 11:54:43 -0500 "Paul Johnson" <[EMAIL PROTECTED]>
> > babbled:
> >
> > > Greetings.
> > >
> > > I stop in and try out Enlightenment every year or so.  I always think
> > > happily of the E DR13.  It is the program that made me want to use
> > > Linux in the first place.  My favorite part was the pager--small
> > > old-fashioned televisions showing desktops, with spotlights that
> > > pointed at the active desktop.  There has never been another program
> > > that represented such originality.
> > >
> > > I'm wondering if there is a background manager in E now that will make
> > > it easier to use edje objects.  In the KDE desktop, there's a desktop
> >
> > in e17 wallpapers ARE edje objects. the desktop is a window (overlayed over
> > root) by e. you don't see the root window in e17. e17 itself controls your
> > desktop bg with an iron fist :) it's part of the wm and under the wm's
> > control. desktop "icons" are there now as part of the filemanager code in
> > e17. any module in e17 can extend the wm and as a result - can find where e
> > keeps its "desktop canvases" (look into the managers then the containers in
> > each mnager - and each container has zones). modules are just code and can
> > create any objects they like, from anywhere and do anything.
> >
> > > manager called kdesktop wallpaper and you can set it to run slideshows
> > > on collections of directories--it randomly shows jpg files at
> > > intervals you specify.    The last time I tried E, I could not find a
> > > brain-free way to do that, and had to write some code to talk to the E
> > > environment.  Even then, the small jpg files got turned into huge
> > > uncompressed edje files that filled up my home directory.
> >
> > edje files are compressed. they also STORE the image in the file so you
> > include a wallpaper -t he image itself gets inlined (there are various
> > compression schemes from RAW (no compression) to COMP (zlib - no loss in
> > quality) and LOSSY (jpeg compression - inlined into the .edj). the .edj is
> > stand-alone and independent - it does not require any files outside - not
> > the original wallpaper or anything. that's why its big - you can email
> > your .edj to a friend - and it will work. out of the box. nothing left to
> > do.
> 
> 
> When all is said and done, I think I'm trying to revise edje_cc to
> allow a USER command line option.   I have been reading your code in
> CVS and experimenting with things.
> 
> I felt pretty enthusiastic about your comment last month that E might
> work on a Nokia N800 tablet. I just got one of those and it is a bit
> ugly in the interface.
> 
> I want the extrenal random backgrounds  because I have about 12,000
> jpg background images sitting in a directory structure.  It is too
> tedious to go pointing and clicking through them with the wallpaper
> tool to create the edj files. I don't mind the risk of breaking an edj
> file by removing a wallpaper.  (It could be the E wallpaper config
> thing needs a way to throw away badly formatted edj files.) )
> 
> Here is the place where I am stuck.  It seems to me there is a
> mismatch between the edj files created by edje_cc and the ones created
> by the Wallpaper config tool.  To the best of my understanding, the
> Engrave file controls what edje_cc does, but these files are a bit
> tricky to write.  But I need to understand what will  work before I go
> too much further.  Here is the example config file--I created it from
> edje_decc and then edited.  I put in the full path to the image,
> otherwise edje_cc wouldn't work, and changed COMP to USER.  (Can't use
> edje_decc on edj files that have image as external reference--it
> fails).
> 
> 
> 
>  fonts {
> }
> spectra {
> }
> images {
>       image: "/home/pauljohn/Backgrounds/test_face.jpg" USER;
> }
> data {
> }
> styles {
> }
> collections {
>       group {
>               name: "e/desktop/background";
>               parts {
>                       part {
>                               name: "background_image";
>                               type: IMAGE;
>                               mouse_events: 0;
>                               description {
>                                       state: "default" 0.00;
>                                       visible: 1;
>                                       rel1 {
>                                               relative: 0.00 0.00;
>                                               offset: 0 0;
>                                       }
>                                       rel2 {
>                                               relative: 1.00 1.00;
>                                               offset: -1 -1;
>                                       }
>                                       image {
>                                               normal:
> "/home/pauljohn/Backgrounds/test_face.jpg"; }
>                                       fill {
>                                               type: SCALE;
>                                               size {
>                                                       relative: 0.00 0.00;
>                                                       offset: 1006 804;
>                                               }
>                                       }
>                               }
>                       }
>               }
>               programs {
>               }
>       }
> }
> 
> When I run the build.sh script, it does create the edj file and after
> re-starting E, it is recognized, the image is tiled, not max scaled.
> 
> Trying to figure out the correct format for the engrave config file, I
> have wandered to this part in the E17 source:
> 
> e17/apps/e/src/modules/conf_wallpaper/e_int_config_wallpaper_import.c
> 
> I'd like to use that as an example to add a -u USER command line
> option into edje_cc, or at least make a script that would generate the
> engrave config files and run a build script.
> 
> Here's what puzzles me.  The engrave config files written by
> e_int_config_wallpaper_import.c do not have the exact same structure
> as the files created by edje_decc.  Note, for example, in the engrave
> file above, there are settings under part that are not mentioned in
> e_int_config_wallpaper_import.c.  For example, look around line 368
> for the file output formats:
> 
>  case IMPORT_STRETCH:
>         fprintf(f,
>                 "images { image: \"%s\" %s; }\n"
>                 "collections {\n"
>                 "group { name: \"e/desktop/background\";\n"
>                 "max: %i %i;\n"
>                 "parts {\n"
>                 "part { name: \"bg\"; mouse_events: 0;\n"
>                 "description { state: \"default\" 0.0;\n"
>                 "image { normal: \"%s\"; }\n"
>                 "} } } } }\n"
>                 , fstrip, enc, w, h, fstrip);
>         break;
> 
> Defining terms:
> 
> fstrip is the filename of the image
> enc is USER
> w,h: info from imlib.
> 
> So what I need is to learn how use imlib to get the values of "max" so
> the image comes out scaled properly?
> 
> Well, this stuff is fun for me because I don't have to do it for a living.

ok  first engrave is not in the picture here. it's a library for loading
edj/edc files and parsing them - then re-compiling. e17 doesnt use engrave. ALL
you eed is an edc that is:

images { image: "/path/to/image.jpg" USER; }
collections {
group { name: "e/desktop/background";
max: 800 480;
parts {
part { name: "bg"; mouse_events: 0;
description { state: "default" 0.0;
image { normal: "/path/to/image.jpg"; }
} } } } }


the max: section is simply a hint the program can get for "max size" of an edj
- e17 uses it to know what the INTENDED size of the image might be (e uses the
size of the original) so when generating thumbnails for listing wallpapers they
are generated properly. all the default values of a .edc will make the image
stretch to fit (unless you change them - you can get it to do just about any
arrangement you can think of just by fiddling parameters/values). you can write
a shell script to generate a .edc per image in your wallpaper tree - run
edje_cc on it and dump in ~/.e/e/backgrounds/ - and voila. now e has a small
file that tells it how you want the wallpaper displayed (stretched, tiles,
scaled but retaining aspect etc. etc.).

> -- 
> Paul E. Johnson
> Professor, Political Science
> 1541 Lilac Lane, Room 504
> University of Kansas
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to