Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fruxo upstream merge #6

Closed
wants to merge 28 commits into from
Closed

Fruxo upstream merge #6

wants to merge 28 commits into from

Conversation

Zomtir
Copy link

@Zomtir Zomtir commented Mar 28, 2019

This is a full merge of current fruxo/master.

The multi touch API and code has changed, here's a list of what has been taken from each branch:

  • Turbodager: Invoke and event syntax (e.g EVENT_TYPE_TOUCH_* rather than EVENT_TYPE_FINGER )
  • Turbodager: Finger ID handling
  • Hastybadger: Touch Gesture (aka MultiGesture)
  • Hastybadger: Triggering Pointer and Touch events at the same time on touch (with touch boolean) rather than forwarding from Touch->Pointer for a single finger.

Each commit has been tested with "make sdl2" and an execution of the demo.

@Zomtir Zomtir changed the title Unity Fruxo upstream merge Apr 4, 2019
@Zomtir
Copy link
Author

Zomtir commented Apr 4, 2019

The touch API is not yet suited for touchpads because their movement cannot be mapped 1:1 onto the screen. I will have to change it to make touch input independent from the pointer location again.

@Zomtir Zomtir force-pushed the unity branch 2 times, most recently from 243ed00 to ba30f59 Compare April 8, 2019 14:09
codecat and others added 26 commits April 8, 2019 17:23
Conflicts:
	src/tb/tb_editfield.cpp
	src/tb/tb_style_edit.cpp
	src/tb/tb_style_edit.h
	src/tb/tb_style_edit_content.cpp
	src/tb/tb_style_edit_content.h
Conflicts:
	src/tb/tb_style_edit.cpp
	src/tb/tb_style_edit.h
	src/tb/tb_style_edit_content.cpp
	src/tb/tb_style_edit_content.h
Conflicts:
	src/tb/tb_style_edit.h
Conflicts:
	src/tb/tb_widgets_reader.cpp
Conflicts:
	Demo/platform/port_glfw.cpp
Added missing GetNumItems and decrement count
when items are removed.

Conflicts:
	src/tb/tb_hashtable.h
Opt-in support for multi touch. Widgets will still only respond to
pointer/first touch events, but new API makes it possible to implement
multi touch widgets (such as action buttons, pan/zoom containers etc).

Conflicts:
	src/tb/tb_widgets.h
Conflicts:
	src/tb/tb_widgets_reader.h
Not sure about c++11 policy... but fixing this would be cool, it fills all my compile logs.
Conflicts:
	image/tb_image_manager.h
	image/tb_image_manager.cpp
this allows application to test parsing before replacing existing ui
Don't call GetHashId twice.
Avoid remeasuring strings during painting.

Conflicts:
	src/tb/tb_widgets_common.cpp
	src/tb/tb_widgets_common.h
Makes painting faster when text is selected or styled.

Will also make Reformat(false) faster (f.ex resizing a text field).

Conflicts:
	src/tb/tb_style_edit.h
	src/tb/tb_style_edit.cpp
Conflicts:
	src/tb/tb_color.h
Round integer conversions and removed nonzero guarantee for values
that where not zero before conversion.

Unknown/mistyped unit is treated like dp instead of px.

Conflicts:
	src/tb/tb_dimension.cpp
	src/tb/tb_dimension.h
@Xeverous
Copy link

Just a note: this repo has not enabled issues. It's virtually impossible to propose anything to the repo while the readme encourages doing so.

Commenting here (most recent PR) ... because I can not open an issue.

@tesch1
Copy link
Owner

tesch1 commented Jul 22, 2019

Thanks for the note, they're enabled now.

@tesch1
Copy link
Owner

tesch1 commented Jul 22, 2019

A note for outside observers - this PR is in limbo -- it contains a lot of changes and it's hard to test them all. I see a few different things going on here 1) merging the fruxo/turbobadger mainline, 2) switching to a different(new) multi-touch / gesture model, 3) ?

I haven't had time to review all of these things, and some of them are changes to APIs that are in use elsewhere, so I wouldn't count on this being merged as-is.

@Zomtir
Copy link
Author

Zomtir commented Jul 22, 2019

  1. switching to a different(new) multi-touch / gesture model

I'm trying so summarize the changes in ff533f4 and 0828da2

There were five trivial changes:

  • FINGER_DOWN was renamed to TOUCH_DOWN (leaning on the upstream syntax by fruxo)
  • Integer type change from uint32 to uint32_t
  • Moved the InvokeWheel function
  • Renamed NewTouchInfo to AddTouchInfo (this function is only used privately)
  • Make use of IsTouchEvent() rather than testing for the cases individually
  • Eearlier bails (returns false) for missing widgets. They no longer reach the end of the function and use less indention.

The remaining changes boil down to those three:

  • The attributes from TBWidgetEventFinger were merged into TBWidgetEvent. The vast majority already had a corresponding counterpart. The only complete new attributes added to TBWidgetEvent were delta_theta and delta_dist.
  • The constructors from TBWidgetEventFinger were added to TBWidgetEvent
  • Renamed InvokeFingerMotion to InvokeTouchGesture. The only difference in the body consits of the TBWidgetEvent trigger rather than the superseded TBWidgetEventFinger.

All in all it's a very lightweight addition of a InvokeTouchGesture() method compared to the fruxo master branch.

  1. ?

There were no additional changes beside the two commits mentioned above. All other commits (authored on fruxo master) can be compiled by their own and have only be minorly adapted to the current code base (~90% uint32 to uint32_t).

I hope this helps for the review.

@tesch1 tesch1 closed this Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants