This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improved focus handling * Added focus change events when clicked outside a widget * Check if motion event is in pressed state * Hanlding of clicking on the env. Better handling of focus in listview.
- Loading branch information
1 parent
93ece9d
commit 0ad0545
Showing
19 changed files
with
277 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 19 additions & 13 deletions
32
app/src/common/shared/org/mozilla/vrbrowser/WidgetManagerDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
package org.mozilla.vrbrowser; | ||
|
||
import android.support.annotation.Nullable; | ||
import android.support.annotation.NonNull; | ||
import android.view.View; | ||
|
||
public interface WidgetManagerDelegate { | ||
interface Listener { | ||
interface UpdateListener { | ||
void onWidgetUpdate(Widget aWidget); | ||
} | ||
interface PermissionListener { | ||
void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults); | ||
} | ||
interface FocusChangeListener { | ||
void onGlobalFocusChanged(View oldFocus, View newFocus); | ||
} | ||
int newWidgetHandle(); | ||
void addWidget(Widget aWidget); | ||
void updateWidget(Widget aWidget); | ||
void removeWidget(Widget aWidget); | ||
void startWidgetResize(Widget aWidget); | ||
void finishWidgetResize(Widget aWidget); | ||
void addListener(WidgetManagerDelegate.Listener aListener); | ||
void removeListener(WidgetManagerDelegate.Listener aListener); | ||
void pushBackHandler(Runnable aRunnable); | ||
void popBackHandler(Runnable aRunnable); | ||
void addWidget(@NonNull Widget aWidget); | ||
void updateWidget(@NonNull Widget aWidget); | ||
void removeWidget(@NonNull Widget aWidget); | ||
void startWidgetResize(@NonNull Widget aWidget); | ||
void finishWidgetResize(@NonNull Widget aWidget); | ||
void addUpdateListener(@NonNull UpdateListener aUpdateListener); | ||
void removeUpdateListener(@NonNull UpdateListener aUpdateListener); | ||
void pushBackHandler(@NonNull Runnable aRunnable); | ||
void popBackHandler(@NonNull Runnable aRunnable); | ||
void fadeOutWorld(); | ||
void fadeInWorld(); | ||
void setTrayVisible(boolean visible); | ||
void setBrowserSize(float targetWidth, float targetHeight); | ||
void keyboardDismissed(); | ||
void updateEnvironment(); | ||
void updatePointerColor(); | ||
void addPermissionListener(PermissionListener aListener); | ||
void removePermissionListener(PermissionListener aListener); | ||
void addPermissionListener(@NonNull PermissionListener aListener); | ||
void removePermissionListener(@NonNull PermissionListener aListener); | ||
void addFocusChangeListener(@NonNull FocusChangeListener aListener); | ||
void removeFocusChangeListener(@NonNull FocusChangeListener aListener); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.