Commit Graph

195 Commits

Author SHA1 Message Date
Matthias Melcher
c26809e0ea Consolidated all possible flag values into a single enum in Fl_Widget (STR #2161)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6905 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-09-27 12:06:35 +00:00
Albrecht Schlosser
9effc624af more indentation fixes in src/Fl_win32.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6668 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-02-21 10:18:47 +00:00
Albrecht Schlosser
f04bc53457 Fixed indentation and comments (src/Fl_Win32.cxx).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6667 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-02-21 10:01:57 +00:00
Fabien Costantini
84920d7cf1 STR #2104 fix: applied patch from sadysta, modified it to harmonize with existing win32 code like global alloc code, wchar_t type use. Added a wchar.h include for gcc win32 targets, compiled and tested under vc2005, gcc mingw, gcc cygwin.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6624 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-12 12:43:03 +00:00
Matthias Melcher
5251b64d57 Changed Copyright in 'src' directory
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 21:28:26 +00:00
Albrecht Schlosser
d34cc411e0 STR 2101: fl_set_spot() could crash on Windows under certain conditions.
The Windows version needs a window to anchor the display window for complex
text editing (IME), e.g. Japanese text. This update adds an additional
Fl_Window argument to fl_set_spot(), but this is only used for Windows.
The implemented version is tested with Japanese text input, including input
in subwindows (test/subwindow.cxx).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-27 19:22:30 +00:00
Albrecht Schlosser
fbe92ea113 Fixed a problem with TrackMouseEvent() (Windows only) that would
generate wrong FL_LEAVE events with subwindows. TrackMouseEvent
is now enabled by default (it was disabled for GNU compilers).
It can be disabled by defining NO_TRACK_MOUSE.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6552 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-07 10:53:07 +00:00
Albrecht Schlosser
abfba16040 STR 2101: Temporary fix to prevent crash. Also corrected code indentation.
ToDo: The correct fix would need more code changes and is under investigation.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6543 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-05 13:48:26 +00:00
Fabien Costantini
60335167b2 + Fixed non standard fltk utf8 files headers.
Kept original author and copyright.
  Added standard fltk LGPL header notice

+ Added missing comment to fl_width() related to latest utf8 STR#2086 related fix in r6539 and r6540.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6542 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-04 20:20:30 +00:00
Fabien Costantini
fdeb60898e #STR2056 partial fixes : wsock API now compiles ok, but there are still all utf8 stuff that won't compile: fl_utf8.cxx, fl_set_fonts_win32.cxx won't compile yet and Fl_Preferences recent utf8 addon should be checked for Cygwin.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6375 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-04 16:35:58 +00:00
Fabien Costantini
ffad932289 + Cairo branch merged after successful testing on Mac OS X 10.5.4, Linux Ubuntu 8.04,Windows XPSP2.
This integration is minimum as discussed, in particular it does not feature any fltk cairo drawing substitution
  as in fltk2.
  Still it provides all the fundations to go further even in next 1.4 ... 
  By default *no* cairo features are implemented nor linked, it can only be activated by --enable-cairo
  whose default is false.
  Please visit the README.cairo for complete description.

+ fixed UTF8 compilation pb on linux ubuntu

+ minor comments fixes on the fly



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6350 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-25 18:26:33 +00:00
Matthias Melcher
e8f467b9e3 Updating fl_utf8.h references. Fixing copyright date in .fl files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-19 17:40:20 +00:00
Fabien Costantini
e8478458bf Doxygen documentation: Fixed most important warnings for the Fl_Widget, Fl_Window, Fl_Valuator classes that should be now a 100% documented. For the rest I drastically reduced the undocumented APIs, but many others (less important) remains.
It looks and feels pretty good now :-)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-18 19:09:34 +00:00
Matthias Melcher
483dab9e92 Remove compile-time dependency on Imm32.dll on Win32. I have no MSWindows machine here, so this code is likely to contain one or more typos... . When working, this will take the burdon of linking to imm32 away, so that existing makefiles will need no changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-11 11:14:06 +00:00
Matthias Melcher
b6bde2e456 Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10 23:56:49 +00:00
Fabien Costantini
c7f4b8c930 merged modification from my private branch after successful regression testing on win32,cygwin/mingw, mac osx, linux.
Fl_win32.cxx and Fl_x.cxx modified for:
======================================
 - STR# 2029 fix: async select using USE_ASYNC_SELECT def. would not work. Obsoleted and commented as discussed
 - STR# 2032 fix: fl_ready would load wsock dll unnecessarily. Bad indents corrected

fluid.cxx modifed for:
======================
Added a local portable Fl_Process class to fluid enabling popen encapsulated win32 impl. based on CreateProcess() to work as expected in non console apps, so that exec command output window is now also implemented in win32, also permitting testing add_fd()/remove_fd() API relying on winsock on win32.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-02 12:03:30 +00:00
Fabien Costantini
e77a5d14d8 wsock32 static lib dependency removal from win build files.
error msg if wsock load fails changed by Fl::fatal() API use.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-08-28 17:33:56 +00:00
Fabien Costantini
bc6d15183c + Added a new optional compile time varaible named USE_WSOCK1 that would change the use of the WINSOCK2 libray by default, by the use of Winsock 1 (also implies the use of winsock.h instead of winsock2.h)
+ Removed one unused ret variable.

TODO: remove unnecessary wsock32.lib dependency from fltk-config, and other win32 build files.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-08-27 16:53:39 +00:00
Fabien Costantini
c874be7712 removed unused wsock api, fixed return result in fl_ready()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6167 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-08-26 08:24:54 +00:00
Fabien Costantini
fa58041f11 STR #1906 fixed as discussed :
Now winsock2 is linked instead of winsock1 by default.
 Also, this lib is now linked dynamically on-the-fly, only when needed.
 Separate commit will follow for vc2005 proj. modifications (removing wsock32.lib) for more readability.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-08-25 23:51:34 +00:00
Matthias Melcher
b6b746cd69 Replaced badly named type Fl_FontSize with Fl_Font_Descriptor. This type is only used in the core files and not available to the user.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6162 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-08-15 21:18:27 +00:00
Matthias Melcher
923f9fe353 STR #1854: fixed win32 issue with possible NULL pointer
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6017 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-01-10 21:53:34 +00:00
Matthias Melcher
5097f4df5b Fixed exposure event on zero size windows (STR #1824)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-12-20 16:22:53 +00:00
Michael R Sweet
ac3ab91ca2 Fix window hide bug on WIN32 (STR #1748)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5984 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-11-20 17:00:56 +00:00
Matthias Melcher
413d9295ac #1706: on WIN32, the attempt to map a subwindow when the parent window was not mapped yet would result in the subwindow never being mapped. This change will defer mapping until the parent window is shown.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5914 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-06-18 13:08:57 +00:00
Matthias Melcher
04ced5396e STR #1681: On WIN32 WM_PAINT messages, FLTK would first render the damaged area and then set the area as valid again. While this is mostly fine on single CPU machines, multi-CPU machines may re-invalidate areas that are currently drawn, resulting in unrendered strips when another window was moved quickly across an FLTK window during its redraw phase.
The new implementation validates the damaged area as quickly as possible, allowing new damage requests to be handled correctly, even while we are still redrawing the same damaged area.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-16 12:47:49 +00:00
Matthias Melcher
18f2016b1f Removed the Fl::set_awake_cb API and documented the Fl::awake(function, data) API.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5749 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-03-20 10:41:14 +00:00
Matthias Melcher
11a15d83a2 This is a suggested change. It is complete except for documentation.
I did not like the awake_cb system at all. These changes implement Fl::awake(Fl_Awake_Handler, void*) which is called from a thread and tells the main loop to call the specified handler (rather a callback I guess) as soon as possible from within the main thread. It is implemented as Fifo (currently 1024 entry ring buffer), so handlers are called in the order that they are generated in.

"test/threads" was modified to change the label color as soon as a thread reaches 10000 - pretty boring, but it show the wonderful simplicity of this approach: you can write libraries that don't need to add to the main loop or register a handler at all... .

I will do some more stress testing tonight.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5729 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-03-06 17:15:03 +00:00
Matthias Melcher
c47b4c91ae Avoiding to wait forever under Cygwin. (STR #1608)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-23 19:27:43 +00:00
Michael R Sweet
72ca38cdd9 Fix WIN32 builds.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5686 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-09 21:57:06 +00:00
Michael R Sweet
6e9a163035 Add handler for thread messages (STR #1536)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5683 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-02-08 23:04:20 +00:00
Michael R Sweet
ae8675a45f Fix order of idle/check processing compared to events (STR #1535)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5645 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-01-28 19:48:31 +00:00
Matthias Melcher
3303d9d7f5 STR #1151: Cygwin for some reason was ifdef'd out for setting a shorter timout when reading fd's (yes, the Win32 requires polling to read fd's). Adding the shorter timeout has no impact on Apps that do not poll fd's, but should fix most (all?) problems described in this bug report.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5383 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-30 09:18:12 +00:00
Michael R Sweet
cb0d6f8f03 Fix blocks crashes on WIN32 - audio buffer too small
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-28 14:45:20 +00:00
Matthias Melcher
05cd337c05 Fixed WIN32 zero size window issue (STR #1387)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5346 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-23 11:47:58 +00:00
Matthias Melcher
555f776077 Fixed uninitialized data in OS X and WIN32 timout functions (STR #1374).
Fixed silly but in preferences test (that was unrelated to Fl_Preferences).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5341 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-21 15:03:02 +00:00
Matthias Melcher
d20a41681d Fixed Fl_Window::copy_label() losing copy (STR #1332)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5251 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-28 10:23:33 +00:00
Matthias Melcher
27e5b81fd4 Changed Tooltip::exit_() to Tooltip::exit()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-14 11:01:03 +00:00
Matthias Melcher
c468a521b0 STR #1321: Calling Fl_Window::show() will exit from the current Fl_Tooltip. Changing window order or creating a new window is a pretty major action, so temporarily disabeling Tooltips seems beneficial. This avoids Tooltips interfering with popup menus.
Of course, poping up a tooltip window does *not* disable further tooltips... .

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5200 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-14 10:48:36 +00:00
Matthias Melcher
4f38c2c1c9 Fixing the fix: restored the FL_KEYUP behavior of WIN32 before the NumLock fix. Now NumLock and Keyup work well.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-09 18:44:50 +00:00
Matthias Melcher
428a283f83 Added an event variable "Fl::event_original_key()" which returns the current key code (see Fl::event_key()) before it gets mangled through the NumLock keypad conversion. This way, an application can differentiate between an arrow key and a numeric keypad w/NumLock off.
On Win32, releasing a numeric keypad key w/NumLock off wiould return the wrong keycode (keypad instead of arrow key).

Documentation changed accordingly. X11 code is yet to be tested.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-09 07:48:08 +00:00
Matthias Melcher
22b1499904 STR #1152: Fixed Cygwin compiler warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 14:36:58 +00:00
Matthias Melcher
5552a0cce7 STR #1104: WIN32 version would insist on running a full length timeout even if it knew already that the UI needed to be updated. This could cause a quite long delay when a timeout was used to trigger a redraw. Probably true for threads as well... .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4714 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-16 11:34:04 +00:00
Michael R Sweet
cbb4918f41 Change FOREVER back to 1e20 (minimal CPU usage) and change fl_wait()
implementation on WIN32 to check for idle and to use a time_to_wait()
of 0... (STR #1120)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4704 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-12-14 01:25:21 +00:00
Matthias Melcher
b1d3eae6f2 Moved 'flush' before 'idle' in main loop fl_wait to make redraw action quicker.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-04 09:16:16 +00:00
Matthias Melcher
5a19010190 STR #1051: fl_wait() would only flush damaged window areas if there were any messages pending. Since FLTK does redraws even if there is no WM_PAINT pending, this was not working all the time.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-02 09:51:27 +00:00
Matthias Melcher
e7ea8bbe97 STR #1057: A window that is needed to correctly manage a timer on WIN32 (personally, I would like to mark this WTF ;-), was actually visible. I resized it to 0x0 ixels, but if that fails, we fall back to the old 1x1 pixels. I also removed the "default" positioning since that messes up the default window stacking for pedantic users.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4614 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-01 16:48:19 +00:00
Michael R Sweet
dc7a14aa9a Rework event loop handling on all platforms for better timer and idle
processing (STR #861)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4589 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-10-12 20:19:30 +00:00
Matthias Melcher
56bcac9859 WIN32, STR #1007: Added some code that looks a lot, but is actually very littl, that keeps track of all window classes that were registered to avoid registering the same class twice.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4567 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-14 07:30:32 +00:00
Matthias Melcher
2b6586f64d STR #1007: Applied second patch by hand. OP: could you please check if all changes were made correctly? Thanks!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4563 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-09-12 23:03:34 +00:00