Changeset 7e38970d in mainline for uspace/lib/display
- Timestamp:
- 2020-12-07T00:08:37Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 25f26600
- Parents:
- 7a873f0 (diff), 8596474 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/display
- Files:
-
- 1 added
- 4 edited
-
include/types/display.h (modified) (2 diffs)
-
include/types/display/wndparams.h (modified) (1 diff)
-
private/display.h (added)
-
src/display.c (modified) (3 diffs)
-
test/display.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/include/types/display.h
r7a873f0 r7e38970d 46 46 #define DISPLAY_DEFAULT NULL 47 47 48 struct display; 49 struct display_window; 50 48 51 /** Display server session */ 49 typedef struct { 50 /** Session with display server */ 51 async_sess_t *sess; 52 /** Synchronize access to display object */ 53 fibril_mutex_t lock; 54 /** @c true if callback handler terminated */ 55 bool cb_done; 56 /** Signalled when cb_done or ev_pending is changed */ 57 fibril_condvar_t cv; 58 /** Windows (of display_window_t) */ 59 list_t windows; 60 } display_t; 52 typedef struct display display_t; 53 54 /** Display window */ 55 typedef struct display_window display_window_t; 61 56 62 57 /** Display window callbacks */ … … 76 71 } display_wnd_cb_t; 77 72 78 /** Display window */79 typedef struct {80 /** Display associated with the window */81 display_t *display;82 /** Link to @c display->windows */83 link_t lwindows;84 /** Window ID */85 sysarg_t id;86 /** Callback functions */87 display_wnd_cb_t *cb;88 /** Argument to callback functions */89 void *cb_arg;90 } display_window_t;91 92 73 #endif 93 74 -
uspace/lib/display/include/types/display/wndparams.h
r7a873f0 r7e38970d 41 41 * 42 42 * The window's dimensions are determined by the bounding rectangle, 43 * the position of which does not relate to its posit on on the display,43 * the position of which does not relate to its position on the display, 44 44 * it just determines which range of logical coordinates is used 45 45 * by the window. -
uspace/lib/display/src/display.c
r7a873f0 r7e38970d 38 38 #include <mem.h> 39 39 #include <stdlib.h> 40 #include "../private/display.h" 40 41 #include "../private/params.h" 41 42 … … 198 199 /** Destroy display window. 199 200 * 200 * @param window Window 201 * @param window Window or @c NULL 201 202 * @return EOK on success or an error code. In both cases @a window must 202 203 * not be accessed anymore … … 206 207 async_exch_t *exch; 207 208 errno_t rc; 209 210 if (window == NULL) 211 return EOK; 208 212 209 213 exch = async_exchange_begin(window->display->sess); -
uspace/lib/display/test/display.c
r7a873f0 r7e38970d 38 38 #include <loc.h> 39 39 #include <pcut/pcut.h> 40 #include "../private/display.h" 40 41 41 42 PCUT_INIT; … … 331 332 } 332 333 334 /** display_window_destroy() can handle NULL argument */ 335 PCUT_TEST(window_destroy_null) 336 { 337 display_window_destroy(NULL); 338 } 339 333 340 /** display_window_move_req() with server returning error response works. */ 334 341 PCUT_TEST(window_move_req_failure)
Note:
See TracChangeset
for help on using the changeset viewer.
