精华内容
下载资源
问答
  • Focus

    2010-05-03 06:37:00
    bypass the distractions and focus on the sources of information

    bypass the distractions and focus on the sources of information

    展开全文
  • Logic Focus与Keyboard Focus

    2019-10-01 09:44:20
    1.定义Keyboard Focus可以理解为物理焦点。就是整个桌面上可以响应键盘输入的地方,整个桌面在某个时刻只可能有一个地方能接受键盘的输入,因此整个桌面在某个时刻只可能有一个Keyboard Focus. Logic Focus从字面上...

    1.定义
    Keyboard Focus可以理解为物理焦点。就是整个桌面上可以响应键盘输入的地方,整个桌面在某个时刻只可能有一个地方能接受键盘的输入,因此整个桌面在某个时刻只可能有一个Keyboard Focus.

    Logic Focus从字面上理解是逻辑焦点。一般带“逻辑”字眼的东西都有可能是“虚”的,在这里也不例外。
    Logic Focus并不是真正的焦点。它只是在桌面上某个范围内,在该范围未获得物理焦点之前,该范围默认的在该范围之内的“焦点”,当该范围获得物理焦点时,会首先将物理焦点分配给逻辑焦点所在的地方。这个“范围”称作Focus Scope.  在WPF中默认被设置成的Focus Scope有 Window, MenuItem, ToolBar, and ContextMenu。也可以手动设置某个控件成为Focus Scope(通过设置FocusManager.IsFocusScope附加属性或调用FocusManager.SetFocusScope方法)。和Keyboard Focus对应,每一个Focus Scope内只有一个Logic Focus.

    综上所述Keyboard Focus与Logic Focus不是任何时候都相等,Keyboard Focus只和同一个Focus Scope内的Logic Focus相等。理论上Logic Focus好像并没有什么实际意义。
    2.API
    WPF中提供Keyboard类和FocusManager类来分别管理Keyboard Focus和Logic Focus.通过这个两个类可以Set和Get相应类型的Focus(FocusManager还可以Set和Get Focus Scope)以及提供相应类型Event.
    3. Focus的改变
    1)用户的操作会改变Keyboard Focus,同时也会改变同一个Focus Scope内的Logic Focus。
    2)通过Keyboard和FocusManager中提供的API可以改变相应类型的Focus。
    3)通过控件的Focus方法可以改变Focus Scope内的Logic Focus,如果Keyboard Focus也在此Focus Scope中则同时也会改变Keyboard Focus.
    4)通过控件的MoveFocus方法可以改变Keyboard Focus(调用该方法时需要传递一个TraversalRequest来指示移动的方向,TraversalRequest中包含指示移动方向的FocusNavigationDirection 枚举对象)

    转载于:https://www.cnblogs.com/Code-life/archive/2009/12/06/1618017.html

    展开全文
  • <div><p>focus_request::wants_focus => bool is_focusable() const focus_request::begin_focus => void begin_focus() focus_request::end_focus => void end_focus() <p>The return value ...
  • AudioFocus

    2016-08-24 20:36:14
    Audio Focus

    Audio Focus需要依赖App自己去实现Policy, Android只是提供了一种通知机制。
    注意:

    AudioManager.AUDIOFOCUS_REQUEST_GRANTED ==
                    mAM.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE);

    request的时候不会触发回调,只有失去后再得到的时候才会触发。

     /**
         * @hide
         * Used to indicate no audio focus has been gained or lost.
         */
        public static final int AUDIOFOCUS_NONE = 0;
        /**
         * Used to indicate a gain of audio focus, or a request of audio focus, of unknown duration.
         * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
         * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
         */
        public static final int AUDIOFOCUS_GAIN = 1;
        /**
         * Used to indicate a temporary gain or request of audio focus, anticipated to last a short
         * amount of time. Examples of temporary changes are the playback of driving directions, or an
         * event notification.
         * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
         * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
         */
        public static final int AUDIOFOCUS_GAIN_TRANSIENT = 2;
        /**
         * Used to indicate a temporary request of audio focus, anticipated to last a short
         * amount of time, and where it is acceptable for other audio applications to keep playing
         * after having lowered their output level (also referred to as "ducking").
         * Examples of temporary changes are the playback of driving directions where playback of music
         * in the background is acceptable.
         * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
         * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
         */
        public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK = 3;
        /**
         * Used to indicate a temporary request of audio focus, anticipated to last a short
         * amount of time, during which no other applications, or system components, should play
         * anything. Examples of exclusive and transient audio focus requests are voice
         * memo recording and speech recognition, during which the system shouldn't play any
         * notifications, and media playback should have paused.
         * @see #requestAudioFocus(OnAudioFocusChangeListener, int, int)
         */
        public static final int AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE = 4;
        /**
         * Used to indicate a loss of audio focus of unknown duration.
         * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
         */
        public static final int AUDIOFOCUS_LOSS = -1 * AUDIOFOCUS_GAIN;
        /**
         * Used to indicate a transient loss of audio focus.
         * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
         */
        public static final int AUDIOFOCUS_LOSS_TRANSIENT = -1 * AUDIOFOCUS_GAIN_TRANSIENT;
        /**
         * Used to indicate a transient loss of audio focus where the loser of the audio focus can
         * lower its output volume if it wants to continue playing (also referred to as "ducking"), as
         * the new focus owner doesn't require others to be silent.
         * @see OnAudioFocusChangeListener#onAudioFocusChange(int)
         */
        public static final int AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK =
                -1 * AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK;
    
    
    public class AudioFocusHelper implements AudioManager.OnAudioFocusChangeListener {
    
        public interface MusicFocusable {
            void onGainedAudioFocus();
            void onLostAudioFocus(boolean b);
        }
    
        AudioManager mAM;
        MusicFocusable mFocusable;
        public AudioFocusHelper(Context ctx, MusicFocusable focusable) {
            mAM = (AudioManager) ctx.getSystemService(Context.AUDIO_SERVICE);
            mFocusable = focusable;
        }
        /** Requests audio focus. Returns whether request was successful or not. */
        public boolean requestFocus() {
            return AudioManager.AUDIOFOCUS_REQUEST_GRANTED ==
                    mAM.requestAudioFocus(this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE);
        }
        /** Abandons audio focus. Returns whether request was successful or not. */
        public boolean abandonFocus() {
            return AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAM.abandonAudioFocus(this);
        }
        /**
         * Called by AudioManager on audio focus changes. We implement this by calling our
         * MusicFocusable appropriately to relay the message.
         */
        public void onAudioFocusChange(int focusChange) {
            Log.i("AudioFocus", "onAudioFocusChange " +focusChange);
            if (mFocusable == null) return;
            switch (focusChange) {
                case AudioManager.AUDIOFOCUS_GAIN:
                    mFocusable.onGainedAudioFocus();
                    break;
                case AudioManager.AUDIOFOCUS_LOSS:
                case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
                    mFocusable.onLostAudioFocus(false);
                    break;
                case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK:
                    mFocusable.onLostAudioFocus(true);
                    break;
                default:
            }
        }
    }
    
        AudioFocusHelper.MusicFocusable musicFocusable = new AudioFocusHelper.MusicFocusable() {
            @Override
            public void onGainedAudioFocus() {
                Log.i(TAG, "gain audio focus");
                play();
            }
    
            @Override
            public void onLostAudioFocus(boolean b) {
                Log.i(TAG, "lost audio focus");
                stop();
            }
        };
    展开全文
  • 解决ionic在ios无法使用focus,ios focus失效的问题

    解决ionic在ios无法使用focus,ios focus失效的问题

    参考文章:

    (1)解决ionic在ios无法使用focus,ios focus失效的问题

    (2)https://www.cnblogs.com/dannyxie/p/5806780.html


    备忘一下。


    展开全文
  • auto-focus

    2019-10-31 13:54:33
    As I verified, this camera doesn’t appear to have auto-focus. However, it has a particular spec named “focus_auto” which is bool and set to 1 by default. Can you tell me the meaning of this?...
  • audio focus

    2015-05-14 17:58:16
    音频焦点讨论, ...应用得到和失去焦点可以通过实现回调函数onAudioFocusChanged来监听,并且做相应逻辑的处理,比如说Music应用,如果获取到audiofocus就播放,如果audiofocus被别的应用如视频抢占了,就停
  • cx-table施加的是focus directive: Focusdirective继承自LockFocusdirective: TrapFocusdirective继承自TabFocusdirective: Focus->Lock->Trap->Tab的继承关系,从下图清晰可见: ...
  • jquery focus

    2012-12-21 16:12:25
    对象.focus() --- 就把光标定位过来了。 如: $("#pageGo").focus();
  • 获得AudioFocus和释放AudioFocus

    千次阅读 2013-03-15 14:35:10
    获得AudioFocus mAudioManager.requestAudioFocus(mAudioFocusListener,AudioManager.STREAM_MUSIC,AudioManager.AUDIOFOCUS_GAIN); 释放AudioFocus mAudioManager.abandonAudioFocus(mAudioFocusListener); ...
  • helicon focus中文版是一款非常优秀的专业级独特景深处理工具,也叫景深合成软件,内置先进的图像聚焦算法,能实现理论上无限景深的图像,主要功能是针对超倍摄影、宏观摄影、显微摄影和超焦距山水摄影后期的制作...
  • 键盘焦点和逻辑焦点(Logic Focus与Keyboard Focus ) 键盘焦点和逻辑焦点(Logic Focus与Keyboard Focus ) 1.定义 Keyboard Focus可以理解为物理焦点。就是整个桌面上可以响应键盘输入的地方,整个...
  • vive、Vive Focus、Vive FocusPlus应用场景轻度对比 [本文为本博主yinyuebin原创,转载注明出处] 1、概述 最近玩了一套focus pro,整体感觉和以前体验的vive +PC虚拟现实装备很类似。仔细把玩两天,发现应用...
  • ios 移动端 focus 无效

    2019-12-23 13:19:57
    focus() 是 jQuery 的一个方法,调用这个方法可以触发 focus 事件,用来为元素赋予焦点,但是只在 PC 端的浏览器上有效,在移动端就会失效或者效果不好 问题解决 使用 HTML 5 的新属性 autofocus 可以使元素自动...
  • Focus事件处理

    千次阅读 2016-05-09 11:34:56
    View是怎么获得Focus的.Focus是如何在View间跳转的呢
  • angularjs设置focus

    千次阅读 2016-08-30 10:41:50
    focus-on="focusMe"/> app.controller('MyCtrl', function($scope, focus) { focus('focusMe'); }); Source app.directive('focusOn', function() { return function(scope, elem, attr) {
  • 给div加focus: 设置div的tabindex 查看当前焦点所在元素: document.activeElement
  • focus.swf 幻灯

    2013-03-20 15:00:08
    focus.swf 幻灯 简单 实用 <div id="index_focus"> [removed] swfobject.embedSWF("focus.swf" , "index_focus" , "338px" , "245px" , "9.0.0" , "expressInstall.swf" , { "speed":"4000" ,"p":...
  • focus-hooks

    2015-05-26 07:37:23
    focus-hooksEmacs24.4新增加了两个focus hook:focus-in-hook和focus-out-hook.focus-in-hook顾名思义就是当frame获取到了焦点时所触发的动作. 而focus-out-hook则在frame失去焦点时会触发动作.因此,若我们希望做到,...
  • focus-within

    2017-05-17 10:00:07
    css伪类 :focus-within 可以非常方便处理获取焦点状态。 div class="container"> label for="text">请输入你的名字label> input type="text" /> div> .container:focus-within { background-color: #...
  • focus.swf图片切换

    2013-02-19 09:21:28
    focus.swf 广告切换功能, focus.swf 焦点图片 focus.swf的图片换页效果源代码
  • 出于测试用途: ...var a = $0; setTimeout(function(){a.focus()},5000); 执行之后,手动把焦点重新从Chrome console恢复到浏览器里,在浏览器空白处随便点击一下,五秒之后,Edit按钮的
  • input:focus

    2014-11-19 14:16:00
    input:focus,select:focus,textarea:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px} 转载于:https://www.cnblogs.com/chris-oil/p/4108147.html
  • Vive Focus丨基础配置

    2019-12-10 15:35:04
    使用Vive Focus Plus设备,进行VR开发。 基础配置: 1、导入WAVE SDK( wave_3.1.4_unity_1.zip)、VIVE Input Utility 2、Unity 2017.4.3f1配置: a、配置好安卓环境:AndroidAPI的版本25、26(配置教程)...
  • C#控件 失去Focus焦点事件与获得焦点事件 文本框失去焦点事件 LostFocus GotFocus事件 供大家学习,减为1分了。。。。
  • 1. 什么是:focus-within? :focus-within 是一个CSS 伪类 ,表示一个元素或其后代元素获得焦点。 在表单中,这个伪类非常有用。 2. 兼容性 需要注意的是,IE不支持。 3. 例子 看下面这个例子,在input被选中的时候...
  • 适用于HTCViveFocus一体机开发的SDK整合包,包含示例场景,安卓平台发布,内有开发文档链接

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 51,336
精华内容 20,534
关键字:

focus