Icon creation in only one function
[wmaker-crm.git] / WINGs / NEWS
blob76e417f206aed0e37491120cb31bccbc748c1365
1 ** API and ABI modifications since wmaker 0.92.0
3 ** libWINGs **
4 <WINGsP.h>
5 struct W_DragDestinationInfo: new members added SIZE CHANGE
7 <WINGs.h>
8 WMGetTextFieldCursorPosition ADDED
9 WC_Matrix REMOVED from enum.
10 WMCreateProgressIndicator REMOVED
11 WMSetProgressIndicatorMinValue REMOVED
12 WMSetProgressIndicatorMaxValue REMOVED
13 WMSetProgressIndicatorValue REMOVED
14 WMGetProgressIndicatorMinValue REMOVED
15 WMGetProgressIndicatorMaxValue REMOVED
16 WMGetProgressIndicatorValue REMOVED
17 typedef struct W_Ruler WMRuler REMOVED
18 typedef struct WMRulerMargins REMOVED
19 WMAppendTextBlock REMOVED
20 WMAppendTextStream REMOVED
21 WMCreateRuler  REMOVED
22 WMCreateTextBlockWithObject REMOVED
23 WMCreateTextBlockWithPixmap REMOVED
24 WMCreateTextBlockWithText REMOVED
25 WMCreateTextForDocumentType REMOVED
26 WMDestroyTextBlock REMOVED
27 WMFindInTextStream REMOVED
28 WMFreezeText REMOVED
29 WMGetGrabbedRulerMargin REMOVED
30 WMGetReleasedRulerMargin REMOVED
31 WMGetRulerMargins REMOVED
32 WMGetRulerOffset REMOVED
33 WMGetTextBlockProperties REMOVED
34 WMGetTextDefaultColor REMOVED
35 WMGetTextDefaultFont REMOVED
36 WMGetTextEditable REMOVED
37 WMGetTextIgnoresNewline REMOVED
38 WMGetTextInsertType REMOVED
39 WMGetTextObjects REMOVED
40 WMGetTextRulerShown REMOVED
41 WMGetTextSelectedObjects REMOVED
42 WMGetTextSelectedStream REMOVED
43 WMGetTextSelectionColor REMOVED
44 WMGetTextSelectionFont REMOVED
45 WMGetTextSelectionUnderlined REMOVED
46 WMGetTextStream REMOVED
47 WMGetTextUsesMonoFont REMOVED
48 WMIsMarginEqualToMargin REMOVED
49 WMPageText REMOVED
50 WMPrependTextBlock REMOVED
51 WMPrependTextStream REMOVED
52 WMRemoveTextBlock REMOVED
53 WMReplaceTextSelection REMOVED
54 WMScrollText REMOVED
55 WMSetRulerMargins REMOVED
56 WMSetRulerMoveAction REMOVED
57 WMSetRulerOffset REMOVED
58 WMSetRulerReleaseAction REMOVED
59 WMSetTextAlignment REMOVED
60 WMSetTextBackgroundColor REMOVED
61 WMSetTextBackgroundPixmap REMOVED
62 WMSetTextBlockProperties REMOVED
63 WMSetTextDefaultColor REMOVED
64 WMSetTextDefaultFont REMOVED
65 WMSetTextDelegate REMOVED
66 WMSetTextEditable REMOVED
67 WMSetTextForegroundColor REMOVED
68 WMSetTextHasHorizontalScroller REMOVED
69 WMSetTextHasRuler REMOVED
70 WMSetTextHasVerticalScroller REMOVED
71 WMSetTextIgnoresNewline REMOVED
72 WMSetTextIndentNewLines REMOVED
73 WMSetTextRelief REMOVED
74 WMSetTextSelectionColor REMOVED
75 WMSetTextSelectionFont REMOVED
76 WMSetTextSelectionUnderlined REMOVED
77 WMSetTextUsesMonoFont REMOVED
78 WMShowTextRuler REMOVED
79 WMThawText REMOVED
80 WMRefreshText REMOVED
81 WMCreateText REMOVED
82 WMClearText REMOVED
87 ** libWutil **
88 enum WMConnectionState REMOVED
89 enum WMConnectionTimeoutState REMOVED
90 struct ConnectionDelegate REMOVED
91 __wmessage ADDED
92 wstrerror REMOVED
93 wmessage converted from function to wrapper macro
94 wwarning converted from function to wrapper macro
95 wfatal converted from function to wrapper macro
96 wsyserror converted from function to wrapper macro
97 wsyserror REMOVED (use werror instead)
98 werror macro ADDED (replaces wsyserror)
99 wsyserrorwithcode removed
100 wmkdirhier ADDED
101 wrmdirhier ADDED
102 wmalloc0 REMOVED
103 wnew REMOVED
104 wnew0 REMOVED
105 wstrlcpy ADDED
106 wstrlcat ADDED
107 WMPushInArray REMOVED
108 WMWritePropListToFile NUMBER OF FUNCTION ARGUMENTS CHANGED
109 WMGetCurrentHost
110 WMGetHostWithName
111 WMGetHostWithAddress
112 WMRetainHost
113 WMReleaseHost
114 WMSetHostCacheEnabled
115 WMIsHostCacheEnabled
116 WMFlushHostCache
117 WMIsHostEqualToHost
118 WMGetHostName
119 WMGetHostNames
120 WMGetHostAddress
121 WMCreateConnectionAsServerAtAddress REMOVED
122 WMCreateConnectionToAddress REMOVED
123 WMCreateConnectionToAddressAndNotify REMOVED
124 WMCloseConnection REMOVED
125 WMDestroyConnection REMOVED
126 WMConnection* WMAcceptConnection REMOVED
127 WMGetConnectionAvailableData REMOVED
128 WMSendConnectionData REMOVED
129 WMEnqueueConnectionData REMOVED
130 WMFlushConnection REMOVED
131 WMSetConnectionDelegate REMOVED
132 WMGetConnectionService REMOVED
133 WMGetConnectionProtocol REMOVED
134 WMSetConnectionNonBlocking REMOVED
135 WMSetConnectionCloseOnExec REMOVED
136 WMSetConnectionShutdownOnClose REMOVED
137 WMGetConnectionClientData REMOVED
138 WMSetConnectionClientData REMOVED
139 WMGetConnectionFlags REMOVED
140 WMSetConnectionFlags REMOVED
141 WMGetConnectionSocket REMOVED
142 WMGetConnectionState REMOVED
143 WMGetConnectionTimeoutState REMOVED
144 WMGetConnectionUnsentData REMOVED
145 WMGetConnectionQueuedData REMOVED
146 WMSetConnectionDefaultTimeout REMOVED
147 WMSetConnectionOpenTimeout REMOVED
148 WMSetConnectionSendTimeout REMOVED
150 WMTreeWalkProc ADDED
151 WMTreeWalk ADDED
152 wshellquote ADDED
156 ----------------------------------------------------
158 *** Mon Oct 14 19:42:42 EEST 2002 - Dan
160 Double buffering
161 ----------------
163 To avoid flickering caused by redrawing the widgets on Expose events, a
164 double buffering tehnique was implemented for most of the widgets.
165 This flickering effect has gotten more vizible with the introduction
166 of antialiased fonts. If with normal text one can redraw the text over the
167 old one over and over again without any degradation of the text (new pixels
168 simply overwrite old pixels), with antialiased text the situation is
169 different and text gets quickly corrupted. To avoid this corruption, one
170 needs to first erase the area where the text will go, which can cause the
171 before mentioned flickering.
172 The double buffer is implemented to solve this issue.
174 This is a change that that will be automatically available for any WINGs
175 applications and will require no change in the existing code.
176 However there is an exception from this in case of WMList if you delegate
177 the drawing of items to userspace (read below for the compelte details).
180 *** Mon Oct 14 22:07:42 EEST 2002 - Dan
182 WMList change
183 -------------
185 In case of WMList there is the posibility to delegate the drawing of the
186 list items to the application that is linked with WINGs, and this code will
187 not be inside the WINGs library, but in userland. Since we use the double
188 buffering tehnique in this case too (to allow all widgets based on WMList
189 and the ones that draw their list items by themselves to benefit from the
190 double buffering advantage automatically), we no longer pass the window to
191 the user code doing item drawing, but instead pass this pixmap in which we
192 draw before copying to the real window.
194 Since one cannot use XClearWindow() or XClearArea() on pixmaps, but only on
195 windows, if the code drawing list items used to call these functions to clear
196 the item area before drawing it needs to change to using XFillRectangle()
197 instead.
199 With this change it also means that there is no longer any need to do any
200 double buffering in the user code, since it's already done by WINGs.
203 *** Mon Oct 14 19:28:35 EEST 2002 - Dan
205 API change
206 ----------
208 WMDrawString() and WMDrawImageString() no longer take a GC as argument.
209 Instead WMDrawString() takes a WMColor* as the color for the string to be
210 drawn, while WMDrawImageString() takes 2 WMColor* arguments in place of the
211 old GC: first for text color and second for background color.
213 This change is required to support extending WMFont to allow it to handle
214 antialiased fonts through the XFree86 Xft2 extension.
216 This also has the advantage of hiding low level X11 details and use WINGs
217 internat objects instead.
219 To fix your old code to work with the new WINGs API you need to replace the
220 GC passed to WMDraw***String() in your code with a WMColor*.
221 Most of the old code used to be like this:
223 WMDrawString(screen, window, WMColorGC(color), font, x, y, txt, len);
225 for the new API it should be replaced by:
227 WMDrawString(screen, window, color, font, x, y, txt, len);
229 However if you used a particular GC created by yourself to suit your special
230 needs, you need to pass a color which is the same as the foreground color of
231 that gc.
233 For WMDrawImageString(), from:
235 WMDrawImageString(screen, window, gc, font, x, y, txt, len);
237 becomes
239 WMDrawImageString(screen, window, textColor, backColor, font, x, y, txt, len);
241 where textColor and backColor are declared like:
243 WMColor *textColor, *backColor;
245 and have the color of the foreground respective the background of the old gc.
249 *** Wed Oct  9 07:10:04 EEST 2002 - Dan
251 Antialiased font support
252 ------------------------
254 With the addition of Xft2 support in the WINGs library, now WINGs can display
255 antialiased text with TrueType or any scalable fonts.
257 Antialiased text is enabled by default, but can be disabled by adding
259 AntialiasedText = NO; in ~/GNUstep/Defaults/WMGLOBAL
261 This will disable antialiased text for any WINGs based application. If you
262 only want to disable them for a specific application only, like WindowMaker
263 for example, then add the same option in the applications configuration file,
264 in this case ~/GNUstep/Defaults/WindowMaker
266 Note that bitmapped fonts look much better than TrueType when antialiasing is
267 disabled.
270 *** Mon Sep 09 06:58:30 EEST 2002 - Dan
272 New delegate for the WMConnection class
273 ---------------------------------------
275 ConnectionDelegate structure has a new member: canResumeSending.
276 The purpose of this callback is to notify you that you can resume sending
277 data over a WMConnection.
278 It works in the following manner:
280 WMSendConnectionData() can return 3 values: -1, 0, 1
282 -1 - means that the connection has died. you should stop sending data and
283      close the connection ASAP.
284  1 - means that the data was succesfully sent
285  0 - means that the data (or part of it) was not sent. however, it was saved
286      in a queue and the library will try to send it later when possible.
288 if the return value is 1, you can continue to send the next message, and so
289 on, until the return value of such a send call will be 0.
290 After it returns 0 you can continue sending, however, the data will not be
291 sent over the connection because the operating system cannot accept any more
292 data for the moment. Instead it will be queued inside the library, making your
293 program's memory footprint increase. If the ammount of data you need to
294 send is limited and not too big, this shouldn't be a problem, because your
295 data will be queued and sent when the operating system will notify the
296 library that sending is possible again.
297 If this is the case you can just ignore the output of WMSendConnectionData()
298 and not set a callback for canResumeSending.
300 However, if the ammount of data you have to send is undetermined and you
301 also want to keep a small memory footprint for your program (so that it
302 won't grow until it uses all your available memory ;) ), you will have to
303 stop sending data over the connection as soon as WMSendConnectionData()
304 returns with 0. Then you should somehow mark this situation in your program
305 to avoid it trying to send anymore data until notified that it can resume.
306 (You should have also set a canResumeSending callback when you initialized
307 your WMConnection object because else you cannot be notified when to resume.)
309 Now, when you receive such a 0 from the send operation, your last sent data
310 is put in a queue inside the library. At a later time when the operating
311 system notifies the library that sending is possible again, the library will
312 resume to send the data that is saved in the queue. After it will be able to
313 send all the data in the queue, the canResumeSending callback will be
314 called, letting you know that not only you can resume sending because the
315 operating system is again able to send data, but also that the queue was
316 completely flushed.
318 From the canResumeSending callback, you should again update the status of
319 your program marking that it can send again, and then resume sending the
320 data from where you were left.
323 *** Thu Oct 04 06:00:09 EEST 2001 -Dan
325 Property lists handling code
326 ----------------------------
328 Code to handle property lists was added to WINGs. It is more robust
329 than the libPropList code, mostly because some conflicting concepts 
330 borrowed from UserDefaults (which libPropList use) are no longer used in
331 the WINGs property lists code. These borrowed concepts conflicted with the
332 retain/release mechanism of property lists and could lead in certain cases
333 to segmentation faults when executing libPropList based code. But the worse
334 part was that these libPropList problems were practically unsolvable without
335 removing one of those conflicting concepts and without a complete redesign. 
336 The new WINGs property lists code is also better integrated with the other
337 data types from WINGs and is actively maintained.
339 Practically the things that were removed from the WINGs property list
340 implementation compared to the old libPropList implementation, are exactly
341 the UserDefaults borrowed concepts that conflict with the retain/release
342 mechanism:
343 - The container of a proplist object and the associated functions are gone.
344 - The filename associated with a proplist object and the corresponding
345   functions are gone. Now the saving function needs the filename as a
346   parameter.
347 - The synchronization functions are no longer supported. They are part of
348   the UserDefaults and are implemented there.
349 - No functions related to domains/registering were implemented in the WINGs
350   property lists code, because they are also not part of property lists.
351   They are more in connection with UserDefaults and a central point of access
352   for domains.
354 The above 2 concepts: container and filename were added to libPropList just
355 to let it support synchronization which was borrowed from UserDefaults.
356 Property lists as defined in the openstep specification are just complex
357 data structures composed of strings, data, arrays, dictionaries and a mix of
358 them and are not associated with any file in particular. UserDefaults on the
359 other hand are property lists read from a specific file and they associate
360 that property list with that file and allow them to be synchronized.
362 Old libPropList based code can still be used by linking against the WINGs
363 library containing the new proplist code with minimal changes which are
364 described in detail in the comments at the top of the WINGs/proplist-compat.h
365 header file (the same file carries the #defines for mapping old libPropList
366 functions to the new WINGs proplist functions).
367 Our recommendation is to move to the new functions WINGs provide because
368 they better integrate with other function naming conventions in WINGs.
369 The proplist-compat.h header file is just a way to have old code up and
370 running with minimal changes so that we can remove the old and unmaintained
371 libPropList from systems while keeping to use old libPropList based code
372 without rewriting it and it should not be used for other purposes.
375 *** Sat Apr 21 09:12:09 EEST 2001 -Dan
377 API change
378 ----------
380 To allow a correct display of icon images with alpha blending in panels and
381 other places where a WINGs based application may use them the following
382 changes took place:
384 1. The following functions were renamed:
385    - WMSetApplicationIconImage()  --> WMSetApplicationIconPixmap()
386    - WMGetApplicationIconImage()  --> WMGetApplicationIconPixmap()
387    - WMSetWindowMiniwindowImage() --> WMSetWindowMiniwindowPixmap()
388 2. The following functions were added:
389    - WMSetApplicationIconImage(WMScreen *scr, RImage *image)
390    - RImage* WMGetApplicationIconImage(WMScreen *scr)
391    - WMPixmap* WMCreateApplicationIconBlendedPixmap(WMScreen *scr, RColor *col)
393 As you can see the old functions that operated on WMPixmap images (which are
394 basically X Pixmaps that lack alpha information) were renamed to ...Pixmap()
395 to make them more suggestive about what they do and to make room for the
396 new functions that operate on RImages (that hold alpha information).
398 Since the corresponding WMGet... functions only retrieve the stored
399 image/pixmap from the application, I'll outline how the WMSet...
400 functions operate:
402 All WM...IconPixmap() functions operate on WMPixmaps
403 All WM...IconImage() functions operate on RImages
406 - WMSetApplicationIconImage() will set the RImage to be used in panels
407     and will also convert the RImage to a WMPixmap with a threshold of 128
408     and will use that pixmap for the appicon image. If that doesn't satisfy
409     you, you can make a call to WMSetApplicationIconPixmap() on your own to
410     set whatever WMPixmap you see fit for the appicon. 
412 - WMSetApplicationIconPixmap() will set the WMPixmap to be used for the
413     appicon and for the panels 
416 If you use only one of the above functions, the corresponding image/pixmap
417 will be used everywhere where needed (panels and appicon), but the pixmap
418 version will not be able to handle alpha blending correctly.
420 If you use both WMSetApplicationIconImage() and WMSetApplicationIconPixmap()
421 then the RImage will have priority in panels, and the WMPixmap will only be
422 used for the appicon. This allows you to better control what icon is
423 displayed in the appicon, in case the default conversion of the RImage to a
424 pixmap with a threshold of 128 is not good enough, or in case you want a
425 different icon to be shown in the appicon than in panels.
428 Also this new function was added:
430 - WMCreateApplicationIconBlendedPixmap() will use the RImage set with
431     WMSetApplicationIconImage() if available and will blend it with the color
432     you passed. This will make the image show well on a background of that
433     color. If the RImage was not set it will return NULL. You need to call
434     WMReleasePixmap() on it after you finish with it. Passing a NULL pointer
435     instead of a color will make the RImage be blended with the default color
436     of the WINGs widgets: '#aeaaae' making it suitable to be assigned to any
437     WINGs widget.
440 To make your existing code work as before all you need to do is to rename
441 the following functions:
443    - WMSetApplicationIconImage()  --> WMSetApplicationIconPixmap()
444    - WMGetApplicationIconImage()  --> WMGetApplicationIconPixmap()
445    - WMSetWindowMiniwindowImage() --> WMSetWindowMiniwindowPixmap()
447 But if you want to take advantage of the new abilities to show alpha
448 blended images you need to start using the new functions.