Recent

Author Topic: Touch Screen Gestures in LCL?  (Read 6302 times)

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Touch Screen Gestures in LCL?
« on: December 24, 2014, 03:30:38 pm »
In another thread I was told that LCL does not support touch screen gestures. I just wonder if someone is working on implementing that functionality? Google gave e no answer.
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Touch Screen Gestures in LCL?
« Reply #1 on: December 24, 2014, 07:55:59 pm »
I'm searching for solution, found this one, but no luck (don't work on Win8 tablet). I have Delphi XE but touch support for listbox etc. don't work well (as expected).
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Touch Screen Gestures in LCL?
« Reply #2 on: December 24, 2014, 08:04:45 pm »
Recommended Reading

hmm.. I guess more complicated part is to debug/simulate touches. StackOverlflow. Typical MS approach.Visual Studio
« Last Edit: December 24, 2014, 08:18:51 pm by skalogryz »

CM630

  • Hero Member
  • *****
  • Posts: 1091
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Touch Screen Gestures in LCL?
« Reply #3 on: December 25, 2014, 08:39:17 pm »
So I conclude that there is no work on gesture implementation in LCL.
Your links point to Win only solutions, so I suppose a separate r solution shall be used for each single OS.
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

StefanC

  • Newbie
  • Posts: 1
Re: Touch Screen Gestures in LCL?
« Reply #4 on: March 06, 2015, 08:46:28 am »
Unfortunately, under Windows, messages not known to the current implementation are not forwarded to the application windows, so you can't process wm_touch or wm_gesture messages by a message handler unless you first add these messages to WindowProc in win32callback.inc, such as I have done here, at the end of the list:
Code: [Select]
   
    WM_IME_COMPOSITION,
    WM_IME_COMPOSITIONFULL,
    WM_IME_CONTROL,
    //WM_IME_ENDCOMPOSITION,
    WM_IME_NOTIFY,
    WM_IME_REQUEST,
    WM_IME_SELECT,
    WM_IME_SETCONTEXT,
    WM_IME_STARTCOMPOSITION,
    $0240, // = WM_TOUCH
    $0119 // = WM_GESTURE
    :
    begin
      LMessage.Msg := Msg;
      LMessage.WParam := WParam;
      LMessage.LParam := LParam;
      WinProcess := False;
    end;
A full implementation, of course, would rather implement them to fire OnTouch and OnGesture events.
« Last Edit: March 06, 2015, 08:56:25 am by StefanC »

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Touch Screen Gestures in LCL?
« Reply #5 on: March 06, 2015, 10:52:57 am »
We should implement it for lazarus 1.6. Gtk3, Qt, Win32 and probably cocoa supports gestures.

 

TinyPortal © 2005-2018