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
NSWindow *topmostAppWindowAtPoint(CGPoint screenPoint) | |
{ | |
const CGWindowLevel kScreensaverWindowLevel = CGWindowLevelForKey(kCGScreenSaverWindowLevelKey); | |
/* This function returns a pointer to the app's topmost NSWindow that | |
the point `screenPoint` is over. The important distinction here is that | |
this function takes _all_ system windows into consideration and will return | |
`nil` if there is a system window (or NSMenu etc.) that the cursor | |
is over which is atop the app window, which is information that | |
can't otherwise be gleaned by checking against `[NSApp orderedWindows]` etc. |
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
@interface NSWindow (FRBExtra) | |
- (NSImage *)windowImage; | |
- (CGImageRef)windowImageShot; | |
@end |
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
public class GroupViewHolder extends MainViewHolder { | |
@InjectView ( R.id.groupTitle ) | |
TextView mTitle; | |
@InjectView ( R.id.groupContent ) | |
TextView mContent; | |
public GroupViewHolder ( View itemView ) { | |
super ( itemView ); |
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
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.view.View; | |
/** | |
* {@link GridLayoutManager} extension which introduces workaround for focus finding bug when | |
* navigating with dpad. | |
* | |
* @see <a href="http://stackoverflow.com/questions/31596801/recyclerview-focus-scrolling">http://stackoverflow.com/questions/31596801/recyclerview-focus-scrolling</a> |
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
/* | |
* Copyright 2016 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |