Changeset 2bb6d04 in mainline for uspace/lib/draw/include


Ignore:
Timestamp:
2019-06-25T14:58:16Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aeba767
Parents:
cd9531d3
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-13 12:14:16)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-06-25 14:58:16)
Message:

Curb the proliferation of libdraw headers

libdraw provides a lot of ambiguously named headers, which makes it
confusing. This change merges the subdirectories into single headers,
and moves all headers into draw subdirectory, so that it's obvious
at a glance what library the header belongs to.

Compare:

#include <path.h>
#include <source.h>
#include <font/bitmap_backend.h>
#include <font/pcf.h>

vs.

#include <draw/path.h>
#include <draw/source.h>
#include <draw/font.h>

Location:
uspace/lib/draw/include/draw
Files:
8 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/include/draw/codec.h

    rcd9531d3 r2bb6d04  
    11/*
    22 * Copyright (c) 2014 Martin Decky
     3 * Copyright (c) 2011 Petr Koupy
    34 * All rights reserved.
    45 *
     
    3435 */
    3536
    36 #ifndef DRAW_CODEC_TGA_GZ_H_
    37 #define DRAW_CODEC_TGA_GZ_H_
     37#ifndef DRAW_CODEC_H_
     38#define DRAW_CODEC_H_
    3839
    3940#include <stddef.h>
    40 #include "../surface.h"
     41#include "surface.h"
    4142
    4243extern surface_t *decode_tga_gz(void *, size_t, surface_flags_t);
    4344extern bool encode_tga_gz(surface_t *, void **, size_t *);
     45extern surface_t *decode_tga(void *, size_t, surface_flags_t);
     46extern bool encode_tga(surface_t *, void **, size_t *);
     47extern surface_t *decode_webp(void *, size_t, surface_flags_t);
     48extern bool encode_webp(surface_t *, void **, size_t *);
    4449
    4550#endif
  • uspace/lib/draw/include/draw/cursor.h

    rcd9531d3 r2bb6d04  
    5858} cursor_t;
    5959
     60extern cursor_decoder_t cd_embedded;
     61
    6062extern void cursor_init(cursor_t *, cursor_decoder_type_t, char *);
    6163extern void cursor_release(cursor_t *);
  • uspace/lib/draw/include/draw/font.h

    rcd9531d3 r2bb6d04  
    4040#include <stdint.h>
    4141
     42#include "font.h"
    4243#include "surface.h"
    4344#include "source.h"
     
    108109} font_t;
    109110
     111typedef struct {
     112        errno_t (*resolve_glyph)(void *, const wchar_t, glyph_id_t *);
     113        errno_t (*load_glyph_surface)(void *, glyph_id_t, surface_t **);
     114        errno_t (*load_glyph_metrics)(void *, glyph_id_t, glyph_metrics_t *);
     115        void (*release)(void *);
     116} bitmap_font_decoder_t;
     117
    110118extern font_t *font_create(font_backend_t *, void *);
    111119extern errno_t font_get_metrics(font_t *, font_metrics_t *);
     
    120128    sysarg_t, sysarg_t);
    121129
     130extern errno_t bitmap_font_create(bitmap_font_decoder_t *, void *, uint32_t,
     131    font_metrics_t, uint16_t, font_t **);
     132extern errno_t embedded_font_create(font_t **, uint16_t points);
     133extern errno_t pcf_font_create(font_t **, char *path, uint16_t points);
     134
    122135#endif
    123136
  • uspace/lib/draw/include/draw/gfx.h

    rcd9531d3 r2bb6d04  
    11/*
    2  * Copyright (c) 2005 Martin Decky
     2 * Copyright (c) 2008 Martin Decky
     3 * Copyright (c) 2012 Petr Koupy
    34 * All rights reserved.
    45 *
     
    3334 */
    3435
    35 #ifndef FONT_8X16_H_
    36 #define FONT_8X16_H_
     36#ifndef GFX_H_
     37#define GFX_H_
    3738
    3839#include <stdint.h>
     
    4041#include <stddef.h>
    4142
     43#define CURSOR_WIDTH   11
     44#define CURSOR_HEIGHT  18
     45
    4246#define FONT_GLYPHS     2899
    4347#define FONT_WIDTH      8
    4448#define FONT_SCANLINES  16
    4549#define FONT_ASCENDER   12
     50
     51extern uint8_t cursor_texture[];
     52extern uint8_t cursor_mask[];
    4653
    4754extern uint16_t fb_font_glyph(const wchar_t, bool *);
Note: See TracChangeset for help on using the changeset viewer.