Queries the graphics updates targets for a screen.

        in screen_id of type int

        return framebuffer of type :class:`IFramebuffer`
779070
def query_framebuffer(self, screen_id):
        
        if not isinstance(screen_id, baseinteger):
            raise TypeError("screen_id can only be an instance of type baseinteger")
        framebuffer = self._call("queryFramebuffer",
                     in_p=[screen_id])
        framebuffer = IFramebuffer(framebuffer)
        return framebuffer
116122
def update_screen_id(self):
        
        self.status_update_event.clear()
        # This gets the screenId but always throws. Couldn't find a better way.
        try:
            self.send_message({MESSAGE_TYPE: TYPE_GET_SCREEN_ID})
        except UnsupportedNamespace:
            pass
        self.status_update_event.wait()
        self.status_update_event.clear()
618680
boolean setFrameIndex(int frame) {
        if(frame < INITIAL_FRAME_POINTER || frame >= getFrameCount()) {
            return false;
        }
        framePointer = frame;
        return true;
    }
64987
public static int framebufferStatusToGL(
    final JCGLFramebufferStatus status)
  {
    switch (status) {
      case FRAMEBUFFER_STATUS_COMPLETE:
        return GL.GL_FRAMEBUFFER_COMPLETE;
      case FRAMEBUFFER_STATUS_ERROR_INCOMPLETE_ATTACHMENT:
        return GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
      case FRAMEBUFFER_STATUS_ERROR_MISSING_IMAGE_ATTACHMENT:
        return GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
      case FRAMEBUFFER_STATUS_ERROR_INCOMPLETE_DRAW_BUFFER:
        return GL3.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER;
      case FRAMEBUFFER_STATUS_ERROR_INCOMPLETE_READ_BUFFER:
        return GL3.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER;
      case FRAMEBUFFER_STATUS_ERROR_UNSUPPORTED:
        return GL.GL_FRAMEBUFFER_UNSUPPORTED;
      case FRAMEBUFFER_STATUS_ERROR_UNKNOWN:
        return -1;
    }

    throw new UnreachableCodeException();
  }
663277
def update_frame(self, key, ranges=None, plot=None, element=None):
        
        reused = isinstance(self.hmap, DynamicMap) and (self.overlaid or self.batched)
        if not reused and element is None:
            element = self._get_frame(key)
        elif element is not None:
            self.current_key = key
            self.current_frame = element

        renderer = self.handles.get('glyph_renderer', None)
        glyph = self.handles.get('glyph', None)
        visible = element is not None
        if hasattr(renderer, 'visible'):
            renderer.visible = visible
        if hasattr(glyph, 'visible'):
            glyph.visible = visible

        if ((self.batched and not element) or element is None or (not self.dynamic and self.static) or
            (self.streaming and self.streaming[0].data is self.current_frame.data and not self.streaming[0]._triggering)):
            return

        if self.batched:
            style_element = element.last
            max_cycles = None
        else:
            style_element = element
            max_cycles = self.style._max_cycles
        style = self.lookup_options(style_element, 'style')
        self.style = style.max_cycles(max_cycles) if max_cycles else style

        ranges = self.compute_ranges(self.hmap, key, ranges)
        self.param.set_param(**self.lookup_options(style_element, 'plot').options)
        ranges = util.match_spec(style_element, ranges)
        self.current_ranges = ranges
        plot = self.handles['plot']
        if not self.overlaid:
            self._update_ranges(style_element, ranges)
            self._update_plot(key, plot, style_element)
            self._set_active_tools(plot)

        if 'hover' in self.handles and 'hv_created' in self.handles['hover'].tags:
            self._update_hover(element)

        self._update_glyphs(element, ranges, self.style[self.cyclic_index])
        self._execute_hooks(element)
802368
def __texUpdate(self, frame):
		
		# Retrieve buffer from videosink
		if self.texture_locked:
			return
		self.buffer = frame
		self.texUpdated = True
506004
def getScreenDetails(self):
        
        monitors = self._getMonitorInfo()
        primary_screen = None
        screens = []
        for monitor in monitors:
            # Convert screen rect to Lackey-style rect (x,y,w,h) as position in virtual screen
            screen = {
                "rect": (
                    monitor["rect"][0],
                    monitor["rect"][1],
                    monitor["rect"][2] - monitor["rect"][0],
                    monitor["rect"][3] - monitor["rect"][1]
                )
            }
            screens.append(screen)
        return screens
399110
def _screen_buffer(self):
        """"""
        # get the address of the screen
        address = _LIB.Screen(self._env)
        # create a buffer from the contents of the address location
        buffer_ = ctypes.cast(address, ctypes.POINTER(SCREEN_TENSOR)).contents
        # create a NumPy array from the buffer
        screen = np.frombuffer(buffer_, dtype='uint8')
        # reshape the screen from a column vector to a tensor
        screen = screen.reshape(SCREEN_SHAPE_32_BIT)
        # flip the bytes if the machine is little-endian (which it likely is)
        if sys.byteorder == 'little':
            # invert the little-endian BGRx channels to big-endian xRGB
            screen = screen[:, :, ::-1]
        # remove the 0th axis (padding from storing colors in 32 bit)
        return screen[:, :, 1:]
754609
def update(self, reseed):
        
        self._screen.print_at(" ", self._x, self._y)
        cell = None
        for _ in range(self._rate):
            self._y += 1
            cell = self._screen.get_from(self._x, self._y)
            if cell is None or cell[0] != 32:
                break

        if ((cell is not None and cell[0] in [ord(x) for x in self._snow_chars + " "]) and
                (self._y < self._screen.start_line + self._screen.height)):
            self._screen.print_at(self._char,
                                  self._x,
                                  self._y)
        else:
            if self._y > self._screen.start_line + self._screen.height:
                self._y = self._screen.start_line + self._screen.height

            drift_index = -1
            if cell:
                drift_index = self._drift_chars.find(chr(cell[0]))
            if 0 <= drift_index < len(self._drift_chars) - 1:
                drift_char = self._drift_chars[drift_index + 1]
                self._screen.print_at(drift_char, self._x, self._y)
            else:
                self._screen.print_at(",", self._x, self._y - 1)
            if reseed:
                self._reseed()
1367475
def update(self, reseed):
        
        if self._clear:
            for i in range(0, 3):
                self._screen.print_at(" ",
                                      self._x,
                                      self._screen.start_line + self._y + i)
            self._maybe_reseed(reseed)
        else:
            for i in range(0, 3):
                self._screen.print_at(chr(randint(32, 126)),
                                      self._x,
                                      self._screen.start_line + self._y + i,
                                      Screen.COLOUR_GREEN)
            for i in range(4, 6):
                self._screen.print_at(chr(randint(32, 126)),
                                      self._x,
                                      self._screen.start_line + self._y + i,
                                      Screen.COLOUR_GREEN,
                                      Screen.A_BOLD)
            self._maybe_reseed(reseed)
550505
def _update_frames(self, written):
        """"""
        if self.seekable():
            curr = self.tell()
            self._info.frames = self.seek(0, SEEK_END)
            self.seek(curr, SEEK_SET)
        else:
            self._info.frames += written
391522
def _redraw_screen(self, stdscr):
        """"""
        with self._lock:
            stdscr.clear()
            stdscr.addstr(
                0, 0, "workflows service monitor -- quit with Ctrl+C", curses.A_BOLD
            )
            stdscr.refresh()
            self.message_box = self._boxwin(
                5, curses.COLS, 2, 0, title="last seen message", color_pair=1
            )
            self.message_box.scrollok(True)
            self.cards = []
192882
public AmqpFrame getFrame()
    {    
        int pos = this.position();       
        AmqpMethod method = new AmqpMethod();
        int classIndex;
        AmqpFrame frame = new AmqpFrame(); 
                 
        // If there is at least one Frame in the buffer, attempt to decode it.
        if (this.remaining() > 7)
        {            
            frame.setHeader(this.getFrameHeader());           
            frame.setChannelId((short) frame.getHeader().channel);           
            frame.setType((short) frame.getHeader().frameType);           
            // the buffer must have an additional byte for the Frame end marker 
            
            if (this.remaining() >= frame.getHeader().size + 1)
            {                
                switch (frame.getType())
                {                
                    case AmqpConstants.FRAME_BODY:                        
                        WrappedByteBuffer body = new AmqpBuffer();
                        // copy body into new Buffer
                        int end = this.position() + (int)frame.getHeader().size;
                        while (position() < end)
                        {
                            body.put(get());
                        }
                        frame.setBody(body);
                        frame.setMethodName("body");                        
                        break;

                    case AmqpConstants.FRAME_HEADER:                        
                        classIndex = this.getUnsignedShort();
                        @SuppressWarnings("unused")
                        short weight = (short)this.getUnsignedShort();
                        @SuppressWarnings("unused")
                        long bodySize = this.getUnsignedLong();                            
                        
                        frame.setContentProperties(this.getContentProperties());
                        frame.setMethodName("header");                        
                        break;

                    case AmqpConstants.FRAME_METHOD:
                         classIndex = this.getUnsignedShort();
                        int methodIndex = this.getUnsignedShort();
                        String indexes = String.valueOf(classIndex) + String.valueOf(methodIndex);                      
                        method = MethodLookup.LookupMethod(indexes);
                        
                        // pull parameter list off of method
                        List<Parameter> params = method.allParameters;

                        frame.setMethodName(method.name);
                        frame.setArgs(this.getMethodArguments(params));                        
                        break;

                    case AmqpConstants.FRAME_HEARTBEAT:
                    case AmqpConstants.FRAME_RABBITMQ_HEARTBEAT:
                    	throw new IllegalStateException("Received heartbeat frame even though the client has expressed no interest in heartbeat via tune-ok method.");

                    default:
                    	throw new IllegalStateException("Unrecognized AMQP 0-9-1 Frame type = " + frame.getType());
                }
                
                short frameEnd = (short) this.getUnsigned();                
                if (frameEnd != AmqpConstants.FRAME_END)
                {                    
                    throw new IllegalStateException("Invalid end of AMQP method frame");
                }
            }
            else
            {                
                this.position(pos);
                return null;
            }
            return frame;
        }
        return null;
    }
997466
def get_frame():
    """"""
    ret = QFrame()
    ret.setLineWidth(1)
    ret.setMidLineWidth(0)
    ret.setFrameShadow(QFrame.Sunken)
    ret.setFrameShape(QFrame.Box)
    return ret
779409
def _update_info(self, target_id):
        

        # Call getInfo ...
        pk = CRTPPacket()
        pk.set_header(0xFF, 0xFF)
        pk.data = (target_id, 0x10)
        self.link.send_packet(pk)

        # Wait for the answer
        pk = self.link.receive_packet(2)

        if (pk and pk.header == 0xFF and struct.unpack('<BB', pk.data[0:2]) ==
                (target_id, 0x10)):
            tab = struct.unpack('BBHHHH', pk.data[0:10])
            cpuid = struct.unpack('B' * 12, pk.data[10:22])
            if target_id not in self.targets:
                self.targets[target_id] = Target(target_id)
            self.targets[target_id].addr = target_id
            if len(pk.data) > 22:
                self.targets[target_id].protocol_version = pk.datat[22]
                self.protocol_version = pk.datat[22]
            self.targets[target_id].page_size = tab[2]
            self.targets[target_id].buffer_pages = tab[3]
            self.targets[target_id].flash_pages = tab[4]
            self.targets[target_id].start_page = tab[5]
            self.targets[target_id].cpuid = '%02X' % cpuid[0]
            for i in cpuid[1:]:
                self.targets[target_id].cpuid += ':%02X' % i

            if (self.protocol_version == 0x10 and
                    target_id == TargetTypes.STM32):
                self._update_mapping(target_id)

            return True

        return False
1285434
function() {
    framebuffer = framebuffer || gl.createFramebuffer();
    gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.id, 0);
    var result = gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE;
    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
    return result;
  }
126258
def refresh(self):
        
        try:
            # suport for RPiDisplay SSD1306 driver
            self.Display.setImage( self._catchCurrentViewContent() )
        except:
            try:
                # suport for Adafruit SSD1306 driver
                self.Display.image( self._catchCurrentViewContent() )
            except:
                raise "Can not update image to buffer."

        self.Display.display()