Changeset 9be2358 in mainline for uspace/lib/gfx/src/backend/console.c


Ignore:
Timestamp:
2019-09-23T13:05:52Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00e8290
Parents:
3e828ea
git-author:
Jiri Svoboda <jiri@…> (2019-09-22 13:04:48)
git-committer:
Jiri Svoboda <jiri@…> (2019-09-23 13:05:52)
Message:

Caller needs entire console GC to be able to destroy it properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfx/src/backend/console.c

    r3e828ea r9be2358  
    115115 */
    116116errno_t console_gc_create(console_ctrl_t *con, FILE *fout,
    117     gfx_context_t **rgc)
     117    console_gc_t **rgc)
    118118{
    119119        console_gc_t *cgc = NULL;
     
    131131                goto error;
    132132
     133        cgc->gc = gc;
    133134        cgc->con = con;
    134135        cgc->fout = fout;
    135         *rgc = gc;
     136        *rgc = cgc;
    136137        return EOK;
    137138error:
     
    142143}
    143144
     145/** Delete console GC.
     146 *
     147 * @param cgc Console GC
     148 */
     149errno_t console_gc_delete(console_gc_t *cgc)
     150{
     151        errno_t rc;
     152
     153        rc = gfx_context_delete(cgc->gc);
     154        if (rc != EOK)
     155                return rc;
     156
     157        free(cgc);
     158        return EOK;
     159}
     160
     161/** Get generic graphic context from console GC.
     162 *
     163 * @param cgc Console GC
     164 * @return Graphic context
     165 */
     166gfx_context_t *console_gc_get_ctx(console_gc_t *cgc)
     167{
     168        return cgc->gc;
     169}
     170
    144171/** @}
    145172 */
Note: See TracChangeset for help on using the changeset viewer.