Commit graph

26 commits

Author SHA1 Message Date
Andreas Kling
b78e13cf2e LibGUI: Make some GUI event getters return const references
There's no good reason to return rects/sizes/positions by value.
2020-09-13 21:41:45 +02:00
Ben Wiederhake
6020a4f274 LibGUI: Remove unused String member 2020-08-28 09:15:47 +02:00
Andreas Kling
e374eb3035 LibGUI+WindowServer: Remove ResizeEvent::old_size()
Turns out nobody was using this information anyway, so let's not go
through all the trouble of plumbing it from WindowServer to LibGUI.

Fixes #3247.
2020-08-22 13:11:25 +02:00
Andreas Kling
75b8f4e4e6 LibGUI: Make focus events more aware of why focus is changing
This patch adds GUI::FocusEvent which has a GUI::FocusSource.
The focus source is one of three things:

- Programmatic
- Mouse
- Keyboard

This allows receivers of focus events to implement different behaviors
depending on how they receive/lose focus.
2020-08-15 00:05:45 +02:00
Nico Weber
cb2d56b909 GUI: Give MouseEvent shift() / ctrl() / alt() / logo() functions 2020-08-12 11:02:30 +02:00
Nico Weber
ce95628b7f Unicode: Try s/codepoint/code_point/g again
This time, without trailing 's'. Ran:

    git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05 22:33:42 +02:00
Nico Weber
19ac1f6368 Revert "Unicode: s/codepoint/code_point/g"
This reverts commit ea9ac3155d.
It replaced "codepoint" with "code_points", not "code_point".
2020-08-05 22:33:42 +02:00
Andreas Kling
ea9ac3155d Unicode: s/codepoint/code_point/g
Unicode calls them "code points" so let's follow their style.
2020-08-03 19:06:41 +02:00
Tom
bbdf0665fc WindowServer: Expose window parent information and more modal improvements
* The parent information is necessary by the Taskbar to be able to
  determine a modal window's parent
* Minimize and maximize modal window stacks together
2020-07-16 16:10:21 +02:00
Tom
ec3737510d WindowServer: Add accessory windows
Accessory windows are windows that, when activated, will activate
their parent and bring all other accessory windows of that parent
to the front of the window stack. Accessory windows can only be
active input windows. The accessory window's parent is always the
active window regardless of whether it is also the active input
window.

In order to route input correctly, input is now sent to the active
input window, which can be any accessory window or their parent,
or any regular window.
2020-07-15 17:15:45 +02:00
Andreas Kling
11c4a28660 Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Hüseyin ASLITÜRK
53227f400c LibGUI: Replace text attribute on KeyEvent with code_point attribute 2020-06-16 13:15:17 +02:00
Andreas Kling
116cf92156 LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Andreas Kling
5be613c9c8 LibGUI: Fix bad KeyEvent::m_key initializer to unbreak SDL2 port 2020-06-04 16:02:40 +02:00
Hüseyin ASLITÜRK
c6f1962919 LibGUI: Add scancode value to KeyEvent 2020-06-03 21:52:40 +02:00
Andreas Kling
1d6ec51bee WindowServer+LibGUI: Add per-window progress
Each window now has an associated progress integer that can be updated
via the SetWindowProgress IPC call.

This can be used by clients to indicate the progress of ongoing tasks.
Any number in the range 0 through 100 indicate a progress percentage.
Any other number means "no progress"
2020-05-30 23:00:35 +02:00
Sergey Bugaev
fce49b3e32 LibGUI: Change GUI::KeyEvent::key() type to KeyCode
...instead of a plain int. Yay for some type safety.
2020-05-27 11:19:38 +02:00
Andreas Kling
7dd8f1b921 LibGUI: Add missing Vector.h include to Event.h 2020-05-12 23:28:08 +02:00
Andreas Kling
479f16bb6c LibGUI: Add KeyEvent::to_string()
This makes it way easier to debug key events.
2020-05-12 17:03:17 +02:00
Andreas Kling
67b92a7d5f WindowServer+LibGUI: Support the 4th and 5th mouse buttons
We'll call the "Back" and "Forward" since that's what they are normally
mapped to in some other systems.
2020-05-02 22:07:43 +02:00
Andreas Kling
3331098aee WindowServer+LibGUI+Taskbar: Don't include frameless windows in lists
Frameless windows don't need to show up in the taskbar or the switcher.
2020-05-02 12:24:23 +02:00
Oriko
2a32330257 LibGUI: Add a ThemeChange event 2020-03-16 13:39:34 +01:00
Andreas Kling
69400c2ca1 LibCore: Replace manual forward declarations with <LibCore/Forward.h> 2020-02-15 00:13:44 +01:00
Andreas Kling
814d59f462 LibGUI: Port the drag&drop code to Core::MimeData 2020-02-14 13:18:59 +01:00
Andreas Kling
3ce80bec97 WindowServer+LibGUI: Add a "drag move" event
This allows windows/widgets to learn when something is being dragged
over them. They can then repaint themselves somehow to indicate that
they are willing to accept a drop.

Currently this is piggybacking somewhat on the mouse event mechanism
in WindowServer. I'm not sure that's the best design but it seemed
easier to do it this way right now.
2020-02-13 21:43:32 +01:00
Andreas Kling
6a9cc66b97 LibGUI: Remove leading G from filenames 2020-02-06 20:33:02 +01:00
Renamed from Libraries/LibGUI/GEvent.h (Browse further)