Lines Matching defs:device

10 #include "device-manager.h"
44 static bool isValidDevice(Glib::RefPtr<Gdk::Device> device)
48 const bool name_matches = (device->get_name() == (*it).name);
49 const bool source_matches = (device->get_source() == (*it).source);
50 const bool mode_matches = (device->get_mode() == (*it).mode);
51 const bool num_axes_matches = (device->get_n_axes() == (*it).num_axes);
53 const bool num_keys_matches = (device->get_n_keys() == (*it).num_keys);
55 const bool num_keys_matches = (gdk_device_get_n_keys(device->gobj()) == (*it).num_keys);
171 InputDeviceImpl(Glib::RefPtr<Gdk::Device> device, std::set<Glib::ustring> &knownIDs);
177 virtual Gdk::InputMode getMode() const {return (device->get_mode());}
178 virtual gint getNumAxes() const {return device->get_n_axes();}
179 virtual bool hasCursor() const {return device->get_has_cursor();}
182 virtual int getNumKeys() const {return device->get_n_keys();}
184 virtual int getNumKeys() const {return gdk_device_get_n_keys(device->gobj());}
195 virtual Glib::RefPtr<Gdk::Device> getDevice() {return device;}
203 Glib::RefPtr<Gdk::Device> device;
230 InputDeviceImpl::InputDeviceImpl(Glib::RefPtr<Gdk::Device> device, std::set<Glib::ustring> &knownIDs)
232 device(device),
234 name(!device->get_name().empty() ? device->get_name() : ""),
235 source(device->get_source()),
352 g_message("device: name[%s] source[0x%x] mode[0x%x] cursor[%s] axis count[%d] key count[%d]", dev->name, dev->source, dev->mode,
356 InputDeviceImpl* device = new InputDeviceImpl(*dev, knownIDs);
357 device->reference();
358 devices.push_back(Glib::RefPtr<InputDeviceImpl>(device));
429 Glib::RefPtr<Gdk::Device> device = (*it)->getDevice();
430 tmp += getAxisToString()[device->get_axis_use(i)];
439 Glib::RefPtr<Gdk::Device> device = (*it)->getDevice();
442 device->get_key(i, keyval, modifiers);
464 Glib::RefPtr<Gdk::Device> device = (*it)->getDevice();
465 if (isValidDevice(device) && ((*it)->getMode() != mode) ) {
466 bool success = device->set_mode(mode);
470 g_warning("Unable to set mode on extended input device [%s]", (*it)->getId().c_str());
482 Glib::RefPtr<Gdk::Device> device = (*it)->getDevice();
484 if (device->get_axis_use(index) != use) {
485 device->set_axis_use(index, use);
489 g_warning("Invalid device axis number %d on extended input device [%s]", index, (*it)->getId().c_str());
497 //static void setDeviceKey( GdkDevice* device, guint index, guint keyval, GdkModifierType modifiers )
503 Glib::RefPtr<Gdk::Device> device = (*it)->getDevice();
504 device->set_key(index, keyval, mods);
679 // Set iterator to point at beginning of device list
682 // Skip past any items in the device list that are not mice
688 Glib::RefPtr<Gdk::Device> device = *dev;
689 fakeList[4].name = device->get_name();
690 fakeList[4].source = device->get_source();
691 fakeList[4].mode = device->get_mode();
692 fakeList[4].has_cursor = device->get_has_cursor();
693 fakeList[4].num_axes = device->get_n_axes();
695 fakeList[4].num_keys = device->get_n_keys();
697 fakeList[4].num_keys = gdk_device_get_n_keys(device->gobj());