Commit graph

251 commits

Author SHA1 Message Date
Ray Strode
6547d48fde [x11] initialize head on query not map
Do it for the same reason we did it in the frame-buffer
plugin in the previous commit.  It's the "right" thing
to do and now that we map lazily, doing it the old way
is broken.
2009-10-12 19:40:08 -04:00
Ray Strode
5d631743d6 [frame-buffer] initialize head on query not map
That's the "right" thing to do and now that we
map lazily, doing it the old way is broken.
2009-10-09 17:38:17 -04:00
Ray Strode
0bb06a8afa [drm] Destroy console buffer object on error path
We were leaking the object if it couldn't be mapped.
2009-10-07 17:26:16 -04:00
Ray Strode
3228d0534d [drm] Destroy console buffer object when done with it 2009-10-06 19:07:41 -04:00
Ray Strode
3d53c471d7 [drm] don't close terminal
It belongs to the core daemon, not the plugin.
2009-10-06 15:30:50 -04:00
Ray Strode
3ca5e37324 [drm] Drop master on VT switches
This improves plymouth's interaction with X.
2009-10-06 10:50:42 -04:00
Ray Strode
7a87b2210b [text] Don't crash after password prompt
We were treating the passed in view to the
draw handler as if it was the plugin itself.
2009-10-05 17:37:48 -04:00
Charlie Brej
80389c14cb [script] Give sensible unique-ish strings for all objects.
All objects can now be transformed into strings which allows them to be used as
hash indexes. Some rules do still apply. If an object is lost (freed....)
another object may take on the name of the lost one. The object address is used
to create a string in the form "#(0x123abc45)". NULL has the string "#NULL".
So arr[NULL] is the same as arr["#NULL"], and similar for the objects.
2009-10-04 18:03:23 +01:00
Charlie Brej
6c4b2630f0 [script] Do not segfault if accessing array with no key
Things like "array[] = 7" would cause a crash.
This is now caught and warned about during the parse.
2009-10-04 17:56:38 +01:00
Charlie Brej
dcd543c17d [script] Allow inline array definitions
This can be used to initialise an array:
arr = [12, 43];	   // arr[0] = 12; arr[1] = 43;

Or create an empty object:
obj = [];
2009-10-04 17:46:59 +01:00
Charlie Brej
9ca46671bb [script] Add do-while loops
Format is:
    do {operations} while (condition);
or
    do operation; while (condition);

Like in C, the semicolon at the end is necessary.
2009-10-04 17:36:22 +01:00
Ray Strode
08466deaf8 [x11] Throttle plymouth to X server
Some drivers completely choke with the amount of data plymouth is
sending over the wire.  This makes sure that plymouth doesn't
keep assaulting the X server when it's already overworked by asking
the server to return back a pixel before continuing.
2009-10-04 10:45:38 -04:00
Ray Strode
9fba779c39 [x11] Tile windows initially 2009-10-04 10:45:38 -04:00
Ray Strode
478a2948ef [x11] Move windows when dragged
Since they don't have title bars now, we need to
provide and easy way for them to be moved around.
2009-10-04 10:45:37 -04:00
Ray Strode
eb8e93f383 [x11] Hide title bar
It's not useful.
2009-10-04 10:45:37 -04:00
Ray Strode
84421722c1 [x11] Ignore ply_console_set_mode calls
Since X is rendering to the console, we don't need
(or want) to move the console between KD_GRAPHICS
and KD_TEXT mode.
2009-10-04 10:45:37 -04:00
Ray Strode
5b0910dc5f [x11] Don't allow windows to be resized
We don't handle the display resizing, so disallow it.
2009-10-04 10:45:37 -04:00
Ray Strode
997f9fe9fe [x11] Draw to back pixmap instead of on exposes
It's a little more efficient.
2009-10-04 10:45:37 -04:00
Ray Strode
d83209248a [x11] Process events only as they come in
Previously, we were waking up an processing events
in a loop.  Now we only do it when there are events.
2009-10-04 10:45:37 -04:00
Charlie Brej
654c14e680 [renderer] Add start of X11 plugin
This renderer is useful for testing plymouth splash
plugins without leaving X. It simulates a multi-head
display by creating two X windows each representing
one monitor.
2009-10-04 10:45:36 -04:00
Ray Strode
a8676e2c08 [renderer] Move VT switching to renderer plugins
Since not all renderer plugins should switch VTs we
do it from the individual plugins now.
2009-10-04 10:45:36 -04:00
Ray Strode
a76c5bc4b7 [drm] Force raw mode on each draw cycle
This is just

602d997200

all over again.
2009-09-29 13:18:54 -04:00
Ray Strode
1b10da8890 [animation] Use default event loop 2009-09-28 17:55:34 -04:00
Ray Strode
0b763c61b4 [drm] Force fb backend if 1 head and ttm driver
Drivers backed by TTM memory manager don't support mapping the
kernel backed framebuffer console, so can't be used for doing
a smooth transition (unless you use /dev/fb).  In single head
configurations, there isn't a big advantage to using libdrm
anyway, so we bail for TTM drivers.
2009-09-28 17:55:34 -04:00
Ray Strode
fe6ee7723a [drm] Add initial support for nvidia cards 2009-09-28 17:55:34 -04:00
Ray Strode
70b9868a62 [drm] Add initial support for radeon cards 2009-09-28 17:55:34 -04:00
Ray Strode
f2048af97d [drm] Add initial support for intel cards 2009-09-28 17:55:34 -04:00
Ray Strode
920051bc55 [drm] Add start of a drm plugin
This commit adds most of the non-driver specific bits
necessary for backing a renderer plugin.

Subsequent commits will add the driver specific bits.
2009-09-28 17:55:19 -04:00
Ray Strode
4b64ff4e56 [two-step] Update to use new multihead interface 2009-09-28 11:23:39 -04:00
Ray Strode
1a516d3635 [throbgress] Update to use new multihead interface 2009-09-28 11:23:39 -04:00
Ray Strode
d0f225b93a [text] Update to use new multihead interface 2009-09-28 11:23:39 -04:00
Ray Strode
6e97f03437 [space-flares] Update to use new multihead interface 2009-09-28 11:23:39 -04:00
Ray Strode
5d0a49bc19 [script] Update to use new multihead interface 2009-09-28 11:23:38 -04:00
Ray Strode
b66fda6700 [fade-throbber] Update to use new multihead interface 2009-09-28 11:23:38 -04:00
Ray Strode
20b9f2e65b [details] Update to use new multihead interface 2009-09-28 11:23:38 -04:00
Ray Strode
d60e817609 [label] Use pixel display instead of window 2009-09-28 11:23:37 -04:00
Ray Strode
d47959e042 [renderer] Add start of frame-buffer plugin
Much of this code comes directly from ply-frame-buffer in libply,
but shoehorned to fit into the renderer plugin interface.

One improvement over the old code is it tracks VT changes, and
stops drawing when the wrong VT is active.
2009-09-28 11:23:37 -04:00
Ray Strode
846d609e5f [libplybootsplash] Add renderer class
In order to support multiple rendering backends, and multi-head
monitor layouts, I'm moving the actually rendering to render
plugins.

Examples of plugins could be frame-buffer, drm fb, and x11
(for debugging).

The renderer class is responsible for loading the appropriate rendering
backend, and providing an interface for the rendering backend to
advertise multiple displays.

Right now we only check for a frame-buffer plugin, although, it isn't
implemented yet.
2009-09-28 11:23:36 -04:00
Charlie Brej
e564655e13 [script] Add inheritance to the language
The inheritance works primarily on objects and functions.
Object example:
 A.v1 = 1;
 A.v2 = 2;
 B.v2 = 7;
 B.v3 = 3;
 C = A | B;

C is now equal to A with B as a base (C.v1 = 1, C.v2 = 2, C.v3 = 3).
A and B remain unchanged.

Function example:
 fib = fun (a) if (a < 2) 1; else fail;
     | fun (a) if (fibcache[a]) fibcache[a] ; else fail;
     | fun (a) fib (a - 1) + fib (a - 2); ;

Fail means a function is aborted and a more base function is attempted.
2009-09-09 21:17:08 +01:00
Charlie Brej
771cf20a49 [script] Create new objects when incrementing/decrementing
It is dangerous to directly edit a number as it may be referenced from multiple
places.
2009-09-09 21:17:08 +01:00
Charlie Brej
bdc31288c2 [script] Make "this" (the current object) a part of the status
This is now also looked up when evaluating vars. Vars are looked for in the
local context, then within this (current object) and finally within the
global context;
2009-09-09 21:17:08 +01:00
Charlie Brej
033c638610 [script] Correct some header files
Missing includes and incorrect recursion protection names
2009-09-09 21:17:07 +01:00
Charlie Brej
bdfbdf65b9 [script] Reference actual object and do not create an indirect reference 2009-09-09 21:17:07 +01:00
Charlie Brej
2a6b3da179 [script] Free the scan only after adding the last debug symbol
Was causing valgrind errors of access to freed locations as the scan name was
freed.
2009-09-09 21:17:07 +01:00
Charlie Brej
ff2654546d [script] Clean up as_numer and as_bool functions
As_bool now returns false for 0.0 and NAN. It uses the fpclassify which should
be a clean way of testing for zero. The as_number function simplifies a switch
to an if.
2009-09-03 21:10:56 +01:00
Charlie Brej
6934a8422e [script] Add script support for suspend and resume splash modes 2009-09-03 17:00:17 +01:00
Charlie Brej
74f4711e77 [script] Add PlymouthGetMode to get boot/shutdown mode
PlymouthGetMode replies the mode as a string of "boot" or "shutdown".
2009-09-03 16:25:01 +01:00
Charlie Brej
7ab622fb40 [script] Set "this" in functions called through an object
When functins are called as an element of an object (e.g. obj.func(par) ), the
object is passed into the function execution as "this" in the local context.
2009-09-02 21:21:05 +01:00
Charlie Brej
082d520605 [script] Use access functions when accessing variables
Rather than directly accessing hash tables when accessing variables, use the
abstraction functions. Adds a peek function which does not create a new object
is one has not been defined already.
2009-09-01 21:19:51 +01:00
Charlie Brej
a0989cf97c [script] Move function definitions from operations to expressions
This removes some of the duplication due to the two methods of creating
functions. Now function definitions like:

fun name (foo) {bar}

are treated as

name = fun (foo) {bar};

No script code needs to change as both are still valid.
2009-09-01 20:32:05 +01:00