aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2024-03-13Rename README to README.mdHEADmasterGeoff Levand2-0/+8
Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-12makefile.am: Fix maintainer-clean targetGeoff Levand2-0/+9
Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-12Add bootstrap fileGeoff Levand2-1/+5
Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-12Update INSTALL fileGeoff Levand1-47/+188
Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-12configure.ac: enable silent build rules by default if availableAntonio Ospite1-0/+5
Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-12configure.ac: use the subdir-objects optionAntonio Ospite1-1/+1
This avoids clutter in the top-level dir, and also fixes this automake warning: Makefile.am:118: warning: source file 'twin_demos/twin_calc.c' is in a subdirectory, Makefile.am:118: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Geoff Levand <geoff@infradead.org>
2016-10-12configure.ac: use autoupdate to modernize the syntaxAntonio Ospite1-15/+17
Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Geoff Levand <geoff@infradead.org>
2013-11-04Updates for libpng-1.4Geoff Levand2-6/+6
Signed-off-by: Geoff Levand <geoff@infradead.org>
2013-05-03libtwin: Add touch supportTyler Hall5-0/+290
In a similar fashion as the Linux mouse and joystick, support absolute pointing devices using /dev/input/eventX. Currently it only handles ABS_X, ABS_Y, and BTN_TOUCH events. The library interface will open the specified device or, if unspecified, find the first device in /dev/input that supports absolute and touch events. Signed-off-by: Tyler Hall <tylerwhall@gmail.com> Signed-off-by: Geoff Levand <geoff@infradead.org>
2012-04-13Fixups for 'make dist'Geoff Levand3-30/+15
o Remove old .cvsignore files. o Add missing dist files to Makefile.am. o Remove generated files from dist. Signed-off-by: Geoff Levand <geoff@infradead.org>
2012-04-13Update maintainerGeoff Levand1-1/+1
Signed-off-by: Geoff Levand <geoff@infradead.org>
2012-04-08Minor cleanup of twin_primitive.cGeoff Levand1-6/+7
Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11Fix build warningsGeoff Levand12-21/+30
Fix various unused parameter and type mismatch build warnings. Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11Add preprocessor macro maybe_unusedGeoff Levand6-8/+16
Define a preprocessor macro maybe_unused and add it where needed to remove unused parameter build warnings. Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11Remove empty twin_path_bevel_shapeGeoff Levand1-13/+0
Remove the empty and unused static routine twin_path_bevel_shape(). Fixes unused parameter build warnings. Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11Remove unneeded call to png_set_swap_alphaGeoff Levand2-10/+8
Alpha byte swapping is done in twin_premultiply_alpha(), so the PNG processing overhead can be reduced by removing the png_set_swap_alpha() call in twin_png_to_pixmap() and adjusting twin_premultiply_alpha(). Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11Fix png little endian alphaGeoff Levand1-10/+26
Add a new helper routine _twin_apply_alpha() that handles big and little endian details of alpha multiplication for png to ARGB32. Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11External fbdev event processingGeoff Levand2-4/+39
Add two new routines twin_fbdev_create_ext() and twin_fbdev_process_events() that allow application control of twin event processing. Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11External X11 event processingGeoff Levand2-3/+23
Add two new routines twin_x11_create_ext() and twin_x11_process_events() that allow application control of twin event processing. Signed-off-by: Geoff Levand <geoff@infradead.org>
2011-12-11Add X11 key event dispatchGeoff Levand1-0/+7
Signed-off-by: Geoff Levand <geoff@infradead.org>
2008-01-08Bump version to 0.0.3Benjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@pasglop.(none)>
2007-08-27Fix up/down inversion of key eventsJeremy Kerr1-1/+1
We're currently getting TwinEventKeyDowns for key ups, and vice versa. This change fixes the problem. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-08-23twin: add Linux joystick supportJeremy Kerr5-0/+204
Add a simple event layer for joystick devices. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-09Remove dependency on libmBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-09Avoid use of sqrt for mouse accel.David Woodhouse2-20/+23
Convert twin_linux_mouse_accel() to twin_fixed_t arithmetic to avoid dependency on libm. Depends on separate patch which actually fixes twin_fixed_sqrt() Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-09Fix overflow in twin_fixed_sqrt()David Woodhouse1-0/+4
Twin_fixed_sqrt() suffers from overflow. Fix it. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-06Fix twin non-HAVE_ALTIVEC build.David Woodhouse1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-05Bump libtwin revisionBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-05Add gzip support for cursorsJeremy Kerr2-10/+50
The cursors used by twin compress well, so allow twin_cursor to load a compressed cursor file when zlib is present. In both cases, uncomressed cursors still work. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-03twin_jpeg: add a query function to get image details from fileBenjamin Herrenschmidt2-0/+66
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-03twin_jpeg: don't enable DEBUG by defaultBenjamin Herrenschmidt1-2/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-03png.h inclusion cleanupBenjamin Herrenschmidt2-2/+1
No need to have it in the user header Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-04-03Add simple jpeg loader based on libjpegBenjamin Herrenschmidt4-1/+223
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-03-30Fix make distJeremy Kerr1-2/+2
twin_def.h wasn't defined in Makefile.am's sources list correctly, so make dist fails. This change fixes the problem, referring to twin_def.h in its proper location. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-03-30Fix glyph width for ttfBenjamin Herrenschmidt1-5/+9
As usual with glyph metrics, I only half understand what's going on there :-) From trial and error, it looks like the margin thing we apply for stroke font is no good for ttf, at least not using a margin does make things much nicer for me using ttf fonts Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-03-30Fix twin_ttf to generate useable #include directiveBenjamin Herrenschmidt1-1/+1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-01-22Premultiply alpha channel on PNG imagesJeremy Kerr3-0/+29
libtwin expects pixmaps to be premultiplied with their alpha channel, but loaded PNGs aren't. This change adds a generic function to do alpha premulitplication, and uses it on pixmaps loaded from PNG. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-01-12Add missing twin_feature.cBenjamin Herrenschmidt2-0/+193
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-07Add some basic altivec supportBenjamin Herrenschmidt9-13/+254
This adds altivec versions of argb32_over_argb32 and argb32_source_argb32 operations and a bit of altivec optimisation to the fbdev put span code as well. It could probably be further optimized, and with some patience, one could implement the full set of primitives for altivec instead of just those two, but that's at least a beginning. I haven't properly measured the difference in performances yet. It is definitely faster on my powerbook though. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-07Add build system support for altivecJeremy Kerr2-1/+33
This change to the libtwin build system detects altivec support, and sets cflags and a #define HAVE_ALTIVEC if found. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-05libtwin includes are in $(includedir)/libtwinJeremy Kerr41-50/+55
This change modifies the twin sources to expect twin libraries in the libtwin/ directory. Consequently, we need to move the headers (and sources to keep things clean) into the libtwin/ directory in the source tree. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-04Remove -fno-strict-aliasing and fix aliasing issueBenjamin Herrenschmidt2-14/+13
Remove -fno-struict-aliasing as I think the code is generally safe due to the proper use of unions when an object can have multiple different types. twin_timeout.c did have some dodgy casts that I removed. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-04Stop widgets update flicker with immediate refreshBenjamin Herrenschmidt1-1/+5
This patch disables refresh around widget refresh operations (from the toplevel object) so that individual widgets get refreshed at once and thus don't flicker. This fixes the flicker with the demos Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-04Add support for immediate damage refresh to fbdevBenjamin Herrenschmidt3-3/+42
This makes the fbdev backend refresh damaged areas directly from the screen->damaged callback instead of delayed to a "work". The work is still there to handle console switches. In order to avoid flicker and artifacts, we also disable refresh around cursor updates and window content. The demos flicker a lot in this mode, so they'll have to be fixed to disable / enable refresh around some operations too (probably in the widget code), but the overall performances are better for my application as mouse cursor no longer triggers giant updates when moving while something else is updating Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-03Fix cursor image handling bugsBenjamin Herrenschmidt1-7/+6
First, don't destroy the previous cursor when relacing it as it's common for applications to store a bunch of cursor images and flipping them in, they don't want to have to re-create them each time. Then, there was a NULL-deref when setting the cursor to NULL to remove it Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-03Space some definitions in twin.hBenjamin Herrenschmidt1-0/+8
Gives me some air to breath Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-03Temporary key events with fbdevBenjamin Herrenschmidt1-4/+15
This is temporary as I need to implement a proper keyboard handling, probably via the event device, and an input method mecanism for translating unhandled raw key down events into ucs4. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-03Add a screen hook that allows to install a toplevel event filter,Benjamin Herrenschmidt2-54/+65
can be used to handle global application events, like console switch related events (once I take the primitive keyboard stuff out of twin_fbdev) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-03Add some damage handling to windows, to be typically used by windowsBenjamin Herrenschmidt2-4/+89
who have a drawproc installed. I intend to use that for some apps that directly paint in windows rather than using the widgets mecanism Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-03Rework clip handling. The clip rectangle and the origin of drawingBenjamin Herrenschmidt6-29/+138
are now two different things, so that you can clip drawing within changing your coordinate system. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Fix crash in twin_composite if msk == NULLBenjamin Herrenschmidt1-2/+2
Oops, introduced by the transform changes, I wasn't testing msk for NULL before dereferencing it in one spot. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Install libtwin.pcJeremy Kerr3-4/+7
The existing twin.pc file was generated, but not installed. This change installs it (as libtwin.pc), and uses the more flexible TWIN_DEP variables. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Add png support to libtwin buildJeremy Kerr2-2/+22
This change adds twin_png to the default build of libtwin. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Allow features to be disabledJeremy Kerr1-5/+31
This change adds --disable options to prevent building the x11, fbdev, linux-mouse and ttf components, even if they're found by pkgconfig. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Only create one libtwin libraryJeremy Kerr2-28/+24
Looks like the idea of splitting up the twin libraries into componenets (eg, libtwin-x11.so for x11-specific stuff) wasn't working too well. Instead, we should stick to the one shared library, whose contents change depending on the available dependencies. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Move twin demo binaries to twin_demos/Jeremy Kerr4-13/+23
This change moved the twin demo binaries to the twin_demos subdirectory. Also, don't include these demos in the install - they can be run from the build directory instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-12-01Recursive make considered harmfulJeremy Kerr4-34/+28
Change the Makefile.am to not use recursive make - this will allow future dependencies on the twin library without too much automake pain. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-29Install libtwin headersJeremy Kerr1-5/+7
This patch installs the libtwin headers in $prefix/include/libtwin/ during make install Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-29Library version info cleanupJeremy Kerr1-2/+4
Small cleanup of libtool version arguments - only specify -version-info when building libraries. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-29Add mouse enter/leave events for pixmaps/windows.Benjamin Herrenschmidt2-32/+82
The current "target" is the one under the mouse and also receives mouse movements and button down events. However, once the button has been pressed in a window, all subsequent mouse events will be sent to that window (and no mouse leave will be generated) until the button has been released. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-29Move demo applications to twin_demos subdirectoryJeremy Kerr17-22/+24
This change moves the twin demo applications to a new subdirectory (twin_demos), and updates the auto{conf,make} setup to suit. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-29Compile twin as separate libraries.Jeremy Kerr3-59/+74
This change separates twin into a set of libraries (libtwin, libtwin-x11, libtwin-fbdev and libtwin-mouse). Also, generally improve the autoconf magic to make this all work. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-28Fix copy/paste bogon on 16 bits tranformBenjamin Herrenschmidt benh@kernel.crashing.org1-2/+2
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-28Add some basic affine transform support to compositing.Benjamin Herrenschmidt benh@kernel.crashing.org5-41/+369
The transform matrix is currently stored in the pixmap, though it is only ever used when that pixmap is a source of a composite operation (not for windows refresh, damage, etc...) thus I might move it to twin_operand_t. The implementation is totally sub-optimal but it gives a working basis. As Keith suggested, we could use a bresenham-type algorithm in the transform loop to avoiding having to transform every pixel through the matrix. That will probably significantly improve performances. There are also minor optimisations that can be done in a few corners. Also the matrix is used as a reverse transform, which can be confusing. I'll fix it one of these days to operate on an inverted matrix instead. While playing with it, I noticed several issues with the existing non-transform composite function. A bug I fixed related to masks, but also the source clipping seems to be busted. It adds the clip top/left to the src_x/y & msk_x/y which doesn't make much sense to me and doesn't clip when fetching pixels, thus forcing you to have perfectly adjusted width and height args to twin_composite() that match the source image size (which stops making sense when using transforms). I haven't fixed it yet but I will do so, possibly by merging xform and simple into one function (thus always using a temporary span buffer) or by adding a bit of clipping code to the simple function's inner loop. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-28Fix timeout handling with more than one timeoutBenjamin Herrenschmidt benh@kernel.crashing.org3-3/+24
The code would do a delete/insert pass while walking the queue which had the effect of breaking the "order" linkage (insert re-initializes pretty much everything). I fixed that by adding a new _twin_queue_reorder() which is to be called on an element that is to be re-ordered and which works at any time, even during a queue walking and using it from the timeout code. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-27Add a basic .png loader using libpngBenjamin Herrenschmidt benh@kernel.crashing.org2-0/+214
If you use that, you also need to link on libpng. Only quickly tested for now, there are some weird things with libpng that I might not have gotten right, some comments are welcome. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-26Add back support for pre-converted ttf fonts. The metrics generated byBenjamin Herrenschmidt9-209/+343
the converter might still be a bit dodgy, I'd appreciate somebody who knows that stuff better to have a look :-) Basically, I added back the type '2' operation to the glyph data parser that was used by the previous ttf parser before it got removed and fixed it up to work in the new context. I pondered using the 'c' "generic" curve operation instead and put the burden of conversion in the converter application, but that would have caused bigger converted font files, so I chose to keep the old op. Various bits & pieces of the font code are modified to cope with the non-stroke fonts (mostly there is no "pen" to account for and we don't convolve but just append the glyph path to the current path). Full support for unicode pages is back. The stroke font has only page 0 for now (the initial code seemed to have more tables I didn't feel like re-converting that so if you want stroke font with more unicode pages, it's up to you to dig the old format and convert it to detect snaps and use curves). We may want to add arguments to twin_ttf converter to only convert a subset of the pages in a font for compactness. Examples still use the built-in font but it's easy enough to change the g_twin_font global and link a generated font file in (tested with Vera.ttf). I still need to add a better way to deal with multiple fonts at once.
2006-11-25Merge branch 'master' of ssh://git.freedesktop.org/git/twinKeith Packard10-32/+1347
2006-11-25Change license on Carl's filesKeith Packard2-37/+30
2006-11-25Remove duplicate twin_cursor.cBenjamin Herrenschmidt1-2/+1
2006-11-25Add ftwin test program for fbdev & linux mouseBenjamin Herrenschmidt3-4/+129
Note the example cursor file is borrowed from bluecurve
2006-11-25Simple linux mouse driverBenjamin Herrenschmidt2-0/+260
Uses /dev/input/mice, uses the accel code from kdrive
2006-11-25Add linux fbdev display and keyboard backendBenjamin Herrenschmidt2-0/+598
The mode is whatever was set when launching, though it would be trivial to add support for mode setting. Keyboard support is very primitive for now, basically it provides an ESC key to kill the app and F1...F10 to console switch. Note also that the fbdev is not switched to the front by default, so you can setup your whole windowing system and only activate it all at once when ready.
2006-11-25Add cursor pixmap supportBenjamin Herrenschmidt4-27/+360
This adds support for a cursor pixmap that is always on top and follows mouse movements. It also provides a function for importing a cursor image from an X.org ARGB cursor file. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-25Merge branch 'master' of git+ssh://git.freedesktop.org/git/twinBenjamin Herrenschmidt47-852/+1208
2006-11-25Whichever autoconf/automake I'm using likes having AC_CONFIG_AUX_DIR before ↵Benjamin Herrenschmidt1-1/+1
AM_INIT_AUTOMAKE() Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2006-11-24Change from MIT to LGPL licenseKeith Packard47-852/+1208
2006-02-03Eliminate spurious segment by moving to initial arc point (sigh).Keith Packard2-0/+8
2006-02-02Add x11 as a required package, (cairo no longer pulls this in by default).Carl Worth5-29/+42
Track changes in cairo API to bring forward to be compatible with cairo 1.0.x. Remove some unused variables. Add missing includes of cairo-xlib.h, X11/Xutil.h, and string.h. Add missing return value and remove unused variables.
2004-10-29add demoline + demosplineKeith Packard24-154/+989
Add cap styles, widget shapes, text alignment and arcs Change circle/ellipse API. Capture button events. Use Lozenge shape for output Drag lines with the mouse drag splines with the mouse move '1' right a bit Convert dispatch result to boool was mis-computing delegate and crashing when window->event was NULL Map X button info to twin mask draw different stuff.
2004-10-27Boxes have no paintKeith Packard6-50/+121
Convert to a widget Always paint background, even if transparent show clock widget
2004-10-27Add calculator and missing header filesKeith Packard12-122/+494
Change type name from twin_layout_t to twin_box_dir_t Create new twin_widget_layout_t holding layout preferences. Add copy_geom field to widget to make widgets look the same Add button signals and signal proc. Fix box layout to sum stretch along axis and minimize normal Add calculator demo
2004-10-27Move bevel routine to twin_widget for sharingKeith Packard8-50/+82
Change order of timeout vs work, making work come last as that's where redisplay occurs. Oops. Argument order wrong in twin_pixmap_damage call Make button italic to test Change names of formals to match prototype
2004-10-27Paint polygons instead of stroked lines for button edgesKeith Packard4-12/+33
Snap origin to pixel grid Strip newline from ctime output
2004-10-26Add button widgetKeith Packard11-38/+341
Grab button down inside client area. Add button widget Test button widget Permit subclassing; add offset to make text shift in button Add _twin_widget_contains to test inclusion Grab button down inside client area Make hello window larger
2004-10-26Add initial widget implementation.Keith Packard18-102/+1132
Fix numbers to have the same width. Add new relative-origin clip setting function Change enumerated constants to include Twin prefix Add new widget-based demo Start widget based demo
2004-10-25Add dispatch stuff to manage timeouts, workprocs and files. Remove threadKeith Packard31-917/+4298
stuff Split demos into separate files Make drawing origin match clip rectangle. twin_fedit Add glyph editor to CVS to preserve it Add scalable icons Separate 'closing' a subpath from 'finishing' a subpath; the former adds a point back to the start while the latter just leaves the path unclosed and prepares for a new subpath. Eliminate locking, add clipping. Clean up title drawing, use clipping Eliminate locking, use dispatch stuff
2004-10-06Add patterns.Keith Packard8-47/+308
Add screen backgrounds Eliminate spurious border bits Add text display applet
2004-10-06Add the beginings of event dispatch and a bit of window managementKeith Packard12-158/+851
including titles. Default event dispatcher does restacking and motion.
2004-10-05Update API to use twin_ types for most everything.Keith Packard12-259/+555
Rework snapping to correctly snap vertical and horizontal text on pixel boundaries. Change clock watermark
2004-10-04Recognize a few special cases to speed up operationsKeith Packard4-21/+75
Fix angular problems in hand position by rotating everything 90 degrees.
2004-10-04Delete old glyph representation support code.Keith Packard5-1602/+341
Oops -- overflow not handled correctly in distance functions. Replace new glyphs with versions using splines. Whack around the default presentation a bit more
2004-10-04Fix a clipping bugKeith Packard12-315/+2287
Change glyph representation to allow splines and include metrics. Add some new helper functions. Expose _twin_path_scurve for glyphs Increase sin table precision. Fix off-by-one error in y position. Lock screen while adding expose damage Change clock appearance. Use corrected glyph metrics
2004-10-02Add put_begin to screen structure so that the backend can batch updates.Keith Packard11-64/+351
Add twin_int_to_fixed. Inline twin_fixed_mul and twin_fixed_div using int64_t. Add twin_text_metrics_utf8. Hard-code the max number of vertices in a glyph. Set various ICCCM properties to make X wms happy. Use better approximation of ellipse major axis radius when drawing circles. Compiler warning. Delete duplicate twin_over definition Allow for multiple clocks, and add watermark. Note that text metrics are quite broken currently.
2004-09-30Add twin_x11.hKeith Packard1-0/+64
2004-09-30Handle unhinted text.Keith Packard13-155/+674
Add helper functions Lock pixmaps during drawing Disable screen updates while applications are busy Add threads to manage events and redisplay Paint a clock
2004-09-28Add some more fixed point functionsKeith Packard8-83/+274
Reimplement text snapping. Note that things are snapped to user units, not pixels. Snapping to pixels requires some thought about rotating transformations. Oops. Closed paths don't necessarily need to join ends, but circles do. Random new tests.
2004-09-27Add affine transformation support. Fix convex hull to eliminate all pointsKeith Packard15-383/+1137
colinear with extreme. Note that text snapping is currently broken.
2004-09-26Eliminate special case for closed paths. Just draw caps at both ends andKeith Packard4-86/+50
accept that the resulting path isn't minimal in all cases. This eliminates the weird results from said attempted minimal path with large pens and small curves. It also eliminated a lot of extra code from this function. Fix font baseline value (should be 9). Take pen size into account when computing positions so that glyphs rest on the baseline instead of painting on top of it. Show baseline in huge text sample
2004-09-26Hmm. Not sure this is right, but I'm giving it a try. Recognize closedKeith Packard6-62/+140
paths and attempt to construct two disjoint paths as their convolution with the pen. This appears to break when the path has a radius of curvature smaller than the radius of the pen. I'm committing it to CVS mostly so I don't lose the code; I will shortly commit a patch which eliminates the check for a closed path. Oh, one correct change is to _twin_path_leftpoint which used to try to be clever about point selection. Now that pens are forced to be convex, the correct point to use is the one furthest from the line. Ignore subpaths containing a single point. Add 'twin_path_append' to glue one path into another. Add debug output that shows vertices of polygons Code to test convolution change mentioned above
2004-09-25Spurious ) in fileKeith Packard2-1/+6
2004-09-25Reduce emboldening to +50% stroke thickness. Clean up debug code. EliminateKeith Packard3-94/+85
some dead code. Try to adjust width computations a bit. Still not right. draw in more colors
2004-09-25Switch to just supporting stroke fontsKeith Packard8-63872/+570
Finish needed stroke font API. Elimiate all but ascii glyphs, use offset table to eliminate table of pointers (which can't be const) Remove twin_vera.c Change glyph structures around for offsets and ascii only Few more cases to show ascii text support
2004-09-25Add convex hull algorithm from cairo sources. Used to constrain pens toKeith Packard10-75/+534
convex shapes so that the convolution algorithm works correctly. Reduce default tolerance to 1/16 of a pixel Use convex hull of pen. Snap horizontal and vertical elements of glyphs to pixel boundaries. Snap stem widths to integer amounts. Add slanting and emboldening Add space and box Avoid using __inline as it increases size dramatically Use <= tolerance_squared as that may be zero Swizzle code to show off recent changes
2004-09-24Add twin_ttf/.cvsignoreKeith Packard1-0/+5
2004-09-24Fix twin_fixed_floor to work for negative values correctly AddKeith Packard16-73/+64821
twin_path_cur_point fix twin_path_step to actually handle duplicate points. Change 'clockwise' to 'around_order' so that all three possible results are returned (clockwise, parallel and counterclockwise) Handle disjoint strokes Add outline and stroke font support (pick one and remove the other) Huge array of stroke fonts from Hershey. Pick appropriate subset and remove extra glyphs (there are a lot here) Eliminate repeated move and close, eliminate duplicate draw. Add support for 1, 4, 16 and 64 samples. 16 appears to be the magic sweet spot. Convert "real" outline fonts to twin built-ins Converted version of Bitstream Vera Sans Roman
2004-09-21Add a few definitionsKeith Packard7-111/+210
Find pen starting point as closest to the normal to the path. Restructure convolve loop to be easier to understand Round circle coordinates instead of truncating them Move sample grid by 1/2 sample step. Clip polygons to mask pixmap. Modest performance improvement in span filling. Fix end case to remove edges before stepping. Stroke a path.
2004-09-21Update .cvsignoreKeith Packard1-0/+22
2004-09-21Add convolution. Pen starting position needs work.Keith Packard13-8/+1112
Move shared geometric functions to new file Add twin_path_circle to generate pens. Fix path edge generator to handle last subpath right. Skip vertices which don't span a sample row test convolutions Add .cvsignore file Mention path primitives Add paths Eliminate some unused variables. Simple path construction Anti-aliased polygon fill code Change twin_bool to twin_bool_t Append cubic Bézier splines to paths Test paths
2004-09-15Import Tiny Window system (twin) into CVSKeith Packard0-0/+0
2004-09-15Initial revisionKeith Packard19-0/+1954