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/lib/display/include/types/display.h

    r22faaf2 rb3c185b6  
    3737
    3838#include <async.h>
     39#include <fibril_synch.h>
     40#include <io/kbd_event.h>
    3941#include <ipc/devman.h>
    4042#include <stdint.h>
     
    4446        /** Session with display server */
    4547        async_sess_t *sess;
     48        /** Synchronize access to display object */
     49        fibril_mutex_t lock;
     50        /** @c true if callback handler terminated */
     51        bool cb_done;
     52        /** Signalled when cb_done or ev_pending is changed */
     53        fibril_condvar_t cv;
     54        /** Windows (of display_window_t) */
     55        list_t windows;
    4656} display_t;
     57
     58/** Display window callbacks */
     59typedef struct {
     60        void (*kbd_event)(void *, kbd_event_t *);
     61} display_wnd_cb_t;
     62
     63typedef struct {
     64        kbd_event_t kbd_event;
     65} display_wnd_ev_t;
    4766
    4867/** Display window */
     
    5069        /** Display associated with the window */
    5170        display_t *display;
     71        /** Link to @c display->windows */
     72        link_t lwindows;
    5273        /** Window ID */
    5374        sysarg_t id;
     75        /** Callback functions */
     76        display_wnd_cb_t *cb;
     77        /** Argument to callback functions */
     78        void *cb_arg;
    5479} display_window_t;
    5580
Note: See TracChangeset for help on using the changeset viewer.