Changeset dc0f6e4c in mainline for uspace/lib/ui/src/wdecor.c
- Timestamp:
- 2023-10-24T16:50:46Z (17 months ago)
- Parents:
- 29ed06d
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-22 20:38:41)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-24 16:50:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/wdecor.c
r29ed06d rdc0f6e4c 650 650 * @param pos_id Positioning device ID 651 651 */ 652 void ui_wdecor_resize(ui_wdecor_t *wdecor, ui_wdecor_rsztype_t rsztype,652 void ui_wdecor_resize(ui_wdecor_t *wdecor, display_wnd_rsztype_t rsztype, 653 653 gfx_coord2_t *pos, sysarg_t pos_id) 654 654 { … … 912 912 * @return Resize type 913 913 */ 914 ui_wdecor_rsztype_t ui_wdecor_get_rsztype(ui_wdecor_t *wdecor,914 display_wnd_rsztype_t ui_wdecor_get_rsztype(ui_wdecor_t *wdecor, 915 915 gfx_coord2_t *pos) 916 916 { … … 923 923 /* Window not resizable? */ 924 924 if ((wdecor->style & ui_wds_resizable) == 0) 925 return ui_wr_none;925 return display_wr_none; 926 926 927 927 /* Window is maximized? */ 928 928 if (wdecor->maximized) 929 return ui_wr_none;929 return display_wr_none; 930 930 931 931 /* Position not inside window? */ 932 932 if (!gfx_pix_inside_rect(pos, &wdecor->rect)) 933 return ui_wr_none;933 return display_wr_none; 934 934 935 935 /* Position is within edge width from the outside */ … … 950 950 /* Top-left corner */ 951 951 if (edge && cleft && ctop) 952 return ui_wr_top_left;952 return display_wr_top_left; 953 953 954 954 /* Top-right corner */ 955 955 if (edge && cright && ctop) 956 return ui_wr_top_right;956 return display_wr_top_right; 957 957 958 958 /* Bottom-left corner */ 959 959 if (edge && cleft && cbottom) 960 return ui_wr_bottom_left;960 return display_wr_bottom_left; 961 961 962 962 /* Bottom-right corner */ 963 963 if (edge && cright && cbottom) 964 return ui_wr_bottom_right;964 return display_wr_bottom_right; 965 965 966 966 /* Left edge */ 967 967 if (eleft) 968 return ui_wr_left;968 return display_wr_left; 969 969 970 970 /* Right edge */ 971 971 if (eright) 972 return ui_wr_right;972 return display_wr_right; 973 973 974 974 /* Top edge */ 975 975 if (etop) 976 return ui_wr_top;976 return display_wr_top; 977 977 978 978 /* Bottom edge */ 979 979 if (ebottom) 980 return ui_wr_bottom;981 982 return ui_wr_none;980 return display_wr_bottom; 981 982 return display_wr_none; 983 983 } 984 984 … … 990 990 * @return Cursor to use for this resize type 991 991 */ 992 ui_stock_cursor_t ui_wdecor_cursor_from_rsztype( ui_wdecor_rsztype_t rsztype)992 ui_stock_cursor_t ui_wdecor_cursor_from_rsztype(display_wnd_rsztype_t rsztype) 993 993 { 994 994 switch (rsztype) { 995 case ui_wr_none:995 case display_wr_none: 996 996 return ui_curs_arrow; 997 997 998 case ui_wr_top:999 case ui_wr_bottom:998 case display_wr_top: 999 case display_wr_bottom: 1000 1000 return ui_curs_size_ud; 1001 1001 1002 case ui_wr_left:1003 case ui_wr_right:1002 case display_wr_left: 1003 case display_wr_right: 1004 1004 return ui_curs_size_lr; 1005 1005 1006 case ui_wr_top_left:1007 case ui_wr_bottom_right:1006 case display_wr_top_left: 1007 case display_wr_bottom_right: 1008 1008 return ui_curs_size_uldr; 1009 1009 1010 case ui_wr_top_right:1011 case ui_wr_bottom_left:1010 case display_wr_top_right: 1011 case display_wr_bottom_left: 1012 1012 return ui_curs_size_urdl; 1013 1013 … … 1074 1074 gfx_coord2_t pos; 1075 1075 sysarg_t pos_id; 1076 ui_wdecor_rsztype_t rsztype;1076 display_wnd_rsztype_t rsztype; 1077 1077 ui_stock_cursor_t cursor; 1078 1078 … … 1089 1089 1090 1090 /* Press on window border? */ 1091 if (rsztype != ui_wr_none && event->type == POS_PRESS)1091 if (rsztype != display_wr_none && event->type == POS_PRESS) 1092 1092 ui_wdecor_resize(wdecor, rsztype, &pos, pos_id); 1093 1093 }
Note:
See TracChangeset
for help on using the changeset viewer.