X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3.git;a=blobdiff_plain;f=ioncore%2Fregion.h;h=d30b4359536f61866161413a78e2d1556018b42c;hp=b2feff748852b02ee512ed4f7f3d24cfcd4d9792;hb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;hpb=8366314611bf30a0f31d25bf5f5023186fa87692 diff --git a/ioncore/region.h b/ioncore/region.h index b2feff7..d30b435 100644 --- a/ioncore/region.h +++ b/ioncore/region.h @@ -1,7 +1,7 @@ /* * ion/ioncore/region.h * - * Copyright (c) Tuomo Valkonen 1999-2006. + * Copyright (c) Tuomo Valkonen 1999-2007. * * Ion is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by @@ -13,31 +13,34 @@ #define ION_IONCORE_REGION_H #include +#include #include #include "common.h" #include "rectangle.h" -#define REGION_MAPPED 0x0001 -#define REGION_ACTIVE 0x0002 -#define REGION_HAS_GRABS 0x0004 -#define REGION_TAGGED 0x0008 +#define REGION_MAPPED 0x0001 +#define REGION_ACTIVE 0x0002 +#define REGION_HAS_GRABS 0x0004 +#define REGION_TAGGED 0x0008 +#define REGION_PSEUDOACTIVE 0x0010 #define REGION_BINDINGS_ARE_GRABBED 0x0020 -#define REGION_GRAB_ON_PARENT 0x0040 -#define REGION_ACTIVITY 0x0100 -#define REGION_SKIP_FOCUS 0x0200 -#define REGION_CWINS_BEING_RESCUED 0x0400 -#define REGION_PLEASE_WARP 0x0800 +#define REGION_GRAB_ON_PARENT 0x0040 +#define REGION_ACTIVITY 0x0100 +#define REGION_SKIP_FOCUS 0x0200 +#define REGION_CWINS_BEING_RESCUED 0x0400 +#define REGION_PLEASE_WARP 0x0800 #define REGION_BINDING_UPDATE_SCHEDULED 0x1000 -#define REGION_GOTO_FOCUS 0x0001 -#define REGION_GOTO_NOWARP 0x0002 -#define REGION_GOTO_ENTERWINDOW 0x0004 +#define REGION_GOTO_FOCUS 0x0001 +#define REGION_GOTO_NOWARP 0x0002 +#define REGION_GOTO_ENTERWINDOW 0x0004 /* Use region_is_fully_mapped instead for most cases. */ #define REGION_IS_MAPPED(R) (((WRegion*)(R))->flags®ION_MAPPED) #define REGION_MARK_MAPPED(R) (((WRegion*)(R))->flags|=REGION_MAPPED) #define REGION_MARK_UNMAPPED(R) (((WRegion*)(R))->flags&=~REGION_MAPPED) #define REGION_IS_ACTIVE(R) (((WRegion*)(R))->flags®ION_ACTIVE) +#define REGION_IS_PSEUDOACTIVE(R) (((WRegion*)(R))->flags®ION_PSEUDOACTIVE) #define REGION_IS_TAGGED(R) (((WRegion*)(R))->flags®ION_TAGGED) #define REGION_IS_URGENT(R) (((WRegion*)(R))->flags®ION_URGENT) #define REGION_GEOM(R) (((WRegion*)(R))->geom) @@ -58,6 +61,8 @@ typedef int WRegionFitMode; +typedef StringId WRegionNotify; + typedef enum{ REGION_ORDER_FRONT, @@ -135,9 +140,7 @@ DYNFUN WRegion *region_managed_control_focus(WRegion *mgr, WRegion *reg); DYNFUN void region_managed_remove(WRegion *reg, WRegion *sub); DYNFUN bool region_managed_prepare_focus(WRegion *reg, WRegion *sub, int flags, WPrepareFocusResult *res); -DYNFUN void region_managed_activated(WRegion *reg, WRegion *sub); -DYNFUN void region_managed_inactivated(WRegion *reg, WRegion *sub); -DYNFUN void region_managed_notify(WRegion *reg, WRegion *sub, const char *how); +DYNFUN void region_managed_notify(WRegion *reg, WRegion *sub, WRegionNotify how); DYNFUN bool region_managed_may_destroy(WRegion *mgr, WRegion *reg); DYNFUN bool region_managed_rqorder(WRegion *reg, WRegion *sub, WRegionOrder order); @@ -162,7 +165,7 @@ extern bool region_reparent(WRegion *reg, WWindow *target, extern void region_updategr_default(WRegion *reg); extern void region_rootpos(WRegion *reg, int *xret, int *yret); -extern void region_notify_change(WRegion *reg, const char *how); +extern void region_notify_change(WRegion *reg, WRegionNotify how); extern bool region_goto(WRegion *reg); extern bool region_goto_flags(WRegion *reg, int flags); @@ -171,6 +174,9 @@ extern bool region_is_fully_mapped(WRegion *reg); extern void region_detach_manager(WRegion *reg); +extern void region_dispose(WRegion *reg, bool was_mcf); +extern void region_dispose_(WRegion *reg); + extern WWindow *region_parent(WRegion *reg); extern WRegion *region_manager(WRegion *reg); extern WRegion *region_manager_or_parent(WRegion *reg); @@ -188,6 +194,9 @@ extern bool region_manager_allows_destroying(WRegion *reg); extern WRegion *region_managed_within(WRegion *reg, WRegion *mgd); +extern void region_set_manager_pseudoactivity(WRegion *reg); +extern void region_unset_manager_pseudoactivity(WRegion *reg); + extern WHook *region_notify_hook; #endif /* ION_IONCORE_REGION_H */