Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[python] Notify python code about double clicks #2447

Merged
1 commit merged into from

3 participants

@aglebov

Only single left button clicks are propagated to the python code at the moment. The commit lets the python side know about double clicks as well.

@bossanova808

Any chance of click and hold support for touch interfaces? I had to implement a very clunky volume up down button thing because it only registers one click event as far as I can tell.

@aglebov
@jimfcarroll
Collaborator

Ok. I just want @Montellese to review this when he's back next week (he reworked all of the mouse/gesture stuff for android). I hope you're ok with that.

Other than that, I'm fine with this.

@aglebov
@ghost

@Montellese tick, tock.

@ghost ghost merged commit 6df9936 into xbmc:master
@MartijnKaijser MartijnKaijser referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. @aglebov
This page is out of date. Refresh to see the latest.
View
1  xbmc/interfaces/legacy/Window.cpp
@@ -507,6 +507,7 @@ namespace XBMCAddon
void Window::onControl(Control* action) { TRACE; /* do nothing by default */ }
void Window::onClick(int controlId) { TRACE; /* do nothing by default */ }
+ void Window::onDoubleClick(int controlId) { TRACE; /* do nothing by default */ }
void Window::onFocus(int controlId) { TRACE; /* do nothing by default */ }
void Window::onInit() { TRACE; /* do nothing by default */ }
View
1  xbmc/interfaces/legacy/Window.h
@@ -170,6 +170,7 @@ namespace XBMCAddon
// into Python anyway. This must result in a problem when
virtual void onControl(Control* control);
virtual void onClick(int controlId);
+ virtual void onDoubleClick(int controlId);
virtual void onFocus(int controlId);
virtual void onInit();
View
12 xbmc/interfaces/legacy/WindowXML.cpp
@@ -381,6 +381,12 @@ namespace XBMCAddon
PulseActionEvent();
return true;
}
+ else if (controlClicked->IsContainer() && message.GetParam1() == ACTION_MOUSE_DOUBLE_CLICK)
+ {
+ invokeCallback(new CallbackFunction<WindowXML,int>(this,&WindowXML::onDoubleClick,iControl));
+ PulseActionEvent();
+ return true;
+ }
else if (controlClicked->IsContainer() && message.GetParam1() == ACTION_MOUSE_RIGHT_CLICK)
{
AddonClass::Ref<Action> inf(new Action(CAction(ACTION_CONTEXT_MENU)));
@@ -438,6 +444,12 @@ namespace XBMCAddon
return false;
}
+ bool WindowXML::OnDoubleClick(int iItem)
+ {
+ TRACE;
+ return false;
+ }
+
void WindowXML::GetContextButtons(int itemNumber, CContextButtons &buttons)
{
TRACE;
View
1  xbmc/interfaces/legacy/WindowXML.h
@@ -86,6 +86,7 @@ namespace XBMCAddon
SWIGHIDDENVIRTUAL void AllocResources(bool forceLoad = false);
SWIGHIDDENVIRTUAL void FreeResources(bool forceUnLoad = false);
SWIGHIDDENVIRTUAL bool OnClick(int iItem);
+ SWIGHIDDENVIRTUAL bool OnDoubleClick(int iItem);
SWIGHIDDENVIRTUAL void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
SWIGHIDDENVIRTUAL bool IsMediaWindow() const { TRACE; return true; };
Something went wrong with that request. Please try again.