Moved some string related functions from memory.c to string.c
[wmaker-crm.git] / WINGs / ChangeLog
blob1c35ef6dfd4e044d107524522218a8cdf8df5ecb
1 - fixed problem with WINGs based apps exiting with a "X_RotateProperties"
2   related error when text was selected in a textfiled.
3 - moved wstrdup(), wstrconcat() and wstrappend() from memory.c to string.c
6 Changes since wmaker 0.64.0:
7 ............................
9 - made programmatic scroller changes send notifications
10 - replaced WMSetBoxExpandsToParent with WMSetViewExpands...
11 - added WMGetLabelFont()
12 - added WMAddPersistentTimerHandler()
13 - Moved all internal handlers (timer, idle and input) to handlers.c
14 - simplified wevent.c and wutil.c.
15 - fixed handling of input with poll (was broken)
16 - fixed mem leak that occured when input handling was done with poll
17 - simpler and more straightforward event handling for timer, idle, input
18   and X events (also fixed some problems the old handling logic had)
19 - moved timer, idle and input handler definitions and prototypes from
20   WINGs.h to WUtil.h because they're not GUI related.
21 - better and more robust handling of events (timer, idle, input, X) in
22   WMMaskEvent(). Also fixed a bug where input and timer events were not
23   treated for undefined periods of time under some circumstances.
24 - fixed secure textfields not to allow text selection, to avoid compromising
25   sensitive information by pasting it to a terminal.
26 - replaced wmkrange(), wmkpoint() and wmksize() functions with macros.
27 - added WMRemoveFromArrayMatching(array, match, cdata), which will remove the
28   first element in the array that is matched by match(item, cdata)==True.
29 - added WMArrayFirst(), WMArrayLast(), WMArrayNext() and WMArrayPrevious()
30   functions and also WM_ITERATE_ARRAY() and WM_ETARETI_ARRAY() macros, to make
31   interfaces to WMBag and WMArray similar and to make life a little simpler
32   when iterating through all elements of an array.
33 - replaced bags with arrays wherever appropriate. This will improve
34   performance a bit.
35 - replaced some recursive code with iterative code in selection.c
36 - added WMCreateBlendedPixmapFromRImage()
37 - small API change:
38   1. Renamed WMSetApplicationIconImage(), WMGetApplicationIconImage() and
39      WMSetWindowMiniwindowImage() to respectively WMSetApplicationIconPixmap(),
40      WMGetApplicationIconPixmap() and WMSetWindowMiniwindowPixmap()
41      They operate on a WMPixmap which is practically an X Pixmap with no alpha
42      channel information and the new name is more suggestive and also leaves
43      room for the new functions added for operating on images with alpha info.
44   2. Added WMSetApplicationIconImage() and WMGetApplicationIconImage() which
45      operate on an RImage and store alpha information too.
46   3. Added WMCreateApplicationIconBlendedPixmap() which will take the image
47      set by WMSetApplicationIconImage() and will combine it with a color.
48      If color is NULL it will blend using the default panel color (#aeaaae)
49   All these changes will allow WINGs to handle images with alpha blending
50   correctly in panels and wherever else needed. More about in NEWS.
51 - updated panels to use the newly available RImages if present and fallback
52   to old WMPixmaps if not, to properly show alpha blended images.
53 - replaced some still left malloc's with wmalloc's.
54 - fixed a bug in WMReparentWidget()
55 - added WMReparentWidget() to WINGs.h
56 - fixed a bug that made the scroller knob jump backwards when dragged (this
57   bug had no relation with the behavior that #define STRICT_NEXT_BEHAVIOUR
58   attempts to accomplish).
59 - fixed scrolling direction with mouse wheel for horizontal scroller.
62 changes since wmaker 0.63.1:
63 ............................
64 - added WMRunModalLoop() and WMBreakModalLoop()
65 - added WMSetBoxExpandsToParent()
66 - added WMRemoveBoxSubview()
67 - moved WINGs headers in a WINGs subdirectory when installed.
68   use #include <WINGs/header_file_name> in your application from now on.
69   Also updated get-{wings|wutil}-flags.
70 - Fixed a mem leak in WMList.
71 - Fixed a bug that caused sigsegv for a WMList with more than 32767 items.
72 - Added an example of how to create a server type program with WMConnection.
73 - added WMOpenScreen()
76 changes since wmaker 0.62.1:
77 ............................
78 - added WRuler widget
79 - added WText widget (rtf multiline text widget) 
80         Nwanua Elumeze <nwanua@colorado.edu>
81 - added a new AUTO option for the UseMultiByte option
82 - added WMRaiseWidget()/WMLowerWidget()
83 - added missing EscapeTextMovement to textfield delegate/notification
84 - added WMGetLabelText()
85 - added WMReparentWidget()
86 - added WMCreateTabViewItem()
87 - added W_CreateUnmanagedTopView()
88 - added wtokenjoin(), wtokensplit(), wtokenfree(), wtrimspace()
89 - added WMWidgetIsMapped()
90 - added WMSetApplicationIconWindow()
91 - restructured the directory tree. Added Documentation, Examples and Tests
92   subdirectories
93 - removed WMArrayBag and reorganized WMTreeBag to be WMBag.
94 - added WMArray class.
95 - added WMSetWindowUserPosition()
96 - added WMGetListSelectedItems()
97 - added WMSetListAllowMultipleSelection(), WMListAllowsMultipleSelection().
98 - added WMSetListAllowEmptySelection(), WMListAllowsEmptySelection().
99 - WMListSelectionDidChangeNotification passes NULL as the notification 
100   client data (previously passed the selected item row).
101 - added WMUnselectListItem(), WMSelectAllListItems(), WMUnselectAllListItems()
102 - better behavior of wheel mices in WMList. Simple mouse wheel events
103   will scroll by 1/3 of the WMList height. Using Shift as a modifier will
104   scroll line by line, while using Control as a modifier will scroll page
105   by page.
106 - better behavior of WMScroller regarding mouse wheel events. 'Shift' modifier
107   will scroll line by line, while 'Control' modifier will scroll page by page.
108 - fixed some buffer overflow allowing bugs.
109 - added WSDecrementWheel and WSIncrementWheel for handling mouse wheel in
110   scrollers and scrolled widgets. This should be treated like the WSxxxPage
111   counterparts, except it should scroll by page_size/3 instead of one full page
112 - added WMSetBrowserAllowMultipleSelection(), WMSetBrowserAllowEmptySelection()
113   WMBrowserAllowsMultipleSelection() and WMBrowserAllowsEmptySelection()
114 - WMBrowser now allows multiple selections.
115 - Added WMGetBrowserPaths() to retrieve the paths for browsers that allow
116   multiple selections.
117 - WMDestroyWidget() now calls WMUnmapWidget() first
118 - added WMScrollerDidScrollNotification to scroller
119 - added WMGetScrollViewVisibleRect()
120 - fixed a mem leak in the browser code.
121 - renamed wstrappend() to wstrconcat(). wstrconcat(str1, str2) concatenates
122   str1 with str2 and returns that in a newly malloc'ed string.
123   Be sure to rename wstrappend with wstrconcat in your code too, else
124   hazardous things can happen!
125 - implemented a new wstrappend() function. wstrappend(dst, src) will append 
126   src to dst modifing dst and returning a pointer to it. No new string is 
127   generated, except if dst is NULL, in which case its the same as calling
128   wstrdup(src).
129   dst can ONLY be NULL or a dynamically allocated string (obtained from a
130   call to malloc, realloc, wmalloc, wrealloc, ...). dst CANNOT be a static
131   or a constant string!
132 - added wmessage() for printing a variable formatted string to stderr, with
133   the program name prepended to it. Similar to wwarning(), except that it
134   doesn't add "warning:" in the output message.
135 - added WMBox widget
136 - added WMAddTabViewItemWithView()
137 - added W_SetViewCursor()
138 - made Extra widgets library
139 - added table widget in Extras library
140 - added WMGetConnectionUnsentData() (WMGetConnectionQueuedData() too as an
141   alias).
142 - added WMSetConnectionCloseOnExec() to specify if the socket associated
143   with a connection survives an exec* call or not. When a new connection is
144   created using the WMCreate... or WMAcceptConnection() calls, it has the
145   close on exec flag set automatically to 'True' by the library. Unless
146   you want to let the socket of some connection to survive across an exec*
147   call, you need not to call this function.
148 - removed all the wsyserror() and wwarning() calls from host.c and
149   connection.c and replaced where appropriate with assertions. If a function
150   returns some invalid result, you can still get the system error message if
151   you need, by calling wsyserrorwithcode() and passing WCErrorCode, if
152   WCErrorCode > 0. If WCErrorCode==0, that is not a system error, and
153   wsyserrorwithcode() should not be called in this case.
154 - added WMNextHashEnumeratorKey() to retrieve all keys in some hash enumerator
155   one by one.
156 - fixed a bug with mouse wheels scrolling in scrollers even with the widget
157   fully visible.
158 - Fixed a memory leak (the destroy function for a view was never called and
159   as a result the shaded windows didn't go away when closed. The non-shaded
160   windows were unmapped on close but not destroyed either so they only
161   apparently went away, but continued to use memory).
165 changes since wmaker 0.62.0:
166 ............................
167 - added WMSetWidgetDefaultFont(), WMSetWidgetDefaultBoldFont()
171 changes since wmaker 0.62.0:
172 ............................
173 - added WM{S,G}etDataFormat()
174 - added drag and drop
175 - changed selection code
176 - added clientdata to WMFindInBag
177 - removed SetWindowInitialSize()
178 - added SetWindowAspectRatio()
179 - added initial timeout when establishing a connection.
180 - added WMSetConnectionDefaultTimeout() and WMSetConnectionOpenTimeout();
181 - added WMGetConnectionTimeoutState()
183 changes since wmaker 0.61.1:
184 ............................
186 - WARNING: semantic of bags has changed!
187         An index assigned to an item will always keep that index unless
188         you insert an item before it.
190         For example:
191                 bag = WMCreateBag();
192                 WMSetInBag(bag, 10, "bla");
193         That code will put "bla" in index 10, instead of 0, as it used to be.
194 - fixed WMInsertInBag(). It ignored index, and always put the new item at end.
195 - added WMSaveUserDefaults().
196 - rewrote WMPopUpButton to use WMMenuItem
197 - added WMGetPopUpButtonMenuItem(WMPopUpButton *bPtr, int index)
198 - WMSortListItemsWithComparer(WMList *lPtr, (int)(f)(const void*, const void*))
199 - WMSortBrowserColumnWithComparer()
200 - fixed bug with sorting list items.
201 - fixed bug in handling keyboard input associated with selection and
202   notification sending.
203 - filepanel puts dirs on top of list (Wolff <wolff@cybercable.fr>)
204 - added WMReplaceInBag (Wolff <wolff@cybercable.fr>)
205 - added vertical views and multiple views in WMSplitView (Wolff <wolff@cybercable.fr>)
206 - changed values of parameter values of WMSplitViewConstrainProc()
207 - configurable default fontsize patch (Igor P. Roboul <igor@mordor.myip.org>)
208 - fixed a bug that crashed the programm when a popup button was scrolled.
209 - fixed a bug that caused incorrect drawing position of the popup indicator.
210 - fixed a bug that prevented selecting no item (-1) in a popup button.
211 - an assertion will be raised if the program tries to select a popup button
212   item that is beyond the total number of items present in the popup button.
213 - changed names of functions for SplitView to be consistent. Some contained
214   SubView while other Subview. Now all have Subview.
215 - fixed a bug in how input events were posted. Establishing 2 or more input 
216   handlers for the same file descriptor, handling different (read/write/except)
217   events, caused wrong handlers to be called.
218 - Reimplemented the input and idle handlers with WMBag to avoid a functional
219   problem with them: inability to remove handlers next to the called one, from
220   the called handler itself. Trying to do this with the old version caused the
221   program to crash.
222 - changed wrealloc behaviour to be like this: new = wrealloc(old, new_size);
223     1. if old is NULL, return wmalloc(new_size).
224     2. if new_size is 0, call wfree(old), and return NULL.
225     3. if both old is a valid pointer and new_size>0, call realloc.
226 - added wstrerror(int errnum) to return the string associated with errnum.
227 - new wsyserrorwithcode(int error, const char* fmt, ...), similar to 
228   wsyserror(), but printing the message for the specified error code.
229 - added 3 new classes: WMData, WMHost and WMConnection
230 - fixed a big memory leak in the color panel code (from Pascal Hofstee).
231 - added scrolling to tabview
233 changes since wmaker 0.61.0:
234 ............................
236 - added WMGetTextFieldFont()
237 - escape key in panels (craig nellist <crn@ozemail.com.au>)
238 - applied patch with fixes and enhancements to textfield 
239         (Franck Wolff <wolff@cybercable.fr>)
240 - changed WMList to use WMBag internally, instead of a linked list
241 - replaced WMAddSortedListItem() with WMSortListItems()
242 - replaced WMAddSortedBrowserItem() with WMSortBrowserColumn()
244 changes since wmaker 0.60.0:
245 ............................
247 - added WMScreenWidth() and WMScreenHeight() functions.
248 - fixed some problems when compiling with non gcc compilers.
249 - added WMSetTextFieldFont()
250 - added WMSetButtonImageDefault() (craig nellist <crn@ozemail.com.au>)
251 - added WMBag (array/list)
252 - added libWUtil, a library that is a subset of libWINGs. It contains utils
253   that can be used in writing non-GUI programs. They include: hashes,
254   notifications, input/idle/timer handlers, user defaults database handling,
255   memory handling, application resource handling, etc.
256   All the non-GUI stuff from libWINGs is present.
257   Still linWINGs contain all this stuff so if you use libWINGs, you don't
258   need to link against libWUtil too.
259   One notable aspect of libWUtil is that it has a modified version of the
260   event handling function. It is named WHandleEvents() and will handle all
261   input/idle/timer events the app has.
262   If your app has a permanent input handler (as for example a socket a server
263   is listening on), then the main loop of the app can be:
264         while(1) {
265             WHandleEvents();
266         }
267   but if there is no permanent input handler, you need to add some delay to
268   avoid a too high cpu load by your program:
269         while(1) {
270             WHandleEvents();
271             wusleep(5000);
272         }
273   A permanent input handler is one that is established when the program starts
274   and is present until the program exits.
275   One that is deleted and later reinstalled, is not considered permanent.
276   This difference is because if there is some input handler, the function will
277   block until some event appears, while if there is no input handler the
278   function will return almost immediately (after handling the timer/idle
279   stuff).
281   Except the stuff declared in WUtil.h, the following functions declared in
282   WINGs.h are also present in libWUtil (you will need to #include <WINGs.h>
283   if you use one of these):
284         WMInitializeApplication(char *applicationName, int *argc, char **argv);
285         WMSetResourcePath(char *path);
286         WMGetApplicationName();
287         WMPathForResourceOfType(char *resource, char *ext);
288         WMAddTimerHandler(int milliseconds, WMCallback *callback, void *cdata);
289         WMDeleteTimerWithClientData(void *cdata);
290         WMDeleteTimerHandler(WMHandlerID handlerID);
291         WMAddIdleHandler(WMCallback *callback, void *cdata);
292         WMDeleteIdleHandler(WMHandlerID handlerID);
293         WMAddInputHandler(int fd, int condition, WMInputProc *proc,
294                           void *clientData);
295         WMDeleteInputHandler(WMHandlerID handlerID);
296 - added progress indicator widget
297 - Changed WMSetWindowUPosition() and WMSetWindowUSize() to
298   WMSetWindowInitialPosition() and WMSetWindowInitialSize() respectively,
299   for better naming conventions.
302 changes since wmaker 0.53.0:
303 ............................
305 - added balloon help
306 - fixed a bug with setting initial path in browsers.
307 - added WMSetButtonImageDimsWhenDisabled()
308 - changed simple callback/notifications to delegate-like stuff. Affected
309   widgets are:
310         WMBrowser
311         - WMSetBrowserFillProc() was replaced with WMSetBrowserDelegate
312         - WMBrowserDidScrollNotification was replaced with a delegate callback
314         WMTextField (not completed yet)
315         The notifications will still work, but using the delegate is preferable
317   How to convert old code to delegate callbacks:
318         1 - create a variable (static or dynamic) of the type of the 
319             delegate for the widget type.
320         2 - Replace the notification observers with the equivalent 
321             delegate callbacks. 
322         3 - Put pointers to the callbacks in the delegate variable.
324         Take a look in wfilepanel.c to see how it is used there.
326 - changed W_ViewProcedureTable to delegates
327         This will only affect user created widgets. If you have a custom
328         widget, you will need to update the callbacks and the declaration
329         of the W_ViewProcedureTable variable to be a W_ViewDelegate,
330         which is declared in WINGsP.h  To setup the delegate, assign
331         the delegate variable to view->delegate.
333 - WMTextField
334         Removed all the didChange notifications that were sent when the text
335         was changed programmatically. Only changes made by user interaction
336         will be notified now. If you need the old behaviour, send notifications
337         manually when you change the text.
339 - added WMTabView
340 - added WMGetColorPanelColor(WMColorPanel *panel)
341 - made WMGetUDStringForKey() to only return a reference to the string, not a
342   wstrdup()'ed copy. DO NOT FREE IT ANYMORE!
343 - added MultiByteText option to userdefaults file to control use of multibyte
344   string drawing functions
345 - renamed WMCreateFont() to WMCreateFontSet()
346 - renamed WMCreateFontInDefaultEncoding() to WMCreateNormalFont()
347 - added WMCreateFont() with different semantics
350 changes since wmaker 0.52.0:
351 ............................
353 - added int WMGetBrowserMaxVisibleColumns(WMBrowser *bPtr);
356 changes since wmaker 0.51.2:
357 ............................
359 - added WMColorWellDidChangeNotification
360 - added wfindfileinarray()
361 - fixed bug in window title setting 
362         (MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>)
364 changes since wmaker 0.51.1:
365 ............................
367 - wusergnusteppath() will return a statically allocated string now.
368  DO NOT FREE IT ANYMORE!!
372 changes since wmaker 0.51.0:
373 ............................
375 - applied c++ compat header patch from Martynas Kunigelis <mkunigelis@alna.lt>
376 - added WMSetTextFieldBeveled()
377 - removed W_GC() : use WMColorGC() instead
378 - added WMCreatePixmap()
379 - changed WMSetTextFieldEnabled() to WMSetTextFieldEditable()
381 changes since wmaker 0.50.1:
382 ............................
384 - fixed various bugs
385 - added patch from Franck Wolff <frawolff@club-internet.fr>, with
386   many fixes and enhancements
387 - added notification queues, asynchronous notifications etc.
388 - added WMSetBrowserDoubleAction()
389 - fixed list double click action
391 changes since wmaker 0.50.2:
392 ............................
394 - added wsetabort() - look WUtil.h
395 - fixed bug in WMList resize
396 - added notification sending when changing textfield programatically
397 - removed WMHideWindow()
398 - fixed bug in WMCloseWindow()
399 - added textfield selection patch
400 - added color panel code
401 - added auto name completion for the file panel
402 - added function to select text range, and to set cursor position in text
403   fields programatically
405 changes since wmaker 0.20.3:
406 ............................
408 - added WMSetSliderImage(), WMSetSliderKnobThickness()
409 - added WMGetListItemHeight()
410 - added WMListDidScrollNotification
411 - added WSetColorWellBordered()
412 - added hacky color dragging in colorwell
413 - added poll() support in WMNextEvent. WARNING: the stuff needed for
414   WMAddInputHandler() is not yet implemented for the poll stuff
415 - added WMSetFilePanelAccessoryView(), WMGetFilePanelAccessoryView()
416 - added WMSetPopUpButtonEnabled()
417 - added WMGetLabelImage()
418 - autoscroll for popup button menus
419 - added WMDrawPixmap()
420 - WARNING: changed parameter list for WMListDrawProc
422 changes since wmaker 0.20.2:
423 ............................
425 - WMSetBrowserMaxVisibleColumns() - untested
429 changes since wmaker 0.20.0:
430 ............................
432 - added generic object field for WMListItem. This is for hanging generic
433   clientdata
436 changes since wmaker 0.20.0:
437 ............................
439 - changed WMGetFilePanelFile() with WMGetFilePanelFileName()
440 - made SavePanel
442 changes since wmaker 0.19.3:
443 ............................
445 - added WMCreatePanelForWindow()
446 - added extra parent parameter for filepanel, alertpanel and inputpanel
447 - WMCloseWindow()
448 - WMChangePanelOwner()
449 - added WMAddInputHandler()
450 - change range related function arguments (WMTextField) to use WMRange
452 changes since wmaker 0.19.1:
453 ............................
455 - added wstrappend()
456 - fixed bug when changing selected radio button by hand
458 changes since wmaker 0.18.1:
459 ............................
461 - removed textHeight arg from W_PaintImageAndText
462 - added WMCreateWindowWithStyle()
463 - added WMSetWindowBaseSize() and ResizeIncrements()
464 - added WMSetWindowLeve()
465 - added WMSetWindowDocumentEdited()
466 - added WMSetScrollViewLineScroll(), WMSetScrollViewPageScroll()
467 - added WMSetWindowMiniwindowTitle()
468 - added WMSetWindowMiniwindowImage()
470 changes since wmaker 0.18.0:
471 ............................
473 - added functions to get RGB components and "#rrggbb" string from WMColor.
474 - added function to create color from a name
475 - fixed bug that caused blocking until some new event arrives, even
476   when there already were events in the queue
477   (like having to move the pointer over window to force the window to be
478   painted)
480 changes since wmaker 0.17.5:
481 ............................
483 I don't remember everything, but here it goes:
485 - fixed some bugs in text field
486 - added a incomplete implementation of split view (not yet usable)
487 - added a slider
488 - changed the filepanel stuff. Each application can have only 1 file panel.
489 The same panel will be reused every time you call for it, unless you free it.
490 - changed semantics of WMCreateFont() so that it returns NULL if the requested
491   font can't be loaded
492 - removed WMAddDestroyCallback() 
493 - fixed bug in WMRemovePopUpButtonItem()
494 - added function for user specified item height in WMList
495 - added WMSetPopUpButtonText(). It will set the default text in the button
496   when no options are selected
497 - fixed bug in remove/add item in already mapped popupbuttons. Note: it is
498   not good practice to change the contents of a popup button when it's
499   already visible and the user has probably interacted with it.
500 - fixed behaviour of "radio buttons"
501 - WMInitializeApplication() must be the first function to be called in the
502   program
503 - removed applicationName, argc and argv arguments from the WMCreateScree...
504   functions
505 - WMReleaseColor(scr,color) changed to WMReleaseColor(color)
506 - WMPaintColorRectangle() changed to WMPaintColorSwatch()
507 - added various functions in font and color handling
508 - added WMSetButtonFont()
509 - changed WMCreateCommandButton() so that the buttons it creates will change
510         their label when pushed
511 - added WMGetSystemPixmap(WMScreen *scr, int image)
512 - added partial I18N support
513 - added libPropList requirement and some related utility functions
514 - added a interface to prooplist, so that it works as a user defaults db
515 - added WMWidthOfString() (removed WMFontWidthOfString())
516 - added WMDrawString()
517 - added WMSetTextFieldSecure(WMTextField *tPtr, Bool flag)
518 - WMGetListItem() will dup the returned string
519 - removed need for ProgName being defined
520 - rewrote hashtable stuff and made it available for outside use
521 - added notification functions, with view resize notification
522 - added WMSetWindowMinSize() and MaxSize()
523 - text editing notification
524 - added WMSetListPosition() etc.
525 - added WMInsertBrowserItem()
526 - the above 2 functions return WMListItem*, instead of Bool
527 - rewrote browser
528 - WMGetListItem() will return WMListItem*
529 - removed WMGetListItems() and WMSetListItems()
530 - fixed focus stuff for multi-window apps
531 - changed all WMList function names that contained index to row