Commit graph

325 commits

Author SHA1 Message Date
Kristian Høgsberg
6e5fe71076 Do the shadow buffer to frame buffer copy through a function pointer.
This allows us to hook in pixel format specific functions for this,
but for now the patch just sets up the old code as the generic fallback.
2008-05-29 10:30:38 -04:00
Ray Strode
ddabea638d Only close frame buffer when closing window if it was open 2008-05-29 10:25:04 -04:00
Ray Strode
fee3d6d876 Reset graphics mode before drawing throbber
This ensures keyboard input stays in raw mode
2008-05-29 01:40:55 -04:00
Ray Strode
458b2c81e3 Add window source files to plugins that were lacking it
We may want to do another convenience lib for plugin
specific apis, or fold window into libply
2008-05-29 01:39:10 -04:00
Ray Strode
788359b9ec Change throbber to take window instead of framebuffer
We want the throbber to know about the window it's in,
so that it will be easier to move drawing code to a
draw handler model
2008-05-29 01:12:17 -04:00
Ray Strode
cae6ca26f3 Have window manage frame buffer instead of plugins
This is a first step toward making the window provide
an draw handler interface, so we can hide the details
of pause/unpause, resetting raw mode, and graphics mode,
etc from the individual plugins.
2008-05-29 00:46:02 -04:00
Ray Strode
93ac9f7b1c Set up event loop exit handler in plugins on show success
Previously we were setting up the exit handler at the top
of the show vtable function.  This meant having to remove
the exit handler if the show fails. It's much easier to
not set up the handler until after we know we're going to
succeed.
2008-05-29 00:16:08 -04:00
Ray Strode
dd3e2229d7 Drop line editing plugin vtable functions. Use window directly.
There was a sort useless layer of indirection between the
window object and splash plugins.  It ended up with
functions like:

void
on_backspace (ply_splash_plugin_t *plugin)
{
  plugin->interface->on_backspace (plugin);
}

Since the individual plugins are aware of the window object
anyway, they can register their own on_backspace et al handlers
without going through the ply_splash_plugin_t layer.
2008-05-29 00:02:22 -04:00
Ray Strode
d76fcfed45 Rename fedora-fade-in to fade-in
The plugin doesn't need to be distro specific
2008-05-28 23:58:46 -04:00
Ray Strode
575be7c81f Merge branch 'master' of git+ssh://halfline@git.freedesktop.org/git/plymouth 2008-05-28 22:12:12 -04:00
Ray Strode
0b0afb569b Rename all the plugins from <plugin-name>.c -> main.c
Just makes things more consistent.
2008-05-28 22:11:22 -04:00
Ray Strode
6bfa7fea35 Rename all the plugins from <plugin-name>.c -> main.c
Just makes things more consistent.
2008-05-28 22:07:20 -04:00
Ray Strode
49303d3d85 Update TODO
Add:
- add expose handler for plugins to draw from.
  We need to reset some state every frame of the animation,
  so better to hide that.
2008-05-28 18:33:07 -04:00
Ray Strode
038939692a Update spec file to be more current
Package the individual plugins as subpackages and
get the file lists up to date.  Also, drop
plymouth-update-initrd %post call since it's not
meant to be used in packages
2008-05-28 18:27:43 -04:00
Ray Strode
8f79086021 Add ctrl-u and ctrl-w to erase password line
Right now we do it in the cheesiest way possible, by
calling the backspace function over and over again on
behalf of the user.  It might make more sense to export
another window callback specifically for erase line. It
probably doesn't make sense to do that until we fix the
TODO item:

- have plugins hook into line editing through window
  directly, instead of via vtable functions

though.
2008-05-28 17:16:57 -04:00
Ray Strode
93ff1b7882 move backspace handling in window to its own function 2008-05-28 16:57:34 -04:00
Ray Strode
2dab183212 Rearrange two cases in a switch block to be clearer 2008-05-28 16:43:12 -04:00
Ray Strode
17f552c8ac Use more descriptive format for control code #defines
The previous format was just the ascii value directly
in octal.  I'm getting sick of typing 'man ascii' to look
it up though.  The new format is just, e.g.,

('\100' ^ 'U')

which not only means I can add new entries without looking
them up, but also has the added advantage that it looks
sort of similiar to, e.g., ^U, which is a common notation
for respresenting control characters.
2008-05-28 16:38:10 -04:00
Ray Strode
d469d3fd75 Don't crash if the user presses enter when a password isn't being asked for 2008-05-28 15:41:27 -04:00
Ray Strode
7e0dee1af1 switch over to spinfinity plugin by default 2008-05-28 15:18:53 -04:00
Ray Strode
4bdf9b1761 Make the throbber less choppy, by always showing every frame 2008-05-28 14:33:01 -04:00
Ray Strode
f288f86539 Make throbber continue to work after stop and start 2008-05-28 14:19:51 -04:00
Ray Strode
cad6ba8b75 Add the ability to toggle off graphics mode with ctrl-T
When debugging it's useful to be able to force text mode so
text messages become visible on screen.  ctrl-t and ctrl-v
combined make it a lot easier to see what's going on.
2008-05-28 13:50:49 -04:00
Ray Strode
7952221f06 If no frames could be loaded for the throbber, noop instead of crash 2008-05-28 11:53:40 -04:00
Ray Strode
0e3d2824d2 Move images in splash-plugins to subdirectories, so they don't clash 2008-05-28 11:53:04 -04:00
root
a85a1f35d9 When copying a directory, be sure the destination directory is in place first 2008-05-28 11:28:41 -04:00
Ray Strode
d569136d52 Exit plymouth early if going to single user mode 2008-05-28 10:52:38 -04:00
Ray Strode
e8d4a7d052 Read /proc/cmdline and enable debugging if plymouth:debug is there
Currently we toggle verbose messges if the user presses ctrl-v.
That's fine, but doesn't help to debug problems that happen before
a splash screen is shown.  This provides a mechanism to enable messages
earlier
2008-05-28 10:50:38 -04:00
Ray Strode
a93fd30a47 Random spacing clean ups 2008-05-28 09:25:28 -04:00
Ray Strode
943ff6268c Add a throbber to the splash screen and build spinfinity 2008-05-28 09:25:28 -04:00
Ray Strode
eddf693c9b Compute correct offset when copying from shadow buffer to frame buffer
When I added commit c12164c162
to copy an entire row at a time to the framebuffer, I miscalculated the
offset to copy from/to.  Their may be uninitialized data at the
beginning and end of the temporary row buffer, if only part of the row
is getting copied.  We need to make sure we jump passed that junk in
memory and copy just the part that got filled in.
2008-05-28 09:25:28 -04:00
Ray Strode
0e7e023560 Drop some unused declarations that are fall out from cut-n-paste 2008-05-28 09:25:27 -04:00
Ray Strode
f926647d98 Add new array type to make managing arrays easier
This is just a thin wrapper around the buffer object,
that keeps the data in terms of "elements" instead of
bytes, and always null terminates the result.
2008-05-28 09:25:27 -04:00
Ray Strode
1a66267ef5 Add new ply_buffer_steal_bytes method
This function disowns the bytes in the buffer and returns
them to the caller. It's useful for freeing the buffer, but
keeping the bytes around without doing a copy.
2008-05-28 09:25:27 -04:00
Ray Strode
73c9fc687f Add frames for spinfinity throbber 2008-05-28 09:25:27 -04:00
Kristian Høgsberg
793c2e5e57 Call ply_boot_splash_hide in on_quit handler in test case. 2008-05-27 22:22:57 -04:00
Ray Strode
5867cf994c Merge branch 'master' of git+ssh://halfline@git.freedesktop.org/git/plymouth 2008-05-24 01:44:55 -04:00
Ray Strode
49c5e26546 Copy and modify fedora-fade-in to new spinfinity plugin
The idea is to make a plugin that matches mockups done by
Mike Langlie.  The mockups feature a throbber that spins
in the shape of an infinity sign.  This is just a placeholder.
Most of the mockup isn't implemented yet.
2008-05-24 01:39:27 -04:00
Kristian Høgsberg
4928a01f26 Fix same bug in ply_frame_buffer_area_intersect(). 2008-05-23 21:48:05 -04:00
Kristian Høgsberg
7af2250014 Factor out area union code from ply_frame_buffer_add_area_to_flush_area. 2008-05-23 21:48:05 -04:00
Kristian Høgsberg
929f15c742 Fix bug in area union code.
ply_frame_buffer_add_area_to_flush_area() computes the wrong area
when the new area right of the current area but is wider than the
old area.

The easiest way to get rectangle intersection right is to just do
it on absolute coordinates and then convert back to width and height
afterwards.
2008-05-23 21:47:57 -04:00
Kristian Høgsberg
8c69be0c4e Pick plymouth from bindir and plymouthd from libexec in install script. 2008-05-23 19:14:10 -04:00
Ray Strode
548fab32e3 Update TODO
Add:
- Add limited text support
- Make --ask-for-password take a prompt message
- consider making details plugin have stdin hooked
  up to the pty instead of tty so input works
- consider making details plugin go back to pretty
  plugin if user presses escape
2008-05-23 15:39:47 -04:00
Ray Strode
a4b92f435e Clear old contents before recompositing to prevent ad-hoc fade effect 2008-05-23 10:33:23 -04:00
Ray Strode
6a2fba76c1 Don't leak entry 2008-05-23 01:15:01 -04:00
Ray Strode
7e14cb9452 Move keyboard handling to window so we can do line editing
The logic for line editing is a little complicated, so it's
best not to duplicate it across all the plugins.  Now we
manage it all from the window.  The plugins now access the
various editing events via there vtable, but that's an
extra layer of indirection that doesn't matter given that
we pass the window to the plugins anyway.  We should drop
that and just have the plugins register for edit events
directly.
2008-05-23 01:00:28 -04:00
Ray Strode
d2b4a3ef73 Add new ply_buffer_remove_bytes_at_end
This function is like ply_buffer_remove_bytes, but it
truncates away the end of the buffer instead of shifting
the contents over the start of the buffer.
2008-05-22 17:02:56 -04:00
Ray Strode
21081183a2 On keyboard input pass size of character to handlers
This prevents each handler from having to run mbrlen on
its own.
2008-05-22 16:25:57 -04:00
Ray Strode
cc5d16775a rename window->buffer to window->keyboard_input_buffer
The new name is more obvious.
2008-05-22 16:17:49 -04:00
Ray Strode
72b06ac254 Don't show timestamp and pid in verbose mode
They haven't been useful recently and they add a lot of noise.
2008-05-22 15:58:25 -04:00