Charlie Brej [Mon, 20 Jul 2009 13:12:53 +0000 (14:12 +0100)]
[script] Rename ply-scan to script-scan
The scan functions were originally aimed to be put in libply but then again I
can't think of anything that would use them so they are now renamed to left in
the plugin.
Charlie Brej [Mon, 20 Jul 2009 12:59:20 +0000 (13:59 +0100)]
[script] Tidy up the example script
Removes the spinfinity function as it used an ugly ../ path to get the images
and assumed that spinfinity was installed.
Removes some elements which were only inserted for testing.
Charlie Brej [Wed, 8 Jul 2009 23:23:23 +0000 (00:23 +0100)]
[script] Add support for variable number of arguments
Functions can pick up the full array of arguments passed in using the "_args"
local variable. This is a hash with arguments stored indexed from "0" to "N".
The "count" entry in the _args hash contains the number of vars passed in.
Charlie Brej [Thu, 2 Jul 2009 14:57:00 +0000 (15:57 +0100)]
[script] Add support for setting the window background color
Two functions set the color of either the bottom or the top of the screen. If
the two colors are equal a solid colour draw is used. The color is supplied by
three floats specitying red green and blue elements.
Charlie Brej [Tue, 30 Jun 2009 21:13:25 +0000 (22:13 +0100)]
[script] Implement script based fade_in implementation
The example script now can show a spinfinity or a fade_in behaviour. This is
just to see how easy it is to implement current plugins. In the case of fade_in
it is around 23 lines of script code
Charlie Brej [Tue, 30 Jun 2009 20:46:40 +0000 (21:46 +0100)]
[script] Add support for 'for'
Matches the use in C as "for (first, condition, last)" where first is executed
once, last is executed at the end of each iteration (even when continue is
executed) and condition is tested at the start of every cycle.
Charlie Brej [Tue, 30 Jun 2009 14:28:31 +0000 (15:28 +0100)]
[script] Deref the state to allow local and global to be reassigned
This should allow local and global to be assigned to a different vareable.
This is discouriged as it may cause asserts to fail, but may be useful to save
current state and continue the function at a later time.
Charlie Brej [Mon, 29 Jun 2009 13:41:23 +0000 (14:41 +0100)]
[script] Creating a string object with a NULL string now returns a NULL object
Strings in C are often set to NULL to signify that they have not been set. This
should be carried through to the script system rather than failing at the
conversion.
Charlie Brej [Thu, 25 Jun 2009 14:49:12 +0000 (15:49 +0100)]
[script] Allow scripts to attach themselves to plymouth plugin callbacks
The scripts can now attach themselves to the following callbacks: refresh,
boot_progress, root_mounted, keyboard_input, update_status, display_normal,
display_password and display_question.
Charlie Brej [Thu, 25 Jun 2009 10:25:12 +0000 (11:25 +0100)]
[script] Rationalize function calls and callbacks
Allows script functions to be executed without extracting the body of the
function and executing that. This makes implementing callbacks simpler and
enables passing of parameters.
Charlie Brej [Tue, 23 Jun 2009 15:50:36 +0000 (16:50 +0100)]
[script] Output error mesages when parsing files
The parses should now produce useful error messages of syntax errors in the
parsed files. This is not a 100% coverage but at least it now gives an error
with a line number rather than just an assert and a crash.
Charlie Brej [Tue, 23 Jun 2009 13:26:07 +0000 (14:26 +0100)]
[scan] Remember the line and column number of tokens
This is useful for scan and parse error reporting. The first column is zero but
this can be changed. Nedit and Emacs say zero, gedit says 1 and Vi says "0-1".
Charlie Brej [Mon, 22 Jun 2009 22:38:57 +0000 (23:38 +0100)]
[scan] Add block comments
Treats "/*" and "*/" as block comment markers. Block comments may be nested.
There is a bug where if a comment or a string is not terminated before the end
of a file, the scanner deadlocks. Need to add a way or reporting scanner
errors to the parser.
Charlie Brej [Mon, 22 Jun 2009 21:59:45 +0000 (22:59 +0100)]
[scan] Add parsing of line comments
These are currently hard coded to '//' and '#'. The code is there to return
them to the caller but currently they are thrown away.
Should add a skip_comments option and allow customisable markers.
Charlie Brej [Mon, 22 Jun 2009 20:30:09 +0000 (21:30 +0100)]
[scan] Remember white space between tokens
Tokens now contain the number of white space characters since the last token.
This is useful in situations where white space between symbols changes the
meaning (e.g. a++ vs. a+ +).
Charlie Brej [Mon, 22 Jun 2009 20:20:13 +0000 (21:20 +0100)]
[script] Add support for script image rotation
An image rotate operation creates a new image with the same dimensions but with
the contents rotated by an angle around the centre of the image. Also added a
script object to float function to allow this.
Charlie Brej [Mon, 22 Jun 2009 15:48:46 +0000 (16:48 +0100)]
[script] Add support for unary operations (!/+/-/++/--)
Allows execution of unary operations: Pre/postfix inc/decrement, logical
negation and unary plus/minus.
The writebacks of increment/decrements happen during the execution of the
expression, unlike C where they are executed after the line if executed. This
is the case simply because it is simpler to execute this way.
Charlie Brej [Thu, 18 Jun 2009 16:27:32 +0000 (17:27 +0100)]
[script] Add support for logical AND and OR
Allows the use of "&&" and "||". These are evaluated lazily and return the
evaluated sub-value which completed the operation rather than a bool. It allows
things like:
If cache_lookup returns a false value (NULL, or 0) then slow_lookup is executed
and its result is placed in reply. Otherwise the result from cache_lookup is
used.
Charlie Brej [Fri, 12 Jun 2009 17:04:25 +0000 (18:04 +0100)]
Initial scripted plugin support
This is an initial support for the scripted plugin. There are _many_ FIXMEs
and the whole code is reather unstable. The formatting is completely incorrect
and will be changed soon. There are scripts which are converted using a perl
to an C embeddable string.
Ray Strode [Fri, 12 Jun 2009 03:11:26 +0000 (23:11 -0400)]
[frame-buffer] Discard overlapping flush areas
One advantage of the previous bounding box approach to flushing
is overlapping flush areas wouldn't get flushed multiple times.
This commit tries to identify overlapping flush areas and eliminate
them. It's not perfect though.
A better approach might be to store a sorted tree of areas to be
flushed, and walk the tree when adding new flush areas to quickly find
overlapping areas. Then we'd split each area into two or more new areas
to avoid overlaps.
Ray Strode [Fri, 12 Jun 2009 02:50:07 +0000 (22:50 -0400)]
[frame-buffer] Track multiple flush areas
Previously we would always aggregate flush areas together even
if they were disjoint and far apart. That meant that if two
images on opposites sides of the screen were updated in one
frame, then the entire screen would get redrawn.
We now track flush areas in a list, instead of a bounding box.
Ray Strode [Fri, 12 Jun 2009 02:31:11 +0000 (22:31 -0400)]
[frame-buffer] Rework flush interface to take area
Before this commit it would always flush the area_to_flush
area. Now the interface allows flushing arbitrary areas. This
change paves the way for us to flush multiple disjoint areas
at one time.
Ray Strode [Mon, 4 May 2009 21:17:36 +0000 (17:17 -0400)]
[two-step] pull trigger right away if already idle
The trigger always needs to get pulled so that the
daemon knows that it can quit. Previously, we weren't
pulling it if two-step was already idle. This meant that
plymouthd never quit.
Charlie Brej [Wed, 13 May 2009 12:11:36 +0000 (13:11 +0100)]
[two-step] Add merge-fade as a progress animation transition type
The merge fade merges the two frames before drawing them to the framebuffer.
This makes a smooth transition between areas with partly transparent pixels or
areas in later frames becoming trasparent. This is set as the default on the
"glow" theme.
Ray Strode [Sat, 2 May 2009 04:36:28 +0000 (00:36 -0400)]
[two-step] Add fade to progress animation
One issue with the two-step plugin is that during the initial boot
progress the frames can be updated several seconds apart from each
other. This can look jumpy. We can now optionally fade between
the frames to make the experience be a little smoother.
Ray Strode [Sat, 2 May 2009 03:08:09 +0000 (23:08 -0400)]
[two-step] Pull background color from theme
The OLPC theme looks best when it's white, so we need to be able to
specify the background color from the theme. If the theme doesn't
specify a background color, we fall back to the old behavior of using
the distro default.
Ray Strode [Wed, 29 Apr 2009 18:25:02 +0000 (14:25 -0400)]
[splash] Split splashes into plugins and themes
Some of the plugins (well, the glow plugin) would be a lot more
versatile if they could be reused for multiple splashes with different
images.
This commit splits boot splashes into two parts, the plugin engine which
does all the dirty work, and the theme which says which plugin to use
and optionally how the plugin should work (using plugin specific
key/value pairs)
Ray Strode [Thu, 30 Apr 2009 03:23:12 +0000 (23:23 -0400)]
[libply] Add new keyfile class
This is a very lame keyfile parser. We'll be able to use it to load
some metadata about the plugins.
The idea is that plugins will shift to being engines that can be
leveraged from multiple splash themes. This way, for instance, the glow
plugin (which will be renamed) can be used to implement several
splashes.
Charlie Brej [Wed, 13 May 2009 09:31:44 +0000 (10:31 +0100)]
[daemon] Update tests to include compile correctly
Adds ply-list.c/h to all tests automake files which use ply-logger.c.
Adds PLYMOUTH_TIME_DIRECTORY/PLUGIN/THEME_PATH when ply-boot-splash.c is used.
Adds PLY_BOOT_SPLASH_MODE_BOOT_UP to the ply_boot_splash_show call.