3
* @brief internal Geis Input Device module private interface
5
* Copyright 2010 Canonical Ltd.
7
* This library is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU Lesser General Public License as published by the Free
9
* Software Foundation; either version 3 of the License, or (at your option) any
12
* This library is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program; if not, write to the Free Software Foundation, Inc.,
19
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef GEIS_DEVICE_H_
22
#define GEIS_DEVICE_H_
24
#include "geis/geis.h"
27
* @defgroup geis_device_container A Device Container
32
* An unsorted container for holding devices.
34
typedef struct _GeisDeviceBag *GeisDeviceBag;
37
* Creates a new device bag,
39
GeisDeviceBag geis_device_bag_new();
42
* Destroys a device bag.
44
* @param[in] bag The device bag,
46
void geis_device_bag_delete(GeisDeviceBag bag);
49
* Gets the number of devices in the bag.
51
* @param[in] bag The device bag,
53
GeisSize geis_device_bag_count(GeisDeviceBag bag);
56
* Gets an indicated device from a bag.
58
* @param[in] bag The device bag.
59
* @param[in] index The index.
61
GeisDevice geis_device_bag_device(GeisDeviceBag bag, GeisSize index);
64
* Inserts a device in the bag.
66
* @param[in] bag The device bag.
67
* @param[in] device The device to insert.
69
GeisStatus geis_device_bag_insert(GeisDeviceBag bag, GeisDevice device);
72
* Remoes a device from the bag.
74
* @param[in] bag The device bag.
75
* @param[in] device The device to remove.
77
GeisStatus geis_device_bag_remove(GeisDeviceBag bag, GeisDevice device);
82
* @defgroup geis_device Internal Device Functions
87
* Creates a new device.
89
* @param[in] name A system-specific device name.
90
* @param[in] id A system-specific device identifier.
92
GeisDevice geis_device_new(GeisString name, GeisInteger id);
95
* Inserts an attr into a device.
97
* @param[in] device A device.
98
* @param[in] attr An attr.
100
void geis_device_add_attr(GeisDevice device, GeisAttr attr);
104
#endif /* GEIS_DEVICE_H_ */