/*
screen_settings

@description:
@since: 3.6
@created: 26/01/13
321654
function screen_settings( $current )
	{
	    $current .= '<h5>' . __("Fields",'acf') . '</h5>';
	    
	    $current .= '<div class="show-field_key">' . __("Show Field Key:",'acf');
			$current .= '<label class="show-field_key-no"><input checked="checked" type="radio" value="0" name="show-field_key" />' . __("No",'acf') . '</label>';
			$current .= '<label class="show-field_key-yes"><input type="radio" value="1" name="show-field_key" />' . __("Yes",'acf') . '</label>';
		$current .= '</div>';
	    
	    return $current;
	}
850664
def set_screen_saver(self, timeout, interval, prefer_blank, allow_exposures, onerror = None):
        """"""
        request.SetScreenSaver(display = self.display,
                               onerror = onerror,
                               timeout = timeout,
                               interval = interval,
                               prefer_blank = prefer_blank,
                               allow_exposures = allow_exposures)
1228898
function DirectorTouchScreen () {
    DirectorTouchScreen.superclass.constructor.call(this)

    // Hardcode some viewport sizes for iOS devices
    var ua = window.navigator.userAgent
    if (ua.match(/(iPhone|iPod)/)) {
        this.viewportSize = { portrait:  new geo.Size(320, 416)
                            , landscape: new geo.Size(480, 268)
                            }
    } else if (ua.match(/(iPad)/)) {
        this.viewportSize = { portrait:  new geo.Size(768, 928)
                            , landscape: new geo.Size(1024, 672)
                            }
    }
}
286573
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & ClassProject.CLASS_DETAIL_MODE) == ClassProject.CLASS_DETAIL_MODE)
            screen = Record.makeNewScreen(ClassInfo.CLASS_INFO_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ClassProject.RESOURCE_DETAIL_MODE) == ClassProject.RESOURCE_DETAIL_MODE)
            screen = Record.makeNewScreen(Resource.RESOURCE_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DETAIL_MODE) == ScreenConstants.DETAIL_MODE)
            screen = Record.makeNewScreen(CLASS_PROJECT_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
            screen = Record.makeNewScreen(CLASS_PROJECT_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DISPLAY_MODE) != 0)
            screen = Record.makeNewScreen(CLASS_PROJECT_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MENU_MODE) != 0)
            screen = Record.makeNewScreen(CLASS_PROJECT_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else
            screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        return screen;
    }
641649
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & ScreenConstants.DOC_MODE_MASK) == PROCESS_DETAIL_MODE)
            screen = Record.makeNewScreen(MessageProcessInfo.MESSAGE_PROCESS_INFO_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
            screen = Record.makeNewScreen(MESSAGE_INFO_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.DISPLAY_MODE) != 0)
            screen = Record.makeNewScreen(MESSAGE_INFO_GRID_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else if ((iDocMode & ScreenConstants.MENU_MODE) != 0)
            screen = Record.makeNewScreen(MenusModel.MENU_SCREEN_CLASS, itsLocation, parentScreen, iDocMode | ScreenConstants.DONT_DISPLAY_FIELD_DESC, properties, this, true);
        else
            screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        return screen;
    }
1362148
public void setupSFields()
    {
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_NUMBER).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_TYPE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_NAME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_1).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_2).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_3).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_4).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_5).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_6).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_7).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_8).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.KEY_FIELD_9).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
        this.getRecord(KeyInfo.KEY_INFO_FILE).getField(KeyInfo.INCLUDE_SCOPE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
    }
1332884
function _fnScrollingWidthAdjust ( settings, n )
	{
		var scroll = settings.oScroll;
	
		if ( scroll.sX || scroll.sY ) {
			// When y-scrolling only, we want to remove the width of the scroll bar
			// so the table + scroll bar will fit into the area available, otherwise
			// we fix the table at its current size with no adjustment
			var correction = ! scroll.sX ? scroll.iBarWidth : 0;
			n.style.width = _fnStringToCss( $(n).outerWidth() - correction );
		}
	}
470009
public function adminScreen() {
		$searches = Search::getSearches();

		if ( isset( $_POST['search_pattern'] ) && ! wp_verify_nonce( $_POST['pressbooks-search-and-replace-nonce'], 'search' ) ) {
			return;
		}

		$search_pattern = '';
		$replace_pattern = '';

		if ( isset( $_POST['search_pattern'] ) ) {
			$search_pattern = stripslashes( $_POST['search_pattern'] );
		}

		if ( isset( $_POST['replace_pattern'] ) ) {
			$replace_pattern = stripslashes( $_POST['replace_pattern'] );
		}

		$search_pattern  = str_replace( "\'", "'", $search_pattern );
		$replace_pattern = str_replace( "\'", "'", $replace_pattern );
		$orderby = 'asc';

		if ( isset( $_POST['orderby'] ) && 'desc' === $_POST['orderby'] ) {
			$orderby = 'desc';
		}

		$limit = isset( $_POST['limit'] ) ? intval( $_POST['limit'] ) : 0;

		$offset = 0;

		$source = isset( $_POST['source'] ) ? stripslashes( $_POST['source'] ) : '';

		if ( Search::validSearch( $source ) && ( isset( $_POST['search'] ) || isset( $_POST['replace'] ) || isset( $_POST['replace_and_save'] ) ) ) {

			/** @var \Pressbooks\Modules\SearchAndReplace\Search $searcher */
			$searcher = new $source;

			// Enable regex mode
			$enabled = ( defined( 'PB_ENABLE_REGEX_SEARCHREPLACE' ) && PB_ENABLE_REGEX_SEARCHREPLACE ) || is_super_admin();
			$searcher->regex = $enabled && ! empty( $_POST['regex'] );

			// Make sure no one sneaks in with a replace
			if ( ! current_user_can( 'administrator' ) ) {
				unset( $_POST['replace'] );
				unset( $_POST['replace_and_save'] );
				$_POST['search'] = 'search';
			}
			$results = [];
			if ( isset( $_POST['search'] ) ) {
				$results = $searcher->searchForPattern( $search_pattern, $limit, $offset, $orderby );
			} elseif ( isset( $_POST['replace'] ) ) {
				$results = $searcher->searchAndReplace( $search_pattern, $replace_pattern, $limit, $offset, $orderby );
			} elseif ( isset( $_POST['replace_and_save'] ) ) {
				$results = $searcher->searchAndReplace( $search_pattern, $replace_pattern, $limit, $offset, $orderby, true );
			}
			if ( ! is_array( $results ) ) {
				$this->renderError( $results );
			} elseif ( isset( $_POST['replace_and_save'] ) ) {
				?>
				<div class="updated" id="message" role="status" onclick="this.parentNode.removeChild (this)">
					<p><?php printf( _n( '%d occurrence replaced.', '%d occurrences replaced.', count( $results ) ), count( $results ) ); ?></p>
				</div>
				<?php
			}
			$this->render(
				'search', [
					'search' => $search_pattern,
					'replace' => $replace_pattern,
					'searches' => $searches,
					'source' => $source,
				]
			);
			if ( is_array( $results ) && ! isset( $_POST['replace_and_save'] ) ) {
				$this->render(
					'results', [
						'search' => $searcher,
						'results' => $results,
					]
				);
			}
		} else {
			$this->render(
				'search', [
					'search' => $search_pattern,
					'replace' => $replace_pattern,
					'searches' => $searches,
					'source' => $source,
				]
			);
		}
	}
493455
function (settings) {
        settings = {
          border: 1,
          padding: 20,
          layout: 'flex',
          pack: "center",
          align: "center",
          containerCls: 'panel',
          autoScroll: true,
          buttons: { type: "button", text: "Ok", action: "ok" },
          items: {
            type: "label",
            multiline: true,
            maxWidth: 500,
            maxHeight: 200
          }
        };

        this._super(settings);
      }
1109093
public void setCurrentSubScreen(BasePanel subScreen)
    {
        m_screenParent = null;      // Screen's parent
        m_iScreenSeq = -1;
        if (subScreen != null)
            m_screenParent = subScreen.getParentScreen();   // Screen's parent
        if (m_screenParent == null) if (this.getOwner() != null) if (this.getOwner().getRecord() != null)
            m_screenParent = (BaseScreen)this.getOwner().getRecord().getRecordOwner();
        if (m_screenParent == null) if (this.getOwner() != null) if (this.getOwner().getComponent(0) instanceof ScreenField)
            m_screenParent = ((ScreenField)this.getOwner().getComponent(0)).getParentScreen();
        if (m_screenParent == null)
            return;
        int iBestGuess = -1;
        for (m_iScreenSeq = 0; m_iScreenSeq < m_screenParent.getSFieldCount(); m_iScreenSeq++)
        {
            ScreenField sField = m_screenParent.getSField(m_iScreenSeq);
            if (sField == subScreen)
                return;     // Found (m_iScreenSeq is correct)
            if (sField instanceof BaseScreen)
                iBestGuess = m_iScreenSeq;
        }
        m_iScreenSeq = iBestGuess;
    }
662157
function screenSize() {
        // Viewport width
        var iw = win.innerWidth || html.clientWidth,
            ow = win.outerWidth || win.screen.width;
        
        api.screen['innerWidth'] = iw;
        api.screen['outerWidth'] = ow;
        

        // START old code
        var w = win.outerWidth || html.clientWidth;

        // remove earlier widths
        html.className = html.className.replace(/ (w|lt|portrait|no-portrait|landscape|no-landscape)-\d+/g, "");

        // add new ones
        pushClass("w-" + Math.round(w / 100) * 100);

        each(conf.screens, function (width) {
            if (w <= width) {
                pushClass("lt-" + width);
            }
        });
        // END old code

        // Viewport height
        var ih = win.innerHeight || html.clientHeight,
            oh = win.outerHeight || win.screen.height;

        api.screen['innerHeight'] = ih;
        api.screen['outerHeight'] = oh;
        
        // no need for onChange event to detect this
        api.feature("portrait" , (ih > iw));
        api.feature("landscape", (ih < iw));
    }
1051787
function TextBuffer( options = {} ) {
	this.ScreenBuffer = options.ScreenBuffer || ( options.dst && options.dst.constructor ) || termkit.ScreenBuffer ;

	// a screenBuffer
	this.dst = options.dst ;

	// virtually infinity by default
	this.width = options.width || Infinity ;
	this.height = options.height || Infinity ;

	this.x = options.x !== undefined ? options.x : 0 ;
	this.y = options.y !== undefined ? options.y : 0 ;
	this.cx = 0 ;
	this.cy = 0 ;

	this.emptyCellAttr = this.ScreenBuffer.prototype.DEFAULT_ATTR ;
	this.hidden = false ;

	this.tabWidth = options.tabWidth || 4 ;
	this.forceInBound = !! options.forceInBound ;
	this.wrap = !! options.wrap ;
	this.lineWrapping = options.lineWrapping || false ;

	this.buffer = [ [] ] ;

	this.stateMachine = options.stateMachine || null ;

	if ( options.hidden ) { this.setHidden( options.hidden ) ; }
}
349108
@SuppressWarnings("deprecation")
    private void setupSimplePreferencesScreen() {
        if (!SettingsActivity.isSimplePreferences(this)) {
            return;
        }

        // Class<ContactPreferenceFragment> a = ContactPreferenceFragment.class;

        // In the simplified UI, fragments are not used at all and we instead
        // use the older PreferenceActivity APIs.

        // Add 'general' preferences.
        PreferenceCategory fakeHeader = new PreferenceCategory(this);
        addPreferencesFromResource(R.xml.pref_contact);

        SettingsActivity.bindPreferenceSummaryToValue(findPreference(SettingsActivity.PREF_KEY_FULL_NAME));
        SettingsActivity.bindPreferenceSummaryToValue(findPreference(SettingsActivity.PREF_KEY_ADDRESS));
        SettingsActivity.bindPreferenceSummaryToValue(findPreference(SettingsActivity.PREF_KEY_PHONE_NUMBER));
        SettingsActivity.bindPreferenceSummaryToValue(findPreference(SettingsActivity.PREF_KEY_EMAIL));
    }
15184
public void setScreenProperties(PropertyOwner propertyOwner, Map<String,Object> properties)
    {
        Frame frame = ScreenUtil.getFrame(this);
        ScreenUtil.updateLookAndFeel((Frame)frame, propertyOwner, properties);
        Color colorBackgroundNew = ScreenUtil.getColor(ScreenUtil.BACKGROUND_COLOR, propertyOwner, properties);
        if (colorBackgroundNew != null)
            this.setBackgroundColor(colorBackgroundNew);
    }
292849
function screenSize() {
        var w = window.outerWidth || html.clientWidth;

        // remove earlier widths
        html.className = html.className.replace(/ (w|lt)-\d+/g, "");

        // add new ones
        pushClass("w-" + Math.round(w / 100) * 100);

        each(conf.screens, function(width) {
            if (w <= width) { pushClass("lt-" + width); }
        });

        api.feature();
    }
19576
function() {
    var self = this;
    if (!this.get('screen')) {
      this.set('screen', new Screen());
    }
    this.updateTextLines();
    this.observe(this, 'change:text change:width', function() {
      self.updateTextLines();
    });
    this.observe(this, 'change:visible change:textLines change:height', function() {
      self.render();
    });
    this.render();
  }
909313
def screen(self):
        '''
        
        '''
        devive_self = self

        class _Screen(object):
            def on(self):
                return devive_self.wakeup()

            def off(self):
                return devive_self.sleep()

            def __call__(self, action):
                if action == "on":
                    return self.on()
                elif action == "off":
                    return self.off()
                else:
                    raise AttributeError("Invalid parameter: %s" % action)

            def __eq__(self, value):
                info = devive_self.info
                if "screenOn" not in info:
                    raise EnvironmentError("Not supported on Android 4.3 and belows.")
                if value in ["on", "On", "ON"]:
                    return info["screenOn"]
                elif value in ["off", "Off", "OFF"]:
                    return not info["screenOn"]
                raise ValueError("Invalid parameter. It can only be compared with on/off.")

            def __ne__(self, value):
                return not self.__eq__(value)

        return _Screen()