Menu

#106 VFS and mouse cursor specification files

open
4
2003-11-12
2002-05-03
Anonymous
No

Tcl version: 8.3.4
OS Platform: Windows 2000

Problem behaviour:
The issue concerns the configuration of the mouse
cursor through a separate mouse cursor specification
file, e.g.

. configure -cursor @linkcursor.cur

When a script is run as a scripted document and the
mouse cursor specification file is contained within the
scripted document, the configuration command command
fails, returning the error message:

bad cursor spec
"@F:/whateverpath/mousetest.sdk/bin/linkcursor.cur"

(Both a script from which you can construct a scripted
document that reproduces the error, and a scripted doc
are packed in the attached zip file.)

The faulty behaviour has been noticed when running
under windows, however, I question whether it is
platform specific.

Expected nehaviour:
The mouse cursor specification file should be read from
the VFS and the shape of the mouse cursor should change
accordingly.

Jean Claude Wippler has tracked the problem down to:

quote jcw start

PS. Oops, wait - I think I found the problem, it's
Windows-specific. The "win/tkWinCursor.c" has a call
"LoadCursorFromFile", and I can't find
LoadCursorFromFile anywhere else, so it looks like this
call has not yet been made VFS aware.

quote jcw end

Sincerely,

Erik Leunissen

Discussion

  • Andreas Kupries

    Andreas Kupries - 2002-05-03

    Logged In: YES
    user_id=75003

    There is no attached file.

     
  • Andreas Kupries

    Andreas Kupries - 2002-05-03
    • assigned_to: nobody --> hobbs
     
  • Nobody/Anonymous

    Logged In: NO

    I am willing to attempt (once more) to provide the attached
    file that I mentioned in the original bug report. Problem is
    that I just do not know how to wield this entire SourceForge
    beast.

    Please send to *my* email address *your* e-mail address to
    which I can send it.

    Erik Leunissen.

     
  • Nobody/Anonymous

    Logged In: NO

    Looks like this is a Win32 API which obviously can't deal
    with a vfs. I imagine something like 'ReadIconFromICOFile'
    will need to be written to handle these cursor files.

     
  • Nobody/Anonymous

    Logged In: NO

    I don't think we need an attached file here. The bug in Tk
    is pretty clear. Looking at MSDN, I see this:

    "You can also create a custom cursor at run time by using
    the CreateIconIndirect function, which creates a cursor
    based on the content of an ICONINFO structure. The
    GetIconInfo function fills this structure with hot spot
    coordinates and information concerning the associated mask
    and color."

    So it seems as if Icons and Cursors have similar
    (identical?) resource structures, and someone knowledgeable
    ought to be able to make use of the code in tkWinWm.c to
    help provide proper .cur support.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-05-07

    Logged In: YES
    user_id=72656

    On the admin side - only the submitter of the bug and
    project bug db technicians can add files to a report. That
    is why it is important to be logged in when you submit a
    report.

    There is no "bug" in Tk. The ability to use cursors from a
    file is a clear feature. What is needed is the further
    ability to handle data defined icons.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-05-07
    • priority: 5 --> 4
     
  • Andreas Kupries

    Andreas Kupries - 2002-05-08

    Zip containing the referenced files

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2002-10-02
    • assigned_to: hobbs --> vincentdarley
     
  • Vince Darley

    Vince Darley - 2002-10-14
    • assigned_to: vincentdarley --> nobody
     
  • Vince Darley

    Vince Darley - 2002-10-14

    Logged In: YES
    user_id=32170

    Someone with better win32 knowledge will have to look
    at this. We need to know what LoadCursorFromFile
    does so that we can load a cursor from an arbitrary i/o
    stream.

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    A quick examination of MSDN indicates that, at least for
    monochrome cursors, we could use CreateCursor(). That would
    at least let us get fairly close to emulating the behaviour
    under X...

    Otherwise, I suspect we'll need a trick like what we use for
    loading DLLs from a VFS. Perhaps this indicates that we
    need an API function to run some other callback with a VFS
    file converted to a real file (i.e. a temp file if we're in
    a non-system FS) for the duration of the call, as I find it
    a bit tricky to believe that only Tk would find such a
    capability useful.

     
  • Don Porter

    Don Porter - 2003-11-12
    • labels: --> 31. Cursor Names
    • assigned_to: nobody --> vincentdarley
     
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.