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


Ignore:
Timestamp:
2020-12-07T00:08:37Z (4 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/fixed.h

    r7a873f0 r7e38970d  
    11/*
    2  * Copyright (c) 2012 Petr Koupy
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup draw
     29/** @addtogroup libui
    3030 * @{
    3131 */
    3232/**
    33  * @file
     33 * @file Fixed layout structure
     34 *
    3435 */
    3536
    36 #ifndef DRAW_PATH_H_
    37 #define DRAW_PATH_H_
     37#ifndef _UI_PRIVATE_FIXED_H
     38#define _UI_PRIVATE_FIXED_H
    3839
    3940#include <adt/list.h>
     41#include <gfx/coord.h>
     42#include <stdbool.h>
     43#include <types/ui/fixed.h>
    4044
    41 typedef enum {
    42         PATH_STEP_MOVETO,
    43         PATH_STEP_LINETO
    44 } path_step_type_t;
     45/** Actual structure of fixed layout.
     46 *
     47 * This is private to libui.
     48 */
     49struct ui_fixed {
     50        /** Base control object */
     51        struct ui_control *control;
     52        /** Layout elements (ui_fixed_elem_t) */
     53        list_t elem;
     54};
    4555
     56/** Fixed layout element. */
    4657typedef struct {
    47         link_t link;
    48         path_step_type_t type;
    49         double to_x;
    50         double to_y;
    51 } path_step_t;
     58        /** Containing fixed layout */
     59        struct ui_fixed *fixed;
     60        /** Link to @c fixed->elem list */
     61        link_t lelems;
     62        /** Control */
     63        ui_control_t *control;
     64} ui_fixed_elem_t;
    5265
    53 struct path;
    54 typedef struct path path_t;
    55 
    56 extern void path_init(path_t *);
    57 extern void path_clear(path_t *);
    58 
    59 extern void path_get_cursor(path_t *, double *, double *);
    60 
    61 extern void path_move_to(path_t *, double, double);
    62 extern void path_line_to(path_t *, double, double);
    63 
    64 extern void path_rectangle(path_t *, double, double, double, double);
     66extern ui_fixed_elem_t *ui_fixed_first(ui_fixed_t *f);
     67extern ui_fixed_elem_t *ui_fixed_next(ui_fixed_elem_t *);
    6568
    6669#endif
Note: See TracChangeset for help on using the changeset viewer.