Changeset 195b7b3 in mainline
- Timestamp:
- 2020-06-22T15:25:48Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8e1f93
- Parents:
- 5271e4c
- Location:
- uspace/srv/hid/display
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/client.c
r5271e4c r195b7b3 128 128 * @param id Window ID 129 129 */ 130 #include <stdio.h>131 130 ds_window_t *ds_client_find_window(ds_client_t *client, ds_wnd_id_t id) 132 131 { … … 134 133 135 134 // TODO Make this faster 136 printf("ds_client_find_window: id=0x%x\n", (unsigned) id);137 135 wnd = ds_client_first_window(client); 138 136 while (wnd != NULL) { 139 printf("ds_client_find_window: wnd=%p wnd->id=0x%x\n", wnd,140 (unsigned) wnd->id);141 137 if (wnd->id == id) 142 138 return wnd; -
uspace/srv/hid/display/ddev.c
r5271e4c r195b7b3 38 38 #include <errno.h> 39 39 #include <io/log.h> 40 #include <stdio.h>41 40 #include <stdlib.h> 42 41 #include "display.h" … … 100 99 rc = loc_service_get_name(svc_id, &name); 101 100 if (rc != EOK) { 102 printf("Error resolving name of service %lu.\n", 101 log_msg(LOG_DEFAULT, LVL_ERROR, 102 "Error resolving name of service %lu.\n", 103 103 (unsigned long) svc_id); 104 104 return rc; … … 107 107 rc = ddev_open(name, &dd); 108 108 if (rc != EOK) { 109 printf("Error opening display device '%s'.\n", name); 109 log_msg(LOG_DEFAULT, LVL_ERROR, 110 "Error opening display device '%s'.\n", name); 110 111 free(name); 111 112 return rc; … … 114 115 rc = ddev_get_info(dd, &info); 115 116 if (rc != EOK) { 116 printf("Error getting information for display device '%s'.\n", 117 log_msg(LOG_DEFAULT, LVL_ERROR, 118 "Error getting information for display device '%s'.\n", 117 119 name); 118 120 free(name); … … 121 123 } 122 124 123 log_msg(LOG_DEFAULT, LVL_ NOTE, "Device rectangle for '%s': "125 log_msg(LOG_DEFAULT, LVL_DEBUG, "Device rectangle for '%s': " 124 126 "%d,%d,%d,%d\n", name, info.rect.p0.x, info.rect.p0.y, 125 127 info.rect.p1.x, info.rect.p1.y); … … 127 129 rc = ddev_get_gc(dd, &gc); 128 130 if (rc != EOK) { 129 printf("Error getting device context for '%s'.\n", name); 131 log_msg(LOG_DEFAULT, LVL_ERROR, 132 "Error getting device context for '%s'.\n", name); 130 133 ddev_close(dd); 131 134 free(name); -
uspace/srv/hid/display/display.c
r5271e4c r195b7b3 208 208 * @param id Window ID 209 209 */ 210 #include <stdio.h>211 210 ds_window_t *ds_display_find_window(ds_display_t *display, ds_wnd_id_t id) 212 211 { … … 214 213 ds_window_t *wnd; 215 214 216 printf("ds_display_find_window: id=0x%x\n", (unsigned) id);217 218 215 client = ds_display_first_client(display); 219 216 while (client != NULL) { 220 printf("ds_display_find_window: client=%p\n", client);221 217 wnd = ds_client_find_window(client, id); 222 if (wnd != NULL) { 223 printf("ds_display_find_window: found wnd=%p id=0x%x\n", 224 wnd, (unsigned) wnd->id); 218 if (wnd != NULL) 225 219 return wnd; 226 } 220 227 221 client = ds_display_next_client(client); 228 222 } 229 223 230 printf("ds_display_find_window: not found\n");231 224 return NULL; 232 225 } -
uspace/srv/hid/display/dsops.c
r5271e4c r195b7b3 138 138 } 139 139 140 log_msg(L VL_NOTE, LVL_DEBUG, "disp_window_move_req()");140 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_move_req()"); 141 141 ds_window_move_req(wnd, pos); 142 142 ds_display_unlock(client->display); … … 157 157 } 158 158 159 log_msg(L VL_NOTE, LVL_DEBUG, "disp_window_move()");159 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_move()"); 160 160 ds_window_move(wnd, pos); 161 161 ds_display_unlock(client->display); … … 180 180 } 181 181 182 log_msg(L VL_NOTE, LVL_DEBUG, "disp_window_resize_req()");182 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_resize_req()"); 183 183 ds_window_resize_req(wnd, rsztype, pos); 184 184 ds_display_unlock(client->display); … … 201 201 } 202 202 203 log_msg(LOG_DEFAULT, LVL_ NOTE, "disp_window_resize()");203 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_resize()"); 204 204 rc = ds_window_resize(wnd, offs, nbound); 205 205 ds_display_unlock(client->display); … … 222 222 } 223 223 224 log_msg(LOG_DEFAULT, LVL_ NOTE, "disp_window_set_cursor()");224 log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_set_cursor()"); 225 225 rc = ds_window_set_cursor(wnd, cursor); 226 226 ds_display_unlock(client->display); -
uspace/srv/hid/display/input.c
r5271e4c r195b7b3 35 35 #include <errno.h> 36 36 #include <io/input.h> 37 #include <io/log.h> 37 38 #include <loc.h> 38 #include <stdio.h>39 39 #include <str_error.h> 40 40 #include "display.h" … … 153 153 errno_t rc = loc_service_get_id(svc, &dsid, 0); 154 154 if (rc != EOK) { 155 printf("%s: Input service %s not found\n", NAME, svc); 155 log_msg(LOG_DEFAULT, LVL_ERROR, "Input service %s not found\n", 156 svc); 156 157 return rc; 157 158 } … … 159 160 sess = loc_service_connect(dsid, INTERFACE_INPUT, 0); 160 161 if (sess == NULL) { 161 printf("%s: Unable to connect to input service %s\n", NAME,162 svc);162 log_msg(LOG_DEFAULT, LVL_ERROR, 163 "Unable to connect to input service %s\n", svc); 163 164 return EIO; 164 165 } … … 168 169 if (rc != EOK) { 169 170 async_hangup(sess); 170 printf("%s: Unable to communicate with service %s (%s)\n", 171 NAME, svc, str_error(rc)); 171 log_msg(LOG_DEFAULT, LVL_ERROR, 172 "Unable to communicate with service %s (%s)\n", 173 svc, str_error(rc)); 172 174 return rc; 173 175 } -
uspace/srv/hid/display/main.c
r5271e4c r195b7b3 161 161 errno_t rc; 162 162 163 log_msg(LOG_DEFAULT, LVL_ NOTE, "display_client_conn arg1=%zu arg2=%zu arg3=%zu arg4=%zu.",163 log_msg(LOG_DEFAULT, LVL_DEBUG, "display_client_conn arg1=%zu arg2=%zu arg3=%zu arg4=%zu.", 164 164 ipc_get_arg1(icall), ipc_get_arg2(icall), ipc_get_arg3(icall), 165 165 ipc_get_arg4(icall)); -
uspace/srv/hid/display/output.c
r5271e4c r195b7b3 38 38 #include <fibril_synch.h> 39 39 #include <io/kbd_event.h> 40 #include <io/log.h> 40 41 #include <io/pos_event.h> 41 42 #include <loc.h> 42 #include <stdio.h>43 43 #include <stdlib.h> 44 44 #include "ddev.h" … … 63 63 IPC_FLAG_BLOCKING); 64 64 if (rc != EOK) { 65 printf("Error looking up category 'display-device'.\n"); 65 log_msg(LOG_DEFAULT, LVL_ERROR, 66 "Error looking up category 'display-device'.\n"); 66 67 return EIO; 67 68 } … … 72 73 rc = loc_category_get_svcs(ddev_cid, &svcs, &count); 73 74 if (rc != EOK) { 74 printf("Error getting list of display devices.\n"); 75 log_msg(LOG_DEFAULT, LVL_ERROR, 76 "Error getting list of display devices.\n"); 75 77 return EIO; 76 78 } … … 90 92 rc = ds_ddev_open(output->def_display, svcs[i], &nddev); 91 93 if (rc != EOK) { 92 printf("Error adding display device.\n"); 94 log_msg(LOG_DEFAULT, LVL_ERROR, 95 "Error adding display device.\n"); 93 96 continue; 94 97 } … … 96 99 list_append(&nddev->loutdevs, &output->ddevs); 97 100 98 printf("Added display device '%lu'\n", 101 log_msg(LOG_DEFAULT, LVL_NOTE, 102 "Added display device '%lu'\n", 99 103 (unsigned long) svcs[i]); 100 104 } … … 114 118 ds_output_t *output = (ds_output_t *) arg; 115 119 116 printf("ds_ddev_change_cb\n");117 120 fibril_mutex_lock(&output->lock); 118 121 (void) ds_output_check_new_devs(output); … … 151 154 rc = loc_register_cat_change_cb(ds_ddev_change_cb, output); 152 155 if (rc != EOK) { 153 printf("Failed registering callback for device discovery.\n"); 156 log_msg(LOG_DEFAULT, LVL_ERROR, 157 "Failed registering callback for device discovery.\n"); 154 158 return rc; 155 159 } -
uspace/srv/hid/display/test/client.c
r5271e4c r195b7b3 30 30 #include <errno.h> 31 31 #include <pcut/pcut.h> 32 #include <stdio.h>33 32 #include <str.h> 34 33 … … 50 49 { 51 50 bool *called_cb = (bool *) arg; 52 printf("test_ds_ev_pending\n");53 51 *called_cb = true; 54 55 52 } 56 53 -
uspace/srv/hid/display/test/display.c
r5271e4c r195b7b3 30 30 #include <errno.h> 31 31 #include <pcut/pcut.h> 32 #include <stdio.h>33 32 #include <str.h> 34 33 … … 51 50 { 52 51 bool *called_cb = (bool *) arg; 53 printf("test_ds_ev_pending\n");54 52 *called_cb = true; 55 53 } -
uspace/srv/hid/display/test/seat.c
r5271e4c r195b7b3 30 30 #include <errno.h> 31 31 #include <pcut/pcut.h> 32 #include <stdio.h>33 32 #include <str.h> 34 33 … … 51 50 { 52 51 bool *called_cb = (bool *) arg; 53 printf("test_ds_ev_pending\n");54 52 *called_cb = true; 55 53 } -
uspace/srv/hid/display/window.c
r5271e4c r195b7b3 669 669 gfx_coord2_t orig_pos; 670 670 671 log_msg(LOG_DEFAULT, LVL_ NOTE, "ds_window_resize_req (%d, %d, %d)",671 log_msg(LOG_DEFAULT, LVL_DEBUG, "ds_window_resize_req (%d, %d, %d)", 672 672 (int) rsztype, (int) pos->x, (int) pos->y); 673 673
Note:
See TracChangeset
for help on using the changeset viewer.