271 Commits

Author SHA1 Message Date
David Capello
7785199899 Fix platform specific flags
* Replace ALLEGRO_WINDOWS and WIN32 with _WIN32
* Replace ALLEGRO_MACOSX with __APPLE__
2015-02-12 12:46:56 -03:00
David Capello
5aea29348e Merge branch '1.0'
Conflicts:
	data/gui.xml
	src/app/CMakeLists.txt
	src/app/color_utils.cpp
	src/app/color_utils.h
	src/app/commands/cmd_preview.cpp
	src/app/document_exporter.cpp
	src/app/document_exporter.h
	src/app/ui/editor/standby_state.cpp
	src/config.h
	src/main/resources_win32.rc
2014-12-03 11:15:09 -03:00
David Capello
a3ffe68f2d Minor check in ~ScopedHandle() 2014-11-30 21:02:41 -03:00
David Capello
2c5ef7d636 Add check for allegro_init() 2014-11-30 12:27:41 -03:00
David Capello
4920179143 Merge branch '1.0'
Conflicts:
	src/ui/manager.cpp
2014-11-25 21:23:02 -03:00
David Capello
3437c49f0b Add opacity to grid and grid pixel (close #58) 2014-11-24 19:13:25 -03:00
David Capello
d176839bf4 Merge branch '1.0'
* In this branch the Alt+mnemonic issues are solved in "she" layer when the
  she::Event is generated (see src/she/alleg4/key_poller.cpp)
* Mouse cursor issues on OS X are solved in src/she/alleg4/mouse_poller.cpp

Conflicts:
	src/app/test_context.h
	src/ui/manager.cpp
2014-11-01 20:55:57 -03:00
David Capello
b9b3b02882 Fix mouse issues on OS X (fix #458)
Now we generate she::Event::MouseEnter/Leave events correctly when the
mouse leaves or enters into the window to show the native cursor again
when necessary.

Close #466
2014-11-01 11:36:51 -03:00
David Capello
39b8e034b5 Merge branch '1.0'
Conflicts:
	.gitmodules
	CMakeLists.txt
	src/CMakeLists.txt
	src/app/app.h
	src/app/app_menus.cpp
	src/app/commands/cmd_move_mask.cpp
	src/app/commands/cmd_rotate.cpp
	src/app/modules/gui.cpp
	src/doc/resize_image_tests.cpp
	src/ui/accelerator.cpp
	third_party/CMakeLists.txt
2014-10-30 01:06:27 -03:00
David Capello
80073e65d1 Fix crash in Editor::drawOneSpriteUnclippedRect() if a temporary surface cannot be created (fix #413) 2014-10-26 00:33:21 -03:00
David Capello
0defe27dc6 Move dotted_mode() from app to she module
Replaced a huge array of marching ant patterns (which was taken
from GIMP 1.3.11) with a simple formula.
2014-10-16 23:52:28 -03:00
David Capello
7095a82141 Add she::is_key_pressed() and clear_keyboard_buffer() 2014-09-21 11:40:55 -03:00
David Capello
443d151104 Simplify mouse position handling 2014-09-19 10:12:32 -03:00
David Capello
b819d36550 Fix generate_mouse_event_for_button() 2014-09-19 10:12:26 -03:00
David Capello
9451cf69fe Don't use poller on Windows 2014-09-19 10:12:10 -03:00
David Capello
c5a568cd15 Generate mouse/key events from polling in she module instead of ui module 2014-09-19 10:12:05 -03:00
David Capello
ee685e419e Win32: Don't process extra mouse buttons messages (related to issue #483) 2014-09-11 00:02:33 -03:00
Benoit Favre
886ff676f6 FIX None macro from X11 colliding with Event::None and others 2014-09-09 21:56:21 -03:00
David Capello
a7c752116b Mac OS X: Fix problem opening files with Unicode chars from Finder 2014-09-09 08:52:51 -03:00
David Capello
bb49ab35a3 Don't use PRINTF in she module (so grid_ui_tests can be compiled) 2014-09-09 01:46:28 -03:00
David Capello
9e8cf5de90 Show correct title bar in the main system window when the program starts 2014-09-03 00:39:15 -03:00
David Capello
573a78f8a2 Fix line to mark "pool" as a unused var 2014-08-24 00:12:14 -03:00
David Capello
4921eeca9c Add she::Logger to log errors in Mac OS X console 2014-08-24 00:11:51 -03:00
David Capello
9135461627 Fix #455 - fix command line processing when the app is in a bundle 2014-08-22 09:36:40 -03:00
David Capello
08d1593481 Avoid warning for unused var in app.mm 2014-08-21 22:06:37 -03:00
David Capello
daa7adde14 Fix #344 initial black screen on Mac OS X and small initial window size on Linux when .asepriterc is not present 2014-08-20 08:27:11 -03:00
David Capello
9398bbc000 Mac OS X: Add support to open files with double-click from Finder 2014-08-18 23:07:53 -03:00
David Capello
e0a20e5385 Fix she::error_message() to avoid calling a printf-like function with a non-printf-format-like argument 2014-08-17 20:41:38 -03:00
David Capello
5075c1f86f Remove unused variables/code 2014-08-17 20:37:12 -03:00
David Capello
dfc1ecd2da Use #pragma warning only in MSC compiler 2014-08-14 23:38:06 -03:00
David Capello
6824570c4b Remove base/override.h (use override keyword directly) 2014-08-14 23:07:47 -03:00
David Capello
1c324c9b14 Add experimental option to use native mouse cursors (and some renames of cursor names) 2014-08-10 19:51:14 -03:00
David Capello
58a515c3ae Win32: If we receive a WM_NCMOUSEMOVE message, we can generate a Event::MouseLeave if needed 2014-08-10 00:48:18 -03:00
David Capello
8cf25c49a7 Win32: Fix bug where the mouse capture isn't released 2014-08-10 00:12:33 -03:00
David Capello
4d4958bf35 Move capture/release mouse function to she layer 2014-08-09 22:32:05 -03:00
David Capello
dfaf097b88 Rename base/compiler_specific.h to base/override.h 2014-08-09 08:08:20 -03:00
David Capello
0f99c78174 Win32: Return HTCLIENT when the mouse is above scrollbars but inside the client area 2014-08-07 08:45:51 -03:00
David Capello
0d2b3d1d68 Don't show Win32 scrollbar popup when the window is right-clicked in the scrollbars area 2014-08-07 08:44:30 -03:00
David Capello
b1d27d66e2 Fix issue 414 for WinXP in classic theme: unable to resize window from bottom/right edges
On WinXP classic theme we receive a WM_NCHITTEST messages for the
scrollbars, and as they overlap the resize borders (see WM_NCCALCSIZE
handler) we have to return a proper value as if they really were the
borders of the window.

Note: Scrollbars are still visible in classic theme, that is just ugly,
but at least the user can resize the window from bottom and right edges.
2014-07-06 20:37:13 -03:00
David Capello
4b7bf5b835 Merge she::Color and ui::Color types in gfx::Color 2014-06-28 16:10:39 -03:00
David Capello
7ebc90678f Use ui::Graphics instead of Allegro in Editor's brush preview routines
* Remove color_utils::color_for_allegro()
* Rename editor_draw/move/clear_cursor() -> draw/move/clearBrushPreview()
* Rename Editor::get_raw_cursor_color() and Editor::is_cursor_mask()
* Add Graphics::get/putPixel() and Graphics::width/height()
* Add SetClip class
2014-06-28 10:33:58 -03:00
David Capello
5bbff161b9 Now ui::Graphics uses she::Surface instead of Allegro BITMAP 2014-06-26 22:14:39 -03:00
David Capello
dbad153698 Add she::Font class (wrapper of Allegro FONT)
This is an huge refactor to avoid handling Allegro FONT directly. Some
changes:
* Add she::System::defaultDisplay/Font, createRgbaSurface, loadSurface,
  and loadRgbaSurface.
* Rename she::CreateSystem/Instance to she::create_system/instance.
* Remove ui/font.cpp and move ui/fontbmp.cpp to she library.
* ui::IButtonIcon uses she::Surface instead of BITMAP.
* Rename she::LockedSurface::drawAlphaSurface -> drawRgbaSurface
* Rename ui::SetDisplay -> set_display
* Rename _ji_font_text_len -> ui::Graphics::measureUIStringLength
2014-06-22 18:53:14 -03:00
David Capello
b7dca01532 Win: Use MessageBoxW instead of allegro_message() in she::error_message() 2014-06-18 01:00:18 -03:00
David Capello
7d0e0f4b4a Remove references to allegro_message() from outside of she library 2014-06-18 00:53:15 -03:00
David Capello
07aaa78ea9 Minor fix in she::Event::type() return type 2014-06-14 00:49:06 -03:00
David Capello
81d30fb24d Detect HTHSCROLL/HTVSCROLL as HTCLIENT in WM_NCHITTEST message
In this way we fix a bug where (sometimes) the mouse is not detected
as in the client area because it's over a system scrollbar.
2014-05-05 21:37:20 -03:00
David Capello
df3cb694ae Add she::Display::setMousePosition() 2014-05-04 16:05:35 -03:00
David Capello
507819a26f win32: hide scrollbars changing client area in WM_NCCALCSIZE 2014-05-03 20:40:57 -03:00
David Capello
774a36efc9 Fix crash using deleted concurrent queue of event when Alleg4Display() is being destroyed 2014-05-03 18:02:27 -03:00