summaryrefslogtreecommitdiff
path: root/src/stage.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2019-08-27 11:40:54 -0700
committerVito Caputo <vcaputo@pengaru.com>2019-08-27 11:40:54 -0700
commit8b4bcb68cf8a3921e623a5d7d908db3053272fb6 (patch)
tree35e59616ed3d3434048965ff67a84d24dd6f9ca0 /src/stage.c
parent71c5db7476d8deadfa785570ae63732445b10e85 (diff)
libstage: drop stage_lookup_key/stage_lookup_func_t
This seemed useful at the time, but it's proven a bit inadequate when adding relative picking in addition to what the stage could provide via the lookup hook. Then once adding relative picking externally, including the spatial stuff the lookup stage hook typically added was conveniently handled as well. So just get rid of this, even though it probably would be perfectly sufficient for purely touch-based interfaces where there's no relative navigation. i.e. tab/arrow key to select the next item.
Diffstat (limited to 'src/stage.c')
-rw-r--r--src/stage.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/stage.c b/src/stage.c
index 69976ae..3927120 100644
--- a/src/stage.c
+++ b/src/stage.c
@@ -373,34 +373,3 @@ stage_t * stage_lookup_name(stage_t *stage, const char *name)
return NULL;
}
-
-
-/* lookup a stage by an opaque key using the per-stage lookup_func when present,
- * returns first hit, does not support multiple hits.
- * Intended for rudimentary non-overlapping spatial searches like picking of
- * basic 2D UI elements.
- */
-stage_t * stage_lookup_key(stage_t *stage, void *key)
-{
- assert(stage);
-
- if (stage->ops->lookup_func) {
- stage_t *hit = (stage_t *)stage->ops->lookup_func(stage, stage->object, key);
-
- if (hit)
- return hit;
- }
-
- for (int i = 0; i < STAGE_LAYERS_MAX; i++) {
- stage_t *s;
-
- DLL_FOR_EACH_ENTRY(&stage->layers[i], s, stage_t, layer) {
- stage_t *hit = stage_lookup_key(s, key);
-
- if (hit)
- return hit;
- }
- }
-
- return NULL;
-}
© All Rights Reserved