Changeset cbaf408 in mainline


Ignore:
Timestamp:
2025-05-02T02:33:26Z (7 days ago)
Author:
Matěj Volf <git@…>
Children:
11cce63
Parents:
629b480
git-author:
Matěj Volf <git@…> (2025-05-02 02:33:15)
git-committer:
Matěj Volf <git@…> (2025-05-02 02:33:26)
Message:

add pointer cursor

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/display/include/types/display/cursor.h

    r629b480 rcbaf408  
    4949        dcurs_size_urdl,
    5050        /** I-beam (suggests editable text) */
    51         dcurs_ibeam
     51        dcurs_ibeam,
     52        /** Pointer (suggests clickable object) */
     53        dcurs_pointer,
    5254} display_stock_cursor_t;
    5355
    5456enum {
    5557        /** Number of stock cursor types */
    56         dcurs_limit = dcurs_ibeam + 1
     58        dcurs_limit = dcurs_pointer + 1
    5759};
    5860
  • uspace/lib/ui/include/types/ui/cursor.h

    r629b480 rcbaf408  
    4949        ui_curs_size_urdl,
    5050        /** I-beam (suggests editable text) */
    51         ui_curs_ibeam
     51        ui_curs_ibeam,
     52        /** Pointer (suggests clickable object) */
     53        ui_curs_pointer,
    5254} ui_stock_cursor_t;
    5355
  • uspace/lib/ui/src/window.c

    r629b480 rcbaf408  
    12511251                dcursor = dcurs_ibeam;
    12521252                break;
     1253        case ui_curs_pointer:
     1254                dcursor = dcurs_pointer;
     1255                break;
    12531256        }
    12541257
  • uspace/srv/hid/display/cursimg.c

    r629b480 rcbaf408  
    159159};
    160160
     161static uint8_t pointer_img[] = {
     162        0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     163        0, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     164        0, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     165        0, 0, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     166        0, 0, 0, 0, 1, 2, 2, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0,
     167        0, 1, 1, 0, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 0,
     168        1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1,
     169        1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1,
     170        1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 1,
     171        1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     172        1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     173        0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     174        0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     175        0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     176        0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     177        0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     178        0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     179        0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
     180        0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0,
     181        0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0,
     182        0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0
     183};
     184
    161185ds_cursimg_t ds_cursimg[dcurs_limit] = {
    162186        {
     
    183207                .rect = { -5, -9, 6, 10 },
    184208                .image = ibeam_img
     209        },
     210        {
     211                .rect = { -6, 0, 13, 21 },
     212                .image = pointer_img
    185213        }
    186214};
Note: See TracChangeset for help on using the changeset viewer.