/*
* 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
#define ION_IONCORE_REGION_H
#include <libtu/obj.h>
+#include <libtu/stringstore.h>
#include <libmainloop/hooks.h>
#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)
typedef int WRegionFitMode;
+typedef StringId WRegionNotify;
+
typedef enum{
REGION_ORDER_FRONT,
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);
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);
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);
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 */