From 08e42acaadf8868abb94dc75da0daa9c6e4e2d1c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 5 May 2007 05:58:35 +0000 Subject: animate iconify/reestore. yeah. --- openbox/frame.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'openbox/frame.h') diff --git a/openbox/frame.h b/openbox/frame.h index 19bade78..8f210b0c 100644 --- a/openbox/frame.h +++ b/openbox/frame.h @@ -27,6 +27,8 @@ typedef struct _ObFrame ObFrame; struct _ObClient; +typedef void (*ObFrameIconifyAnimateFunc)(gpointer data); + typedef enum { OB_FRAME_CONTEXT_NONE, OB_FRAME_CONTEXT_DESKTOP, @@ -142,6 +144,17 @@ struct _ObFrame gboolean flashing; gboolean flash_on; GTimeVal flash_end; + + /*! The step which the client is currently in for animating iconify and + restore. + 0 means that it is not animating. FRAME_ANIMATE_ICONIFY_STEPS is the + first step for iconifying, and -FRAME_ANIMATE_ICONIFY_STEPS is the + forst step for restoring. It counts towards 0 either way. Visually, + +x == -(FRAME_ANIMATE_ICONIFY_STEPS-x+1) + */ + gint iconify_animation_step; + ObFrameIconifyAnimateFunc iconify_animation_cb; + gpointer iconify_animation_data; }; ObFrame *frame_new(struct _ObClient *c); @@ -178,4 +191,11 @@ void frame_frame_gravity(ObFrame *self, gint *x, gint *y, gint w, gint h); void frame_flash_start(ObFrame *self); void frame_flash_stop(ObFrame *self); +/*! Start an animation for iconifying or restoring a frame. The callback + will be called when the animation finishes. But if another animation is + started in the meantime, the callback will never get called. */ +void frame_begin_iconify_animation(ObFrame *self, gboolean iconifying, + ObFrameIconifyAnimateFunc callback, + gpointer data); + #endif -- cgit v1.2.3