David Capello
be9b33828d
Don't restore the window minimized
2015-12-11 19:46:41 -03:00
David Capello
a088bf46a2
Remember exact window position (e.g. in which monitor it was closed)
...
It's working on alleg4 port on Windows only.
2015-12-11 19:40:18 -03:00
David Capello
1aaeacc460
Refactor several "getNoun()" getters to "noun()"
...
This is a work-in-progress to create a consistent API and finally
separate the whole Aseprite base/gfx/ui libs into a reusable C++ library.
Classes:
app::IFileItem, app::AppMenuItem, app::skin::SkinPart,
gfx::Rect, gfx::Border, she::FileDialog,
ui::IButtonIcon, ui::Graphics, ui::Overlay, ui::Widget,
ui::ScrollableViewDelegate, and UI events
2015-12-04 14:39:04 -03:00
David Capello
cf7c4754cc
Convert InkShadesField in a combobox-like widget to store several shades ( #85 )
...
Changes:
* Added new ui::IconButton widget to create widgets with one skin icon
that is colored depending on the button state.
* ContextBar::InkShadesField was divided into a couple widgets (ShadeWidget
and IconButton to drop-down a little menu with saved shades)
* Fixed CommonLockedSurface::drawColoredRgbaSurface() impl.
* Removed invalid gfx::setr/g/b/a() functions.
2015-11-24 18:37:13 -03:00
David Capello
8cba37e36b
Return false if the native cursor cannot be change on SkiaWindow::setNativeMouseCursor
2015-10-14 19:31:38 -03:00
David Capello
ae1861236e
Use key modifiers from NSEvents in Skia/OSX
2015-10-14 17:06:23 -03:00
David Capello
bd1a1ffafb
Add support to transport key modifiers from she events to UI messages
...
It’s better if we use the original key modifiers from she::Events (given
by Cocoa or Win32 APIs) instead of asking for the current state of
the modifier when the ui::Message is created (which can be different
from the original value).
This commit adds support to transport the modifiers, but it is not
using the original key modifiers yet.
2015-10-14 16:42:49 -03:00
David Capello
ba194a817f
Fix Alt+char on Skia/OSX
2015-10-14 15:53:47 -03:00
David Capello
7e7d3b9dc8
Disable GPU acceleration on Skia/OSX
2015-10-14 13:35:26 -03:00
David Capello
2e5f051e7d
Catch exceptions if GL context cannot be created on Skia/OSX
2015-10-14 13:32:15 -03:00
David Capello
11401e9899
Resize NSView with multiples of 4
...
With this we should avoid seeing scaled pixels on screen with (e.g.) 3
pixels instead of 2 when Screen Scaling = 200%.
2015-10-14 13:11:08 -03:00
David Capello
ee7df1f973
Impl SkiaWindow::setNativeMouseCursor() on Skia/OSX
2015-10-14 12:30:48 -03:00
David Capello
d7d0eeec7f
Fix SkiaWindow::updateWindow() on Skia/OSX
2015-10-14 12:00:50 -03:00
David Capello
d5c5c2e1f9
Remove commented line
2015-10-14 12:00:03 -03:00
David Capello
f9d0254d91
Initialize windows with width/height/scale args on Skia port
2015-10-14 10:25:24 -03:00
David Capello
66c5e04a58
Impl OSXWindow::setMousePosition on Skia/OSX port
2015-10-14 09:29:14 -03:00
David Capello
2fe612fd00
Add precise trackpad support on Skia/OSX port
2015-10-14 09:27:20 -03:00
David Capello
47f493df78
Fix window resize on Skia/OSX
2015-10-13 18:49:56 -03:00
David Capello
0a1f492c24
Implement SkiaSurface::setDrawMode()
2015-10-13 18:44:31 -03:00
David Capello
b8f5a0236c
Add she::is_key_pressed() impl on Skia/OSX port
2015-10-13 17:12:51 -03:00
David Capello
0508b6fd67
Avoid beeps on keyDown/Up on Skia/OSX port
2015-10-13 17:11:45 -03:00
David Capello
d4e37218e2
Show errors on stderr on Skia port
2015-10-13 17:11:23 -03:00
David Capello
07900c8e48
Enable line that doesn't crash anymore on newer version of Skia
2015-10-13 17:10:59 -03:00
David Capello
4379c6793e
Minor changes to Skia/OSX #includes
2015-10-13 16:55:29 -03:00
David Capello
15f4a16294
Add support for right and middle click on Skia/OSX port
2015-10-13 16:02:18 -03:00
David Capello
f818dbc692
Add keyDown/keyUp events to Skia/OSX port
2015-10-13 15:50:25 -03:00
David Capello
250de2257c
Complete clock_value() impl for Skia/OSX port w/msecs precision
2015-10-10 13:02:32 -03:00
David Capello
1d69edcced
Fix to_skia(gfx::Color) impl
2015-10-10 12:15:40 -03:00
David Capello
7a00a0bfca
Add missing #if/endif SK_SUPPORT_GPU
2015-10-09 19:48:31 -03:00
David Capello
324953b2fc
Minor rename in skia_window_win.cpp
2015-10-09 19:48:07 -03:00
David Capello
247a8a7174
Make progress in Skia/OSX port
...
It includes:
- Use ARC instead of GC (compiling with -fobjc-arc flag)
- Implement GLContextCGL::getStencilBits/getSampleCount functions
- Modify OSXEventQueue to avoid creating a thread for app_main()
- NativeDialogs class can be compiled in 10.4 (with GC) and 10.6 (with
ARC)
- Split she/osx/view.h into view.h and view.mm
- get_local_mouse_pos() takes care of the window scale
- Temporal she::clock_value() impl
- Working SkiaWindow with Quartz and some progress with OpenGL
2015-10-09 19:45:39 -03:00
David Capello
f38fd4eb5e
Refactor Skia/OSX port
...
- Moved OSXWindowDelegate to she/osx/window_delegate.h
- Renamed CloseDelegate to OSXWindowImpl
- Added m_ prefix to OSXWindow fields
2015-10-07 17:56:30 -03:00
David Capello
7bde73e2a3
Minor change in skia_window_osx.mm
2015-10-07 17:46:37 -03:00
David Capello
416951f592
Avoid crash when Cmd+Q is pressed on Skia/OSX port
2015-10-07 17:46:04 -03:00
David Capello
8edb0c0a67
Move OSXView to its own file
...
This new OSXView contains some basic mouse event handlers to generate
some she events.
2015-10-07 16:10:52 -03:00
David Capello
0db4c1c664
Add m_ prefix to OSXWindowDelegate fields
2015-10-07 16:07:14 -03:00
David Capello
6e5271848c
Fix crash on resize on Skia/OSX port
...
Keep NSWindowDelegate reference alive in OSXWindow
2015-10-07 10:43:53 -03:00
David Capello
f98c4df79a
Rename SKIA_OPENGL_LIBRARY variable in src/she/CMakeLists.txt
2015-10-06 16:39:56 -03:00
David Capello
066a8dffcc
Replace SkGLContext with our own GLContext class
2015-10-06 16:37:01 -03:00
David Capello
9e44818cd8
Move window size fields to OSXWindow
2015-10-06 11:18:21 -03:00
David Capello
580c900fb2
Add SkiaWindow::handle() impl on Skia/OSX port
2015-10-06 11:12:41 -03:00
David Capello
7118251f83
Create NSWindow in main thread/queue on Skia/OSX port
...
We cannot create/handle UI controls outside the main thread.
2015-10-06 10:57:56 -03:00
David Capello
03c0367827
Add option to disable GPU acceleration
2015-10-05 21:18:42 -03:00
David Capello
7434dd053a
Avoid beep when Alt+char is pressed on Skia/Win port
2015-10-05 21:16:27 -03:00
David Capello
2bc6a76fd5
Minor change in she/CMakeLists.txt
...
This was done in case we need to use #include <GLES2/gl.2> in the future,
as this header file is in angle2 repository.
2015-10-05 17:42:07 -03:00
David Capello
9a8b7cd741
Fix UI rendering on Skia/Win port w/GPU when screen scaling >= 200%
...
If screen scaling is not 1:1, we create a SkSurface using a off-screen
texture, everything is painted there and then a blit to the screen
framebuffer is done in SkiaWindow::paintImpl()
2015-10-05 17:40:55 -03:00
David Capello
cc8b8cf52e
Fix SkiaSurface::blitTo() with GPU and without GPU acceleration
2015-10-02 17:14:52 -03:00
David Capello
bb826c681b
Add SkiaSurface::clear() impl
2015-10-02 17:13:49 -03:00
David Capello
6d1348c721
Fix SkiaSurface::drawRect() bounds
2015-10-02 16:24:58 -03:00
David Capello
7a747fc144
Add missing "override" to SkiaSurface::setDrawMode()
2015-10-02 12:12:57 -03:00