mate-desktop 1.29.2
Library with common API for various MATE modules
Loading...
Searching...
No Matches
mate-bg-crossfade.h File Reference
View source
#include <glib.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
Include dependency graph for mate-bg-crossfade.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  _MateBGCrossfade
 
struct  _MateBGCrossfadeClass
 

Macros

#define MATE_TYPE_BG_CROSSFADE   (mate_bg_crossfade_get_type ())
 
#define MATE_BG_CROSSFADE(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfade))
 
#define MATE_BG_CROSSFADE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass))
 
#define MATE_IS_BG_CROSSFADE(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_BG_CROSSFADE))
 
#define MATE_IS_BG_CROSSFADE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_BG_CROSSFADE))
 
#define MATE_BG_CROSSFADE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass))
 

Typedefs

typedef struct _MateBGCrossfadePrivate MateBGCrossfadePrivate
 
typedef struct _MateBGCrossfade MateBGCrossfade
 
typedef struct _MateBGCrossfadeClass MateBGCrossfadeClass
 

Functions

GType mate_bg_crossfade_get_type (void)
 
MateBGCrossfade * mate_bg_crossfade_new (int width, int height)
 mate_bg_crossfade_new: @width: The width of the crossfading window @height: The height of the crossfading window
 
gboolean mate_bg_crossfade_set_start_surface (MateBGCrossfade *fade, cairo_surface_t *surface)
 mate_bg_crossfade_set_start_surface: @fade: a MateBGCrossfade @surface: The cairo surface to fade from
 
gboolean mate_bg_crossfade_set_end_surface (MateBGCrossfade *fade, cairo_surface_t *surface)
 mate_bg_crossfade_set_end_surface: @fade: a MateBGCrossfade @surface: The cairo surface to fade to
 
void mate_bg_crossfade_start (MateBGCrossfade *fade, GdkWindow *window)
 mate_bg_crossfade_start: @fade: a MateBGCrossfade @window: The #GdkWindow to draw crossfade on
 
void mate_bg_crossfade_start_widget (MateBGCrossfade *fade, GtkWidget *widget)
 mate_bg_crossfade_start_widget: @fade: a MateBGCrossfade @widget: The #GtkWidget to draw crossfade on
 
gboolean mate_bg_crossfade_is_started (MateBGCrossfade *fade)
 mate_bg_crossfade_is_started: @fade: a MateBGCrossfade
 
void mate_bg_crossfade_stop (MateBGCrossfade *fade)
 mate_bg_crossfade_stop: @fade: a MateBGCrossfade
 

Macro Definition Documentation

◆ MATE_BG_CROSSFADE

#define MATE_BG_CROSSFADE (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfade))

◆ MATE_BG_CROSSFADE_CLASS

#define MATE_BG_CROSSFADE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass))

◆ MATE_BG_CROSSFADE_GET_CLASS

#define MATE_BG_CROSSFADE_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_BG_CROSSFADE, MateBGCrossfadeClass))

◆ MATE_IS_BG_CROSSFADE

#define MATE_IS_BG_CROSSFADE (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_BG_CROSSFADE))

◆ MATE_IS_BG_CROSSFADE_CLASS

#define MATE_IS_BG_CROSSFADE_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_BG_CROSSFADE))

◆ MATE_TYPE_BG_CROSSFADE

#define MATE_TYPE_BG_CROSSFADE   (mate_bg_crossfade_get_type ())

Typedef Documentation

◆ MateBGCrossfade

◆ MateBGCrossfadeClass

◆ MateBGCrossfadePrivate

Function Documentation

◆ mate_bg_crossfade_get_type()

GType mate_bg_crossfade_get_type ( void  )

◆ mate_bg_crossfade_is_started()

gboolean mate_bg_crossfade_is_started ( MateBGCrossfade *  fade)

mate_bg_crossfade_is_started: @fade: a MateBGCrossfade

This function reveals whether or not @fade is currently running on a window. See mate_bg_crossfade_start() for information on how to initiate a crossfade.

Return value: TRUE if fading, or FALSE if not fading

References MATE_IS_BG_CROSSFADE, _MateBGCrossfade::priv, and _MateBGCrossfadePrivate::timeout_id.

Referenced by mate_bg_crossfade_start(), and mate_bg_crossfade_stop().

◆ mate_bg_crossfade_new()

MateBGCrossfade * mate_bg_crossfade_new ( int  width,
int  height 
)

mate_bg_crossfade_new: @width: The width of the crossfading window @height: The height of the crossfading window

Creates a new object to manage crossfading a window background between two #cairo_surface_ts.

Return value: the new MateBGCrossfade

References MATE_TYPE_BG_CROSSFADE.

Referenced by mate_bg_set_surface_as_root_with_crossfade().

◆ mate_bg_crossfade_set_end_surface()

gboolean mate_bg_crossfade_set_end_surface ( MateBGCrossfade *  fade,
cairo_surface_t *  surface 
)

mate_bg_crossfade_set_end_surface: @fade: a MateBGCrossfade @surface: The cairo surface to fade to

Before initiating a crossfade with mate_bg_crossfade_start() a start and end surface have to be set. This function sets the surface shown at the end of the crossfade effect.

Return value: TRUE if successful, or FALSE if the surface could not be copied.

References _MateBGCrossfadePrivate::end_surface, get_current_time(), _MateBGCrossfadePrivate::height, MATE_IS_BG_CROSSFADE, _MateBGCrossfade::priv, _MateBGCrossfadePrivate::start_time, tile_surface(), and _MateBGCrossfadePrivate::width.

Referenced by mate_bg_set_surface_as_root_with_crossfade().

Here is the call graph for this function:

◆ mate_bg_crossfade_set_start_surface()

gboolean mate_bg_crossfade_set_start_surface ( MateBGCrossfade *  fade,
cairo_surface_t *  surface 
)

mate_bg_crossfade_set_start_surface: @fade: a MateBGCrossfade @surface: The cairo surface to fade from

Before initiating a crossfade with mate_bg_crossfade_start() a start and end surface have to be set. This function sets the surface shown at the beginning of the crossfade effect.

Return value: TRUE if successful, or FALSE if the surface could not be copied.

References _MateBGCrossfadePrivate::height, MATE_IS_BG_CROSSFADE, _MateBGCrossfade::priv, _MateBGCrossfadePrivate::start_surface, tile_surface(), and _MateBGCrossfadePrivate::width.

Referenced by mate_bg_set_surface_as_root_with_crossfade().

Here is the call graph for this function:

◆ mate_bg_crossfade_start()

void mate_bg_crossfade_start ( MateBGCrossfade *  fade,
GdkWindow *  window 
)

mate_bg_crossfade_start: @fade: a MateBGCrossfade @window: The #GdkWindow to draw crossfade on

This function initiates a quick crossfade between two surfaces on the background of @window. Before initiating the crossfade both mate_bg_crossfade_set_start_surface() and mate_bg_crossfade_set_end_surface() need to be called. If animations are disabled, the crossfade is skipped, and the window background is set immediately to the end surface.

References draw_background(), _MateBGCrossfadePrivate::end_surface, _MateBGCrossfadePrivate::fading_surface, get_current_time(), get_root_pixmap_id_surface(), _MateBGCrossfadePrivate::height, _MateBGCrossfadePrivate::is_first_frame, mate_bg_crossfade_is_started(), MATE_IS_BG_CROSSFADE, on_finished(), on_tick(), on_widget_draw(), _MateBGCrossfade::priv, _MateBGCrossfadePrivate::start_surface, _MateBGCrossfadePrivate::start_time, tile_surface(), _MateBGCrossfadePrivate::timeout_id, _MateBGCrossfadePrivate::total_duration, _MateBGCrossfadePrivate::widget, _MateBGCrossfadePrivate::width, and _MateBGCrossfadePrivate::window.

Referenced by mate_bg_crossfade_start_widget(), and mate_bg_set_surface_as_root_with_crossfade().

Here is the call graph for this function:

◆ mate_bg_crossfade_start_widget()

void mate_bg_crossfade_start_widget ( MateBGCrossfade *  fade,
GtkWidget *  widget 
)

mate_bg_crossfade_start_widget: @fade: a MateBGCrossfade @widget: The #GtkWidget to draw crossfade on

This function initiates a quick crossfade between two surfaces on the background of @widget. Before initiating the crossfade both mate_bg_crossfade_set_start_surface() and mate_bg_crossfade_set_end_surface() need to be called. If animations are disabled, the crossfade is skipped, and the window background is set immediately to the end surface.

References mate_bg_crossfade_start(), MATE_IS_BG_CROSSFADE, _MateBGCrossfade::priv, and _MateBGCrossfadePrivate::widget.

Here is the call graph for this function:

◆ mate_bg_crossfade_stop()

void mate_bg_crossfade_stop ( MateBGCrossfade *  fade)

mate_bg_crossfade_stop: @fade: a MateBGCrossfade

This function stops any in progress crossfades that may be happening. It's harmless to call this function if @fade is already stopped.

References mate_bg_crossfade_is_started(), MATE_IS_BG_CROSSFADE, _MateBGCrossfade::priv, and _MateBGCrossfadePrivate::timeout_id.

Referenced by mate_bg_crossfade_finalize().

Here is the call graph for this function: