Changeset b3c185b6 in mainline for uspace/srv/hid/display/window.c


Ignore:
Timestamp:
2019-11-04T14:05:35Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be15256
Parents:
22faaf2
git-author:
Jiri Svoboda <jiri@…> (2019-10-03 18:05:09)
git-committer:
Jiri Svoboda <jiri@…> (2019-11-04 14:05:35)
Message:

Window event delivery mechanism

File:
1 edited

Legend:

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

    r22faaf2 rb3c185b6  
    4343#include <io/log.h>
    4444#include <stdlib.h>
     45#include "client.h"
    4546#include "display.h"
    4647#include "window.h"
     
    7677        ds_window_t *wnd = (ds_window_t *) arg;
    7778
    78         log_msg(LOG_DEFAULT, LVL_NOTE, "gc_set_color");
    79         return gfx_set_color(wnd->display->gc, color);
     79        log_msg(LOG_DEFAULT, LVL_NOTE, "gc_set_color gc=%p", wnd->client->display->gc);
     80        return gfx_set_color(wnd->client->display->gc, color);
    8081}
    8182
     
    9495        log_msg(LOG_DEFAULT, LVL_NOTE, "gc_fill_rect");
    9596        gfx_rect_translate(&wnd->dpos, rect, &drect);
    96         return gfx_fill_rect(wnd->display->gc, &drect);
     97        return gfx_fill_rect(wnd->client->display->gc, &drect);
    9798}
    9899
     
    116117                return ENOMEM;
    117118
    118         rc = gfx_bitmap_create(wnd->display->gc, params, alloc, &cbm->bitmap);
     119        rc = gfx_bitmap_create(wnd->client->display->gc, params, alloc,
     120            &cbm->bitmap);
    119121        if (rc != EOK)
    120122                goto error;
     
    181183 * Create graphics context for rendering into a window.
    182184 *
    183  * @param disp Display to create window on
     185 * @param client Client owning the window
    184186 * @param rgc Place to store pointer to new GC.
    185187 *
    186188 * @return EOK on success or an error code
    187189 */
    188 errno_t ds_window_create(ds_display_t *disp, ds_window_t **rgc)
     190errno_t ds_window_create(ds_client_t *client, ds_window_t **rgc)
    189191{
    190192        ds_window_t *wnd = NULL;
     
    202204                goto error;
    203205
    204         ds_display_add_window(disp, wnd);
     206        ds_client_add_window(client, wnd);
    205207
    206208        wnd->gc = gc;
     
    222224        errno_t rc;
    223225
    224         ds_display_remove_window(wnd);
     226        ds_client_remove_window(wnd);
    225227
    226228        rc = gfx_context_delete(wnd->gc);
Note: See TracChangeset for help on using the changeset viewer.