[PATCH 5/5] add a glow plugin

Ray Strode halfline at gmail.com
Wed Mar 4 13:06:54 PST 2009


Hi,

On Wed, Mar 4, 2009 at 3:22 PM, William Jon McCann
<william.jon.mccann at gmail.com> wrote:
> From: William Jon McCann <jmccann at redhat.com>
>
> This plugin will progress through a sequence of images until
> the progress reaches 90% complete.  At that point it will run
> an animation sequence.
Looks fine.  At some point we're going to grow enough plugins that
we're going to need to do something about it, but adding one more
doesn't hurt for now.


> diff --git a/configure.ac b/configure.ac
> index 63a4709..f5d4639 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -111,6 +111,8 @@ AM_CONDITIONAL(ADD_DEFAULT_PLUGIN_LINK,
>                   -o "$default_plugin_name" = "fade-in"    \
>                   -o "$default_plugin_name" = "pulser"     \
>                   -o "$default_plugin_name" = "text"       \
> +                  -o "$default_plugin_name" = "glow"       \
> +                  -o "$default_plugin_name" = "solar"      \
Ah thanks for catching that solar was missing.

[...]
> diff --git a/src/libplybootsplash/ply-throbber.c b/src/libplybootsplash/ply-throbber.c
> index a3bd2ea..e1bce90 100644
> --- a/src/libplybootsplash/ply-throbber.c
> +++ b/src/libplybootsplash/ply-throbber.c
> @@ -70,6 +70,7 @@ struct _ply_throbber
>   long x, y;
>   long width, height;
>   double start_time, previous_time, now;
> +  uint32_t is_stopped : 1;
>  };
>
>  ply_throbber_t *
> @@ -86,6 +87,7 @@ ply_throbber_new (const char *image_dir,
>   throbber->frames = ply_array_new ();
>   throbber->frames_prefix = strdup (frames_prefix);
>   throbber->image_dir = strdup (image_dir);
> +  throbber->is_stopped = true;
>   throbber->width = 0;
>   throbber->height = 0;
>   throbber->frame_area.width = 0;
> @@ -323,6 +325,7 @@ ply_throbber_start (ply_throbber_t         *throbber,
>   throbber->loop = loop;
>   throbber->window = window;
>   throbber->frame_buffer = ply_window_get_frame_buffer (window);;
> +  throbber->is_stopped = false;
>
>   throbber->x = x;
>   throbber->y = y;
> @@ -345,6 +348,7 @@ ply_throbber_stop_now (ply_throbber_t *throbber)
>
>   throbber->frame_buffer = NULL;
>   throbber->window = NULL;
> +  throbber->is_stopped = true;
>
>   if (throbber->loop != NULL)
>     {
> @@ -369,6 +373,12 @@ ply_throbber_stop (ply_throbber_t *throbber,
>   throbber->stop_trigger = stop_trigger;
>  }
>
> +bool
> +ply_throbber_is_stopped (ply_throbber_t *throbber)
> +{
> +  return throbber->is_stopped;
> +}
> +
>  long
>  ply_throbber_get_width (ply_throbber_t *throbber)
>  {
> diff --git a/src/libplybootsplash/ply-throbber.h b/src/libplybootsplash/ply-throbber.h
> index 83f6b43..647f409 100644
> --- a/src/libplybootsplash/ply-throbber.h
> +++ b/src/libplybootsplash/ply-throbber.h
> @@ -46,6 +46,7 @@ bool ply_throbber_start (ply_throbber_t         *throbber,
>                          long                y);
>  void ply_throbber_stop (ply_throbber_t *throbber,
>                         ply_trigger_t  *stop_trigger);
> +bool ply_throbber_is_stopped (ply_throbber_t *throbber);
>
>  long ply_throbber_get_width (ply_throbber_t *throbber);
>  long ply_throbber_get_height (ply_throbber_t *throbber);

Do you actually need these changes or is it just for continuity with
some of the other apis?

No real comments on the actual plugin.  Do whatever you want there,
it's your thing.

--Ray


More information about the plymouth mailing list