Commit Graph

1852 Commits (2b11839902f3e913ace63cdf62e41f5dd36f51ed)

Author SHA1 Message Date
Per Inge Mathisen 6fc021819c Do a dummy load of basic object data from tagfile to stress test tagfile system. Ported from work in tagfile branch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6079 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:45:18 +00:00
Per Inge Mathisen 68ca9bef81 Fix tagfile type definition
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6078 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:39:10 +00:00
Giel van Schijndel 2cea275cb5 * Fully define struct timeval (not just forward declare)
* Forward declare struct timezone


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6063 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 23:42:48 +00:00
http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/ 05f7761bab Add a gettimeofday() implementation for Windows
Epoch and hint to use GetSystemTimeAsFileTime taken from: http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6062 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 23:24:17 +00:00
Giel van Schijndel becaf21060 Revert r6058: I stupidly used "git svn dcommit" instead of "git stash pop" (yes I know they don't even look the same...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6059 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:54:41 +00:00
Giel van Schijndel 53d6990a55 Initial FMV support
patch: http://developer.wz2100.net/attachment/ticket/64/FMV5c.patch

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6058 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:52:01 +00:00
Freddie Witherden 784b40d2a0 Slight cosmetic improvement to the window alignment code (factoring out a / 2).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6049 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:56:36 +00:00
Freddie Witherden ba9c453857 Make sure we correctly enable double buffering for SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6048 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:21:08 +00:00
Freddie Witherden 6e3ff77160 Vsync for the win, also enable double-buffering.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6047 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:10:40 +00:00
Freddie Witherden f499f08a49 Use glPushMatrix and glPopMatrix when compositing as opposed to manually restoring it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 21:56:02 +00:00
Freddie Witherden 994e2d3938 Fix radar corruption under nVidia/Intel cards. This closes ticket #72.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6042 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 17:45:16 +00:00
Freddie Witherden dc878823c2 Fix the inclusion of GLEE in betawidget; this fixes the blending problems under nVidia Linux. Plus some minor indentation fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 11:24:36 +00:00
Giel van Schijndel 10ac89541a Update our SQLite copy from 3.5.9 to 3.6.2
* 3.6.0 introduced an interface change to the VFS layer
 * Updated physfs_vfs.c for the interface change in 3.6.0, breaking compatibility with SQLite < 3.6.0
 * Change the configure script to require sqlite3 >= 3.6

This closes ticket:66

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6034 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-16 20:02:16 +00:00
Giel van Schijndel 73bd4b81f9 Don't #define DATADIR when compiling SQLite as it causes conflicts with some Windows headers (objidl.h:95)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6029 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-15 06:06:59 +00:00
Giel van Schijndel 043cc9d278 Fix a spelling error in the MSVC project files causing problems with the #include path
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6027 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 19:47:56 +00:00
Giel van Schijndel ff507b13f0 * Don't use "if USE_SYSTEM_SQLITE" sections in all Makefiles
* Use the pkg-config variables SQLITE_CFLAGS and SQLITE_LIBS to compile and link with instead


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6021 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 14:41:44 +00:00
Freddie Witherden 26444e8e07 Switch from a virtal method to an event handler for re-generating the window's pattern.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6020 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:49:37 +00:00
Giel van Schijndel 9d7a8e8d43 Update our SQLite copy from 3.5.4 to 3.5.9
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6019 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:48:22 +00:00
Giel van Schijndel 140f553d06 * Change the autotools build system such that if the system provides an SQLite version that meets our requirements we use that instead of the one in our own repository
* Require sqlite3 versions >= 3.5.4 and < 3.6 (due to r5984 these versions are possible)
 * Move physfs_vfs.[ch] from lib/sqlite3/ to lib/framework/
 * Update the autotools, raw win32 Makefile, Code::Blocks and MSVC build systems
  - NOTE: Xcode still requires an update

This closes ticket:59


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6018 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:40:28 +00:00
Giel van Schijndel e2fa071a02 Replace the custom crafted Lua interface code for the addEventHandler and addTimerEventHandler methods of class widget with a SWIG typemap
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6017 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:27:03 +00:00
Giel van Schijndel 4d79c24838 * Add Lua support for widget animations
* These can be defined using Lua tables; see the example code in sdl-testapp.lua

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6016 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:26:48 +00:00
Giel van Schijndel 8681483c7d Make sure to translate before scaling in widgetCompositeImpl as that yields in-place scaling as opposed to scaled translating
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6015 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:16:49 +00:00
Giel van Schijndel e3c884a249 When resizing windows make sure to resize their gradient as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6011 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:34:16 +00:00
Giel van Schijndel e766b2f605 Allow Lua event handlers to remove themselves (i.e. don't segfault in that case)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6010 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:32:59 +00:00
Giel van Schijndel 41e74888ef Make sure to use "destroy" as the method name in lua_widget_destroy for error message generation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6009 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:48:29 +00:00
Giel van Schijndel ee7cfc1ac5 * Add enum spacerDirection and its contents to the Lua betawidget module
* Add method `destroy` to the Lua class `widget` and its children in the betawidget module
 * Add some code that demonstrates the usage of widget:destroy() and its current flaws (i.e. segfaults ''will'' occur when using widget after calling the destroy() method on it, garbage collection is included in "using")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6008 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:37:20 +00:00
Giel van Schijndel c661cb9bc4 * Don't use a single cairo_pattern to store the window gradient for ''all'' windows
* Use a separate cairo_pattern for each window to store the window gradient in


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6007 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 23:15:44 +00:00
Giel van Schijndel a2a22b3804 Check both the `lua5.1` and `lua` pkg-config package in betawidget's ./configure script
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6006 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 22:36:47 +00:00
Giel van Schijndel 123551b6b6 Initialise the network buffer to send GAMESTRUCTs from across to zero
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6004 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 20:39:26 +00:00
Giel van Schijndel 07e8a802f9 Remove the last remnants from platform selection in betawidget/Makefile.am
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6003 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:36:33 +00:00
Giel van Schijndel ea446b8653 * Use recursive make (through SUBDIRS) to build the `platform` portion of betawidget
* Compile the utility part we use from Warzone (framework/utf.c and ivis_opengl/GLee.c) separately


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6002 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:35:26 +00:00
Elio Gubser 2395064bc8 outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5998 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:58:18 +00:00
Elio Gubser 413cc540a9 outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5997 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:52:23 +00:00
Elio Gubser 426f09cf9b nicer window design implemented
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5996 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:05:28 +00:00
Per Inge Mathisen 704117f85c Fix various doxygen errors and warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:25:34 +00:00
Per Inge Mathisen be263e0b8c Fix missing define of WZ_DECL_THREAD on windows
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5991 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:16:06 +00:00
Giel van Schijndel 50c974f74b Install all betawidget headers into $(pkgincludedir)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 07:56:28 +00:00
Giel van Schijndel 6088fca5af * Make xGetTempname (from the PhysicsFS VFS for SQLite) return a bogus filename to keep SQLite happy
- We can safely catch the only one case where this filename is used (see comment in diff for an explanation)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5984 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 20:07:16 +00:00
Freddie Witherden 4bb879d64c Make sure we fill out the event structure for EVT_DESTRUCT events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 18:10:06 +00:00
Giel van Schijndel 6061eb40d9 Add an example of window/widget destruction by means of employing the garbage collector (this should be improved to something like widget:destroy())
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5980 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:33:40 +00:00
Giel van Schijndel 9177d9cf2f * Register widgetGetTime() as betawidget.getTime() in Lua
* In the Lua test app use betawidget.getTime() to determine the *true* amount of time passed since registering of the timer event


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5979 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:17:38 +00:00
Giel van Schijndel 0d3b868de7 * After calling the Lua event handler function make sure to pop the return value from the stack
* If the Lua event handler function didn't return a value, assume it was successful (and leave the stack as is)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5978 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:04:56 +00:00
Freddie Witherden 75d615d134 Update the Doxygen documentation for clipboardX11.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5977 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 10:18:15 +00:00
Giel van Schijndel ce8d315645 Fix a bug where we would fire timer events `interval` milli-seconds since program start up instead of `interval` milli-seconds since registering the event
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5976 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 09:35:59 +00:00
Giel van Schijndel 4ca3f73cbb Print an empty string when the clipboard contains nothing (i.e. betawidget.getClipboardText() returned nil)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5973 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 21:34:31 +00:00
Giel van Schijndel 5184c015e4 * Don't store a Lua reference to the widget itself in the callback struct
- This struct is only destroyed when the callback is destroyed, which (by default) only happens when the widget is destroyed.
  - Keeping a reference to the widget prevents Lua's garbage collector from ever destroying the widget
  - Thus store a reference to the widget in a Lua "weak table"
  - Also store the callback function in this table
 * Thus we now only keep a reference to a Lua table referring to the widget (weakly) and the function (normally/strongly)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5972 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 21:34:17 +00:00
Freddie Witherden 5bdf883268 Add GPLv2 or above licensing cruft to the SDL betawidget test application; remove the erroneous call to SDL_Quit which was added in r5964.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5970 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 17:45:51 +00:00
Giel van Schijndel 574a74ab35 Extend the betawidget Lua testapp:
* Be more interesting when clicking the first window
 * Add a timer event handler
 * Add a clipboard usage example


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5968 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 00:32:22 +00:00
Giel van Schijndel 966e1bfedc Add an example of how to use a closure in Lua in order to bind user data to an event handler
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5966 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-08 00:06:04 +00:00
Giel van Schijndel f81ac77f91 Rewrite the SDL betawidget testapp to set up its GUI using Lua and betawidget's Lua bindings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5965 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 23:56:00 +00:00
Giel van Schijndel 75b4e523bd Fix a memory leak which resulted from neglecting to call SDL_Quit()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5964 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 23:51:21 +00:00
Giel van Schijndel b033817fc4 * Add a Lua interface to (parts of) betawidget
* Partially generated by SWIG
  * Partially handcrafted
 * Already supports registering Lua functions as event handlers of `widget` derivatives
 * Slight change in betawidget headers because the struct typedef's somehow confused the compiler
 * Use libtool for linking with Lua


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5963 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 23:47:53 +00:00
Giel van Schijndel 5802bba3ae Add a small SDL test application for betawidget (committed for EvilGuru)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5962 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 22:50:25 +00:00
Per Inge Mathisen 4def288387 Remove requirement on texture rectangle extension for minimap code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5960 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:41:50 +00:00
Freddie Witherden c174efd0c7 Fix a typo in the doxygen documentation for widget.h.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5959 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:10:31 +00:00
Buginator 21fdab0117 Modify debug output to specify the 'real' directory that physfs is using for the file in question.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5958 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 20:00:54 +00:00
Freddie Witherden a7eee1378d Pass the ID of an event handler to destruct events the same way as we would to regular events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5953 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 16:58:46 +00:00
Freddie Witherden 50747b6e53 Fix compilation of betawidget/platform/sdl/event.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5952 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 15:31:34 +00:00
Freddie Witherden b827f0b7d6 Add support for text events to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5951 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 14:05:55 +00:00
Freddie Witherden c670477709 Fix the include paths for clipboardWin32.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 13:57:01 +00:00
Freddie Witherden 19345a8d2e Fix the X11 clipboard code so that it now waits for a response before attempting to fetch the data; also make it request a UFT-8 string.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 13:35:39 +00:00
Giel van Schijndel d4923de07a Conditionally compile in one of platform/sdl/clipboard* depending on the host platform we're compiling for
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5946 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 22:39:43 +00:00
Giel van Schijndel d40084dadc Take care of #including utf.h and the content of <stdbool.h> and <stdint.h>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5943 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 17:20:34 +00:00
Giel van Schijndel 01c6ba831c Allow compiling of utf.c outside of framework's debug facilities (i.e. allow it to be used in betawidget)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5942 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:20:06 +00:00
Giel van Schijndel 330d599916 Apparently betawidget depends on GLee and utf.[ch], so make sure to compile those along
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5941 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:11:30 +00:00
Giel van Schijndel bdae8ce9ef Only #include types.h in utf.h as we don't depend on the entire framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5940 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:02:26 +00:00
Giel van Schijndel e9ea1df8d9 * Move the addition of SDL's stuff to CPPFLAGS and LIBS to the "platform selection" part
* Make sure to also check for and link against OpenGL


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5939 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 15:50:48 +00:00
Giel van Schijndel 6150e58b45 * Make sure that we only have a compile and link time dependency on Cairo when compiling and linking betawidget, not when using it
* When only compiling and linking against betawidget just forward declare cairo_t


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5938 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 15:38:31 +00:00
Giel van Schijndel a8aa84dec4 Use libtool for compiling and linking of betawidget
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5937 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 15:05:55 +00:00
Giel van Schijndel 5ce8de3abe Add a perliminary buildsystem for betawidget (autotools buildsystem)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5936 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 13:26:03 +00:00
Freddie Witherden 2547bdcf29 Revert the changes to window.[ch] which were committed by accident in r5931.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5933 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 12:31:44 +00:00
Freddie Witherden 04e2f5f82b Update the widget animation callback to use widgetReposition as opposed to setting the position directly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5932 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 12:26:27 +00:00
Giel van Schijndel 906f766b8a * When using a va_list multiple times make sure to va_copy it first
* Make sure to call va_end on all instances of va_list when we're done with it

Similar to r5930 (which fixed ticket:50)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5931 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 20:10:47 +00:00
Giel van Schijndel 37c6b31651 * When using a va_list multiple times make sure to va_copy it first
* Because va_copy is C99 provide a fallback for it on non-C99 systems (which assumes that va_list is just a pointer to the stack)

This fixes ticket:50, thanks to Buginator for finding the cause (though this solution is different from his suggestion)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5930 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 19:38:22 +00:00
Freddie Witherden 548c43e6e3 Add support for resize and reposition events to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5929 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 17:05:56 +00:00
Freddie Witherden 9deaad010d Simplify event creation by adding a helper function to generate the base structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5927 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 15:03:21 +00:00
Freddie Witherden 4c70b5eb7a Fix a bug similar in ilk to that fixed in r5925, except for vertical as opposed to horizontal window alignment.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5926 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 21:36:28 +00:00
Freddie Witherden ad1a6db74e Fix a bug in the window alignment code, thanks to Elio for reporting it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5925 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 19:05:29 +00:00
Freddie Witherden 79df709d5b Improve the Doxygen documentation for widget.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5924 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 19:02:39 +00:00
Freddie Witherden 7453cee5bb Add textEntry class (warning: unfinished) to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5920 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 17:53:34 +00:00
Freddie Witherden a31fbb4561 Minor indentation fix to clipboardWin32.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5919 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 16:31:42 +00:00
Freddie Witherden 2a8cee26b5 Re-write the Windows clipboard support; Unicode is now supported; add support for setting clipboard text.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5918 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 16:27:00 +00:00
Freddie Witherden bef604763f Add an nbytes parameter to UTF8toUTF16 and UTF16toUTF8 which allow for fetching the number of bytes allocated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5917 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 14:37:01 +00:00
Freddie Witherden a8709983e0 Commit the final patch of patch #45; this cleans up utf.[ch].
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5916 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 11:21:12 +00:00
Giel van Schijndel 99fe22e0a4 Don't accept out-of-range Unicode codepoints in function unicode_utf8_char_length either
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5915 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:16:00 +00:00
Giel van Schijndel aabf08d6fa Change the UTF-8 encoder and decoder to only accept valid Unicode codepoints, not just every representable 32 bit unsigned integer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:10:03 +00:00
Giel van Schijndel 0e88a86b8e Add two new functions: utf(8|16)_char_at_offset, which return a pointer to the index-th character in the given stream
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5911 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:39:17 +00:00
Giel van Schijndel f0f68e7386 Rename utf8.[ch] to utf.[ch] because it deals with different UTFs (Unicode Transformation Format) but not just specifically with UTF-8
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5910 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:06:40 +00:00
Freddie Witherden de59586edf Fix compilation of betawidget on OS X; ensure we correctly restore the layout if a child could not be added.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5905 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 10:17:09 +00:00
Freddie Witherden 8114b1e71f Fix a bug in the window alignment code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5904 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 18:14:58 +00:00
Freddie Witherden 2f1cb8dcdc Add widgetSDLInit and widgetSDLQuit to initialise and uninitialise the widget system under SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5903 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 17:15:43 +00:00
Giel van Schijndel d3eaf3bbd1 Add several new functions for converting between UTF-8 and UTF-16 to utf8.[ch]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5902 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:16 +00:00
Giel van Schijndel a0cdfd44ab Rename utf8_(encode|decode) to utf8_(encode|decode)_utf32 because they convert between UTF-8 and UTF-32
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5901 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:09 +00:00
Giel van Schijndel dfa9c2bc01 Rename function unicode_strlen to utf32_strlen because it really determines the length of a UTF-32 encoded string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5900 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:49:11 +00:00
Giel van Schijndel 2cb4c71883 * Split out the code that encodes a single Unicode character as UTF-8 into a separate function: encode_utf8_char
* This will allow encoding of Unicode strings to UTF-8 regardless of its current encoding

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5899 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:15 +00:00
Giel van Schijndel ac08ca70b0 * Seperate out the part that determines a single Unicode character's (codepoint actually) length when encoded as UTF-8 into a separate function: unicode_utf8_char_length
* This will allow determining of the length of a string when encoded as UTF-8 regardless of its current encoding

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5898 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:06 +00:00
Giel van Schijndel 5222037799 Move the duplicated UTF-8 decoding code out of functions utf8_character_count and utf8_decode and into new function decode_utf8_char, which only decodes a single UTF-8 character sequence
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5897 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:24:27 +00:00
Giel van Schijndel b10871a0ab Add utf8.c to the win32 makefile system (which I forgot in r5895)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5896 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:38:26 +00:00
Giel van Schijndel d45e64bf55 Reintroduce utf8.{c,h} for encoding and decoding UTF-8 strings
This is meant to be used with betawidget

This is a revert of r2477 (which removed the UTF-8 module)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5895 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:34:46 +00:00
Freddie Witherden 0d58106de3 Make tool-tip events irrelevant for child widgets.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5894 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 10:36:52 +00:00