diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-08 18:31:29 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-14 19:41:48 -0700 |
commit | 5bebde59c93312d0cef33b7e62f37dd3bc939ce0 (patch) | |
tree | d2f1b6cca1496a20ce61c5e48df26ae9fafeb8ce /src/overlays.h | |
parent | df9f5f5b92cef88492b647f362c91f281c3b2e3b (diff) |
overlays: encapsulate global overlays state
Introduce vwm_overlays_t and create/destroy functions, use in vwm_startup()
and vwm_shutdown(). Supply to methods operating on the global overlays
state vwm_overlays_update(), vwm_overlays_rate_increase(),
vwm_overlays_rate_decrease().
This is a fairly minimal adoption of these changes with vwm_t still being
supplyed to the overlay functions.
A future commit will further cleanup the interactions and cease all
knowledge of vwm_t in overlays.c, but for now everything overlay-oriented
still accesses the overlays_t instance via vwm_t. Instead of supplying the
vwm_t to vwm_overlays_create() the bare vwm_xserver_t will be supplied, as
this is the future shared component across vmon and vwm (in addition to
overlays).
Diffstat (limited to 'src/overlays.h')
-rw-r--r-- | src/overlays.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/overlays.h b/src/overlays.h index bfcf0da..19678e5 100644 --- a/src/overlays.h +++ b/src/overlays.h @@ -24,14 +24,17 @@ typedef struct _vwm_overlay_t { int gen_last_composed; /* the last composed vmon generation */ int redraw_needed; /* if a redraw is required (like when the window is resized...) */ } vwm_overlay_t; +typedef struct _vwm_overlays_t vwm_overlays_t; int vwm_overlay_xwin_composed_height(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_overlay_xwin_reset_snowflakes(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_overlay_xwin_create(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_overlay_xwin_destroy(vwm_t *vwm, vwm_xwindow_t *xwin); void vwm_overlay_xwin_compose(vwm_t *vwm, vwm_xwindow_t *xwin); -void vwm_overlay_rate_increase(vwm_t *vwm); -void vwm_overlay_rate_decrease(vwm_t *vwm); -void vwm_overlay_update(vwm_t *vwm, int *desired_delay); +vwm_overlays_t * vwm_overlays_create(vwm_t *vwm); +void vwm_overlays_destroy(vwm_overlays_t *overlays); +void vwm_overlays_rate_increase(vwm_overlays_t *overlays); +void vwm_overlays_rate_decrease(vwm_overlays_t *overlays); +int vwm_overlays_update(vwm_overlays_t *overlays, int *desired_delay); #endif |