Tk Source Code

View Ticket
Login
Ticket UUID: 551969
Title: VFS and mouse cursor specification files
Type: RFE Version: None
Submitter: nobody Created on: 2002-05-03 18:42:03
Subsystem: 31. Cursor Names Assigned To: vincentdarley
Priority: 4 Severity:
Status: Open Last Modified: 2003-11-13 06:56:09
Resolution: None Closed By:
    Closed on:
Description:
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
==============
User Comments: dkf added on 2003-02-24 01:07:29:
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.

vincentdarley added on 2002-10-14 18:14:04:
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.

andreas_kupries added on 2002-05-08 13:17:21:

File Added - 22693: MCfromVFS.zip

hobbs added on 2002-05-07 23:08:31:
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.

nobody added on 2002-05-07 18:41:13:
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.

nobody added on 2002-05-07 18:35:48:
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 added on 2002-05-04 16:57:57:
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.
==============

andreas_kupries added on 2002-05-04 03:00:03:
Logged In: YES 
user_id=75003

There is no attached file.

Attachments: