Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 无法识别gtkmm多点触摸设备(Windows)_C++_Windows_Gtk_Gtkmm_Gdk - Fatal编程技术网

C++ 无法识别gtkmm多点触摸设备(Windows)

C++ 无法识别gtkmm多点触摸设备(Windows),c++,windows,gtk,gtkmm,gdk,C++,Windows,Gtk,Gtkmm,Gdk,版本:Gtkmm v3.22(通过vcpkg安装) 我插入了一个使用标准Windows驱动程序“HID兼容触摸屏”的多点触摸设备 我已经验证了本机Windows WM_TOUCH能够使用此触摸屏进行多点触摸数字化: 我创建了一个基本的gtkmm应用程序,在运行应用程序之前,我在parent\u窗口()上调用了set\u support\u multidevice() 但是,当我将Gtk::Button的信号\u touch\u event() 然后,为了验证连接了哪些设备,我编写了以下代码:

版本:Gtkmm v3.22(通过vcpkg安装)

我插入了一个使用标准Windows驱动程序“HID兼容触摸屏”的多点触摸设备

我已经验证了本机Windows WM_TOUCH能够使用此触摸屏进行多点触摸数字化:

我创建了一个基本的gtkmm应用程序,在运行应用程序之前,我在
parent\u窗口()上调用了
set\u support\u multidevice()

但是,当我将Gtk::Button的
信号\u touch\u event()

然后,为了验证连接了哪些设备,我编写了以下代码:

    // Get the device manager from the Gdk::Display object
    Glib::RefPtr<Gdk::DeviceManager> dev_manager = parent_display->get_device_manager();

    // Get device list from the device manager for type "floating"
    std::vector<Glib::RefPtr<Gdk::Device>> devices = 
      dev_manager->list_devices(Gdk::DEVICE_TYPE_FLOATING);

    for (int i = 0; i < devices.size(); i++) {
        std::cout << "Device found: " << devices[i]->property_name() << std::endl;
    }

    // Get devices for type "master"
    devices = dev_manager->list_devices(Gdk::DEVICE_TYPE_MASTER);
    for (int i = 0; i < devices.size(); i++) {
        std::cout << "Device found: " << devices[i]->property_name() << std::endl;
    }

    // Get devices for type "slave"
    devices = dev_manager->list_devices(Gdk::DEVICE_TYPE_SLAVE);
    for (int i = 0; i < devices.size(); i++) {
        std::cout << "Device found: " << devices[i]->property_name() << std::endl;
    }

    // At this point we should have printed all devices associated with the Gdk::DeviceManager that's 
    // attached to the current display
要让设备管理器识别能够进行多点触摸的从属设备,我必须做些什么


我的多点触控设备被视为系统聚合指针,我无法处理典型的触控事件-仅处理“鼠标式”事件。

如果您可以隔离设备,您可能可以使用该设备并将其设置为主控,这将允许它处理所有类型的事件。您可能还想使用gdk_device_get_mode()来确认gdk是否以不同的方式对待设备。

我的问题是,使用设备管理器可以找到的唯一设备是系统聚合键盘和系统聚合指针。我甚至找不到多点触摸设备。抱歉,奥斯汀,我对这个设备不太了解,你能告诉我这个设备的名称和规格吗?这样我可以进一步研究它。
Device found: Virtual Core Keyboard
Device found: Virtual Core Pointer
Device found: System Aggregated Keyboard
Device found: System Aggregated Pointer