* Removed unnecessary defines.

* Removed COMPILE_FOR_R5 support.
* No need for the distribution files any longer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34510 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-12-05 15:04:43 +00:00
parent 125a95f1ef
commit f0f0a2d136
5 changed files with 22 additions and 178 deletions
-7
View File
@@ -2,10 +2,6 @@ SubDir HAIKU_TOP src servers input ;
SetSubDirSupportedPlatformsBeOSCompatible ;
if $(COMPILE_FOR_R5) {
SubDirC++Flags -DCOMPILE_FOR_R5 ;
}
rule MkKeymapHeader {
local binary = $(1) ;
local source = $(2) ;
@@ -32,10 +28,7 @@ AddResources input_server : input_server.rdef ;
UsePrivateHeaders app input interface shared storage ;
UsePrivateSystemHeaders ;
SubDirC++Flags -DADD_ON_STABLE_SECONDS=1 ; # for AddOnMonitorHandler.cpp
if $(TARGET_PLATFORM) != haiku {
SubDirC++Flags -DCOMPILE_FOR_R5 ;
#APPSERVER_TEST_MODE = 1 ;
if $(APPSERVER_TEST_MODE) {
SubDirC++Flags -DAPPSERVER_TEST_MODE ;
-12
View File
@@ -1,12 +0,0 @@
Copyright (c) 2001-2004, Haiku, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
•Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
•Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
•Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+22 -51
View File
@@ -1,19 +1,12 @@
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
//
// Copyright (c) 2004, Haiku
//
// This software is part of the Haiku distribution and is covered
// by the Haiku license.
//
//
// File: MouseSettings.h
// Authors: Jérôme Duval,
// Andrew McCall ([email protected]),
// Axel Dörfler ([email protected])
// Description: Input Server
// Created: August 29, 2004
//
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
/*
* Copyright 2004-2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jérôme Duval
* Andrew McCall ([email protected])
* Axel Dörfler, [email protected]
*/
#include "MouseSettings.h"
@@ -56,7 +49,7 @@ MouseSettings::~MouseSettings()
}
status_t
status_t
MouseSettings::GetSettingsPath(BPath &path)
{
status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path);
@@ -68,7 +61,7 @@ MouseSettings::GetSettingsPath(BPath &path)
}
void
void
MouseSettings::RetrieveSettings()
{
// retrieve current values
@@ -76,7 +69,7 @@ MouseSettings::RetrieveSettings()
fMode = mouse_mode();
fAcceptFirstClick = accept_first_click();
Defaults();
// also try to load the window position from disk
BPath path;
@@ -87,24 +80,10 @@ MouseSettings::RetrieveSettings()
if (file.InitCheck() < B_OK)
return;
#ifdef COMPILE_FOR_R5
// we have to do this because mouse_map counts 16 buttons in OBOS
if ((file.Read(&fSettings.type, sizeof(int32)) != sizeof(int32))
|| (file.Read(&fSettings.map, sizeof(int32) * 3) != sizeof(int32) * 3)
|| (file.Read(&fSettings.accel, sizeof(mouse_accel))
!= sizeof(mouse_accel))
|| (file.Read(&fSettings.click_speed, sizeof(bigtime_t))
.282
!= sizeof(bigtime_t))) {
Defaults();
}
#else
if (file.ReadAt(0, &fSettings, sizeof(mouse_settings))
!= sizeof(mouse_settings)) {
!= sizeof(mouse_settings)) {
Defaults();
}
#endif
if ((fSettings.click_speed == 0)
|| (fSettings.type == 0)) {
@@ -113,13 +92,13 @@ MouseSettings::RetrieveSettings()
}
status_t
status_t
MouseSettings::SaveSettings()
{
#ifdef DEBUG
Dump();
#endif
BPath path;
status_t status = GetSettingsPath(path);
if (status < B_OK)
@@ -129,15 +108,7 @@ MouseSettings::SaveSettings()
if (status < B_OK)
return status;
// we have to do this because mouse_map counts 16 buttons in OBOS
#ifdef COMPILE_FOR_R5
file.Write(&fSettings.type, sizeof(fSettings.type));
file.Write(&fSettings.map, 3*sizeof(int32));
file.Write(&fSettings.accel, sizeof(fSettings.accel));
file.Write(&fSettings.click_speed, sizeof(fSettings.click_speed));
#else
file.Write(&fSettings, sizeof(fSettings));
#endif
// who is responsible for saving the mouse mode and accept_first_click?
@@ -220,7 +191,7 @@ MouseSettings::SetMouseType(int32 type)
}
bigtime_t
bigtime_t
MouseSettings::ClickSpeed() const
{
return fSettings.click_speed;
@@ -255,14 +226,14 @@ MouseSettings::Mapping(int32 index) const
}
void
void
MouseSettings::Mapping(mouse_map &map) const
{
map = fSettings.map;
}
void
void
MouseSettings::SetMapping(int32 index, uint32 button)
{
fSettings.map.button[index] = button;
@@ -276,7 +247,7 @@ MouseSettings::SetMapping(mouse_map &map)
}
void
void
MouseSettings::SetMouseMode(mode_mouse mode)
{
fMode = mode;
@@ -286,14 +257,14 @@ MouseSettings::SetMouseMode(mode_mouse mode)
void
MouseSettings::SetFocusFollowsMouseMode(mode_focus_follows_mouse mode)
{
fFocusFollowsMouseMode = mode;
fFocusFollowsMouseMode = mode;
}
void
void
MouseSettings::SetAcceptFirstClick(bool acceptFirstClick)
{
fAcceptFirstClick = acceptFirstClick;
fAcceptFirstClick = acceptFirstClick;
}
-68
View File
@@ -1,68 +0,0 @@
Haiku Input Kit Replacement v1.0.0
ABOUT:
This is a drop-in replacement for the BeOS Input server that comes with
BeOS. Its purpose is to be 100% compatible with the original input_server
and to improve it by adding features. The package contains the following
files:
README
The file you are reading.
LICENSE
Conditions for using/distributing this package.
input_server
This is the new replacement Input Server. It will be installed in
/boot/beos/system/servers, overwriting the original input_server file.
Addons
Addons are typically needed to control input devices, and will be installed in
/boot/home/config/add-ons/input_server
Drivers
Drivers are the kernel components which know your special devices, and will be
installed in /boot/home/config/add-ons/kernel/drivers/bin
Keymaps
Keymaps are used to map characters to keycodes generated by your keyboard. They
will be installed in /boot/home/config/settings/Keymap
INSTALLATION:
Installation is through a zip file. Just unzip the
file somewhere and double click the install.sh icon.
ADDON INSTALLATION:
Add-ons should be installed in /boot/home/config/add-ons/
input_server/ in the subdirectory specified in the add on documentation.
This directory will be automatically created by the installation process.
The distribution contains the keyboard and mouse device addons.
FILTERS:
This release contains no filter addons.
KEYMAPS:
These release contains a set of keymaps. The Keymap preference app enables to
select one of these keymaps in the User listbox.
IMPLEMENTATION:
The latest version has the following (interesting) features:
- Add-on based architeture.
- Fully multithreaded.
TODO:
This is a partial list of what we intend to implement. Suggestions are welcome:
- More...
OTHER STUFF
Thanks to Dr. Zoidberg Enterprises for their README file :)
-40
View File
@@ -1,40 +0,0 @@
#!/bin/sh
base=`dirname "$0"`
cd "$base"
RETURN=`alert "There can only be ONE version of input_server on the system at one time (see the enclosed README file for why).
Choose 'Backup' if you wish to keep your old input_server, Keymap preferences app, Keyboard preferences app, Mouse preferences app, keymap app and this is the first time you're installing the InputKit Replacement. Otherwise, you should choose 'Purge' to clear the other versions from your system." "Purge" "Backup" "Abort - Don't do anything!"`
if [[ $RETURN = Purge ]]
then
# note: we don't remove libmail.so, because it doesn't matter here, and there may be symlinks and things
query -a 'BEOS:APP_SIG == "application/x-vnd.Be-input_server"' | grep /boot/beos | xargs rm -f
elif [[ $RETURN = Backup ]]
then
query -a 'BEOS:APP_SIG == "application/x-vnd.Be-input_server"' | grep /boot/beos | xargs zip -ym /boot/home/inputkit.zip
else
alert "No backup will be done. That means it's up to YOU to purge all of your old input_server and ensure that the new version is the only version."
exit -1
fi
if [ -n "$TTY" ]
then
unzip -d / install.zip
else
response=`alert "Would you like to automatically overwrite existing files, or receive a prompt?" "Overwrite" "Prompt"`
if [ $response == "Overwrite" ]
then
unzip -od / install.zip
alert "Finished installing" "Thanks"
else
if [ -e /boot/beos/apps/Terminal ]
then
terminal=/boot/beos/apps/Terminal
else
terminal=`query Terminal | head -1`
fi
$terminal -t "installer" /bin/sh "$0"
fi
fi