Commit Graph

26283 Commits

Author SHA1 Message Date
Linus Groh
b59e9260db LibJS: Implement Temporal.ZonedDateTime.prototype.era 2021-08-27 23:36:52 +01:00
Linus Groh
f59e4d6738 LibJS: Implement Temporal.PlainYearMonth.prototype.eraYear 2021-08-27 23:36:52 +01:00
Linus Groh
b11ea98648 LibJS: Implement Temporal.PlainYearMonth.prototype.era 2021-08-27 23:36:52 +01:00
Linus Groh
f2f671f340 LibJS: Implement Temporal.PlainDateTime.prototype.eraYear 2021-08-27 23:36:52 +01:00
Linus Groh
276d3f5089 LibJS: Implement Temporal.PlainDateTime.prototype.era 2021-08-27 23:36:52 +01:00
Linus Groh
418c22f9b3 LibJS: Implement Temporal.PlainDate.prototype.eraYear 2021-08-27 23:36:52 +01:00
Linus Groh
6f7d6d917e LibJS: Implement Temporal.PlainDate.prototype.era 2021-08-27 23:36:52 +01:00
Linus Groh
c3e0d78ba6 LibJS: Implement Temporal.Calendar.prototype.eraYear() 2021-08-27 23:36:52 +01:00
Linus Groh
f746850d1c LibJS: Implement Temporal.Calendar.prototype.era() 2021-08-27 23:36:52 +01:00
Mustafa Quraish
525a7e487b AudioApplet: Remove wpath and cpath priviliges 2021-08-27 23:17:05 +02:00
Mustafa Quraish
17299db61a Hearts: Remove wpath and cpath priviliges
There are no longer needed since the config file is not being
modified by the application directly.
2021-08-27 23:17:05 +02:00
Mustafa Quraish
c646efaf49 AudioApplet: Use LibConfig instead of Core::ConfigFile
No longer need to store `RefPtr<Core::ConfigFile>` :^)
2021-08-27 23:17:05 +02:00
Mustafa Quraish
0af3855fb9 Hearts: Use LibConfig instead of Core::ConfigFile 2021-08-27 23:17:05 +02:00
Musab Kılıç
3edeb9b7e7 Shell: Use variable instead of iteration_times.size() in builtin_time 2021-08-27 23:16:53 +02:00
Musab Kılıç
29a9be6503 Shell: Add iteration_times.ensure_capacity() in builtin_time 2021-08-27 23:16:53 +02:00
Mustafa Quraish
75a706b6eb Everywhere: Use the Optional<T>::operator==(T) operator
In general, I think `opt == x` looks much nicer than
`opt.has_value() && opt.value() == x`, so I'm updating
the remaining few instances I could find with some regex
magic in my search.
2021-08-27 23:13:51 +02:00
kleines Filmröllchen
2dc614127e Meta: Add System32 to the PATH so that reg.exe is always found
On my machine (c), /mnt/c/Windows/System32 is not on the PATH by
default. This causes reg.exe to fail, which is responsible for detecting
the presence of QEMU. By putting this path on the PATH on WSL, it will
always work regardless of the specific PATH configuration, and QEMU is
always detected.
2021-08-27 21:24:25 +01:00
kleines Filmröllchen
7d7d310df6 Base+Utilities: Add the asctl audio utility, replacing avol
The new asctl (audio server control) utility expands on avol with a
completely new command line interface (documented in the man page) that
supports retrieving and setting all exposed audio server settings, like
volume and sample rate. This is currently the only user-facing way of
changing the sample rate.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
f99e6507ee AK: Add Traits for Enums
Enums can be hashed as their underlying integral type. This allows enum
keys in hash maps etc.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
22b836dd7b Userland: Two low-sample rate fixes
1) The Sound Player visualizer couldn't deal with small sample buffers,
   which occur on low sample rates. Now, it simply doesn't update its
buffer, meaning the display is broken on low sample rates. I'm not too
familiar with the visualizer to figure out a proper fix for now, but
this mitigates the issue (and "normal" sample rates still work).
2) Piano wouldn't buffer enough samples for small sample rates, so the
   sample count per buffer is now increased to 2^12, introducing minor
amounts of (acceptable) lag.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
d049626f40 Userland+LibAudio: Make audio applications support dynamic sample rate
All audio applications (aplay, Piano, Sound Player) respect the ability
of the system to have theoretically any sample rate. Therefore, they
resample their own audio into the system sample rate.

LibAudio previously had its loaders resample their own audio, even
though they expose their sample rate. This is now changed. The loaders
output audio data in their file's sample rate, which the user has to
query and resample appropriately. Resampling code from Buffer, WavLoader
and FlacLoader is removed.

Note that these applications only check the sample rate at startup,
which is reasonable (the user has to restart applications when changing
the sample rate). Fully dynamic adaptation could both lead to errors and
will require another IPC interface. This seems to be enough for now.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
9880a5c481 AudioServer: Expose the ability to get and set the sample rate
Two new IPC calls allow audio clients to get and set the sample rate.
The AudioServer calls into the new ioctl of the sound card.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
d0ceaa24a6 Kernel: Implement ioctl for the SB16 to change sample rate
Two new ioctl requests are used to get and set the sample rate of the
sound card. The SB16 device keeps track of the sample rate separately,
because I don't want to figure out how to read the sample rate from the
device; it's easier that way.

The soundcard write doesn't set the sample rate to 44100 Hz every time
anymore, as we want to change it externally.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
2c9afaf5ac Kernel: Modernize SB16.cpp
This was some old code that could use mostly some east-const :^)
2021-08-27 23:35:27 +04:30
Idan Horowitz
24dbf18936 LibJS: Implement Temporal.PlainDateTime.prototype.withPlainTime() 2021-08-27 19:01:30 +01:00
Idan Horowitz
0f464f38d3 LibJS: Implement Temporal.PlainTime.prototype.equals() 2021-08-27 19:01:30 +01:00
Idan Horowitz
684e62476b LibJS: Implement Temporal.PlainTime.compare() 2021-08-27 19:01:30 +01:00
Idan Horowitz
a77cdc5f92 LibJS: Implement Temporal.PlainTime.from() 2021-08-27 19:01:30 +01:00
Idan Horowitz
bb857330d2 LibJS: Implement Temporal.PlainDate.prototype.toPlainDateTime() 2021-08-27 19:01:30 +01:00
Idan Horowitz
f6370fe3f7 LibJS: Add the ToTemporalTime AO and stub the ParseTemporalTimeString AO
This AO is required for a bunch of PlainTime related methods.

As part of this change the `TemporalTime` record was renamed to
`UnregulatedTemporalTime` and a new `TemporalTime` record that matches
the other Temporal parse result records was added. This also has the
added benefit of getting rid of a would be round-trip cast from integer
to double and back in `ParseTemporalTimeString`.
2021-08-27 19:01:30 +01:00
Idan Horowitz
32fc81c186 LibJS: Implement Temporal.PlainDateTime.prototype.equals() 2021-08-27 16:40:16 +01:00
Idan Horowitz
9ed877e8e7 LibJS: Implement Temporal.PlainDateTime.compare() 2021-08-27 16:40:16 +01:00
Idan Horowitz
28fa4d1568 LibJS: Add the CompareTemporalTime & CompareISODateTime AOs
These are required for implementing comparisons between `PlainTime`s and
`PlainDateTime`s.
2021-08-27 16:40:16 +01:00
Timothy Flynn
86b99fd9a6 LibJS: Extend Intl.DisplayNames.of to support currency tags 2021-08-27 12:32:24 +01:00
Timothy Flynn
8b93d51212 LibUnicode: Parse Unicode CLDR currencies and generate locale mappings 2021-08-27 12:32:24 +01:00
Timothy Flynn
297db925fc LibUnicode: Extract cldr-numbers dataset from CLDR database
This dataset holds the values needed to handle DisplayNames.prototype.of
with a type option of "currency".
2021-08-27 12:32:24 +01:00
Timothy Flynn
a029e3d38a LibJS: Extend Intl.DisplayNames.of to support script tags 2021-08-27 12:32:24 +01:00
Timothy Flynn
0f02def3c2 LibUnicode: Parse Unicode CLDR scripts and generate locale mappings 2021-08-27 12:32:24 +01:00
Timothy Flynn
ca77a7c573 LibJS: Extend Intl.DisplayNames.of to support language tags 2021-08-27 12:32:24 +01:00
Timothy Flynn
ab7a1dd89e LibUnicode: Parse Unicode CLDR languages and generate locale mappings 2021-08-27 12:32:24 +01:00
Timothy Flynn
6719e5cb17 LibUnicode: Generate locale subtag data as multiple smaller tables
This commit is preemptive to upcoming commits which add more subtags to
the CLDR generator. Rather than generating a giant HashMap containing
all data, generate more (smaller) Array-based tables. This mimics the
UCD generator. This also allows simpler lookups at runtime since we can
generate index-based lookups into the smaller tables rather easily.

Without this change, adding the remaining locale subtags would result
in the generation and compilation of UnicodeLocale.cpp taking about 30s
on my machine. With this change, it takes about half that. Additionally,
the size of the generated file reduces by about 1.5MB.
2021-08-27 12:32:24 +01:00
Timothy Flynn
b8ad4d302e LibUnicode: Move Locale enumeration from generated UCD data to CLDR data
The UCD set of data contained a very small subset of all locales just to
handle some special casing rules. This enumeration will be needed within
the CLDR generator as well. So rather than duplicate the enum, remove it
from the UCD generator in favor of the full list of locales known by the
CLDR generator.
2021-08-27 12:32:24 +01:00
Andreas Kling
317f55bb25 ConfigServer: Update the configuration cache on file changes
We were only notifying clients about the change, but didn't actually
update the internal cache in ConfigServer itself.

Thanks to "The Grey One" for pointing this out. :^)
2021-08-27 13:31:45 +02:00
Mustafa Quraish
4bd9ac1f66 Pong: Remove unused Core::ConfigFile imports
This application was including, opening and unveiling the path for
a config file, however it never actually reads or saves anything
from the configuration file.

Since it's easy enough to add it back later if needed, probably
makes sense to remove the unused code right now?
2021-08-27 12:45:50 +02:00
Mustafa Quraish
998d3a98ec Spider: Use LibConfig instead of Core::ConfigFile
There was a lot of error handling here previously when writing to
a config file failed, but this was removed since we have no way of
conveying a `Config::write` failure from the ConfigServer.
2021-08-27 12:45:50 +02:00
Mustafa Quraish
458471cc37 Snake: Use LibConfig instead of Core::ConfigFile 2021-08-27 12:45:50 +02:00
Maciej Zygmanowski
3ad9df1522 PixelPaint: Make Layer passed to tools a pointer
Some tools (e.g. ZoomTool) doesn't need layer to work. This commit
makes mouse events fire even if there is no layer. This fixes
a bug that ZoomTool didn't work when there is no layers.
2021-08-27 12:45:06 +02:00
Maciej Zygmanowski
0224dc2882 PixelPaint: Pass raw mouse event to Tools and wrap them all in a struct
This commit adds a Tool::MouseEvent struct, which contains events that
may be needed by tools: layer-relative, image-relative and raw (editor-
relative) event.

The raw event is used by ZoomTool to properly pan the view. This fixes
a bug which caused image to snap out of sight.
2021-08-27 12:45:06 +02:00
Maciej Zygmanowski
635130ef76 PixelPaint: Make scaling exponential
This matches behaviour of other image editors, e.g GIMP.
The default ZoomTool sensitivity was increased for better zooming
experience :^)
2021-08-27 12:45:06 +02:00
thankyouverycool
96dee93d3f FontEditor: Adjust margins and spacing
Brings vertical spacing in line with most other apps using
ToolbarContainers. Fixes GroupBox margins since CSS ordering
change.
2021-08-27 12:38:29 +02:00