Menu

#32 example change cursor shape on linux

v1.0_(example)
open
nobody
1
2021-03-03
2020-12-26
No
Hi to all and merry christmas , i use hwgui on linux ubuntu 20.01.1 lts and i have some long iterations with a table, so i need to change the cursor shape from normal to clock and reverse, could some one bring me an example how to ?
regards
domenico

Discussion

  • Wilfried Brunken

    Hello Domenico,
    it is good idea to add this feature to HWGUI, i think
    it is also useful for other users.

    But for this we need to add new functions to the HWGUI library.
    These are functions for converting images to cursor shapes or
    use standard cursor, they are defined in "gtk.ch" for GTK.

    The sample program "testfunc.prg" demonstrates the usage of functions for
    hiding and reactivating the cursor.

    My first investigation:
    Functions HWG_LOADCURSOR() and HWG_SETCURSOR() are used to
    set cursor shapes, they must be ported to GTK.
    Hwg_SetCursor(objecthandle , areahandle ) makes
    cursor visible.

    So it is a new feature and i need some time to
    realize this feature for WinAPI and GTK.
    Be patient, i'll post with this ticket, if
    the feature is ready.

    Happy new year,
    with regards,
    MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     
  • domenico d'oria

    domenico d'oria - 2021-01-02

    Happy new year Wilfried

    many many thanks for your amazing support

    probably if Alexander can explain how to, all we can use these function

    regard

    Domenico

     
  • Wilfried Brunken

    Hello Domenico,
    with commit r2951 i created the function
    hwg_LoadCursorFromFile()
    for setting custom mouse cursor for WinAPI and GTK.

    Next step will be, that the cursor can be converted to
    hex values and be compiled into the exe file without
    using any rc files. This is really done with bitmaps and icon,
    so that i think, can add this feature the next few days.

    Please check and give feedback.

    With regards,
    MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     
  • Wilfried Brunken

    Hello Domenico,
    now the function "hwg_LoadCursorFromString()" (multi platform) is ready to
    display a custom cursor defined by hex values, so the
    cursor data is part of the exe file without any definitions in rc files.
    (committed with r2952).

    See sample program "testspli.prg" for details.
    Please check.

    With regrards,
    MNI TNX, 73 es 55 de
    DF7BE, Wilfried

     
  • domenico d'oria

    domenico d'oria - 2021-03-03

    Thank Wilfried, i'll try as soon as possible

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.