Changeset acd7ac2 in mainline for uspace/srv/hid/display/window.c
- Timestamp:
- 2023-08-09T11:27:03Z (17 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 24be331e
- Parents:
- a77c722
- git-author:
- Jiri Svoboda <jiri@…> (2023-08-08 17:26:15)
- git-committer:
- Jiri Svoboda <jiri@…> (2023-08-09 11:27:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/window.c
ra77c722 racd7ac2 1092 1092 * @return Alternate window matching the criteria or @c NULL if there is none 1093 1093 */ 1094 ds_window_t *ds_window_find_alt(ds_window_t *wnd, 1094 ds_window_t *ds_window_find_prev(ds_window_t *wnd, 1095 display_wnd_flags_t allowed_flags) 1096 { 1097 ds_window_t *nwnd; 1098 1099 /* Try preceding windows in display order */ 1100 nwnd = ds_display_next_window(wnd); 1101 while (nwnd != NULL && (nwnd->flags & ~allowed_flags) != 0) { 1102 nwnd = ds_display_next_window(nwnd); 1103 } 1104 1105 /* Do we already have a matching window? */ 1106 if (nwnd != NULL && (nwnd->flags & ~allowed_flags) == 0) { 1107 return nwnd; 1108 } 1109 1110 /* Try succeeding windows in display order */ 1111 nwnd = ds_display_first_window(wnd->display); 1112 while (nwnd != NULL && nwnd != wnd && 1113 (nwnd->flags & ~allowed_flags) != 0) { 1114 nwnd = ds_display_next_window(nwnd); 1115 } 1116 1117 if (nwnd == wnd) 1118 return NULL; 1119 1120 return nwnd; 1121 } 1122 1123 /** Find alternate window with the allowed flags. 1124 * 1125 * An alternate window is a *different* window that is preferably previous 1126 * in the display order and only has the @a allowed flags. 1127 * 1128 * @param wnd Window 1129 * @param allowed_flags Bitmask of flags that the window is allowed to have 1130 * 1131 * @return Alternate window matching the criteria or @c NULL if there is none 1132 */ 1133 ds_window_t *ds_window_find_next(ds_window_t *wnd, 1095 1134 display_wnd_flags_t allowed_flags) 1096 1135 {
Note:
See TracChangeset
for help on using the changeset viewer.