Ignore:
Timestamp:
2019-12-16T10:14:12Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
65160d7
Parents:
fdc8e40
git-author:
Jiri Svoboda <jiri@…> (2019-12-15 10:13:47)
git-committer:
Jiri Svoboda <jiri@…> (2019-12-16 10:14:12)
Message:

Store dimensions in display server window structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/test/display.c

    rfdc8e40 r3434233  
    2727 */
    2828
     29#include <disp_srv.h>
    2930#include <errno.h>
    3031#include <pcut/pcut.h>
     
    99100        ds_window_t *w1;
    100101        ds_window_t *wnd;
     102        display_wnd_params_t params;
    101103        errno_t rc;
    102104
     
    107109        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    108110
    109         rc = ds_window_create(client, &w1);
    110         PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    111 
    112         rc = ds_window_create(client, &w0);
     111        display_wnd_params_init(&params);
     112        params.rect.p0.x = params.rect.p0.y = 0;
     113        params.rect.p1.x = params.rect.p1.y = 1;
     114
     115        rc = ds_window_create(client, &params, &w1);
     116        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     117
     118        rc = ds_window_create(client, &params, &w0);
    113119        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    114120
     
    148154        ds_window_t *w1;
    149155        ds_window_t *wnd;
     156        display_wnd_params_t params;
    150157        gfx_coord2_t pos;
    151158        errno_t rc;
     
    157164        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    158165
    159         rc = ds_window_create(client, &w0);
    160         PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    161 
    162         rc = ds_window_create(client, &w1);
     166        display_wnd_params_init(&params);
     167        params.rect.p0.x = params.rect.p0.y = 0;
     168        params.rect.p1.x = params.rect.p1.y = 100;
     169
     170        rc = ds_window_create(client, &params, &w0);
     171        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     172
     173        rc = ds_window_create(client, &params, &w1);
    163174        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    164175
     
    217228        ds_client_t *client;
    218229        ds_window_t *wnd;
     230        display_wnd_params_t params;
    219231        kbd_event_t event;
    220232        bool called_cb = false;
     
    230242        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    231243
    232         rc = ds_window_create(client, &wnd);
     244        display_wnd_params_init(&params);
     245        params.rect.p0.x = params.rect.p0.y = 0;
     246        params.rect.p1.x = params.rect.p1.y = 1;
     247
     248        rc = ds_window_create(client, &params, &wnd);
    233249        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    234250
     
    260276        ds_client_t *client;
    261277        ds_window_t *w0, *w1;
     278        display_wnd_params_t params;
    262279        kbd_event_t event;
    263280        bool called_cb = false;
     
    273290        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    274291
    275         rc = ds_window_create(client, &w0);
    276         PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    277 
    278         rc = ds_window_create(client, &w1);
     292        display_wnd_params_init(&params);
     293        params.rect.p0.x = params.rect.p0.y = 0;
     294        params.rect.p1.x = params.rect.p1.y = 1;
     295
     296        rc = ds_window_create(client, &params, &w0);
     297        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     298
     299        rc = ds_window_create(client, &params, &w1);
    279300        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    280301
     
    317338        ds_client_t *client;
    318339        ds_window_t *w0, *w1;
     340        display_wnd_params_t params;
    319341        ptd_event_t event;
    320342        bool called_cb = false;
     
    330352        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    331353
    332         rc = ds_window_create(client, &w0);
    333         PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    334 
    335         rc = ds_window_create(client, &w1);
     354        display_wnd_params_init(&params);
     355        params.rect.p0.x = params.rect.p0.y = 0;
     356        params.rect.p1.x = params.rect.p1.y = 1;
     357
     358        rc = ds_window_create(client, &params, &w0);
     359        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
     360
     361        rc = ds_window_create(client, &params, &w1);
    336362        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    337363
Note: See TracChangeset for help on using the changeset viewer.