xboard.git
11 years agoConnect CommentClick handler
H.G. Muller [Wed, 17 Oct 2012 18:01:37 +0000]
Connect CommentClick handler

This can make use of generic memo callback, so it could be entirely
backend. Therefore it was moved to dialogs.h. As it shared a global with
some other back-end popup routines to remember the current move, these
could now be moved out of xboard.c too. (Well, not so for the X11 front-end,
so it has now been put in a header. :-( )

11 years agoFix animation
H.G. Muller [Wed, 17 Oct 2012 17:41:11 +0000]
Fix animation

Because FrameDelay does block the event loop, even though it releaes the
CPU, expose events start to lag behind the actual drawing. By combining
expose events for overlapping squares, rather than decompose them into
3 rectangles, this problem seems to go away. But only if there is an
extra exposure on the squares to be drawn also non-overlapping frames
will be properly drawn (?!).

11 years agoImplement highlighting in engine output by through generic method
H.G. Muller [Wed, 17 Oct 2012 12:40:59 +0000]
Implement highlighting in engine output by through generic method

HighlightMove was made generally available for all text. It is now just a
wrapper for the generic HighlightText, and could be moved to the back-end.
(This requires the initialization to be widget specific, and the flag
indicating it has been done is now stored in the Option.min field.)

11 years agoLet engine-output memos use new generic callback
H.G. Muller [Wed, 17 Oct 2012 12:33:28 +0000]
Let engine-output memos use new generic callback

11 years agoAdd scrolling of Move History
H.G. Muller [Wed, 17 Oct 2012 11:53:03 +0000]
Add scrolling of Move History

To have access to the textview, its handle is now stored in the
Option.textValue field.

11 years agoAdd highlighting in move list
H.G. Muller [Wed, 17 Oct 2012 11:11:23 +0000]
Add highlighting in move list

For now it is assumed the normal background will be white (for clearing
the highlight).

11 years agoMake generic memo-event handler, and connect history callback
H.G. Muller [Tue, 16 Oct 2012 17:44:40 +0000]
Make generic memo-event handler, and connect history callback

Large text widgets can now define a user handler in their Option.choice
field. If they do, agneric callback is added tothem, which catches mouse
events. Button release and pointer motion pass their coordinate and type
to the specified user routine. Button presses in addition retrieve
the text from the widget, set the cursor in it to the clicked point,
and convert it to a character position, also passed to the user.
  The user is responsible for ignoring events he is not interested in.

11 years agoAdd key-handler for ICS Input Box
H.G. Muller [Tue, 16 Oct 2012 13:58:58 +0000]
Add key-handler for ICS Input Box

In contrast to the X11 code, all intercepted keys are now treated by
the same callback. The ICS Input Box callback triggers on Up, Down and
Return key, and refers to these symbolically.

11 years agoHighlight Pause button
H.G. Muller [Tue, 16 Oct 2012 13:05:45 +0000]
Highlight Pause button

11 years agoBetter cleansing of xboard.c from X11 types
H.G. Muller [Tue, 16 Oct 2012 11:52:41 +0000]
Better cleansing of xboard.c from X11 types

The #includes for X11 files were still in there.

11 years agoAdd text insertion in engine-output memos
H.G. Muller [Tue, 16 Oct 2012 11:28:32 +0000]
Add text insertion in engine-output memos

11 years agoAppend recent engines to engine menu
H.G. Muller [Tue, 16 Oct 2012 07:34:02 +0000]
Append recent engines to engine menu

This is now entirely moved to the back-end, by doing it in the table
from which the menus are later generated. The special callback for engine
items is abandoned, and the euProc for such items is left NULL to flag
that RecentEngineEvent should be invoked with the applicable engine number.
To calculate the latter a global variable firstEngineItem is dynamically
set to the length of the regular engine menu.

11 years agoTransfer more gtk-xt code, and add some new
H.G. Muller [Mon, 15 Oct 2012 20:17:50 +0000]
Transfer more gtk-xt code, and add some new

Add input-source handling
Graft color picker (<Enter> callbeack in the text field is still missing!)
Handle contents of label widgets (store handles in Option for access)
Add printing of clocks
Add printing of window title
Pay attention to BORDER attribute of Label Options (pack in frame)
Delete ReadBitmap code (also remove #including of bitmap files for icons)
Fix layout of textviews (adapt to newer Option format, incl. wrap, scroll)
Support vertical stacking in Break Option (no table widening when !SAME_ROW)
Make default horizontal scroll policy automatic (for engine-output window)
Fix disabling of unused spinners in TC dialog

11 years agoConnect dialog Browse buttons to GTK browser
H.G. Muller [Mon, 15 Oct 2012 18:47:33 +0000]
Connect dialog Browse buttons to GTK browser

11 years agoImplement menu checkmarking and enabling
H.G. Muller [Mon, 15 Oct 2012 17:52:17 +0000]
Implement menu checkmarking and enabling

odes in the (later over-written) handle field specify which items
are to be checkmarked, and by what style button.

11 years agoAttach expose handler and connect to mouse events
H.G. Muller [Mon, 15 Oct 2012 14:18:12 +0000]
Attach expose handler and connect to mouse events

The GraphExposeProc is conected to the Graph widgets. A gdk draw routine
is used to copy the buffer bitmap to the display. It is also connected
to button and motion-notify events.
  In this version the board can be fully operated with the mouse.

11 years agoTransfer most available gtk-xt code to xoptions.c
H.G. Muller [Sun, 14 Oct 2012 20:00:14 +0000]
Transfer most available gtk-xt code to xoptions.c

GenericPopUp and PopDown are grafted from gtk-xt into gtk2.
The version compiles, but segfaults before doing anything, with error
messages about unexpected cases in GenericPopup for Graph and PopUp Options
of the main board. The spin options need special treatment in GetWidgtText.

11 years agoGive LoadListBox two extra parameters
H.G. Muller [Mon, 15 Oct 2012 09:41:33 +0000]
Give LoadListBox two extra parameters

It often occurs that we just want to swap two elements, and reloading
the entire listbox would be a very inefficient way to do this in widget
sets that allow access to a single element.

11 years agoRemove all X11 code by #ifdeffing it out
H.G. Muller [Sun, 14 Oct 2012 18:36:34 +0000]
Remove all X11 code by #ifdeffing it out

With #ifdef TODO_GTK we disable all X11 code, in order to get a compiling
X11-free version. The disabled sections can then be replaced by code
for another widget set, the X11 version still showing what it was supposed
to do.

11 years agoMove timer functions to new file xtimer.c
H.G. Muller [Sun, 14 Oct 2012 15:37:18 +0000]
Move timer functions to new file xtimer.c

The timers for the clocks, periodic analysis events and ScheduleDelayedEvent
go into a separate file.

11 years agoMake xevalgraph.c backend
H.G. Muller [Sun, 14 Oct 2012 13:31:56 +0000]
Make xevalgraph.c backend

The only front-end stuff left in xevalgraph.c was an unnecessary reading
of the window size (which could be obtained from the WindowPlaceent struct),
and drawing (all cairo now). The drawing was moved to draw.c, and the
remaining part renamed nevalgraph.c.

An attempt to list them in a less chaotic way.

11 years agoCleanse back-end code of all references to X11 types
H.G. Muller [Sun, 14 Oct 2012 12:34:09 +0000]
Cleanse back-end code of all references to X11 types

When compiling for X11, common.h #included X11/Intrinsics.h so that
X11-specific data types could still be used throughout the back-end part
not shared with WinBoard. By temporarily disabling this, error messages
could be generated on all such occurrences, and were then solved. This
included the following:
  The InputSource struct is not uses in usystem.c at all, and its definition
could be moved to xboard.c. InputSourceRef, which logically should heve been
defined as (InputSource *), is in reality (void *), so the back-end can
pass it around.
  Some non-platform-dependent stuff of general interest had prototypes
(or external vars) in xboard.h. This is now moved to a new header xboard2.h,
to allow it to be shared without bringing in X11 dependence.
  The EngineOutputProc was defined inconsistently, but the header was not
sufficiently shared to flag this error. This has been repaired now, by moving
the template to menus.h.

11 years agoRemove xedittags.c, .h from project
H.G. Muller [Sun, 14 Oct 2012 11:39:47 +0000]
Remove xedittags.c, .h from project

The tiny bit of code that was left was absorbed in dialogs.c, the one
prototype to menus.h.

11 years agoRemove inclusion of frontend.h from backendz.h
H.G. Muller [Sun, 14 Oct 2012 10:53:20 +0000]
Remove inclusion of frontend.h from backendz.h

This did not seem to serve any purpose at all.

11 years agoSplit xhistory.c in front-end and middle-end part
H.G. Muller [Sun, 14 Oct 2012 10:49:28 +0000]
Split xhistory.c in front-end and middle-end part

11 years agoMove MarkMenuItem to xoptions.c
H.G. Muller [Sun, 14 Oct 2012 10:21:09 +0000]
Move MarkMenuItem to xoptions.c

This to make xoptions.c completely independent from the inclusion of
frontend.h. The prototype is moved to menus.h.
  Loose end: DrawPosition in board.c does not see the prototype.
Very suspect that it wants to see it. Why would it have to correct the
flipView setting??? Better se to it that it is correct to start with!

11 years agomove testing for no options to back-end
H.G. Muller [Sun, 14 Oct 2012 10:14:07 +0000]
move testing for no options to back-end

The test if an engine has options and display a note instead of
the Engine Settings dialog when this is not the case is moved
to outside of GenericPopUp, to make the later independent of calling
other routines.

11 years agoRemove some unnecessary header includes
H.G. Muller [Sun, 14 Oct 2012 09:20:16 +0000]
Remove some unnecessary header includes

11 years agoMove ICS-engine analyze and AnalyzeGame code to shared back-end
H.G. Muller [Sun, 14 Oct 2012 08:47:21 +0000]
Move ICS-engine analyze and AnalyzeGame code to shared back-end

This code was still duplicated between WB and XB in the front-ends.
Because of its incorporation in AnalyzeModeEvent the 'middle-end'
function AnalyzeModeProc could be eliminated. AnalyzeModeEvent was made
to return an int to flag its success, and keep the JAWS code based
on it out of XBoard.
 The AnalyzeGame code  is now incorporated in AnalyzeFileEvent().

11 years agoAdd configure switches for Xaw vs GTK.
H.G. Muller [Fri, 26 Oct 2012 08:28:59 +0000]
Add configure switches for Xaw vs GTK.

This patch is an adapted version of the one Arun made at the end of the
gtk2 branch. It uses the exact same version of his configure.ac, but the
Makefile.am is adapted to the situation in master at the beginning of it,
after duplication of the X11 front-end files in the xaw directory for
preserving them, while the versions that will be modified to GTK front-end
are still in the xboard directory.

11 years agoPrepare xoptions.c for middle-end changes
H.G. Muller [Thu, 25 Oct 2012 09:12:41 +0000]
Prepare xoptions.c for middle-end changes

Some changes that can be pre-empted, such as the splitting of Label
into Label and Icon Option type, and some dummy wrappers are already
implemented, so they can be used when needed by GTK.

11 years agoPreserve copies of the X11 front-end in xboard directory
H.G. Muller [Thu, 25 Oct 2012 07:20:03 +0000]
Preserve copies of the X11 front-end in xboard directory

The X11 front-end has been moved to the xaw directory, but copies
are retained for modifying them to gtk versions.

11 years agoMove X11 front-end to directory xaw
H.G. Muller [Wed, 24 Oct 2012 06:55:27 +0000]
Move X11 front-end to directory xaw

11 years agoFix initial enables in TC dialog
H.G. Muller [Wed, 31 Oct 2012 17:18:02 +0000]
Fix initial enables in TC dialog

11 years agoFix image extension used for browsing to .pgn
H.G. Muller [Tue, 30 Oct 2012 13:47:24 +0000]
Fix image extension used for browsing to .pgn

11 years agoFix WinBoard compile error on enum PEN
H.G. Muller [Sun, 28 Oct 2012 20:39:19 +0000]
Fix WinBoard compile error on enum PEN

11 years agoFix crash in promotion popup
H.G. Muller [Tue, 30 Oct 2012 10:20:54 +0000]
Fix crash in promotion popup

There were not enough entries for Capablanca Chess with legality-testing off,
where King is also presented as a choice.

11 years agoFix message in New Variant dialog
H.G. Muller [Sun, 28 Oct 2012 17:19:23 +0000]
Fix message in New Variant dialog

Even in -ncp mode the message was referring to the 'current engine'.

11 years agoFix crash on animation after resizing
H.G. Muller [Sun, 28 Oct 2012 17:16:20 +0000]
Fix crash on animation after resizing

The animate buffers were still holding pointers to a discarded cairo surface.

11 years agoFix variant-dependent pieces
H.G. Muller [Sun, 21 Oct 2012 12:49:45 +0000]
Fix variant-dependent pieces

The code to select the actually used piece images from the available ones
(from InitDrawingSizes) is now made into a subroutine, and also called
after resizing the pieces.

11 years agoReplace marble texture pixmaps by png
H.G. Muller [Fri, 26 Oct 2012 08:18:48 +0000]
Replace marble texture pixmaps by png

11 years agoReplace xiangqi board pixmaps by png images
H.G. Muller [Fri, 26 Oct 2012 08:13:27 +0000]
Replace xiangqi board pixmaps by png images

11 years agoRemove the texture pixmaps from project
H.G. Muller [Fri, 26 Oct 2012 08:08:44 +0000]
Remove the texture pixmaps from project

These were already replaced by png textures.

11 years agoFix re-rendering of svg on resize
H.G. Muller [Tue, 23 Oct 2012 13:02:56 +0000]
Fix re-rendering of svg on resize

The previously prepared bitmaps were retained if we resized, rather then
rendering the svg atthe new size.

11 years agoupdate po/pot files
Arun Persaud [Sun, 21 Oct 2012 22:48:30 +0000]
update po/pot files

11 years agonew version number for developer release
Arun Persaud [Sun, 21 Oct 2012 22:47:12 +0000]
new version number for developer release

11 years agowe still need a few bitmaps, so the directory needs to be included in Makefile.am
Arun Persaud [Sun, 21 Oct 2012 18:10:36 +0000]
we still need a few bitmaps, so the directory needs to be included in Makefile.am

make distcheck complained about this

11 years agoRename svg shogi pieces, so they become usable
H.G. Muller [Sun, 21 Oct 2012 13:56:43 +0000]
Rename svg shogi pieces, so they become usable

Only white pieces are present. For black they would have to be flipped.

11 years agoFix bug in resizing on variant switch
H.G. Muller [Sun, 21 Oct 2012 13:54:25 +0000]
Fix bug in resizing on variant switch

The fix of the garbage pixels had unfortunately broken this.

11 years agoFix bug in fallback mechanism
H.G. Muller [Sun, 21 Oct 2012 13:15:01 +0000]
Fix bug in fallback mechanism

After failure to load a piece from a specified -pieceImageDirectory
the default theme was not tried, because the cairo function to load
from a pgn file returns a valid handle even if the file does not exist.

11 years agoGet svg error message
H.G. Muller [Sun, 21 Oct 2012 12:58:42 +0000]
Get svg error message

11 years agoFix variant-dependent pieces
H.G. Muller [Sun, 21 Oct 2012 12:49:45 +0000]
Fix variant-dependent pieces

The code to select the actually used piece images from the available ones
(from InitDrawingSizes) is now made into a subroutine, and also called
after resizing the pieces.

11 years agoRemove caveat on available pieces fromNew Variant dialog
H.G. Muller [Tue, 16 Oct 2012 10:08:25 +0000]
Remove caveat on available pieces fromNew Variant dialog

In the cairo version all pieces are available at all board sizes.

11 years agoRemove some unused images from png directory
H.G. Muller [Sun, 21 Oct 2012 09:41:11 +0000]
Remove some unused images from png directory

Currently only the three board texture files are used. But the piece
images are still left, because they might be useful if we ever want
to mae XBoard configurable for not using librsvg.

11 years agoFix bug in resizing
H.G. Muller [Sun, 21 Oct 2012 08:40:37 +0000]
Fix bug in resizing

The nominal size of the window was not set in the correct Option struct.

11 years agoPrevent odd-width line shift in length direction
H.G. Muller [Sun, 21 Oct 2012 07:58:23 +0000]
Prevent odd-width line shift in length direction

11 years agoPrint missing-pieces error message to console
H.G. Muller [Sun, 21 Oct 2012 07:48:29 +0000]
Print missing-pieces error message to console

The GUI might not yet be up at this point.In addition, suppress
the rest of the code, because it could give segfaults.

11 years agoFix garbage pixels on the right of the board
H.G. Muller [Sun, 21 Oct 2012 07:30:26 +0000]
Fix garbage pixels on the right of the board

The extra pixel that is requested in sizing the board window back to
an available size because we ofte get one less pixel than we ask for
can lead to a line of garbage pixels next to the board. This is combatted
by limiting expose events to the true board area, remembering that in the
Graph Option rather than the actual window size, and suppressing resizing
when the latter only exceeds the stored width by more than 1 pixel.

11 years agoTrim board-window size
H.G. Muller [Mon, 15 Oct 2012 08:27:14 +0000]
Trim board-window size

The board window will sometimes be a pixel larger than requested.
The ReSize routine will now reset the size values in the Graph Option
to what they were supposed to be, to prevent expose events will
draw nonsense in the extra space.

11 years agoAdapt docs for svg/png in stead of bitmap/pixmap
H.G. Muller [Sat, 13 Oct 2012 21:26:10 +0000]
Adapt docs for svg/png in stead of bitmap/pixmap

11 years agoSpontaeous changes in gettext stuff
H.G. Muller [Sat, 13 Oct 2012 07:35:31 +0000]
Spontaeous changes in gettext stuff

11 years agoMove Shogi svg pieces to own directory
H.G. Muller [Sat, 13 Oct 2012 06:03:48 +0000]
Move Shogi svg pieces to own directory

11 years agoRemove unnecessary Xt colors and call to MakeColors
H.G. Muller [Sat, 13 Oct 2012 05:57:48 +0000]
Remove unnecessary Xt colors and call to MakeColors

11 years agoCode cleanup: move expose redraw to draw.c
H.G. Muller [Sat, 13 Oct 2012 05:50:56 +0000]
Code cleanup: move expose redraw to draw.c

11 years agoSuppress warning for InitDrawingHandle
H.G. Muller [Sat, 13 Oct 2012 05:37:45 +0000]
Suppress warning for InitDrawingHandle

11 years agoMake fallbackPieceImageDirectory hardcoded
H.G. Muller [Sat, 13 Oct 2012 05:33:15 +0000]
Make fallbackPieceImageDirectory hardcoded

11 years agoIncrease drag delay too 200 msec
H.G. Muller [Sat, 13 Oct 2012 05:18:23 +0000]
Increase drag delay too 200 msec

On my slow laptop it can take more than 100 msec to reallocate bitmaps
in the generic expose, with as a consequence that the DelayedDrag event
is not processed before the timeout expires. The timeout event then triggers
a redraw, which again takes so long that the timeout expires before the
event to reset the timer could be processed, and this just perpetuates
itself, leading to a large series of queued redraws, and a long waiting time
for an image to appear after the sizing stops.

11 years agoFix segfault on faulty command-line option
H.G. Muller [Sat, 13 Oct 2012 05:01:05 +0000]
Fix segfault on faulty command-line option

11 years agoSuppress anti-aliasing in -monoMode
H.G. Muller [Fri, 12 Oct 2012 12:42:26 +0000]
Suppress anti-aliasing in -monoMode

In the color-substitution code, always use bi-level alpha and color.

11 years agoRemove piece pixmaps from project
H.G. Muller [Fri, 12 Oct 2012 11:34:04 +0000]
Remove piece pixmaps from project

11 years agoImplement proper fallback cascade
H.G. Muller [Fri, 12 Oct 2012 09:47:25 +0000]
Implement proper fallback cascade

Try in order cached svg, cached bitmap, user png, user svg, default svg.

11 years agoCache svg handles
H.G. Muller [Fri, 12 Oct 2012 09:06:06 +0000]
Cache svg handles

11 years agoInstall svg pieces in themes/default
H.G. Muller [Fri, 12 Oct 2012 08:45:29 +0000]
Install svg pieces in themes/default

The svg pieces are installed with the XBoard data in the directory
.../xboard/themes/default . A new option -fallbackPieceImageDirectory
is added, and is configured in the master settings file to point to
these pieces. This options, which replaces -svgDirectory, is volatile,
and the menu control to set it is removed. The -pngDirectory option
is renamed to -pieceImageDirectory (-pid).

11 years agoRemove bitmaps from project
H.G. Muller [Fri, 12 Oct 2012 08:02:50 +0000]
Remove bitmaps from project

11 years agoInstall the wood textures as png
H.G. Muller [Fri, 12 Oct 2012 07:55:07 +0000]
Install the wood textures as png

The xboard.conf has to be edited to set these as default textures,
in stead of the .xpm files.

11 years agoAdd hatched board texture
H.G. Muller [Fri, 12 Oct 2012 07:50:31 +0000]
Add hatched board texture

A png file with hatching is added, so it can be used for dark squares
in a monochrome theme. It is installed in a new data directory
.../xboard/themes/textures.

11 years agoadded a black and white theme to replace the mono option
Arun Persaud [Fri, 12 Oct 2012 05:21:06 +0000]
added a black and white theme to replace the mono option

11 years agoadded SVGs to dist files in automake
Arun Persaud [Fri, 12 Oct 2012 03:56:42 +0000]
added SVGs to dist files in automake

11 years agoFix exposure of atomic captures
H.G. Muller [Thu, 11 Oct 2012 17:44:22 +0000]
Fix exposure of atomic captures

The grid lines had to be repaired too, so damage marker 2 had to be used.

11 years agoFix animation with textures off
H.G. Muller [Thu, 11 Oct 2012 17:13:24 +0000]
Fix animation with textures off

The blank square was not shifted to (0,0) when drawing the animation buffer.

11 years agoFix 1-pixel offset of grid lines on some cairo implementations
H.G. Muller [Thu, 11 Oct 2012 17:08:49 +0000]
Fix 1-pixel offset of grid lines on some cairo implementations

11 years agoSolve odd lineGap problem
H.G. Muller [Thu, 11 Oct 2012 07:51:07 +0000]
Solve odd lineGap problem

Not all cairo versions seem to round the same when an odd-width line
is to be drawn at integer coordinates. So now we explicitly ask it
to be drawn centered on half-odd-integer coordinates.

11 years agoAdd -trueColors option
H.G. Muller [Tue, 9 Oct 2012 16:52:43 +0000]
Add -trueColors option

11 years agoAlways render svg pieces anew on size change
H.G. Muller [Tue, 9 Oct 2012 12:56:16 +0000]
Always render svg pieces anew on size change

The svg pieces are now unconditionally rendered to supply the pngPieceImage
master source otherwise read from png file. This is then fed into the
original png code (so that if for some reason it fails, we fall back on png
pieces, and finally on built-in pixmaps).

11 years agoFix rsvg version in configure.ac
H.G. Muller [Tue, 9 Oct 2012 12:06:47 +0000]
Fix rsvg version in configure.ac

11 years agoinitial svg rendering
Arun Persaud [Tue, 9 Oct 2012 02:54:19 +0000]
initial svg rendering

11 years agoadded cairo and librsvg to configure process
Arun Persaud [Tue, 9 Oct 2012 01:34:05 +0000]
added cairo and librsvg to configure process

11 years agoadded SVGs
Arun Persaud [Tue, 9 Oct 2012 01:32:55 +0000]
added SVGs

converted from inkscape SVG to plain SVG before adding

11 years agoAdapt Eval Graph code to new drawing system
H.G. Muller [Wed, 10 Oct 2012 19:19:25 +0000]
Adapt Eval Graph code to new drawing system

The eval graph now triggers an expose after drawing, and gets its size
from the Option fields.

11 years agoFix expose requests seek graph
H.G. Muller [Wed, 10 Oct 2012 18:37:58 +0000]
Fix expose requests seek graph

11 years agoMake draw handle for board globally available
H.G. Muller [Wed, 10 Oct 2012 18:07:53 +0000]
Make draw handle for board globally available

11 years agoLet expose requests pay proper attenton to widget
H.G. Muller [Wed, 10 Oct 2012 17:45:39 +0000]
Let expose requests pay proper attenton to widget

So far, expose requests were always assumed to be for the board widget,
preventing display of the labels.

11 years agoFix initial display of logos
H.G. Muller [Wed, 10 Oct 2012 16:45:59 +0000]
Fix initial display of logos

The logos were selected and printed during the initialization,
before the main event loop was started. So the expose events during
widget creation, which created the drawing surfaces, were only processed
after the initial drawing of logos, so that there was nothing to draw on!

11 years agoFix alignment of highlight expose
H.G. Muller [Wed, 10 Oct 2012 15:25:25 +0000]
Fix alignment of highlight expose

11 years agoremove NewSurfaces
H.G. Muller [Wed, 10 Oct 2012 15:19:52 +0000]
remove NewSurfaces

11 years agoMake expose handler generic
H.G. Muller [Tue, 9 Oct 2012 11:57:40 +0000]
Make expose handler generic

The Graph Option now returns two handles in hitherto unused fields of its
Option struct: Option.choice is a cairo handle of a memory buffer the user
must draw to, while Option.textValue is the handle to the widget.
Expose events copy the memory buffer to the display for the exposed area.
A routine DrawExpose() is supplied to let the user generate expose events.

11 years agoReload piece images when pngDirectory is changed
H.G. Muller [Sat, 6 Oct 2012 19:30:59 +0000]
Reload piece images when pngDirectory is changed

The OK function of the board options dialog now tests for a change
in pngDirectory and passes a parameter to InitDrawingParams to tell
it to destroy the old images. This cause a reload on scaling the pieces.

11 years agoSuppress redraw during sizing
H.G. Muller [Sat, 6 Oct 2012 18:16:54 +0000]
Suppress redraw during sizing

11 years agoFix bug in resize trigger
H.G. Muller [Sat, 6 Oct 2012 18:10:18 +0000]
Fix bug in resize trigger

Even if the square size does not change, the window has to be shrunk
back to fit the board.

11 years agoMake Piececolor options work on png pieces
H.G. Muller [Sat, 6 Oct 2012 17:54:50 +0000]
Make Piececolor options work on png pieces

The scaled, antialiased bitmaps are now colored according to the option
settings. This is done by decomposing every pixel in a white, black and
transparency component, which is possible because the opacity is
directly give in the alpha channel, and black originally was a hard zero.
So what you se in the red channel must be white (as the original white
was #FFFFCC), and the rest of the opacity must be due to black.
  The color to be replaced (white for the white pieces, black for the black
pieces) is then replaced by the original weight of this color times the
color from the option.