Giter Club home page Giter Club logo

Comments (14)

ccoupe avatar ccoupe commented on August 11, 2024 2

Cheers, that was fast!

I like working on user requests that are interesting.

Currently, it's just treating touch like a second mouse with only one button. If your finger can fit on a scrollbar you might be able to drag it. Lot's of ifs, there. Providing a better mechanism is a little more complicated. I ordered a screen like yours and it should be here Friday. Lots of options for touch screens but I could tell that many of them could not work work with normal Gtk3 and Shoes. I also started a good test program - a rewrite of in Shoes. Reminds me why Shoes is fun.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

Hi @mashedkeyboard . As you've noted, Shoes doesn't know about touch devices or drag. There are api's in the underlying Gtk3 and Cocoa libraries and perhaps we can get something working in Shoes. Perhaps re-purposing the wheel method would work for your example? I don't have a touch device to test with - what are you using and which OS ?

from shoes3.

mashedkeyboard avatar mashedkeyboard commented on August 11, 2024

I'm using Linux (Raspbian) with a Raspberry Pi Touch display.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

Good - that's easier for me to work with than say a $2000 mac laptop. Which display? I might want one for my pi3. There aren't a lot of raspbian programs that use gtk3 (last I Iooked) - we need to know how gtk3 libs deal with that device starting with "Do they see it".

from shoes3.

mashedkeyboard avatar mashedkeyboard commented on August 11, 2024

It's the official Raspberry Pi touch display - nothing fancy :)

I'm not too familiar with GTK's inner workings - is there some debug output I could provide that would be useful?

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

Of course you want to try a web browser or two. There's boat load of stuff available if you set the right environment vars but don't do that - it's too hard, confusing and probably wont tell us what we want to know. I've got a Wacom tablet around here somewhere - not quite the same but maybe close enough for gtk3. Is there an applet or menu thing that you have to enable to use the touch screen? I could dig around the PI sites to learn but ...

I just installed a new SSD and a new version of Linux Mint so I'll be putting my system right for the next few days.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

This shows that Gtk3 and the RPI Touchscreen can work together. It also demonstrates why someone would prefer to use Shoes instead of Gtk3. This bit of documentation describes the general Gtk3 event handling. It might be as easy as just setting the GDK_TOUCH_MASK and the built in emulation will work. Sadly, the pi build is the one that has issues with my new mint19 host.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

@mashedkeyboard - I've got a beta for the pi with GDK_TOUCH_MASK enabled. Would you try it out with the touch screen and let me know what works and doesn't. Try the Manual->Furthermore->Sample->expert->curve-control-point and something that scrolls like Sample/simple/info and a click on the card in samples/good/cardflip.

Longer term, it might be pretty easy to create a 'touch' method like 'click' or 'motion'.

from shoes3.

mashedkeyboard avatar mashedkeyboard commented on August 11, 2024

Cheers, that was fast!

Conclusions:

  • curve-control-point works exactly as expected!
  • info doesn't scroll unless you use the scrollbar :(
  • cardflip works as expected - but just tapping worked previously (at least in my app).

I also checked Chromium, and that definitely supports scrolling on places other than the scrollbar.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

Now that my touch screen is working, I can see some other missing support in Shoes. The menus in Cobbler drop down but can't be selected. Odd. My kiosk rewrite works fine although it hasn't been tested as a full screen. My wacom Graphire tablet behaves as a mouse even when set in tablet mode.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

The good news is we can get touch events into Shoes. The raw events need to be passed to a new method 'touch' like 'motion', IFF there is a touch method declared by the script writer. samples/expert/curve-control point.rb doesn't work if we grab the events.

Looks like I'll want to implement GtkGestures on the GtkAltFixed container that Shoes uses. Not a place I like to play in, but we have to go where the bug is. @mashedkeyboard is asking for something like a drag or swipe gesture to be mapped to the current scrolling mechanism (assuming the widget or window is showing a scroll bar).

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

Another worthy place to look at. The 'gtk-3-examples' package installs an app 'gtk3-demo' which is really useful to see how the touch screen works - works well on my pi3. Note: they don't do menu selection either (gtk 3.24.5 - very new)

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

@mashedkeyboard , I've got another beta which can scroll the Shoes screen - in some situations but not all. It's an appimage so just download, chmod +x and run it from the cmdline - that requires a keyboard. It does not replace any shoes you might have installed.

from shoes3.

ccoupe avatar ccoupe commented on August 11, 2024

I'm going to close this issue. The latest beta works OK on the pi touch screen for the original problem. There are related problems/issues however. Gestures are not handled - I lack an OSX trackpad for one. The menu non-support is a known Gtk3 bug for all app's with a touch screen. Note, closing the issue doesn't mean the discussion can't continue.

from shoes3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.