Commit Graph

323 Commits (21e42a5d3b9cff9bfb09e779cdc95703db4ddafe)

Author SHA1 Message Date
Björn Lindqvist 3aac5a6591 ui: more docs and tests 2017-06-27 23:47:35 +02:00
Björn Lindqvist fe41e99437 ui: better handling of cascading errors
The second update-ui is wrapped in a recover so that if it fails
again, the UI system is stopped. That should fix the cascade problem
in #1827.
2017-06-27 23:47:35 +02:00
Doug Coleman 0ca1b4656f ui.backend.cocoa.views: Use ?-> to avoid objc lookup errors if backingScaleFactor selector does not exist. 2017-06-01 16:53:10 -05:00
Doug Coleman a632337ba2 cocoa: Add basic support for TouchBar. 2017-05-30 15:33:48 -05:00
John Benediktsson 8b455d2306 tools.deploy.shaker: support "stop-after-last-window?".
This only works on macOS right now, but since most every deploy.factor
has it set, we should read it and use it.
2017-03-05 15:13:24 -08:00
John Benediktsson 96a0c30baf ui.backend: adding ui-stop-after-last-window?.
This defaults to true, except for the "ui.tools".  Also, this only
works on macOS right now.  Linux and Windows always stop after the
last window closes.
2017-03-05 14:51:33 -08:00
Björn Lindqvist 39811fc7e7 ui.*: using pixel-format-attributes>int-array in even more places
So now we don't need the PIXEL-FORMAT-ATTRIBUTE-TABLE: syntax anymore.
2017-01-30 06:17:37 +01:00
Björn Lindqvist 4756c30d3f ui.pixel-formats,ui.backend.*: new word pixel-format-attributes>int-array
This word replaces usages of the PIXEL-FORMAT-ATTRIBUTE-TABLE: syntax
2017-01-30 05:43:19 +01:00
Björn Lindqvist 1b1842f62d ui.pixel-formats,ui.backend.*: removing the (pixel-format-attribute) generic
It appears to be unused code.
2017-01-30 05:07:28 +01:00
Jon Harper 14f51e2dd5 ui.backend.gtk, use a separate widget for drawing opengl. Fixes #1487
Apparently you can't use opengl calls in a configure event signaled from
the window. If you do, on ubuntu 14.04 with unity, each and every frame
will be drawn. Since they are drawn slower than the event are emitted,
it continues to redraw after the resize is done, 'replaying' the resize
motion.
opengl calls from a configure event on the single child of the
window are ok.
Also, now that the window is not used to draw opengl, it doesn't produce
expose events, instead the drawable child must be used.

This also makes moving the window much smoother.
2017-01-23 10:04:43 -08:00
John Benediktsson dadff2f062 some cleanup. 2016-11-26 22:01:03 -08:00
Björn Lindqvist b31c0b8857 Docs: bunch of random doc updates 2016-10-31 11:46:39 +01:00
Björn Lindqvist f8e781ee17 ui.backend.x11.keys: symbolic constants can be used 2016-08-17 04:04:06 +02:00
Björn Lindqvist 1c3f345396 x11.*: new vocab x11.X for ffi stuff from the X.h header
It's nicer to have one vocab for each X11 header file than the previous
organization.
2016-08-17 03:46:28 +02:00
Björn Lindqvist acdcc1f2c2 ui.backend.x11.keys: Support for the Windows/Meta key on X11 2016-08-17 03:41:45 +02:00
Björn Lindqvist de2e01268e ui.backend.x11.keys: typo on F12 2016-08-17 03:37:57 +02:00
Björn Lindqvist ddc5ece757 alien.*: frontend varargs support! #1677
alien-invoke gets an extra parameter indicating if the call uses varargs
or not. In 99.9% of the cases, the parameter should be f, but is t if
varargs are indicated. E.g

: do-printf ( fmt d -- st ) int f "printf" { c-string double } t alien-invoke ;
2016-08-10 21:34:37 +02:00
Björn Lindqvist 0a34002988 ui.gestures: fix the cocoa ui backend which i broke by moving the modifier word 2016-06-21 23:37:20 +02:00
Björn Lindqvist 4b919b19ce ui.backend.*: new vocab for keysym handling which is the same on x11 and gtk 2016-06-20 13:13:20 +02:00
Björn Lindqvist d752a1947c x11.keysymdef, ui.backend.x11: vocab for all of x11's keycodes
using them in u1.backend.x11 instead of hardcoding numbers
2016-06-20 02:18:18 +02:00
Björn Lindqvist f0836dd69d ui.backend.gtk.io: refactoring which removes ui.backend.gtk.io.unix
ui.backend.gtk is unix-specific so there is no need to have different
implementations for different os:es.
2016-06-19 01:33:59 +02:00
Björn Lindqvist fbfc5fdae3 ui.backend.gtk: add handling of insert key (#1656) 2016-06-18 20:39:57 +02:00
Björn Lindqvist ee80cb0752 ui.backend.gtk: use a global variable to store the icon data
It's easier than the previous code that replaced the get-icon-data word
during deployment. Also GTK support for icon.ico icons.
2016-06-17 16:39:11 +02:00
Björn Lindqvist 2c8b2d9bf5 ui.backend.gtk: hi-res icon awesomeness 2016-06-17 14:29:45 +02:00
John Benediktsson 63410f62c8 ui.theme: updates to color scheme.
Fixes circularity and adds theme switching to Mac menu.
Could use some simplification and reduction in color theme hooks.
2016-05-09 21:40:56 -07:00
John Benediktsson 1f063155a9 ui.backend.gtk: simplify calls to gtk_init. 2016-04-04 15:00:04 -07:00
John Benediktsson 2ea3e304cf ui.backend.gtk: simplify <window-handle>. 2016-04-04 10:33:03 -07:00
John Benediktsson 37fc051506 Revert "ui.backend.gtk: try yield in idle callback."
This reverts commit 2929cc21f5.
2016-03-31 16:53:52 -07:00
John Benediktsson 281ccddda8 Revert "ui.backend.gtk: only use the timer when not io.backend.unix."
This reverts commit 7d5df2c8a2.
2016-03-31 16:53:47 -07:00
John Benediktsson 498285d7dd unicode: make this the API for all unicode things. 2016-03-30 23:29:48 -07:00
John Benediktsson 1b71efb748 ui: change active? back to a boolean. 2016-03-30 07:31:13 -07:00
John Benediktsson 7d5df2c8a2 ui.backend.gtk: only use the timer when not io.backend.unix. 2016-03-29 22:36:02 -07:00
John Benediktsson 2929cc21f5 ui.backend.gtk: try yield in idle callback. 2016-03-29 22:15:57 -07:00
John Benediktsson d3990d1eeb ui.backend.gtk: simplify. 2016-03-29 20:52:49 -07:00
Doug Coleman dbf781b29a ui.backend.windows: fix set. 2016-03-29 18:05:23 -07:00
John Benediktsson 864912f446 ui.backend.cocoa.views: call super.prepareOpenGL(). 2016-03-28 21:51:16 -07:00
John Benediktsson 20883fb21a ui.backend.cocoa.views: add constants for modifier flags. 2016-03-19 12:48:42 -07:00
Björn Lindqvist d6a9122967 ui.backend.gtk: only run the tests on linux 2015-12-08 09:46:30 +01:00
Björn Lindqvist 5deea76d55 ui.backend.gtk: set the active? to 100 in on-map, should fix #1506
what now happens is that configure events are skipped until the first
on-map signal is fired. seem to work fine in a variety of wm:s. if this
works well we can return active? to be plain boolean.
2015-12-04 00:57:19 +01:00
Björn Lindqvist 43f2592d1b ui.gestures: fix gesture docs, #1509 2015-12-01 11:01:34 +01:00
Björn Lindqvist d4a127211d ui.backend.cocoa: fix for the silly error I made in 7bc1009973 2015-10-29 04:41:36 +01:00
Björn Lindqvist 7bc1009973 ui.*: make active? an integer 0-100
A UI backend can delay setting active? to 100 until the windows actually
is visible. That way, some redundant redraws that happen when the window
isn't visible is supressed. It makes the Windows and GTK UI startup a
little faster.
2015-10-27 19:00:28 +01:00
Björn Lindqvist 73893693d3 ui.backend.*: the offscreen buffer hooks appear unused - let's delete! 2015-10-27 16:58:01 +01:00
Björn Lindqvist 0795d21e46 ui.backend.gtk: on-key-press and on-key-release can be merged into one
on-key-press/release handler
2015-10-22 18:02:35 +02:00
Björn Lindqvist f9e5d4f22c ui.backend.gtk: tune the order of the setup tasks in (open-window)
The fix for #1307 made bug #776 come back. Apparently gtk is kind of
britle so the widget setup must be done in a very specific order.
2015-10-14 00:22:26 +02:00
John Benediktsson 2dea9bab74 ui.backend.gtk: small typo fix. 2015-09-28 14:48:20 -07:00
Björn Lindqvist 94f863f33e ui.backend.gtk: make it so configure-im is called after realize (#1307)
gtk_im_context_set_client_window must be called with a realized window
otherwise IM won't work,
http://lists.maemo.org/pipermail//maemo-developers/2006-January/002337.html
2015-09-28 15:33:36 +02:00
John Benediktsson e477f6996f Fix comments to be ! not #!. 2015-09-08 16:15:10 -07:00
Doug Coleman 3649dd2764 ui.backend.cocoa.views: Don't throw an error on weird mouse buttons. Fixes #1453. 2015-08-18 23:22:55 -07:00
Doug Coleman 9f0a1ed730 cocoa: Syntax is funky, so regularize it by parsing CLASS: ; and METHOD: ; and COCOA-PROTOCOL: token. 2015-08-12 19:44:07 -05:00