diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2009-04-09 15:26:51 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2009-04-09 15:26:51 +0000 |
commit | 6e4ab5b91771e516b3fb80f5692f31a23001d72c (patch) | |
tree | d36c59986fa08d01e0efbec0d4cb66c5f7ffc904 /include/libnsfb.h | |
parent | e136ab597105dcbe211ce0a1f49113b4cb14b1ca (diff) | |
download | libnsfb-6e4ab5b91771e516b3fb80f5692f31a23001d72c.tar.gz libnsfb-6e4ab5b91771e516b3fb80f5692f31a23001d72c.tar.bz2 |
add frontend selection and fix finalisation support
svn path=/trunk/libnsfb/; revision=7072
Diffstat (limited to 'include/libnsfb.h')
-rw-r--r-- | include/libnsfb.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/libnsfb.h b/include/libnsfb.h index 0af8ab3..0869614 100644 --- a/include/libnsfb.h +++ b/include/libnsfb.h @@ -7,7 +7,7 @@ typedef struct nsfb_cursor_s nsfb_cursor_t; typedef struct nsfb_s nsfb_t; typedef uint32_t nsfb_colour_t; -/* bounding box */ +/** bounding box for plotting operations */ typedef struct nsfb_bbox_s { int x0; int y0; @@ -17,8 +17,8 @@ typedef struct nsfb_bbox_s { /** The type of frontend for a framebuffer context. */ enum nsfb_frontend_e { - NSFB_FRONTEND_NONE = 0, /* Empty frontend. */ - NSFB_FRONTEND_SDL, + NSFB_FRONTEND_NONE = 0, /**< Empty frontend. */ + NSFB_FRONTEND_SDL, /**< SDL frontend */ NSFB_FRONTEND_LINUX, NSFB_FRONTEND_VNC, NSFB_FRONTEND_ABLE, @@ -33,12 +33,28 @@ enum nsfb_frontend_e { */ nsfb_t *nsfb_init(enum nsfb_frontend_e frontend); +/** Finalise nsfb. + * + * This shuts down and releases all resources associated with an nsfb context. + * + * @param nsfb The context returned from ::nsfb_init tofinalise + */ +int nsfb_finalise(nsfb_t *nsfb); + /** Initialise selected frontend. * - * @param nsfb The context frturned from ::nsfb_init + * @param nsfb The context returned from ::nsfb_init */ int nsfb_init_frontend(nsfb_t *nsfb); +/** Select frontend type from a name. + * + * @param name The name to select a frontend. + * @return The frontend type or NSFB_FRONTEND_NONE if frontend with specified + * name was not available + */ +enum nsfb_frontend_e nsfb_frontend_from_name(const char *name); + /** Process input from a frontend. */ int nsfb_input(nsfb_t *nsfb); |