Commit Graph

2960 Commits

Author SHA1 Message Date
Adrien Destugues
a206dcc221 usb hid: implement horizontal scrollwheel
- Fix USB_hid_page_consumer.h: some values are skipped in the spec so
  our defines were off
- Handle the horizontal wheel on my mouse which is declared as a
  CON_AC_PAN, but otherwise works just like the vertical wheel
- Input server and interface kit already handle the events properly
  (they were available for serial mice already).

Change-Id: Ie0080ebb27e9478bcfe9f9dc5fd2a936ae05a848
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2201
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-06 00:10:10 +00:00
Ryan Leavengood
e10de1ecf5 Visually align shortcuts in menus
In a menu, we use the right side both for submenu arrows and shortcuts.
As a result, when an entry has both a shortcut and a submenu, its
shortcut is not aligned with others, and this does not look so nice.

The spacing for the arrow appears only if there is a submenu in any of
the items in the parent menu.

Change-Id: If91fdcdad36abb0141fb05d1f59141f89540c1db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/355
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-04 23:06:54 +00:00
X512
958d3f4375 BeBuild: set default visibility for _EXPORT
This is required for building shared libraries with hidden by default symbol
visiblility such as mesa.

Change-Id: I7150629aaea61d7c9b6e641d32913c5cc7c96543
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2159
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-30 00:32:32 +00:00
Adrien Destugues
670af4fc7b More build fixes. 2020-01-25 21:35:34 +01:00
Zotyamester
edad811b96 Game Kit: rewrite GameSound and GameSoundDefs headers
Change-Id: I5efee795a73a9637f34ed8ffa4fbeeda09eb7a88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2104
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:43:02 +00:00
Ra-V2
e9d6c3150e Game Kit: rewrite StreamingGameSound.h
Change-Id: Ibd5d77236dc14ca605b0925c1177e64ca9e5a5d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2113
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-25 11:42:41 +00:00
Panagiotis Vasilopoulos
f0b6c6a24b Game Kit: rewrite DirectWindow, FileGameSound and SimpleGameSound headers
Change-Id: I45687f8164dbc915a0cb6ca1bf4c0211761cb098
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2108
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-22 00:33:44 +00:00
Raheem Idowu
e8faedae57 Game Kit: rewrite PushGameSound and WindowScreen headers
Part of #1576

Change-Id: Iafdc88bcf13e9c07fa148cb7980b54f5ee98be50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2086
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-11 02:26:06 +00:00
Jérôme Duval
feeb4b5d93 RosterPrivate: add IsShutDownInProgress()
enable to check whether a shutdown process is in progress.

Change-Id: I8efdddb3caa80e9fd188f202b6e92a888a7608e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:32:31 +00:00
Kacper Kasper
c67dde0f2c app_server: Add tiled bitmap drawing routines
Change-Id: I9a7bd967f2cc95d815a66707b764cf5e33b3f8ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1962
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-09 12:22:28 +00:00
Adrien Destugues
69f814cded BFileGameSound: allow initializing from a BDataIO
There is no reason to not allow this, and it makes it possible to load
data from eg. a BResource instead of a file, which is very useful.

Remove some unused members in the class and dead code, and fix style
issues.

Change-Id: I94cbd0c13c469ea80f55028cf33dfde2de4365ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2001
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-09 12:00:17 +00:00
Adrien Destugues
af3d90a597 Attempt to fix gcc8 build. 2019-12-05 20:14:08 +01:00
Adrien Destugues
b819569ef4 usb_video.h: build fixes
- Remove duplicate and otherwise unused lendian_bitfield.h
- Adjust listusb jamfile to use lendian_bitfield.h
- Fix various typos in usb_video.h and restore some fields to make
  listusb happy
2019-12-05 18:28:12 +01:00
brjhaiku
f57d609e9b USB_Video.h: add more definitions from the spec.
fixes #5940

Change-Id: Idb9ae8dfdaa9f0fab43be3767bf97e1c87245940
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1022
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-05 10:55:29 +00:00
Adrien Destugues
70cdd7d4f5 BCountry: add SetTo and InitCheck.
Change-Id: I5fbc2a1c0e735d6edeb23672017bb64d1b3f4390
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1872
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-02 12:32:15 +00:00
John Scipione
fb3493dfef BControlLook: Move tab frame drawing into DrawTabFrame()
The tab frame is drawn behind the tabs.

Create a new DrawTabFrame method in BControlLook and HaikuControlLook
that draws the tab frame background.

Until now we've been reusing the DrawInactiveTab method to draw the tab frame
in BTabView. While this works on HaikuControlLook, it doesn't work on other
ControlLook's (such as BeControlLook) that draw their tab frame differently.

Add FBC method to preserve binary compatibility on gcc2 and gcc4.

Move DrawTabFrame method to where _ReservedControlLook1 was in header.

Set rect to area of tab frame in TabView instead of doing the
calculation in HaikuControlLook so that others may benefit.

Change-Id: I513e238914f6d680f495659b6ec902df15555015
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1936
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-11-22 23:24:05 +00:00
Jérôme Duval
bc6dc61fb9 USB_hid: VR Controls definitions. 2019-10-08 16:56:51 +02:00
Jérôme Duval
c84296d0ad USB_hid: fix include guard. 2019-10-07 21:58:17 +02:00
Niels Sascha Reedijk
88dc9ee1b1 Remove MultiChannelControl.h
This class is not implemented in our code. It is not documented in the BeBook.

Change-Id: Id3a48dbd2039005f69998567dcc26548612f3e9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1876
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-20 23:59:30 +00:00
Jaroslaw Pelczar
1761cb8e6f arm64: Add more headers for code compilation
This makes ARM64 target compile more files. This patch is one of
series of patches to support new architecture, as fixes in many
places are required just to compile the code.

Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ia060612733cd3a0fcb781fec449da164ed635b8e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1807
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-09-01 03:02:49 +00:00
Simon South
b9d9c282fd input_server: Notify apps of new key map
Define a new message, B_KEY_MAP_LOADED, that is broadcast to applications by
the Input Server each time a key map is loaded. This allows apps that cache
key-map data to know when their copy has become stale.

Change InputServer::HandleGetSetKeyMap() so it returns an error in the event
loading even the system (fallback) key map fails.

Change-Id: Icc6c884f695ca59c687d83c680bb2fb467dd90cc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1741
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-27 06:49:37 +00:00
Augustin Cavalier
8a0c9d52c6 OS: Rename B_USER_CLONEABLE_AREA to B_CLONEABLE_AREA.
It now lives in OS.h. The idea is that this will now be
accessible to userland applications, so userland memory
is protected from access by other processes, just as
kernel memory is.

No functional change (the constants are still the same,
though I've changed some to use shifts to make clear
which bits are allocated are which are unused.)
2019-08-10 15:51:41 -04:00
Ryan Leavengood
b711002d34 HaikuDepot: Set package state when loading single package
Without this, even installed packages still get an "Install" button.

Fixes #14821.

This was implemented by adding BPackageRoster::IsPackageActive. I decided to
have this take a location since GetActivePackages also did, but as noted in my
TODO comment, I think this is awkward.

It would also be nice to show the user they have a different version of a
particular package, but that would require some changes to IsPackageActive.

Change-Id: Iab0d35eb6b671a17711b0214b15164d296927e5a
Reviewed-on: https://review.haiku-os.org/c/1694
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-08 07:09:35 +00:00
Adrien Destugues
103741882a PVS V542: operator precedence issue accross macro expansion
In CodyCam, we attempt to cast the result of this macro to const char*.
However, the ternary operator has lower priority than the cast so it
doesn't work as expected.

Add some protective parentheses here.

Change-Id: I5e9875187cec67b9534b1bbe58d82217c6cd5524
Reviewed-on: https://review.haiku-os.org/c/1667
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-31 02:13:01 +00:00
Zoltán Mizsei
3ddf0bbc29 BSD: Use elf.h from os/kernel
Platform-dependant defines for Elf_*

Change-Id: Ib86554eb497d20e60ad7c75de4321d5b516ad88c
Reviewed-on: https://review.haiku-os.org/c/1635
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-27 15:19:31 +00:00
Adrien Destugues
22817d221a PVS V591: non void functions must return something
Change-Id: I1f4276bc32afab75cf857c143d2bdb4fc3b578b1
Reviewed-on: https://review.haiku-os.org/c/1612
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:57:50 +00:00
Adrien Destugues
12d046d024 PVS V547: always false conditions
Change-Id: I389c081331b1c5ef67bef9ffcac9055573e1ebf5
Reviewed-on: https://review.haiku-os.org/c/1605
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-17 01:48:25 +00:00
Adrien Destugues
fcf7cbe79e PVS V522: null pointer dereferences
Change-Id: Iaa753ef3a93c36031789a85f87e569fc410d3304
Reviewed-on: https://review.haiku-os.org/c/1604
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-07-16 20:44:32 +00:00
Kacper Kasper
17c9e98743 TextView: add shortcuts for wordwise delete
Change-Id: Ie67f6255c3f5d9d8ccc6699ed42dd71ae593fa16
Reviewed-on: https://review.haiku-os.org/c/1573
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-14 14:14:39 +00:00
Adrien Destugues
076b19023f elf2aout: import from FreeBSD
The sparc openboot implementation can run executables in the a.out
format. We used to generate these using objcopy, but this does not work
anymore as binutils is deprecating a.out format support.

- Import elf2aout from FreeBSD
- Add some missing bits to our elf.h and have a copy of it in the build
  headers so it can be used to build elf2aout for the host platform
  (tested for Linux)
- Use it to generate the sparc haiku_loader
- Adjust the bootloader linker script to have two "program headers": one
  that is not loadable and contains the ELF headers, and the second one
  that is loadable and contains the actual code and data. Unlike
  objcopy, elf2aout relies only on the program headers to know what to
  put in its output file (sections are ignored), so this is required
  otherwise we end up with the ELF header nested inside the a.out file,
  and everything offset from the expected load address as a result.

Confirmed that this allows to build the loader and run it as far as
before, so I'm back to needing to implement some MMU support now.

FreeBSD commit: 7551d83c353e040b32c6ac205e577dbc5f2c8955

Change-Id: I90b48e578fa7f148aeddd8c5998fdddc5cfa73fa
Reviewed-on: https://review.haiku-os.org/c/1557
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-13 01:29:05 +00:00
Augustin Cavalier
74c38cab40 BMenuBar & Deskbar: Make the hack to call ShowMenuBar a lot less ugly.
The previous hack, which as the comment (and __MWERKS__) implies
dates all the way back to the Be era, finally broke: int32 is "int"
on non-x86, not "long", and so this generated an undefined symbol
error on ARM.

The best solution seems to be to make StartMenuBar merely protected,
and then make a subclass where it is fully public to call it.
This is a lot less fragile (and much less ugly.)

Change-Id: I0519d0d9eeb1cc4523d0c6dd4fdfe8688ed1092c
Reviewed-on: https://review.haiku-os.org/c/1516
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-17 11:49:48 +00:00
Augustin Cavalier
69712d5c00 OS.h: Reorder includes alphabetically. 2019-05-19 12:37:14 -04:00
Augustin Cavalier
218a8c03cb Revert the Codec Kit.
All of Barrett's individual reverts have been squashed into this
one commit, save a few actual bugfixes.

Change-Id: Ib0a7d0a841d3ac40b1fca7372c58b7f9229bd1f0
2019-05-17 14:43:32 -04:00
Jeroen Oortwijn
72f7f7d976 USB_hid.h: Add Report Type constants
From "Device Class Definition for Human Interface Devices (HID)
Ver. 1.11", par. 7.2.1, page 51.

Change-Id: I4628f8ca940758aaf4a09290e9fa407d30374e7a
Reviewed-on: https://review.haiku-os.org/c/1450
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-14 07:24:09 +00:00
François Revol
629397f222 Add basic support for loading ControlLook add-ons
app_server just passes the add-on path around.

Maybe we should make sure the add-on can be loaded when setting it.

Change-Id: I3acd3299782a22c1666bd5435dbf3d8053e359fa
Reviewed-on: https://review.haiku-os.org/c/1430
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-13 22:15:30 +00:00
Murai Takashi
0ecfc6f3e3 Added some support for GCC 9.
Change-Id: I6b6cd53e00601592b44e1f2aa2804c8c9c9593d9
Reviewed-on: https://review.haiku-os.org/c/1438
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-05-07 23:07:17 +00:00
Jérôme Duval
02f7c69828 TranslationErrors.h: document as deprecated.
TranslationDefs.h: SupportDefs.h already includes Errors.h, remove TranslationErrors.h.
2019-04-15 20:45:19 +02:00
Augustin Cavalier
f1fafe317f kernel/OS.h: Include sys/types.h instead of pthread.h.
This avoids polluting the namespace significantly. Also adjust
all files which depended on this behavior to include pthread.h
directly.
2019-04-12 15:26:25 -04:00
Augustin Cavalier
5ffbe7d778 Change all references to "__INTEL__" to "__i386__".
They are functionally identical, but the former is a BeOS/Haiku-specfic
macro that we include in the compiler specs, and the latter is defined
by GCC.
2019-03-30 16:54:01 -04:00
PulkoMandy
8ff82ee2d4 sparc: fix debug support
Declare and use the correct registers to define a stack frame.

Change-Id: Ice3ba8f8715313a715f6b1cb553a6883541f5cc4
Reviewed-on: https://review.haiku-os.org/c/1327
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
Augustin Cavalier
9cb15d72bd netinet/in: Use the GCC4 builtin byteswap functions for htonl.
Fixes the build breakage caused by PulkoMandy's recent commit.
Remove these from ByteOrder.h now also, as per POSIX they should
come from netinet/in.h.

This is a small source compatibility breakage, but it will only
affect a small portion of non-POSIX, partially-Be applications.
2019-03-26 19:33:43 -04:00
CodeforEvolution
e2c7bb900c Add Reboot Check to BPackageRoster
A bit of an explanation for these weirdly named functions:
LatestActivePackageInfos() returns the packages on the system that are
both installed and fully set up. When packages are in the middle of being
installed, LatestInactivePackageInfos() shows the packages in the process
of being installed. Once the installation process is done,
LatestInactivePackageInfos() returns nothing. If there are packages that
can't be fully activated without a reboot, CurrentlyActivePackageInfos()
will return the same information as LatestActivePackageInfos(), or if
everything has been installed and activated, it will return no packages.

Change-Id: Ia1814a5abda6d815c46e0b46dc812b4e7af81de3
Reviewed-on: https://review.haiku-os.org/c/1129
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-18 14:10:42 +00:00
Augustin Cavalier
d3f27239b1 bus: Remove IDE.h and change ATA bus manager paths. 2019-03-13 11:34:13 -04:00
Augustin Cavalier
ee735d1b33 PackageKit: Fix BPackageInfoAttributeValue::Clear for GCC2.
These are simple structs, so hopefully GCC8 will be OK with us
memsetting them. We can't use the standard = {} route because
GCC2 does not support that.
2019-03-03 17:04:22 -05:00
Murai Takashi
752ec5c625 Package kit: Fix -Werror=class-memaccess
Initialize each class members instead of memset()
for clearing PackageInfoAttributeValue.
Pointed out by gcc8.

Change-Id: I8bdb328e2271e49e840b1294dba9cca544805e72
Reviewed-on: https://review.haiku-os.org/c/1114
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-03 21:07:42 +00:00
Alexander von Gluck IV
05dda88dc1 headers/riscv64: Implement basic arch headers
Change-Id: I6bfbacb61eae84ffebc30c2565683348d684d88f
Reviewed-on: https://review.haiku-os.org/c/1063
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-26 14:50:35 +00:00
Adrien Destugues
5629675a32 sparc: add defines and minimum set of required files
Gets the stage0 bootstrap to run.
Imlementation is probably nonsense at this point.

Change-Id: I10876efbb54314b864c0ad951152757cdb2fd366
Reviewed-on: https://review.haiku-os.org/c/1061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-23 16:30:50 +00:00
Augustin Cavalier
86dfe1d9a8 BAffineTransform: Remove "register" storage class.
Long since deprecated, and compilers can figure this out on
their own now. Fixes a lot of errors in Clang.
2019-02-21 14:03:05 -05:00
Barrett17
83a69e16c5 MediaExtractor and MediaWriter fix constness
* Fixes an ugly hack, where the codec was initialized in the
InitCheck and prevented the method to be const too.
2019-02-21 17:43:11 +01:00
Barrett17
662583b300 MediaStreamer: Extend API to support DVD navigation
* This is a general review of the code and includes a rework
 of the sniffing API.
2019-02-21 16:39:58 +01:00
Adrien Destugues
a6a6e3a842 Package kit: add likely-useful architectures
Required for bootstrapping them.

Change-Id: I179d8c73b08688946049bf18ff9151ef047e449b
Reviewed-on: https://review.haiku-os.org/c/1071
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-20 22:29:36 +00:00
ahenriksson
8497a2cc28 vfs: functions to change a vnode busy status and ID
The kernel version is only partially tested.

Change-Id: I9a2f6c78087154ab137eadbced99062a8a2dd688
Reviewed-on: https://review.haiku-os.org/c/918
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-19 18:44:43 +00:00
Barrett17
784c192df2 AdapterIO: Don't inclue RWLocker header in public file 2019-02-17 14:22:30 +01:00
Barrett17
303f574120 MediaPlugin: Use three decimals for plugin version
* That allow to manage minor and major versions.
2019-02-17 14:15:08 +01:00
Barrett17
eb6626e962 MetaData: Implement copy constructor 2019-02-17 11:54:10 +01:00
Barrett17
d0064da6a5 MetaData: Introduce missing keys 2019-02-17 11:54:09 +01:00
Barrett17
9ad840d86f MetaData: Correct doxygen brief 2019-02-17 11:54:09 +01:00
Augustin Cavalier
de48af7a58 Adapt all consumers of HashSet and HashMap to the slightly-different APIs.
No functional changes intended. Tested and verified as working.

Change-Id: Iaa67c2e5f0d9aff433ac7348e63e901a6a80e589
Reviewed-on: https://review.haiku-os.org/c/1043
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-02-15 00:34:36 +00:00
Augustin Cavalier
e5d0c9094d BView: Add a B_SCROLL_VIEW_AWARE flag.
* This indicates the view will manage whatever scrollbars are targeted
   to it.
 * Use _B_RESERVED7_ for this. It's been RESERVED since BeOS R5
   (I guess it was probably something on some older BeOS version?)
   and we don't really care about BeOS R4 ABI compatibility, so
   that should be fine.
 * Update BScrollView to not touch BScrollBar range/proportion
   when the target view has this set.
 * Update BListView to set this flag, always.

Fixes #14871.

Change-Id: I17027f3b63ef28da1e735c5393593496c415dce3
Reviewed-on: https://review.haiku-os.org/c/998
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-02-03 18:04:13 +00:00
Augustin Cavalier
3493fcb668 headers/kernel: Add argument names to initialization functions. 2019-02-02 18:10:54 -05:00
Augustin Cavalier
c5e4e4ffb4 headers/kernel: Include declarations of initialization functions in image.h.
No "real" functional change, but this causes GCC7 to throw errors when
these functions are declared without the image_id argument, which
in some files they were (as this commit repairs.)

This change is largely inconsequential on x86, but on callee-cleanup-args
targets, leaving out the argument would probably cause stack corruption.
2019-02-01 20:30:39 -05:00
Augustin Cavalier
d545ad17ce headers/kernel: Define B_CURRENT_IMAGE_SYMBOL via __func__.
Previously, __haiku_init_before was a symbol that was included in
each (shared) object, and so it could be used to determine what
one we were in. Now, there are no such universal symbols that
are declared private to only the object, so we have to use
a different approach.

__func__ is defined as a const char* at the very beginning of
every function it's used in, set to a string of the function name
only, i.e., the arguments and return type are left off. So while
including that is perhaps not quite optimal, in practice this
definition is used extremely rarely (it was introduced by Haiku,
and it is used in only 2 applications at all that I could find --
WebKit and Canna.)

There really isn't any other way to get a pointer that we know
for certain is within the current object besides this one
without inserting one, but that really isn't merited just for this.
(__builtin_return_address() has problematic semantics wrt. inlining,
including linker-inlining.) So this will have to do.
2019-02-01 20:24:31 -05:00
Augustin Cavalier
475172337b headers/kernel: Move B_WAIT_TILL_LOADED to a syscall header.
It is only used as an argument to _kern_load_image directly, not to
any of the load_image functions in image.h, so it belongs in a syscall-
specific header like other such constants.

No functional change intended.
2019-02-01 19:45:56 -05:00
Augustin Cavalier
04b9fbfdfa headers/kernel: Clean up image.h.
* Add missing whitespace.
 * Remove definition of the now-gone __haiku_init_before.

No functional change intended.
2019-02-01 19:20:25 -05:00
Augustin Cavalier
4854630d29 BScrollView: Resize scrollbars dynamically based on target's B_SUPPORTS_LAYOUT...
...instead of the BScrollView itself's layout flag. Thanks to Adrien and
Kacper for discussion on the mailing list.
2019-01-27 14:35:32 -05:00
Adrien Destugues
1322d50732 HttpRequest: write whole request to socket
Better performance by using a single write, and some servers may not be
happy about getting so many TCP fragments for the HTTP header.

Change-Id: If7139e2a7748ea423d470676e70bd523a89031b2
Reviewed-on: https://review.haiku-os.org/c/909
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-27 07:55:55 +00:00
Augustin Cavalier
2502d45aca BTabView: Change layout constructor to default to B_WIDTH_FROM_WIDEST.
This seems to fit the "spirit of layout" better.

Change-Id: I7a75b58de4c9f703d828cdd292b7b91ee720c135
Reviewed-on: https://review.haiku-os.org/c/891
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-24 18:52:39 +00:00
Adrien Destugues
5f603da01a Better shape for submenu arrow
Just use BControLook where appropriate. It already provides a nice arrow
drawing function (also used in DeskBar expander and in scrollbar
buttons).

Fix second part of #8900

Changes by John Scipione:

Update menu mark and submenu arrow color with menu text color

Use text color for checkmark and submenu arrow colors, tint less black.
This means that colored bg/white text menu item will also draw a white
checkmark and submenu arrow.

Break out BMenuItem::Draw functionality into private methods _IsActive,
_LowColor() and _HighColor() methods and use them to set the mark colors.

Scale submenu arrow and checkmark with item height (which scales with
font size.)

does not align shortcuts with submenu arrows... but if you were to do
that you'd add item->Bounds().Height() / 2.

Signed-off-by: John Scipione <jscipione@gmail.com>

Change-Id: I8299094ef88bf227510b116eb1b84c261dc94723
Reviewed-on: https://review.haiku-os.org/c/341
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-01-14 15:59:57 +00:00
Barrett17
e7933432e9 BCodecRoster: Remove MakeFormatFor
* I want to introduce a new way for plugins to
register for a format. Supporting the old FormatManager is
too painful at this point and not worth the effort.
2018-12-28 23:01:02 +01:00
Barrett17
708de94fde MetaData: Add doxygen brief 2018-12-28 22:24:07 +01:00
Barrett17
e98351d3bc MetaData: Revert types to uint32 and define framerate as float
* Adds some missing methods signatures.
* integer vs float framerate is a longstanging debate. In theory,
in digital a/v there should not be need for floating point framerates.
This is because unless the software is run on exoteric hardware, there
is not need for it. Unfortunately, some legacy from the past like the
29.7 hz debate (NTSC) still may need to work under floating point framerates.
Even if in pratice it'd be run at 30 hz anyway.
* In theory, to handle all those correctly we should use a rational framerate,
however most code should be rewritten to support that correctly, and
it'd add some excessive complexities.
* All integer types are reverted back to unsigned ones. There's really
no reason to use signed integers there, and more importantly the danger
for integer underflows and the attached security concerns is very big.
2018-12-27 12:26:45 +01:00
Barrett17
30d69e3f5e BMetaData: Add missing stuff to describe a media format
* We will need those for BMediaFormatBuilder.
2018-12-26 12:34:44 +01:00
Augustin Cavalier
5dd66afb7d headers: Remove some extra semicolons.
Spotted by Clang.
2018-12-09 23:00:47 -05:00
Adrien Destugues
151343ebc8 BLooper: API to hijack existing thread.
I need this to use loopers in WebKit, which spawns threads and expects
to be able to turn them into event loops later on.

This is the pattern already used in BApplication, we may as well make it
available elsewhere.

Change-Id: I5939ca89d33cb3bcc92567b302c2038d976af598
Reviewed-on: https://review.haiku-os.org/735
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2018-12-02 21:36:31 +00:00
Barrett17
b6802a9530 MetaData: Remove support for uint32 keys
* We try to conform to what ffmpeg does, it is
unuseful to support metadata keys formats which
aren't really used anywhere.
* Add TODO with some infos for future improvements.
2018-12-01 12:30:54 +01:00
Barrett17
a57cf128a6 Codec Kit: Introduce declarative macro with version and name
* Namespaces protect symbols, I didn't consider that when adding
the BCodecKit namespace, so, the AddOnManager complained that
instantiate_plugin() was missing. A macro is introduced that allow
plugins to specify it's className, version and name, this ease
the declaration of the plugin symbols, otherwise the function
should have been declared inside the BCodecKit namespace which
we would like to avoid.
* The code is also more future proof, since in future the AddOn manager
can begin to check for plugin versions.
2018-12-01 11:19:12 +01:00
Barrett17
36f94d9e39 Move RawFormats.h to Codec Kit
* This should be probably uniformed with the future
media kit format defs. Not sure why those formats are
separated and used only by the codec kit. Eventually,
if needed can be changed to some name that differentiate
them better than media defs.
2018-11-29 08:06:34 +01:00
Barrett17
278d03da22 media_kit: Remove most private dependencies from codec_kit
* Move to BCodecKit namespace and make extensive use
of BCodecRoster.
* This is a first step in the right direction of
decreasing private dependencies. Some APIs are being
translated to the CodecKit. I am doing an investigation
on which APIs are really used among apps, so that the new
kit can be more slim and oriented toward easy development
and can be extended in the right direction instead to
continue maintaning unuseful code.
* BMediaFormats needs still a bit of love.
* General improvements in style and code maintainability.
2018-11-27 11:38:05 +01:00
Barrett17
fe9542fdb5 BCodecRoster: Add useful functionality from MediaFormats 2018-11-27 11:38:05 +01:00
Barrett17
d33bd9ec7b Codec Kit: Introduce BCodecKit namespace 2018-11-27 11:38:04 +01:00
Barrett17
f20ff4faec CodecRoster: Add GetDecoderInfo 2018-11-26 07:41:27 +01:00
Barrett17
1b96c34179 ChunkProvider/ChunkWriter: Move method to protected
* Remove inline destructor.
2018-11-25 14:07:46 +01:00
Barrett17
ee09c29148 Media Kit: Update private code 2018-11-25 13:02:02 +01:00
Barrett17
be805d02d7 Codec Kit: Rename classes to BFoo pattern 2018-11-25 13:02:02 +01:00
Barrett17
082e4ae4a7 Codec Kit: Rename files 2018-11-25 13:02:02 +01:00
Augustin Cavalier
ef593f61a2 ELF: Ignore PT_EH_FRAME and PT_STACK.
This allows Clang builds (linked with our cross binutils) to
at least start runtime_loader and then try to load launch_daemon.
That fails with an infinite loop somewhere...
2018-11-24 21:08:31 -05:00
Barrett17
44fc903a8f Codec Kit: Introduce BCodecRoster
* This class include almost everything you need to
manage codecs and iterate over them.
2018-11-22 17:41:26 +01:00
Barrett17
f5a452910a Codec Kit: Add some TODO for the future
* Little beauty fixes included.
2018-11-22 09:48:04 +01:00
Barrett17
06b088bd62 Streamer: Make constructor private 2018-11-22 09:47:12 +01:00
Barrett17
f40547016d Encoder: Make constructor private 2018-11-22 09:47:12 +01:00
Barrett17
c09a589891 Decoder: Make constructor protected 2018-11-22 09:47:12 +01:00
Barrett17
a741fb49a6 Writer: Make constructor and Init protected 2018-11-22 09:47:12 +01:00
Barrett17
75b5f33c19 Reader: Make constructor protected 2018-11-22 09:47:11 +01:00
Barrett17
af34e7abcc Codec Kit: Beauty fixes 2018-11-22 09:47:11 +01:00
Barrett17
608c9d9ae1 Codek Kit: Introduce BMetaData in Writer/MediaWriter
* Remove SetCopyright as well.
2018-11-21 17:22:58 +01:00
Barrett17
3e8f721b3b Codec Kit: Introduce BMetaData in Reader/Extractor
* Remove superfluous Copyright method.
2018-11-21 16:55:02 +01:00
Barrett17
9bbd53a288 BMetaData: Add missing functionality
* Add more metadata keys needed to support ffmpeg.
* Implement methods allowing to embed BMetaData into
BMetaData.
* Add methods to handle more types.
2018-11-21 16:51:19 +01:00
Barrett17
f722040584 BMetaData: Finalize implementation
* Use string keys. I am still convinced we need BValue.
* Use boolean instead of status_t in return, this is
much more handy in pratical use given that there's no
really a status to check.
2018-11-21 12:46:54 +01:00
Augustin Cavalier
2897df9676 bluetooth: ioctls always pass size on Haiku. 2018-11-18 14:42:09 -05:00
Barrett17
1f2ddf2fd0 Codec Kit: Initial BMetaData implementation 2018-11-18 16:57:12 +01:00