Commit graph

1119 commits

Author SHA1 Message Date
Ray Strode
6c6ecf5e2d [boot-splash] Update to use new multihead interface
The boot splash plugin now takes in a keyboard, text
displays, pixel displays, and the console.

I passes those along to the plugins, and listens for
key strokes to handle CTRL-L refresh and other keybindings.

So now it's assuming some of the role of ply-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
91abc08d3b [libplybootsplash] Add pixel-display class
This is the graphical output portion of the window class.  This
commit and the previous few commits lay the foundation needed
for dropping the window class and getting  multi-head rendering support.
2009-09-28 11:23:36 -04:00
Ray Strode
6479cc162c [libplybootsplash] Add text-display class
This is the text output portion of the window class.  With this commit
and a subsequent commit to split out the graphical output portion,
we should be able to drop the window class.

As mentioned earlier, this will give us the flexibility we
need for multi-head rendering.
2009-09-28 11:23:36 -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
Ray Strode
48d4f00052 [libplybootsplash] Add terminal class
This is the terminal settings portion of the window class.  With this
commit and subsequent commits to split out the higher level text output,
and graphical output portions, we should be able to drop window
in favor of the new display classes.
2009-09-28 11:23:36 -04:00
Ray Strode
f183218c73 [libplybootsplash] Add console class
This serves a few purposes:

1) To watch for VT changes
2) To make VT changes
3) To put the console in KD_GRAPHICS mode

The latter is handled by the window class right now, but I want to
drop the window class.
2009-09-28 11:23:36 -04:00
Ray Strode
a018e96d5f [libplybootsplash] Add keyboard class
This is the input portion of the window class.  With this commit
and subsequent commits to split out the output portions, we should
be able to drop the window class.

This will give us the flexibility we need for multi-head rendering.
2009-09-28 11:23:36 -04:00
Ray Strode
33d5702de6 [libplybootsplash] Add new pixel buffer class
Right now a lot of pixel manipulation functions are in the frame buffer
code.  This means it's hard to do these types of things without the
results showing up on the display.

Furthermore, we want to get away from one frame buffer anyway for
multihead support.  I can imagine each display in a multihead
configuration with its own pixel buffer, so splash plugins can draw to
the independently.

This commit adds the start of a pixel buffer class, which just copies
and pastes most of pixel-twiddling frame buffer code.  There are some
changes to deal with pixel buffers not always having a final alpha of
1.0, and some changes to provide a more flexible interface for masking
fill operations.

At some point it will probably gain copy-and-pastes of the resize an
rotate code from the image class as well, and provide a mechansim for
have subpixbufs where rowstride != width.
2009-09-28 11:23:35 -04:00
Ray Strode
b032e6d4f4 [libply] Add new region class
Sometimes it's necessary to deal with a disjoint
set of rectangles together.

One big example is when keeping track of which parts of
the screen have changed.

Another example would be for non-rectangular clip masks.

This commit adds a new region class to simplify the handling
of these types of cases.
2009-09-28 11:23:35 -04:00
Ray Strode
97178ba761 [libply] Add new rectangle type
Previously we were using ply_frame_buffer_area_t even
when not dealing with a frame buffer area.

This commit adds a new general purpose rectangle type
to replace ply_frame_buffer_area_t.  It has some
convenience functions for operating on rectangles as well.
2009-09-28 11:23:35 -04:00
Ray Strode
376742c50f [event-loop] Add ply_event_loop_get_default ()
The event loop is used all through out the code
for many different things.  In order to use it
in all those various bits of code, it's getting
passed around a lot.  This adds a lot of complexity
to the code.

The event loop should probably be a standard
resource that all parts of the code have free access
to in the same vein as the logging apis.

This commit adds a new function
ply_event_loop_get_default () and makes main use it
and pass it along.

Subsequent commits may clean up all the places that
take an event loop to just use this instead.
2009-09-28 11:23:35 -04:00
Ray Strode
d338e6becb [libply] Drop terminal class
It was a really lame small wrapper around creating pseudoterminals.
The wrapper didn't buy anything and the name ply-terminal would be
better used for managing tty settings, etc.
2009-09-28 11:23:35 -04:00
Ray Strode
a8f0572cb2 [configure] Bump to 0.7.2 2009-09-28 11:01:28 -04:00
Ray Strode
abdf987f66 [libplybootsplash] Order header list one-per line
It's a lot easier to add and remove entries from the Makefile
this way.
2009-09-28 09:08:30 -04:00
Ray Strode
441fce1e1f [libplybootsplash] Drop text-pulser
It hasn't been used since we dropped the pulser plugin
2009-09-28 09:08:23 -04:00
Ray Strode
c10c4af22f [entry] Fix up max bullet calculation
Before we were counting space that could only fit a partial bullet as room
for a whole bullet.  Now we look and see if there is enough extra space for
at least half a bullet (since the code will draw half a bullet in the case
of more bullets than can fit)
2009-09-28 09:08:17 -04:00
Ray Strode
841b77761b [main] rename state->console to state->kernel_console_tty
The name "console" is sort of ambiguous.  It could mean:

1) the keyboard and mouse together (also known as "seat")
2) the VT console
3) /dev/console
4) where /dev/console messages should go

In this case we mean 4, so we rename it to kernel_console_tty
for clarity.
2009-09-28 09:07:59 -04:00
Ray Strode
b85fb4cbb5 [main] Make some callback functions static 2009-09-20 12:19:11 -04:00
Ray Strode
e031f59b98 [main] Flip debug buffer conditional check
It was inverted so we were never creating a debug buffer
when plymouth:debug was put on the kernel command line.
2009-09-20 12:19:05 -04:00
Charlie Brej
21a9ba67a7 [progress] Stop progress at 25% if progress file is not loaded
In cases where, before the file system is mounted, there is a very long pause,
the progress would continue all the way to 100% assuming a 60 second boot time.

It now stops at 25% to signal that something is wrong and moves to crawl mode
(nudging forward very very slowly).
2009-09-10 20:22:11 +01:00
Frederic Crozat
7a3a91cf42 [daemon] fix detection of single on kernel cmdline 2009-09-10 19:06:24 +02:00
Frederic Crozat
50142cbffc [daemon] recognize s, S, -s as single for kernel cmdline 2009-09-10 16:58:37 +02:00
Ray Strode
3c2e1453d9 [populate-initrd] Don't require set_verbose function
If it's not around, define it, so we can use it without error
2009-09-10 09:55:18 -04:00
Charlie Brej
d8156feb0d [script] Example script rewritten to use the object system 2009-09-09 21:27:39 +01: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
Ray Strode
736822e2f2 [populate-initrd] Try to find inst more aggressively
We've been using the inst function provided by mkinitrd
to install plymouth and its dependencies into the initrd
root, but mkinitrd may not be installed in a dracut world,
and dracut has its own inst function.

This commit tries getting access to either of them, before
bailing. At some point we may want to bundle our own inst
function or get a new flag added to /usr/bin/install to do
what inst does.
2009-09-09 11:26:46 -04:00
Frederic Crozat
ba0c9f50f9 move switch_to_vt to ply-utils and rename it ply_switch_to_vt 2009-09-04 16:19:38 +02:00
Frederic Crozat
18e7adba61 Merge git://anongit.freedesktop.org/plymouth into splash-client-lib 2009-09-04 11:12:08 +02: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
Frederic Crozat
649db0de61 Merge branch 'master' into splash-client-lib 2009-09-03 19:35:30 +02:00
Frederic Crozat
9917545c9e Merge branch 'master' of git://anongit.freedesktop.org/plymouth 2009-09-03 19:35:01 +02:00
Charlie Brej
6934a8422e [script] Add script support for suspend and resume splash modes 2009-09-03 17:00:17 +01:00
Charlie Brej
7e547299a8 [boot-splash-plugin] Add suspend and resume boot splash modes 2009-09-03 16:57:31 +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
Frederic Crozat
57d93340e8 [libply] allow access to ply_event_loop_process_pending_events 2009-09-03 16:36:23 +02:00
Frederic Crozat
053ca5cf13 [libplybootsplash] move ply-boot-splash.[ch] to libplybootsplash 2009-09-03 16:30:44 +02:00
Frederic Crozat
391dffb5a6 Merge branch 'master' of git://anongit.freedesktop.org/plymouth 2009-09-03 16:09:17 +02:00
Charlie Brej
a65e402dcc [progress] Make the progress percentage settable
The progress percentage is now settable. By "settable" this doesn't mean the
value will change to the new value, the set value is only a hint as to where
the progress should be at this point in time. So it it overshot or under-run,
the hint is used to determine how much time is left, and how fast to move the
bar.
2009-09-03 13:45:41 +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
Frederic Crozat
267008cd21 [daemon] splash=verbose is equivalent to no splash (splashy compatibility) 2009-09-01 19:01:28 +02:00
Charlie Brej
4539abfba2 [script] Generate error messages on erroneous operations 2009-08-31 01:17:56 +01:00
Charlie Brej
e84fc98325 [script] Add a expressions and operators to the debug hashtables 2009-08-31 00:24:08 +01:00