Changeset 7e38970d in mainline for uspace/lib/ui/private/dummygc.h


Ignore:
Timestamp:
2020-12-07T00:08:37Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
25f26600
Parents:
7a873f0 (diff), 8596474 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'jxsvoboda-gfx' into master

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/private/dummygc.h

    r7a873f0 r7e38970d  
    11/*
    2  * Copyright (c) 2011 Petr Koupy
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libc
     29/** @addtogroup libui
    3030 * @{
    3131 */
    3232/**
    33  * @file
     33 * @file Dummy graphic context
     34 *
    3435 */
    3536
    36 #ifndef _LIBC_IO_MODE_H_
    37 #define _LIBC_IO_MODE_H_
     37#ifndef _UI_PRIVATE_DUMMYGC_H
     38#define _UI_PRIVATE_DUMMYGC_H
    3839
    39 #include <abi/fb/visuals.h>
    40 #include <adt/list.h>
    41 #include <io/pixel.h>
    42 #include <io/charfield.h>
     40#include <gfx/context.h>
    4341
     42/** Dummy graphic context */
    4443typedef struct {
    45         sysarg_t width;
    46         sysarg_t height;
    47 } aspect_ratio_t;
     44        gfx_context_t *gc;
     45        bool bm_created;
     46        bool bm_destroyed;
     47        gfx_bitmap_params_t bm_params;
     48        void *bm_pixels;
     49        gfx_rect_t bm_srect;
     50        gfx_coord2_t bm_offs;
     51        bool bm_rendered;
     52        bool bm_got_alloc;
     53} dummy_gc_t;
    4854
    49 typedef union {
    50         visual_t pixel_visual;
    51         char_attr_type_t field_visual;
    52 } cell_visual_t;
     55/** Dummy GC bitmap */
     56typedef struct {
     57        dummy_gc_t *dgc;
     58        gfx_bitmap_alloc_t alloc;
     59        bool myalloc;
     60} dummygc_bitmap_t;
    5361
    54 typedef struct {
    55         sysarg_t index;
    56         sysarg_t version;
     62/** Dummy GC ops */
     63extern gfx_context_ops_t dummygc_ops;
    5764
    58         sysarg_t refresh_rate;
    59         aspect_ratio_t screen_aspect;
    60         sysarg_t screen_width;
    61         sysarg_t screen_height;
    62 
    63         aspect_ratio_t cell_aspect;
    64         cell_visual_t cell_visual;
    65 } vslmode_t;
    66 
    67 typedef struct {
    68         link_t link;
    69         vslmode_t mode;
    70 } vslmode_list_element_t;
     65extern errno_t dummygc_create(dummy_gc_t **);
     66extern void dummygc_destroy(dummy_gc_t *);
     67extern gfx_context_t *dummygc_get_ctx(dummy_gc_t *);
    7168
    7269#endif
Note: See TracChangeset for help on using the changeset viewer.