Change to shared command constants
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include <List.h>
|
#include <List.h>
|
||||||
|
|
||||||
// Project Includes ------------------------------------------------------------
|
// Project Includes ------------------------------------------------------------
|
||||||
|
#include "InputServerTypes.h"
|
||||||
|
|
||||||
// Local Includes --------------------------------------------------------------
|
// Local Includes --------------------------------------------------------------
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ void PrintDevices()
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
BInputDevice *find_input_device(const char *name)
|
BInputDevice *find_input_device(const char *name)
|
||||||
{
|
{
|
||||||
BMessage command('Ifdv');
|
BMessage command(IS_FIND_DEVICES);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddString("device", name);
|
command.AddString("device", name);
|
||||||
@@ -104,7 +105,7 @@ status_t get_input_devices(BList *list)
|
|||||||
{
|
{
|
||||||
list->MakeEmpty();
|
list->MakeEmpty();
|
||||||
|
|
||||||
BMessage command('Ifdv');
|
BMessage command(IS_FIND_DEVICES);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
status_t err = _control_input_server_(&command, &reply);
|
status_t err = _control_input_server_(&command, &reply);
|
||||||
@@ -132,7 +133,7 @@ status_t get_input_devices(BList *list)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
status_t watch_input_devices(BMessenger target, bool start)
|
status_t watch_input_devices(BMessenger target, bool start)
|
||||||
{
|
{
|
||||||
BMessage command('Iwdv');
|
BMessage command(IS_WATCH_DEVICES);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddMessenger("target", target);
|
command.AddMessenger("target", target);
|
||||||
@@ -162,7 +163,7 @@ bool BInputDevice::IsRunning() const
|
|||||||
if (!fName)
|
if (!fName)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
BMessage command('Idvr');
|
BMessage command(IS_IS_DEVICE_RUNNING);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddString("device", fName);
|
command.AddString("device", fName);
|
||||||
@@ -175,7 +176,7 @@ status_t BInputDevice::Start()
|
|||||||
if (!fName)
|
if (!fName)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
BMessage command('Istd');
|
BMessage command(IS_START_DEVICE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddString("device", fName);
|
command.AddString("device", fName);
|
||||||
@@ -188,7 +189,7 @@ status_t BInputDevice::Stop()
|
|||||||
if (!fName)
|
if (!fName)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
BMessage command('Ispd');
|
BMessage command(IS_STOP_DEVICE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddString("device", fName);
|
command.AddString("device", fName);
|
||||||
@@ -201,7 +202,7 @@ status_t BInputDevice::Control(uint32 code, BMessage *message)
|
|||||||
if (!fName)
|
if (!fName)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
BMessage command('Icnd');
|
BMessage command(IS_CONTROL_DEVICES);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddString("device", fName);
|
command.AddString("device", fName);
|
||||||
@@ -220,7 +221,7 @@ status_t BInputDevice::Control(uint32 code, BMessage *message)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
status_t BInputDevice::Start(input_device_type type)
|
status_t BInputDevice::Start(input_device_type type)
|
||||||
{
|
{
|
||||||
BMessage command('Istd');
|
BMessage command(IS_START_DEVICE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddInt32("type", type);
|
command.AddInt32("type", type);
|
||||||
@@ -230,7 +231,7 @@ status_t BInputDevice::Start(input_device_type type)
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
status_t BInputDevice::Stop(input_device_type type)
|
status_t BInputDevice::Stop(input_device_type type)
|
||||||
{
|
{
|
||||||
BMessage command('Ispd');
|
BMessage command(IS_STOP_DEVICE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddInt32("type", type);
|
command.AddInt32("type", type);
|
||||||
@@ -241,7 +242,7 @@ status_t BInputDevice::Stop(input_device_type type)
|
|||||||
status_t BInputDevice::Control(input_device_type type, uint32 code,
|
status_t BInputDevice::Control(input_device_type type, uint32 code,
|
||||||
BMessage *message)
|
BMessage *message)
|
||||||
{
|
{
|
||||||
BMessage command('Icnd');
|
BMessage command(IS_CONTROL_DEVICES);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddInt32("type", type);
|
command.AddInt32("type", type);
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
// Private definitions not placed in public headers
|
// Private definitions not placed in public headers
|
||||||
extern "C" void _init_global_fonts();
|
extern "C" void _init_global_fonts();
|
||||||
extern "C" status_t _fini_interface_kit_();
|
extern "C" status_t _fini_interface_kit_();
|
||||||
|
|
||||||
|
#include "InputServerTypes.h"
|
||||||
extern status_t _control_input_server_(BMessage *command, BMessage *reply);
|
extern status_t _control_input_server_(BMessage *command, BMessage *reply);
|
||||||
|
|
||||||
using namespace BPrivate;
|
using namespace BPrivate;
|
||||||
@@ -106,7 +108,7 @@ set_scroll_bar_info(scroll_bar_info *info)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_mouse_type(int32 *type)
|
get_mouse_type(int32 *type)
|
||||||
{
|
{
|
||||||
BMessage command('Igmt');
|
BMessage command(IS_GET_MOUSE_TYPE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
@@ -121,7 +123,7 @@ get_mouse_type(int32 *type)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_mouse_type(int32 type)
|
set_mouse_type(int32 type)
|
||||||
{
|
{
|
||||||
BMessage command('Ismt');
|
BMessage command(IS_SET_MOUSE_TYPE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddInt32("mouse_type", type);
|
command.AddInt32("mouse_type", type);
|
||||||
@@ -132,7 +134,7 @@ set_mouse_type(int32 type)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_mouse_map(mouse_map *map)
|
get_mouse_map(mouse_map *map)
|
||||||
{
|
{
|
||||||
BMessage command('Igmm');
|
BMessage command(IS_GET_MOUSE_MAP);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
const void *data = 0;
|
const void *data = 0;
|
||||||
int32 count;
|
int32 count;
|
||||||
@@ -151,7 +153,7 @@ get_mouse_map(mouse_map *map)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_mouse_map(mouse_map *map)
|
set_mouse_map(mouse_map *map)
|
||||||
{
|
{
|
||||||
BMessage command('Ismm');
|
BMessage command(IS_SET_MOUSE_MAP);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddData("mousemap", B_ANY_TYPE, map, sizeof(mouse_map));
|
command.AddData("mousemap", B_ANY_TYPE, map, sizeof(mouse_map));
|
||||||
@@ -161,7 +163,7 @@ set_mouse_map(mouse_map *map)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_click_speed(bigtime_t *speed)
|
get_click_speed(bigtime_t *speed)
|
||||||
{
|
{
|
||||||
BMessage command('Igcs');
|
BMessage command(IS_GET_CLICK_SPEED);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
@@ -176,7 +178,7 @@ get_click_speed(bigtime_t *speed)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_click_speed(bigtime_t speed)
|
set_click_speed(bigtime_t speed)
|
||||||
{
|
{
|
||||||
BMessage command('Iscs');
|
BMessage command(IS_SET_CLICK_SPEED);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
command.AddInt64("speed", speed);
|
command.AddInt64("speed", speed);
|
||||||
return _control_input_server_(&command, &reply) == B_OK;
|
return _control_input_server_(&command, &reply) == B_OK;
|
||||||
@@ -186,7 +188,7 @@ set_click_speed(bigtime_t speed)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_mouse_speed(int32 *speed)
|
get_mouse_speed(int32 *speed)
|
||||||
{
|
{
|
||||||
BMessage command('Igms');
|
BMessage command(IS_GET_MOUSE_SPEED);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
@@ -201,7 +203,7 @@ get_mouse_speed(int32 *speed)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_mouse_speed(int32 speed)
|
set_mouse_speed(int32 speed)
|
||||||
{
|
{
|
||||||
BMessage command('Isms');
|
BMessage command(IS_SET_MOUSE_SPEED);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
command.AddInt32("speed", speed);
|
command.AddInt32("speed", speed);
|
||||||
return _control_input_server_(&command, &reply) == B_OK;
|
return _control_input_server_(&command, &reply) == B_OK;
|
||||||
@@ -211,7 +213,7 @@ set_mouse_speed(int32 speed)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_mouse_acceleration(int32 *speed)
|
get_mouse_acceleration(int32 *speed)
|
||||||
{
|
{
|
||||||
BMessage command('Igma');
|
BMessage command(IS_GET_MOUSE_ACCELERATION);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
@@ -226,7 +228,7 @@ get_mouse_acceleration(int32 *speed)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_mouse_acceleration(int32 speed)
|
set_mouse_acceleration(int32 speed)
|
||||||
{
|
{
|
||||||
BMessage command('Isma');
|
BMessage command(IS_SET_MOUSE_ACCELERATION);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
command.AddInt32("speed", speed);
|
command.AddInt32("speed", speed);
|
||||||
return _control_input_server_(&command, &reply) == B_OK;
|
return _control_input_server_(&command, &reply) == B_OK;
|
||||||
@@ -236,7 +238,7 @@ set_mouse_acceleration(int32 speed)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_key_repeat_rate(int32 *rate)
|
get_key_repeat_rate(int32 *rate)
|
||||||
{
|
{
|
||||||
BMessage command('Igrr');
|
BMessage command(IS_GET_KEY_REPEAT_RATE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
@@ -251,7 +253,7 @@ get_key_repeat_rate(int32 *rate)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_key_repeat_rate(int32 rate)
|
set_key_repeat_rate(int32 rate)
|
||||||
{
|
{
|
||||||
BMessage command('Isrr');
|
BMessage command(IS_SET_KEY_REPEAT_RATE);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
command.AddInt32("rate", rate);
|
command.AddInt32("rate", rate);
|
||||||
return _control_input_server_(&command, &reply) == B_OK;
|
return _control_input_server_(&command, &reply) == B_OK;
|
||||||
@@ -261,7 +263,7 @@ set_key_repeat_rate(int32 rate)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_key_repeat_delay(bigtime_t *delay)
|
get_key_repeat_delay(bigtime_t *delay)
|
||||||
{
|
{
|
||||||
BMessage command('Igrd');
|
BMessage command(IS_GET_KEY_REPEAT_DELAY);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
_control_input_server_(&command, &reply);
|
_control_input_server_(&command, &reply);
|
||||||
@@ -276,7 +278,7 @@ get_key_repeat_delay(bigtime_t *delay)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
set_key_repeat_delay(bigtime_t delay)
|
set_key_repeat_delay(bigtime_t delay)
|
||||||
{
|
{
|
||||||
BMessage command('Isrd');
|
BMessage command(IS_SET_KEY_REPEAT_DELAY);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
command.AddInt64("delay", delay);
|
command.AddInt64("delay", delay);
|
||||||
return _control_input_server_(&command, &reply) == B_OK;
|
return _control_input_server_(&command, &reply) == B_OK;
|
||||||
@@ -286,7 +288,7 @@ set_key_repeat_delay(bigtime_t delay)
|
|||||||
_IMPEXP_BE uint32
|
_IMPEXP_BE uint32
|
||||||
modifiers()
|
modifiers()
|
||||||
{
|
{
|
||||||
BMessage command('Igmd');
|
BMessage command(IS_GET_MODIFIERS);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
int32 err, modifier;
|
int32 err, modifier;
|
||||||
|
|
||||||
@@ -305,7 +307,7 @@ modifiers()
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_key_info(key_info *info)
|
get_key_info(key_info *info)
|
||||||
{
|
{
|
||||||
BMessage command('Igki');
|
BMessage command(IS_GET_KEY_INFO);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
const void *data = 0;
|
const void *data = 0;
|
||||||
int32 count, err;
|
int32 count, err;
|
||||||
@@ -326,7 +328,7 @@ get_key_info(key_info *info)
|
|||||||
_IMPEXP_BE void
|
_IMPEXP_BE void
|
||||||
get_key_map(key_map **map, char **key_buffer)
|
get_key_map(key_map **map, char **key_buffer)
|
||||||
{
|
{
|
||||||
BMessage command('Igkm');
|
BMessage command(IS_GET_KEY_MAP);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
int32 map_count, key_count;
|
int32 map_count, key_count;
|
||||||
const void *map_array = 0, *key_array = 0;
|
const void *map_array = 0, *key_array = 0;
|
||||||
@@ -355,7 +357,7 @@ get_key_map(key_map **map, char **key_buffer)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
get_keyboard_id(uint16 *id)
|
get_keyboard_id(uint16 *id)
|
||||||
{
|
{
|
||||||
BMessage command('Igid');
|
BMessage command(IS_GET_KEYBOARD_ID);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
uint16 kid;
|
uint16 kid;
|
||||||
|
|
||||||
@@ -371,7 +373,7 @@ get_keyboard_id(uint16 *id)
|
|||||||
_IMPEXP_BE void
|
_IMPEXP_BE void
|
||||||
set_modifier_key(uint32 modifier, uint32 key)
|
set_modifier_key(uint32 modifier, uint32 key)
|
||||||
{
|
{
|
||||||
BMessage command('Ismk');
|
BMessage command(IS_SET_MODIFIER_KEY);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddInt32("modifier", modifier);
|
command.AddInt32("modifier", modifier);
|
||||||
@@ -383,7 +385,7 @@ set_modifier_key(uint32 modifier, uint32 key)
|
|||||||
_IMPEXP_BE void
|
_IMPEXP_BE void
|
||||||
set_keyboard_locks(uint32 modifiers)
|
set_keyboard_locks(uint32 modifiers)
|
||||||
{
|
{
|
||||||
BMessage command('Iskl');
|
BMessage command(IS_SET_KEYBOARD_LOCKS);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
command.AddInt32("locks", modifiers);
|
command.AddInt32("locks", modifiers);
|
||||||
@@ -639,7 +641,7 @@ void __set_window_decor(int32 theme)
|
|||||||
_IMPEXP_BE status_t
|
_IMPEXP_BE status_t
|
||||||
_restore_key_map_()
|
_restore_key_map_()
|
||||||
{
|
{
|
||||||
BMessage message('Iskm');
|
BMessage message(IS_RESTORE_KEY_MAP);
|
||||||
BMessage reply;
|
BMessage reply;
|
||||||
|
|
||||||
return _control_input_server_(&message, &reply);
|
return _control_input_server_(&message, &reply);
|
||||||
|
|||||||
Reference in New Issue
Block a user