Changeset 3583ffb in mainline for uspace/lib/ui/src/window.c


Ignore:
Timestamp:
2020-11-08T19:51:04Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f93e4e3
Parents:
8c772c4
Message:

Revert "Create UI controls based on UI object…"

This was a mistake. Controls need ui_resource object, which must be
(at least currently) specific to a window and cannot be obtained from
ui_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/window.c

    r8c772c4 r3583ffb  
    135135                goto error;
    136136
    137         ui->resource = res;
    138 
    139         rc = ui_wdecor_create(ui, params->caption, &wdecor);
     137        rc = ui_wdecor_create(res, params->caption, &wdecor);
    140138        if (rc != EOK)
    141139                goto error;
     
    225223}
    226224
    227 /** Get window GC.
    228  *
    229  * Return the grapic context of the window. It is relative to the upper-left
    230  * corner of the window.
    231  *
    232  * @param window Window
    233  * @return Graphic context
    234  */
     225ui_resource_t *ui_window_get_res(ui_window_t *window)
     226{
     227        return window->res;
     228}
     229
    235230gfx_context_t *ui_window_get_gc(ui_window_t *window)
    236231{
     
    238233}
    239234
    240 /** Get window application rectangle.
    241  *
    242  * Return the window's application rectangle. This is a rectangle covering
    243  * everything apart from the window frame and title bar.
    244  *
    245  * @param window Window
    246  * @param rect Place to store application rectangle
    247  */
    248235void ui_window_get_app_rect(ui_window_t *window, gfx_rect_t *rect)
    249236{
     
    254241}
    255242
    256 /** Paint window.
    257  *
    258  * @param window Window
    259  * @return EOK on success or an error code
    260  */
    261243errno_t ui_window_paint(ui_window_t *window)
    262244{
Note: See TracChangeset for help on using the changeset viewer.