LwWallpaper

LwWallpaper — Interface for live wallpaper plugins

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── LwWallpaper

Prerequisites

LwWallpaper requires GObject.

Description

LwWallpaperInterface is the interface for live wallpaper plugins. A live wallpaper plugin is a plugin which provides an animated wallpaper like the galaxy or the nexus plugin.

Functions

lw_wallpaper_adjust_viewport ()

void
lw_wallpaper_adjust_viewport (LwWallpaper *self,
                              LwOutput *output);

Adjust the viewport to fit to this output. All following calls to lw_wallpaper_paint() will get this output as parameter. This is the right place to transform the model or projection matrix or to enable OpenGL features like blending. You should restore all changes this function makes within the lw_wallpaper_restore_viewport() function.

Parameters

self

A LwWallpaper

 

output

The new active LwOutput

 

lw_wallpaper_done_paint ()

void
lw_wallpaper_done_paint (LwWallpaper *self);

Clean up after all outputs are painted.

Parameters

self

A LwWallpaper

 

lw_wallpaper_init_plugin ()

void
lw_wallpaper_init_plugin (LwWallpaper *self);

Initialization of the plugin. Initialize all the variables of the plugin here that need the plugin's data dir path.

Parameters

self

A LwWallpaper

 

lw_wallpaper_paint ()

void
lw_wallpaper_paint (LwWallpaper *self,
                    LwOutput *output);

Paint the wallpaper for the given output.

Parameters

self

A LwWallpaper

 

output

The LwOutput to paint to

 

lw_wallpaper_prepare_paint ()

void
lw_wallpaper_prepare_paint (LwWallpaper *self,
                            gint ms_since_last_paint);

Update the animation for all outputs here.

Parameters

self

A LwWallpaper

 

ms_since_last_paint

The time since the last paint in milliseconds

 

lw_wallpaper_restore_viewport ()

void
lw_wallpaper_restore_viewport (LwWallpaper *self);

Restore all changes made by the lw_wallpaper_adjust_viewport() function here.

Parameters

self

A LwWallpaper

 

lw_wallpaper_load_gresource ()

GResource *
lw_wallpaper_load_gresource (LwWallpaper *self,
                             const gchar *filename);

Call lw_load_gresource with the peas datadir + filename.

Parameters

self

A LwWallpaper

 

filename

the name of the resource file or its path from the peas datadir

 

Types and Values

LwWallpaper

typedef struct _LwWallpaper LwWallpaper;

Interface for plugins providing a live wallpaper.


struct LwWallpaperInterface

struct LwWallpaperInterface {
	void (*init_plugin) (LwWallpaper *self);

	void (*adjust_viewport) (LwWallpaper *self, LwOutput *output);

	void (*prepare_paint) (LwWallpaper *self, gint ms_since_last_paint);
	void (*paint) (LwWallpaper *self, LwOutput *output);
	void (*done_paint) (LwWallpaper *self);

	void (*restore_viewport) (LwWallpaper *self);
};

Interface for plugins providing a live wallpaper.

Members

init_plugin ()

Init function

 

adjust_viewport ()

Adjust viewport

 

prepare_paint ()

Function to prepare the paint

 

paint ()

Paint function

 

done_paint ()

Function to clean up after paint

 

restore_viewport ()

Restore viewport