summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-24 10:56:37 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-02-24 10:56:37 +0000
commit1440a3a8cb8b44c4d762758c20b1fc31653ff187 (patch)
treebbb77846ca367fa71b4dcd0730441eb87cd54a27 /include
parent84fb99890ff127c763efc5014633b8e3a4c762b4 (diff)
downloadlibnsfb-1440a3a8cb8b44c4d762758c20b1fc31653ff187.tar.gz
libnsfb-1440a3a8cb8b44c4d762758c20b1fc31653ff187.tar.bz2
surface: Add basic surface enumerator
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'include')
-rw-r--r--include/libnsfb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libnsfb.h b/include/libnsfb.h
index dfb720c..d52d821 100644
--- a/include/libnsfb.h
+++ b/include/libnsfb.h
@@ -58,6 +58,21 @@ enum nsfb_format_e {
NSFB_FMT_I1, /* black and white */
};
+/** Callback for surface enumeration
+ *
+ * @param The context you gave for the enumeration
+ * @param The name of a surface registered with libnsfb
+ * @param The type of that surface for use with ::nsfb_new
+ */
+typedef void (*surface_enumeration_cb)(void *, const char *, enum nsfb_type_e);
+
+/** Enumerate surface types registered with libnsfb
+ *
+ * @param cb The callback to call with each surface
+ * @param context The context to pass to the enumeration callback
+ */
+void nsfb_enumerate_surface_types(surface_enumeration_cb cb, void *context);
+
/** Select frontend type from a name.
*
* @param name The name to select a frontend.