| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]
STR #1385
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Unassigned |
Summary: | cursor(Image*, ...) not implemented |
Version: | 2.0-current |
Created By: | kispaljr |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
#1 | kispaljr 07:11 Aug 02, 2006 |
| The following function is declared, but not implemented:
Cursor* cursor(Image*, int x, int y);
I tried it under Win32, but I beleive that it's not implemented for other platforms either. Please do NOT remove this function, it is so useful. If you have the time to implement it, I would be very grateful :)
If you haven't got the time, but you can accept implementation from "outside", please let me know and I will try to provide an implementation for Win32. | |
|
#2 | yuri 00:03 Jun 23, 2009 |
| I add implimentation for win32 and X11 (using Xcursor lib, check it in configure). r6793.
Please post any coments here. | |
|
#3 | AlbrechtS 15:06 Jun 29, 2009 |
| Yuri, you asked for comments - here are mine: I'm not at FLTK 2 developer or user, but I see these problems:
1) using BITMAPV5HEADER broke old mingw builds. IMHO it is possible to use BITMAPV4HEADER, this would *maybe* fix this. Using BITMAPHEADER didn't work - you would need to recode the R/G/B mode.
2) building on Linux without lib Xcursor didn't work because USE_XCURSOR is defined anyway (as 0). You should change "#ifdef USE_XCURSOR" to "#if USE_XCURSOR" - this fixed it for me.
3) the #warning doesn't compile on all compilers, it's probably only supported by gcc. It should be guarded by "#if defined(__GNUC__)" - that's what we did in FLTK 1.1.
That said, I don't think that it is a good idea to have a dependency on yet another lib. Maybe you should take a look at Matthias' Flmm_Cursor_Shape. IIRC this would also work for Mac, but I don't know if it can be used without too many changes.
Matthias, what do you think about this? I can imagine to have the nice cursor editor as another demo program, please see also http://www.fltk.org/str.php?L2192
Would this also be usable to make cursors from images? | |
|
#4 | AlbrechtS 03:45 Jun 30, 2009 |
| Oh, I forgot two issues:
4) you left some debug (printf) statements in the code
5) the test program crashes at startup time, if the custom cursor image isn't found, e.g. if you start it from another working directory. | |
|
#5 | yuri 07:01 Jul 10, 2009 |
| Ok i see to fix Linux build it's enough change configh.in: line 69 must be #undef USE_XCURSOR instead of #define USE_XCURSOR 0
about Flmm_Cursor_Shape it may be usefull at some points. but cursors is not reusable (i try use it with gtk+ - cursors was mirrored).
another problem i see at macos : on x86 Flmm_Cursor_Shape not work. (I have no solution for mac os). | |
|
#6 | AlbrechtS 07:11 Jul 10, 2009 |
| configh.in mod. checked in: svn -r 6827.
Tested and works. Thanks, Yuri. | |
|
#7 | AlbrechtS 01:45 Aug 30, 2009 |
| Please see also STR #2238:
http://www.fltk.org/str.php?L2238 | |
|
#8 | AlbrechtS 01:50 Aug 30, 2009 |
| Please see also STR #2235 for a description how the fix the #warning issue in a compatible way:
http://www.fltk.org/str.php?L2235 | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |