gtk/demos/gtk-demo/gtkshaderstack.h
Alexander Larsson e9885f9cde gtk-demo: Make gltransitions demo a bit snazzier
This adds a bunch of snazz to the gltransitions demo. It is perhaps
a bit overloaded now, but it demos everything that we can do.

Changes:
 * The fire shader is now not a bin, it just renders an animating
   background with no textures involved.
 * The stacks don't all start on the same page.
 * The shaderbin passes the mouse coordinate to the shader.
 * The shaderbin allows specifying a "border" so that you can
   cause effects outside the bin child (something that is new to gtk4).
 * All the buttons and the stacks are now in shader-bins that runs
   a wobbly-widget effect based on the mouse position that
   wobbles outside the child allocation.
2020-09-30 11:40:37 +02:00

24 lines
883 B
C

#ifndef __GTK_SHADER_STACK_H__
#define __GTK_SHADER_STACK_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GTK_TYPE_SHADER_STACK (gtk_shader_stack_get_type ())
G_DECLARE_FINAL_TYPE (GtkShaderStack, gtk_shader_stack, GTK, SHADER_STACK, GtkWidget)
GtkWidget * gtk_shader_stack_new (void);
void gtk_shader_stack_set_shader (GtkShaderStack *self,
GskGLShader *shader);
void gtk_shader_stack_add_child (GtkShaderStack *self,
GtkWidget *child);
void gtk_shader_stack_transition (GtkShaderStack *self,
gboolean forward);
void gtk_shader_stack_set_active (GtkShaderStack *self,
int index);
G_END_DECLS
#endif /* __GTK_SHADER_STACK_H__ */