Changeset 3434233 in mainline
- Timestamp:
- 2019-12-16T10:14:12Z (5 years ago)
- 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)
- Location:
- uspace
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/include/disp_srv.h
rfdc8e40 r3434233 38 38 #include <async.h> 39 39 #include <errno.h> 40 #include <types/display/event.h>41 #include <types/display/wndparams.h>40 #include "display/wndparams.h" 41 #include "types/display/event.h" 42 42 43 43 typedef struct display_ops display_ops_t; -
uspace/lib/display/include/display.h
rfdc8e40 r3434233 39 39 #include <gfx/context.h> 40 40 #include <stdbool.h> 41 #include " types/display/wndparams.h"41 #include "display/wndparams.h" 42 42 #include "types/display.h" 43 43 44 44 extern errno_t display_open(const char *, display_t **); 45 45 extern void display_close(display_t *); 46 extern void display_wnd_params_init(display_wnd_params_t *);47 46 extern errno_t display_window_create(display_t *, display_wnd_params_t *, 48 47 display_wnd_cb_t *, void *, display_window_t **); -
uspace/srv/hid/display/dsops.c
rfdc8e40 r3434233 63 63 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create()"); 64 64 65 rc = ds_window_create(client, &wnd);65 rc = ds_window_create(client, params, &wnd); 66 66 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create() - ds_window_create -> %d", rc); 67 67 if (rc != EOK) -
uspace/srv/hid/display/test/client.c
rfdc8e40 r3434233 27 27 */ 28 28 29 #include <disp_srv.h> 29 30 #include <errno.h> 30 31 #include <pcut/pcut.h> … … 83 84 ds_window_t *w1; 84 85 ds_window_t *wnd; 86 display_wnd_params_t params; 85 87 errno_t rc; 86 88 … … 91 93 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 92 94 93 rc = ds_window_create(client, &w0); 94 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 95 96 rc = ds_window_create(client, &w1); 95 display_wnd_params_init(¶ms); 96 params.rect.p0.x = params.rect.p0.y = 0; 97 params.rect.p1.x = params.rect.p1.y = 1; 98 99 rc = ds_window_create(client, ¶ms, &w0); 100 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 101 102 rc = ds_window_create(client, ¶ms, &w1); 97 103 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 98 104 … … 123 129 ds_window_t *w1; 124 130 ds_window_t *wnd; 131 display_wnd_params_t params; 125 132 errno_t rc; 126 133 … … 131 138 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 132 139 133 rc = ds_window_create(client, &w0); 134 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 135 136 rc = ds_window_create(client, &w1); 140 display_wnd_params_init(¶ms); 141 params.rect.p0.x = params.rect.p0.y = 0; 142 params.rect.p1.x = params.rect.p1.y = 1; 143 144 rc = ds_window_create(client, ¶ms, &w0); 145 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 146 147 rc = ds_window_create(client, ¶ms, &w1); 137 148 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 138 149 … … 158 169 ds_client_t *client; 159 170 ds_window_t *wnd; 171 display_wnd_params_t params; 160 172 kbd_event_t event; 161 173 ds_window_t *rwindow; … … 170 182 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 171 183 172 rc = ds_window_create(client, &wnd); 184 display_wnd_params_init(¶ms); 185 params.rect.p0.x = params.rect.p0.y = 0; 186 params.rect.p1.x = params.rect.p1.y = 1; 187 188 rc = ds_window_create(client, ¶ms, &wnd); 173 189 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 174 190 … … 213 229 ds_client_t *client; 214 230 ds_window_t *wnd; 231 display_wnd_params_t params; 215 232 errno_t rc; 216 233 … … 221 238 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 222 239 223 rc = ds_window_create(client, &wnd); 240 display_wnd_params_init(¶ms); 241 params.rect.p0.x = params.rect.p0.y = 0; 242 params.rect.p1.x = params.rect.p1.y = 1; 243 244 rc = ds_window_create(client, ¶ms, &wnd); 224 245 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 225 246 -
uspace/srv/hid/display/test/display.c
rfdc8e40 r3434233 27 27 */ 28 28 29 #include <disp_srv.h> 29 30 #include <errno.h> 30 31 #include <pcut/pcut.h> … … 99 100 ds_window_t *w1; 100 101 ds_window_t *wnd; 102 display_wnd_params_t params; 101 103 errno_t rc; 102 104 … … 107 109 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 108 110 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(¶ms); 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, ¶ms, &w1); 116 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 117 118 rc = ds_window_create(client, ¶ms, &w0); 113 119 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 114 120 … … 148 154 ds_window_t *w1; 149 155 ds_window_t *wnd; 156 display_wnd_params_t params; 150 157 gfx_coord2_t pos; 151 158 errno_t rc; … … 157 164 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 158 165 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(¶ms); 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, ¶ms, &w0); 171 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 172 173 rc = ds_window_create(client, ¶ms, &w1); 163 174 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 164 175 … … 217 228 ds_client_t *client; 218 229 ds_window_t *wnd; 230 display_wnd_params_t params; 219 231 kbd_event_t event; 220 232 bool called_cb = false; … … 230 242 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 231 243 232 rc = ds_window_create(client, &wnd); 244 display_wnd_params_init(¶ms); 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, ¶ms, &wnd); 233 249 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 234 250 … … 260 276 ds_client_t *client; 261 277 ds_window_t *w0, *w1; 278 display_wnd_params_t params; 262 279 kbd_event_t event; 263 280 bool called_cb = false; … … 273 290 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 274 291 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(¶ms); 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, ¶ms, &w0); 297 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 298 299 rc = ds_window_create(client, ¶ms, &w1); 279 300 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 280 301 … … 317 338 ds_client_t *client; 318 339 ds_window_t *w0, *w1; 340 display_wnd_params_t params; 319 341 ptd_event_t event; 320 342 bool called_cb = false; … … 330 352 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 331 353 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(¶ms); 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, ¶ms, &w0); 359 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 360 361 rc = ds_window_create(client, ¶ms, &w1); 336 362 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 337 363 -
uspace/srv/hid/display/test/seat.c
rfdc8e40 r3434233 27 27 */ 28 28 29 #include <disp_srv.h> 29 30 #include <errno.h> 30 31 #include <pcut/pcut.h> … … 62 63 ds_seat_t *seat; 63 64 ds_window_t *wnd; 65 display_wnd_params_t params; 64 66 errno_t rc; 65 67 … … 73 75 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 74 76 75 rc = ds_window_create(client, &wnd); 77 display_wnd_params_init(¶ms); 78 params.rect.p0.x = params.rect.p0.y = 0; 79 params.rect.p1.x = params.rect.p1.y = 1; 80 81 rc = ds_window_create(client, ¶ms, &wnd); 76 82 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 77 83 … … 93 99 ds_window_t *w0; 94 100 ds_window_t *w1; 101 display_wnd_params_t params; 95 102 errno_t rc; 96 103 … … 104 111 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 105 112 106 rc = ds_window_create(client, &w1); 113 display_wnd_params_init(¶ms); 114 params.rect.p0.x = params.rect.p0.y = 0; 115 params.rect.p1.x = params.rect.p1.y = 1; 116 117 rc = ds_window_create(client, ¶ms, &w1); 107 118 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 108 119 109 rc = ds_window_create(client, & w0);120 rc = ds_window_create(client, ¶ms, &w0); 110 121 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 111 122 -
uspace/srv/hid/display/test/window.c
rfdc8e40 r3434233 27 27 */ 28 28 29 #include <disp_srv.h> 29 30 #include <errno.h> 30 31 #include <pcut/pcut.h> … … 46 47 ds_client_t *client; 47 48 ds_window_t *wnd; 49 display_wnd_params_t params; 48 50 gfx_context_t *gc; 49 51 errno_t rc; … … 55 57 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 56 58 57 rc = ds_window_create(client, &wnd); 59 display_wnd_params_init(¶ms); 60 params.rect.p0.x = params.rect.p0.y = 0; 61 params.rect.p1.x = params.rect.p1.y = 1; 62 63 rc = ds_window_create(client, ¶ms, &wnd); 58 64 PCUT_ASSERT_ERRNO_VAL(EOK, rc); 59 65 -
uspace/srv/hid/display/types/display/window.h
rfdc8e40 r3434233 54 54 /** Link to @c display->windows */ 55 55 link_t ldwindows; 56 /** Bounding rectangle */ 57 gfx_rect_t rect; 56 58 /** Display position */ 57 59 gfx_coord2_t dpos; -
uspace/srv/hid/display/window.c
rfdc8e40 r3434233 184 184 * Create graphics context for rendering into a window. 185 185 * 186 * @param client Client owning the window 186 * @param client Client owning the window= 187 * @param params Window parameters 187 188 * @param rgc Place to store pointer to new GC. 188 189 * 189 190 * @return EOK on success or an error code 190 191 */ 191 errno_t ds_window_create(ds_client_t *client, ds_window_t **rgc) 192 errno_t ds_window_create(ds_client_t *client, display_wnd_params_t *params, 193 ds_window_t **rgc) 192 194 { 193 195 ds_window_t *wnd = NULL; … … 208 210 ds_display_add_window(client->display, wnd); 209 211 212 wnd->rect = params->rect; 210 213 wnd->gc = gc; 211 214 *rgc = wnd; -
uspace/srv/hid/display/window.h
rfdc8e40 r3434233 42 42 #include "types/display/display.h" 43 43 #include "types/display/window.h" 44 #include "types/display/wndparams.h" 44 45 45 46 extern gfx_context_ops_t window_gc_ops; 46 47 47 extern errno_t ds_window_create(ds_client_t *, ds_window_t **); 48 extern errno_t ds_window_create(ds_client_t *, display_wnd_params_t *, 49 ds_window_t **); 48 50 extern void ds_window_destroy(ds_window_t *); 49 51 extern gfx_context_t *ds_window_get_ctx(ds_window_t *);
Note:
See TracChangeset
for help on using the changeset viewer.