Commit Graph

636 Commits

Author SHA1 Message Date
PulkoMandy
344ded80d4 ioctl: Document in Haiku book and in comments
- Convert libroot from a page to a group, so that it can list the
  included file and functions in the generated book (like the kits)
- Add unistd.dox and move the relevant part of ioctl details there
- Make sure to use C89-compatible comments only in POSIX headers

Change-Id: I8f0412e4c75de6f48018a0436909f8b0076342a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6369
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-11-18 17:12:04 +00:00
drea233
fc7456e9b1 fix typo in "Update keyboard.dox"
Small typo

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2024-10-17 12:10:30 -04:00
X512
2141d2fe3a input: fix KEY_power key code conflict with japanese \_ key
- This key code is inherited from BeOS, where it was used for the power
  key on Apple ADB keyboards
- Since then, we have introduced a new system for "multimedia" keys,
  that uses HID key codes directly instead of defining our own mappings
- The PS2 driver was using the HID keycode, but the USB driver was still
  using the BeOS defined one
- Japanese keyboards, which have a few more keys than US and European
  ones, reused the same keycode for something else

Since the power key does not need to be mapped by the keymap, move it
out of the way by using the HID keycode (key codes larger than 0x7f
cannot be mapped to UTF8 symbols). Remove all mentions of the use of
0x6b as a keycode for the power key, but add a note in the documentation
that BeOS did this.

To avoid further confusions, complete the documentation of extra
keycodes, and remove some definitions from keyboard_mouse_driver.h that
should have been in InterfaceDefs.h.

While researching this, I also found that some keys specific to Korean
keyboards were declared in the wrong place, as mapped codes instead of
unmapped ones (checked that by looking at the HID driver, which emits
these raw keycodes, and confirming that the mapped ones are not used in
any keymaps. Also added a note about the mapping of the extra modifier
keys in Japanese keyboards, which I think may be a problem since these
map to invalid UTF-8 byte sequences, but this is what the existing
keymap does, so leaving it as is for now until we can determine if this
can be changed or if we have to keep it that way.

Change-Id: I6a198a0840cba7739bdc78e0c65e5d8fd23956c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8047
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-08-19 16:00:25 +00:00
Máximo Castañeda
caed67a8cb Input server: add mouse-specific API for button map and click speed
Convert users of those and other parameters to the new API.
Fix mouse preferences "Default" button not changing button map.

Change-Id: I9184011fd3067fd0b229e1db6376c1b41f06dab9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7878
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-07-29 17:30:39 +00:00
Augustin Cavalier
ba0223da5d Haiku Book: Fix typo in launch_daemon documentation. 2024-07-15 21:17:04 -04:00
Máximo Castañeda
b8a45b3a2d BFont: allow skipping fallbacks in GetHasGlyphs
Change-Id: I5a68008d25cce34596fb5ce6fb07259ae56c3a3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7829
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-07-06 13:12:21 +00:00
Zardshard
984f843b91 HaikuBook: document missing BBitmap constructor
Change-Id: I4fc51b0e499f9cb5e5c4ce58d6baddf462322b3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7719
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-06-10 16:36:12 +00:00
Pascal Abresch
47c05920fd Docs: Document color_which UI colors
Change-Id: Ic8fef097ac6cc616ae962459c42f93109a1833ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7656
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-05-19 08:55:45 +00:00
Pascal Abresch
9c274ccd09 Document new rgb_color apis, apply their usage.
Change-Id: I48f1bedd3abfb3b445c1c7090ce43504bcff4537
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7485
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-02-28 17:53:38 +00:00
PulkoMandy
2a2e7ad562 doc/user: mention libnetwork and a bit of the filesystem hierarchy
Based on the feedback from Maya Posch in https://mayaposch.wordpress.com/2024/01/20/porting-nymphcast-to-the-haiku-operating-system/
Thanks for noting that the information was missing!

Change-Id: I4a9f709b17cb3a4a771f167b5af0fc83843ec5ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7406
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-02-20 12:14:51 +00:00
Máximo Castañeda
621200ebbd BOutlineListView: fix ItemUnderAt and accept NULL as superitem
ItemUnderAt was returning items that were not under the superitem (this
was fixed for EachItemUnder in hrev52210).
Make a NULL superitem mean the parent of the topmost items. Despite not
being explicitly documented in the BeBook, that's how BeOS works, the
MenuWorld test app uses it and, well, it's handy.

Change-Id: I2551e8ce874a6238c5e5fb1eb742e68e62d3928a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7359
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-01-29 18:58:03 +00:00
Máximo Castañeda
d579eb9efe HaikuBook: minor fixes
Fix some copy-pasta and strange grammar.
Remove a note that seems unnecessary in context and easy to misinterpret
out of context.

Change-Id: If1ce26b293c8098c260a9697fb0ef0611a4958c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7358
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-01-29 18:15:16 +00:00
PulkoMandy
1978089f7c API docs: document menu reordering functions
Change-Id: Ic1a914af343aa713cfb7edc813c6a6458cb5027f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7357
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2024-01-28 16:12:09 +00:00
Augustin Cavalier
1322e37a03 docs/user: Fix typo. 2024-01-08 14:07:53 -05:00
PulkoMandy
da4dbfa47a API docs: document KernelExport.h and overview of synchronization primitives.
Change-Id: Ic3853bf103710f289a32f43f5fb1beb79bca0b9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7245
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-12-30 18:33:37 +00:00
John Scipione
82bfaa954d BListView: Add ScrollTo(index) method, auto-scroll on drag
Multi-select lists may also auto-scroll on drag now as well.

Document ScrollTo(index). Give Scrolling its own section.

Change-Id: I36284a28376a01bafd23ddb30162fc786fb41521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7213
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-12-24 02:45:59 +00:00
PulkoMandy
ae2049aa4f user docs: add note about use of BView::GetMouse() in BView::MouseUp()
Fixes #18606

Change-Id: I2f6d9cd67de6cd4223b6837bb1b8b0cd1de79800
2023-09-30 21:27:32 +02:00
Zardshard
c9afad2268 HaikuBook: Improve documentation of AddDynamicItem
Change-Id: Id682c64f13eb103074bdbee34d531d3e2a91de0f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6955
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-09-26 16:40:04 +00:00
Pascal Abresch
f11b304632 Document Launch flags and Preference directory for findpath
Change-Id: I150c0ca1e0deb5749689bb1019a48efdcdc99def
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6701
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2023-07-18 16:43:20 +00:00
Niels Sascha Reedijk
4958c5d7b6 HaikuBook: fix some errors and warnings during documentation generation
Change-Id: Ib6b876ff83aeba0d2346990ab2e9869cbf519284
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6641
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-06-24 22:00:27 +00:00
PulkoMandy
4dbd474753 Add BIconUtils::GetSystemIcon
Allow to easily access the alert icons and anything that's added to app_server
resources.

Fixes #10887.

Convert BAlert, Debugger AlertWithCheckbox and Keymap ModifierKeysWindow
to make use of it, removing the duplicate code to locate app_server
resources.

The resources are initialized only once (per application), so there is no need
to reload them for every access to the icons.

In the ticket there is discussion about putting this in BControlLook,
but I think this should in fact be moved fully into app_server with
special drawing commands for well-known icons. That would avoid loading
and rendering the icon on the application side to then send it to
app_server (especially in remote_app_server case)?

In any case, this simple API can serve as a base for applications to
use, and we can change how it is implemented later on.

Change-Id: Id370526ae5cf165cfb8bc277bc8a7f46c26f542d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6463
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-24 10:58:48 +00:00
John Scipione
f18d2effbf API Docs: Update BVolume::SetName()
Update \since to BeOS R4. This method definitely predates Haiku,
it has existed since at least R4.5 despite not being documented.

Document B_NAME_TOO_LONG return value.

Change-Id: I0816e4e89ae2710f6123e10ee41145a83fdca66f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6363
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-05-01 14:21:41 +00:00
Augustin Cavalier
6fa3716c79 docs/user: Import syslog documentation from an old Haiku newsletter article. 2023-04-25 13:10:59 -04:00
Yourself
a231654f09 BWindow docs: Improve function descriptions
* Clarify what information BWindow::WorkspacesChanged provides
* Clarify when BWindow::WorkspaceActivated is called

Change-Id: Ifcb041bcf67db1ee5c1c514a2b97baa49f8c4dcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6257
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-24 14:01:56 +00:00
Pascal Abresch
b548e9131d Api docs: fix code blocks
Also simplifies some canvas vars

Change-Id: I52cd507768ffa361bbd68e1064f947bbcf2dcfa4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6184
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-11 22:28:47 +00:00
Pascal Abresch
40a7fe3f68 Api docs: style search
Change-Id: I11cf0ae20ff7fc34dd2facaba462f5851efea050
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6078
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-02-21 10:47:03 +00:00
Pascal Abresch
9a91a72662 Api docs: dark mode
Change-Id: I46538353f38902b58937286a9e32167424fc7d0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6074
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-02-18 16:08:12 +00:00
Augustin Cavalier
c97648aad1 docs/user: Use Doxygen's internal search system.
Fixes #17209.
2023-02-15 16:49:45 -05:00
Augustin Cavalier
f7b2278e28 docs/user: Update Doxyfile to Doxygen 1.9.6.
Automated conversion via "doxygen -u". No changes to settings otherwise.
2023-02-15 16:45:53 -05:00
PulkoMandy
2db0fbd87e documentation: add a list of "media" keycodes to keyboard documentation.
Change-Id: Idd0249c2c19cea7a3435b5a73fc48c2027dcb8f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5961
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-12-23 16:55:17 +00:00
Máximo Castañeda
241f109ccb View: provide the transform between different coordinate spaces
There's currently no way for an application to convert between view and
drawing coordinates with a drawing states stack without keeping track of
all the transformations itself, which is not very convenient for helper
or library functions.

Handle other spaces too, for good measure.

Change-Id: Ic8404a1c111e273fff1eebf2f9f59f58246b796c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5775
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-13 04:04:30 +00:00
Niels Sascha Reedijk
1111dda699 NetServices: Add libnetservices2.a from dev/netservices into master
The overall design does not deviate much from my proof of concept [2] and that still makes a good read to
understanding the overall architecture. If you want to get a sense of how it is built up, the API comes with
full doxygen documentation for the public API [3], and I have also done a PoC change for HaikuDepot which is
useful as an illustration on what the impact for the user of the new library is. [4] There is also a test suite
that may give some insight into the day to day ergonomics of the API [5].

The current state is that I am fairly confident that many HTTP requests will actually work, but I do expect
rough edges with a protocol with this many diverse implementations. There is also a list of features yet to be
implemented on Trac [6]. Additionally, I still want/need to do performance testing.

The goal of merging the kit right now is to start making it available for more uses, and through that also give
a chance to shape its future. There are also some design decisions that need review, most notably I expect some
discussion around the uses of C++ 17 idioms (like std::optional and std::string_view) and around the use of
exceptions for error handling.

The impact of merging right now should be near zero: the netservices2 kit lives in its own header space, and
builds into its own static library (libnetservices2.a). It is not yet used in any of the apps in our
repository.

The branch does remove the deprecated services kit from the libnetapi.so library, though it leaves
libnetservices.a intact. After our previous announcement to remove it after beta 3, this should be expected.

[2] https://github.com/nielx/haiku-netservices-rfc/tree/exceptions
[3] https://git.haiku-os.org/haiku/tree/docs/user/netservices?h=dev/netservices
[4] https://review.haiku-os.org/c/haiku/+/5692
[5] https://git.haiku-os.org/haiku/tree/src/tests/kits/net/netservices2?h=dev/netservices
[6] https://dev.haiku-os.org/wiki/Development/NetServices2

Change-Id: I5d0b7e2619699f39a2506588417b57391f0f5cc2
2022-11-02 01:37:17 +00:00
Máximo Castañeda
baf401757e HaikuBook: small list levels and grammar tweaks
Change-Id: I186e38108a57a8a8b82dbfbdf27766730fe659e4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5774
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Oscar Lesta <oscar.lesta@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-11-02 02:12:23 +00:00
Niels Sascha Reedijk
97f11716bf Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I588c4a840523995f820161d63741c137bc5c719c
2022-09-04 07:30:59 +01:00
Niels Sascha Reedijk
27196c4068 NetServices: use BBorrow<BDataIO> for custom body targets
Change-Id: Ib2d4b0ca3689338d906f943295278c086c6f2c83
2022-09-04 07:27:08 +01:00
Niels Sascha Reedijk
1e22817dfb NetServices: add the BExclusiveBorrow<T> smart pointer
This smart pointer is designed to help with putting some explicitness and
safety around the case where someone will use their own object that implements
the BDataIO interface to store the body of a network request. By default,
BDataIO objects do not require or enforce thread safety. Since accessing these
unsynchronized objects between two threads is undefined behavior, it should be
explicitly discouraged.

The BExclusiveBorrow/BBorrow smart pointer helper helps solve that by enforcing
the limitations on using an unsynchronized object in two threads. When used
correctly, there is a runtime check on incorrect use by the developer. This
should help write better code.

The design is based on shared_ptr, including having an admin block akin the
control block, that manages the internal object. This type-erased admin block
has the advantage that it allows the owner to have a different type than the
borrower. It also handles cases where the lifetime of the borrower is longer
than the owner: the borrower can continue to use the object until they want to
return it, after which it will be cleaned up. This will make it possible to do
some fire and forget pattern in the network services kit, where someone may
just wants to create a file and borrow it to the network request, and care
about further processing the file in the future.

Change-Id: Ie9b7e7472c868b60f663b4db4fa449d421e447eb
2022-09-04 06:54:37 +01:00
Máximo Castañeda
2eab9be564 HaikuBook: fix xml
Change-Id: If6dfe4de919d946f1ff19946e1fa1abe726ea95f
2022-09-02 12:12:01 +02:00
Augustin Cavalier
f5fcee0157 BAlert documentation: Clarify that SetIcon assumes ownership.
It always did, this documentation was incorrect.
Also, we introduced this method, it wasn't present on R5.
2022-08-26 21:25:23 -04:00
Niels Sascha Reedijk
8a16ecbce9 NetServices: Add debugging constants and messages
These allow for additional messages about the progress/status of the request.
For now, the messages are sent unconditionally, though it may be reasonable to
in the future switch to sending them only when enabled.

Change-Id: Ic45a0055037af02c689494fa5ce0acd03592ad7e
2022-08-14 14:53:48 +01:00
Niels Sascha Reedijk
7b1d966cf2 NetServices: Rework parsing of content-length and move to HttpParser
This fixes a bug in the HttpAuthTest, and in general, moves responsibility of determining
the shape and size of the content to the right place.

Still to do is to fix the case where there really is a variable length content. This will
now probably error out as a connection closed error.

Change-Id: I13c20028e834cc9af8c7bc1d7d7613bf60838e64
2022-08-08 07:58:45 +01:00
Niels Sascha Reedijk
9cb56a4881 NetServices: Add custom error message to BNetworkRequestError
Change-Id: I03970762531a689e25cd78a1091aecf755ee87ce
2022-08-07 08:47:19 +01:00
Niels Sascha Reedijk
6d1bb0e7ad NetServices: Remove BHttpRequest::SerializeTo(BDataIO*)
The private version that serializes to a HttpBuffer is now used.

Change-Id: I034933a641e98b3a8f918470a024ba32ea7c8663
2022-08-07 07:17:38 +01:00
Niels Sascha Reedijk
c7f925c3ee NetServices: add the HttpSerializer helper to help serialize requests
Change-Id: Ide1e2d387884ce4cf2d406057960cd0732d61f38
2022-08-07 06:47:15 +01:00
Niels Sascha Reedijk
9b33a931f1 NetServices: Implement controls on the number of concurrent requests.
This change allows the user to control how many concurrent request can be done
per session. This is going to be helpful to running the tests as well; they were
all fired up in parallel, which sometimes leads to our test server refusing a
connection.

Change-Id: I4f1f40b28b8e0199ea5589b36cd8d00ecd849a63
2022-07-27 09:02:09 +01:00
Niels Sascha Reedijk
60355daec9 NetServices: Implement asynchronous status update messages.
The integration PostTest has a basic test that the expected messages are sent and
have the expected data fields. The gist is documented in book.dox.

To do are the messages around SSL. However, that functionality is also not
implemented yet, so there is nothing to send.

Change-Id: Ib8f36ed32f9854d643d8256338b71af7067059f0
2022-07-24 08:56:02 +01:00
Niels Sascha Reedijk
b74e852fd9 NetServices: Remove Accept as standard and protected header.
In the old service kit, the Accept header was automatically set. However, it is
not a required header. This removes the default value and the protection against
setting it manually.

Required to make HaikuDepot work.

Change-Id: Ic589bfc5829db25915b67f2a13b6c2436c053e25
2022-07-20 06:28:17 +01:00
Leorize
86fa1c21e1 Shared Kit: Introduce BMemoryRingIO, a thread-safe ring buffer
This commit introduces a simple thread-safe ring buffer implementation
based on top of BDataIO. The main use case for this class will be to
implement shared buffers between threads for the upcoming refactoring
of Services Kit.

Change-Id: I526bc044b28c91496ad996fabebe538e75647f2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2966
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-07-11 16:29:53 +00:00
Niels Sascha Reedijk
92357c131e NetServices: Add support for an input body in a request and handle this with redirects.
Change-Id: Id2399d49aa673469c8c04ebd13884cdbcb24112d
2022-06-23 21:13:35 +01:00
Niels Sascha Reedijk
6cbbd9bf4e NetServices: Implement BHttpSession::Cancel()
Change-Id: Iff0a7726e57f3e6bd4e9d0ebac08a370d25a62d7
2022-06-03 13:38:28 +01:00
Niels Sascha Reedijk
2f3b9b18ac NetServices: Add/rework the MaxRedirections, Timeout and StopOnError options
Change-Id: I4e59b51c16c6777941dc92ce02505386257dad03
2022-06-03 09:40:42 +01:00