Changeset b3c185b6 in mainline for uspace/lib/display/include
- Timestamp:
- 2019-11-04T14:05:35Z (6 years ago)
- 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)
- Location:
- uspace/lib/display/include
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/include/disp_srv.h
r22faaf2 rb3c185b6 38 38 #include <async.h> 39 39 #include <errno.h> 40 #include <types/display/event.h> 40 41 41 42 typedef struct display_ops display_ops_t; … … 51 52 errno_t (*window_create)(void *, sysarg_t *); 52 53 errno_t (*window_destroy)(void *, sysarg_t); 54 errno_t (*get_event)(void *, sysarg_t *, display_wnd_ev_t *); 53 55 }; 54 56 55 57 extern void display_conn(ipc_call_t *, display_srv_t *); 58 extern void display_srv_ev_pending(display_srv_t *); 56 59 57 60 #endif -
uspace/lib/display/include/display.h
r22faaf2 rb3c185b6 43 43 extern errno_t display_open(const char *, display_t **); 44 44 extern void display_close(display_t *); 45 extern errno_t display_window_create(display_t *, display_window_t **); 45 extern errno_t display_window_create(display_t *, display_wnd_cb_t *, 46 void *, display_window_t **); 46 47 extern errno_t display_window_destroy(display_window_t *); 47 48 extern errno_t display_window_get_gc(display_window_t *, gfx_context_t **); -
uspace/lib/display/include/ipc/display.h
r22faaf2 rb3c185b6 39 39 40 40 typedef enum { 41 DISPLAY_WINDOW_CREATE = IPC_FIRST_USER_METHOD, 41 DISPLAY_CALLBACK_CREATE = IPC_FIRST_USER_METHOD, 42 DISPLAY_WINDOW_CREATE, 42 43 DISPLAY_WINDOW_DESTROY, 43 DISPLAY_ WINDOW_GC44 DISPLAY_GET_EVENT 44 45 } display_request_t; 46 47 typedef enum { 48 DISPLAY_EV_PENDING = IPC_FIRST_USER_METHOD 49 } display_event_t; 45 50 46 51 #endif -
uspace/lib/display/include/types/display.h
r22faaf2 rb3c185b6 37 37 38 38 #include <async.h> 39 #include <fibril_synch.h> 40 #include <io/kbd_event.h> 39 41 #include <ipc/devman.h> 40 42 #include <stdint.h> … … 44 46 /** Session with display server */ 45 47 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; 46 56 } display_t; 57 58 /** Display window callbacks */ 59 typedef struct { 60 void (*kbd_event)(void *, kbd_event_t *); 61 } display_wnd_cb_t; 62 63 typedef struct { 64 kbd_event_t kbd_event; 65 } display_wnd_ev_t; 47 66 48 67 /** Display window */ … … 50 69 /** Display associated with the window */ 51 70 display_t *display; 71 /** Link to @c display->windows */ 72 link_t lwindows; 52 73 /** Window ID */ 53 74 sysarg_t id; 75 /** Callback functions */ 76 display_wnd_cb_t *cb; 77 /** Argument to callback functions */ 78 void *cb_arg; 54 79 } display_window_t; 55 80
Note:
See TracChangeset
for help on using the changeset viewer.