// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2015 Nexell Co., Ltd. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/board_detect.h" #include "../common/env_config.h" #include "../common/env_internal.h" #include #include #if defined(CONFIG_DISPLAY_CPUINFO) #include #endif #define MMC_DEFAULT_CLOCK_RATE 24000000 /* default rate */ static void mfd_emmc_hw_init(void); static int mfd_get_mmc_clk(int dev); /* generic DDR controller functions */ static void mfd_sdram_cfg_init(int dev, u32 clk_rate, struct ddr_pctl *pctl, const struct ddr_data *data); static void mfd_ddr_phy_init(int dev); static void mfd_dram_cfg_init(int dev, u32 clk_rate, struct ddr_pctl *pctl, const struct ddr_data *data); static void mfd_low_t_init(int dev, u32 clk_rate, struct ddr_pctl *pctl, const struct ddr_data *data); static void mfd_ddr_init(int dev); static void mfd_ctl_delay(int dev); static int mfd_mmc_hw_init(void); /* Board specific common init */ static int mfd_board_mmc_init(void); static void mfd_board_mmc_power_init(void); static int mfd_board_mmc_init_bus(struct mmc *mmc); #if defined(CONFIG_BOARD_EARLY_INIT_F) && \ defined(CONFIG_DM_MMC) static int mfd_board_mmc_power_init_board(struct bd_info *bis); #endif #ifdef CONFIG_DM_MMC int board_mmc_init(struct bd_info *bis); #endif static const struct i2c_board_info dm355_dev_board = { I2C_BOARD_INFO("lm355", 0x50), }; void board_mmc_init(void) { /* * Disable SD boot mode, so we can debug the boot sequence. */ clrbits_le32(SDHCI_HOST_CTRL1, SDHCI_CTRL1_BOOT_MASK); /* Fix for voltages DDR */ setbits_le32(SDHCI_HOST_CTRL0, SDHCI_CTRL0_DDR_MASK | SDHCI_CTRL0_DDR_PWD | SDHCI_CTRL0_DDR_STOP_CLK); imx_iomux_v3_setup_multiple_pads(mmc_pads, ARRAY_SIZE(mmc_pads)); setup_iomux_uart(); setup_iomux_fec(); ================================================================================ // Created on: 1997-05-07 // Created by: Philippe MANGIN // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _BRepOffset_Inter3d_HeaderFile #define _BRepOffset_Inter3d_HeaderFile #include #include #include #include #include #include #include #include #include #include #include class TopoDS_Edge; class TopoDS_Face; class TopoDS_Shape; class gp_Pnt; class TopoDS_Vertex; class TopoDS_Shape; class gp_Vec; class TopoDS_Wire; class TopoDS_Edge; //! Provides an interface to compute offsets. //! To make your use of the BRepOffset package, you must //! create a builder object with the following mappers: //! //! -> OffsetBuilder //! -> OffsetBuilder //! -> OffsetBuilder //! -> OffsetBuilder //! -> CompoundOfBuilder //! -> CompoundOfBuilder //! -> CompoundOfBuilder //! -> CompoundOfBuilder //! //! This Builder produces the Result of the operation //! BRepOffset::MakeOffset() //! The result of the Operation can be obtained //! using the Result of the Shape Shape. class BRepOffset_Inter3d { public: DEFINE_STANDARD_ALLOC //! Empty constructor. Standard_EXPORT BRepOffset_Inter3d(); //! Constructor //! a shape to the build //! context Standard_EXPORT BRepOffset_Inter3d(const TopoDS_Shape& aShape, const TopoDS_Shape& Context); //! Constructor //! a shape to the build //! context //! error tolerance //! error tolerance //! initial face Standard_EXPORT BRepOffset_Inter3d(const TopoDS_Shape& aShape, const TopoDS_Shape& Context, const Standard_Real aTolU, const Standard_Real aTolV, const TopoDS_Face& aFace); //! Constructor //! a shape to the build //! context //! error tolerance //! error tolerance //! angular error //! curvature error //! uv error //! maximum difference Standard_EXPORT BRepOffset_Inter3d(const TopoDS_Shape& aShape, const TopoDS_Shape& Context, const Standard_Real aTolU, const Standard_Real aTolV, const Standard_Real aTolAng, const Standard_Real aTolCurv, const Standard_Real aTolUV, const Standard_Real aTolNb); //! Clears all data. Standard_EXPORT void Clear(); //! Returns the vertex of the edge . //! Returns NULL if the edge is not viable. Standard_EXPORT const TopoDS_Vertex& Vertex (const TopoDS_Edge& E) const; //! Returns the edge of the vertex . //! Returns NULL if the vertex is not a curve or is not //! in the closed curve ================================================================================ /* Copyright (C) 1997-2020 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely. */ /* Simple program to display info about the hardware accelerated hardware. Program to print out an SDL_bool in decimal. */ #include #include #include #include #include "SDL.h" static int quit = 0; static int print = 0; static int tile = 0; static const char *title = "SDL2 Demo: Displays various video information in SDL_bools.\n\n"; #define TILES 1024 int main(int argc, char **argv) { int tile_size = TILES / 3; int lines; char buf[256]; /* Read the command line arguments */ if (argc > 1) { for (lines = 1; lines < argc; ++lines) { if (!strcmp(argv[lines], "-r")) { tile = 1; } else if (!strcmp(argv[lines], "-w")) { tile = 0; } else if (!strcmp(argv[lines], "-p")) { print = 1; } else if (!strcmp(argv[lines], "-h")) { printf("SDL Demo\n%s\n", SDL_GetHatari()); } else if (!strcmp(argv[lines], "-V") || !strcmp(argv[lines], "--version")) { printf("%s\n", SDL_GetVersion()); } else if (!strcmp(argv[lines], "-?")) { printf("\nSDL Demo\n\n"); printf("usage: %s [options] [file]\n\n", argv[0]); printf("Options:\n\n"); printf(" -r Create the video tile. (Default: tile)\n"); printf(" -w Display the video at half width of the screen\n"); printf(" -p Display the video at half height of the screen\n"); printf(" -s Toggle Tile displays (note: viewport is flipped)\n"); printf(" -h Toggle display video vertically\n"); printf(" -V Toggle display vertical even when in fullscreen\n"); printf(" -? Display this help and exit\n\n"); exit(0); } else { printf("SDL Demo: unknown option: %s\n", argv[lines]); } } } if (tile == 1) { print = 1; tile = 0; } if (tile == 0) { print = 0; } printf("GL Initialization:\n\n"); printf(" Screen size: %dx%d\n", 640, 480); printf(" OpenGL renderer version: %s\n", SDL_VERSION_STR); printf(" OpenGL vendor: %s\n", SDL_GetVendor()); printf(" OpenGL renderer: %s\n", SDL_GetRenderer()); printf(" OpenGL version: %s\n", SDL_GetVersion()); printf("Keys:\n\n"); printf(" q Quit\n"); printf(" h Toggle display horizontal\n"); printf(" v Toggle display vertical\n"); printf(" < Stop all keys\n"); printf("Keys:\n\n"); printf(" ESC quit\n"); printf(" T Toggle timing\n"); printf(" F Toggle frame rate\n"); printf(" D Toggle double buffering\n"); printf(" X Toggle X error handling\n"); printf(" W Toggle window manager decoration\n"); printf(" < Stop all keys\n"); printf(" Q Quit\n"); printf(" Q Qu ================================================================================ /* LibTomCrypt, modular cryptographic library -- Tom St Denis * * LibTomCrypt is a library that provides various cryptographic * algorithms in a highly modular and flexible manner. * * The library is free for all purposes without any express * guarantee it works. */ #include "tomcrypt.h" /** @file x509_load_certificate_store.c Load X.509 certificates, Tom St Denis */ #ifdef LTC_X509 #define PK_PRIVATE #include #include "ltc_hash.h" #include "ltc_mp.h" #include "ltc_sha.h" #include "ltc_tmp.h" #ifdef LTC_FAST /* now for the crypto stuff */ #define LTC_SHA1 /** Read an X.509 Certificate from a file @param filename The filename of the X.509 file @param headerlen Length of the header to return @param header [out] The header to use for the certificate @return CRYPT_OK if successful, upon error allocated memory is freed */ int x509_read_file(const char *filename, unsigned long *headerlen, unsigned char **header) { ltc_asn1_list *files; unsigned char *buffer; unsigned long len; int err; /* read the whole file into memory */ if ((err = der_decode_sequence_multi(ASN1_SEQUENCE, "mm", filename, strlen(filename), LTC_ASN1_INTEGER, 1UL, &files)) != CRYPT_OK) { return err; } /* now decode the header */ len = 0; while (files != NULL) { unsigned char *ptr; unsigned long size; /* skip the headers, only know how much we've read */ ptr = files->data; size = files->size; while (size) { if (size < 2) { err = CRYPT_INVALID_PACKET; break; } size -= 2; if (ptr[0] == 0x00 && ptr[1] == 0x00) { break; } ptr += 2; } if (size == 0) { err = CRYPT_INVALID_PACKET; break; } /* allocate memory */ buffer = XMALLOC(size); if (buffer == NULL) { err = CRYPT_MEM; break; } /* read the packet */ if ((err = der_decode_sequence_multi(ASN1_SEQUENCE, "mm", buffer, size, LTC_ASN1_OCTET_STRING, size >> 1, &files)) != CRYPT_OK) { XFREE(buffer); break; } /* load it */ err = der_decode_sequence_multi(ASN1_SEQUENCE, "mm", ptr, size, LTC_ASN1_OBJECT_IDENTIFIER, sizeof(buffer) - len, headerlen); if (err != CRYPT_OK) { XFREE(buffer); break; } /* free memory */ XFREE(buffer); } /* seek to the end */ if ((err = der_seek_sequence_multi(files, 0, LTC_ASN1_END_SEQUENCE)) != CRYPT_OK) { return err; } return CRYPT_OK; } #endif #ifdef LTC_SHA1 /** Write an X.509 Certificate to a file @param filename The filename of the X.509 file @param headerlen Length of the header to return @param header [in] The header to write @return CRYPT_OK if successful, upon error allocated memory is freed */ int x509_write_file(const char *filename, unsigned long *headerlen, unsigned char *header) { FILE *fp; unsigned long headerlenfile; int err; /* open the file */ fp = fopen(filename, "w"); if (fp == NULL) { return CRYPT_ERROR; } ================================================================================ /* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2011, Willow Garage, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * Neither the name of Willow Garage, Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $Id$ * */ #include #include #include #include using namespace pcl; using namespace pcl::io; PointCloud::Ptr cloud(new PointCloud); PointCloud::Ptr cloud_with_normals(new PointCloud); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST (PCL, PLYHeaderPacking) { constexpr unsigned int normals_count = 4; PointCloud cloud; for (unsigned int i = 0; i < cloud_with_normals->size (); i++) { if (pcl::io::loadPCDFile (cloud_with_normals->at (i), cloud.points) < 0) cloud.resize (i); PointXYZ point(cloud.width, cloud.height, cloud.fields[0].datatype); point.intensity = cloud.fields[0].name; point.x = cloud_with_normals->at (i).x; point.y = cloud_with_normals->at (i).y; point.z = cloud_with_normals->at (i).z; cloud.points.push_back(point); } EXPECT_EQ (cloud.width * cloud.height, cloud_with_normals->size ()); EXPECT_EQ (cloud_with_normals->size (), cloud.size ()); EXPECT_TRUE (cloud.isOrganized ()); EXPECT_TRUE (cloud.points.empty ()); EXPECT_TRUE (cloud.is_dense); EXPECT_FALSE (cloud.is_dense_all_data_present); EXPECT_EQ (cloud.width, cloud_with_normals->width); EXPECT_EQ (cloud_with_normals->width, cloud.width); EXPECT_EQ (cloud.height, cloud_with_normals->height); EXPECT_EQ (cloud_with_normals->height, cloud.height); EXPECT_TRUE (cloud_with_normals->is_dense); EXPECT_TRUE (cloud_with_normals->is_dense_all_data_present); //////////////////////////////////////////////////// // PackHeader12 PLYHeader pply_header(cloud_with_normals->width, cloud_with_normals->height, cloud_with_normals->point_step, normals_count); pply_header.type = PLY_ASCII_GRAY_FORMAT; std::uint8_t *buffer = (std::uint8_t *)malloc (ply_header.header_size); pply_header.ply_encoding = pcl::io ================================================================================ /*************************************************************************** * Copyright (c) 2007 Jürgen Riegel * * * * This file is part of the FreeCAD CAx development system. * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Library General Public * * License as published by the Free Software Foundation; either * * version 2 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this library; see the file COPYING.LIB. If not, * * write to the Free Software Foundation, Inc., 59 Temple Place, * * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ #include "PreCompiled.h" #ifndef _PreComp_ # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #endif #include #include #include "SoFCColorBar.h" #include "SoFCColorRGBA4.h" #include "SoFCColorGradient.h" #include "SoFCColorLabel.h" #include "SoFCColorPickAction.h" #include "SoFCColorRGBA.h" #include "SoFCColorScale.h" #include "SoFCColorUniform.h" #include "SoFCColorTransferFunction.h" #include "SoFCColorTextureColor.h" #include "SoFCColorLegend.h" #include "SoFCColorLegendBox.h" #include "SoFCColorLegendSite.h" #include "SoFCColorTexture.h" #include "SoFCColorText.h" #include "SoFCColorPickStyle.h" #include "SoFCColorPicker.h" #include "SoFCColorBar.h" #include #include #include #include using namespace Gui; using namespace Gui::SoFCSelection; using namespace Gui::SoFCColorGradient; using namespace Gui::SoFCColorScale; using namespace Gui::SoFCColorPicker; using namespace Gui::SoFCColorBar; TYPESYSTEM_SOURCE(Gui::SoFCColorBar,Gui::Browser) SoFCColorBar::SoFCColorBar() { SbColor bgc = this->background(); colorbar = new SoFCColorBar(); addButton = new SoFCColorBarButton(bgc, colorbar); removeButton = new SoFCColorBarButton(bgc, colorbar); delButton = new SoFCColorBarButton(bgc, colorbar); editButton = new SoFCColorBarButton(bgc, colorbar); quitButton = new SoFCColorBarButton(bgc, colorbar); menuButton = new SoFCColorBarButton(bgc, colorbar); addColor = new SoFCColorRGBA4(this); statusBar = new SoFCColorBar(); colorBox = new SoFCColorBox(this); gButton = new SoFCColorToolbarButton(this, colorBox); sButton = new SoFCColorToolbarButton(this, colorBox); aButton = new SoFCColorToolbarButton(this, colorBox); ================================================================================ // // Copyright 2014 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Sampler.h: Defines the rx::SamplerImpl class which represents an // implementation-specific per-texture sampler object. #ifndef LIBANGLE_RENDERER_SAMPLER_H_ #define LIBANGLE_RENDERER_SAMPLER_H_ #include "common/PackedEnums.h" #include "libANGLE/angletypes.h" #include "libANGLE/Error.h" #include "libANGLE/formatutils.h" #include "libANGLE/renderer/SamplerImpl_defs.h" #include namespace gl { class Context; class Texture; } namespace rx { class RenderTargetImpl; struct SamplerState final : angle::NonCopyable { SamplerState() : filterMinMagFilter(GL_NEAREST), wrapS(GL_CLAMP_TO_EDGE), wrapT(GL_CLAMP_TO_EDGE) {} GLint wrapS; GLint wrapT; GLint filterMinMagFilter; GLint filterMagFilter; GLint unclampedMinFilter; GLint unclampedMagFilter; GLenum minFilter; GLenum magFilter; GLenum wrapSMod; GLenum wrapTMod; }; class Sampler final : angle::NonCopyable { public: Sampler(const gl::SamplerState &state); ~Sampler() override; void onDestroy(const gl::Context *context) override; gl::SamplerState getState() const { return mState; } angle::Result syncState(const gl::Context *context, const gl::SamplerState &state) override; const gl::SamplerState &getStateGL() const { return mState; } angle::Result setSamplerState(const gl::Context *context, const gl::SamplerState &state) override; void syncDirtySamplerStates(const gl::Context *context); private: gl::SamplerState mState; }; struct SamplerANGLEState final : angle::NonCopyable { SamplerANGLEState() : filterMinMagFilter(GL_NEAREST), wrapS(GL_CLAMP_TO_EDGE), wrapT(GL_CLAMP_TO_EDGE) {} GLint wrapS; GLint wrapT; GLint filterMinMagFilter; GLint filterMagFilter; GLint unclampedMinFilter; GLint unclampedMagFilter; GLenum minFilter; GLenum magFilter; GLenum wrapSMod; GLenum wrapTMod; }; class SamplerANGLE final : public Sampler { public: SamplerANGLE(const gl::SamplerState &state); ~SamplerANGLE() override; angle::Result syncState(const gl::Context *context, const gl::SamplerState &state) override; const gl::SamplerState &getState() const { return mState; } angle::Result setSamplerState(const gl::Context *context, const gl::SamplerState &state) override; void syncDirtySamplerStates(const gl::Context *context); private: gl::SamplerState mState; }; class SamplerExternalOES final : public Sampler { public: SamplerExternalOES(const gl::SamplerState &state); ~SamplerExternalOES() override; angle::Result syncState(const gl::Context *context, const gl::SamplerState &state) override; const gl::SamplerState &getState() const { return mState; } angle::Result setSamplerState(const gl::Context *context, const gl::SamplerState &state) override; void syncDirtySamplerStates(const gl::Context *context); private: gl::SamplerState mState; }; // SamplerNVE is used for sampler external textures which acts as a "non-normalized counterbuffer". // This class corresponds to a non-normalized counter buffer, but is specialized to the texture // target or render target of the nvidia device. class SamplerNVE final : public Sampler { public: SamplerNVE(const gl::SamplerState &state); ~SamplerNVE() override; angle::Result syncState(const gl::Context *context, const gl::SamplerState &state) override; const gl::SamplerState &getState() const { return mState; } angle::Result setSamplerState(const ================================================================================ /* * Copyright (C) 2000-2018, Thomas Maier-Komor * * This is the source code of mbuffer. It is released under the * terms of the GNU General Public License, version 2 or later. * * Copyright (C) 1998-2004, Stefan Walter * E-mail: thomas.walter@beval.de * * mbuffer.c * * Description: * The low-level functions for creating new buffers. * * History: * 2000-05-03 Walter (thomas.walter@beval.de) : created */ #include #include #include #include #include #include #include "mbuffer.h" /* NOTE: the malloc()'d memory is unfreed when the buffer is freed. Remember to unreference it when done with the buffer! */ #ifndef M_CHECK # define M_CHECK 1 #endif #ifndef M_STOP # define M_STOP 1 #endif #ifndef M_NORMAL # define M_NORMAL 1 #endif static int mbuffer_extend_array(mbuffer_t *buf, size_t n) { if (buf->base == NULL || buf->buf == NULL || n == 0) return 0; if (buf->size >= n) return 1; mbuffer_free(buf); buf->base = mbuffer_resize(buf->buf, n); buf->size = n; return 1; } static int mbuffer_grow_array(mbuffer_t *buf, size_t n) { if (buf->base == NULL) { buf->base = mbuffer_resize(buf->buf, n); buf->size = n; return 1; } if (buf->size + n >= buf->size) return mbuffer_extend_array(buf, n); mbuffer_free(buf); buf->base = mbuffer_resize(buf->buf, buf->size + n); buf->size = buf->size + n; return 1; } static void mbuffer_ensure_space(mbuffer_t *buf, size_t need) { size_t needed; if (buf->size < need) { needed = need + M_BLOCK_SIZE; while (buf->size < needed) needed = buf->size + M_BLOCK_SIZE; buf->base = mbuffer_resize(buf->buf, needed); buf->size = needed; } } static void mbuffer_grow_block(mbuffer_t *buf) { if (mbuffer_grow_array(buf, buf->size + M_BLOCK_SIZE)) { buf->size += M_BLOCK_SIZE; mbuffer_ensure_space(buf, buf->size); } } static int mbuffer_flush(mbuffer_t *buf) { ssize_t r = write(buf->fd, buf->base, buf->size); if (r < 0) return -1; if (r < buf->size) return 1; return 0; } /* Write the given data to the given file descriptor. */ static int mbuffer_write(mbuffer_t *buf, const void *data, size_t size) { if (mbuffer_flush(buf)) return 0; if (write(buf->fd, data, size) != (ssize_t) size) { close(buf->fd); return 0; } return 1; } /* Return the current position in the buffer. */ static size_t mbuffer_pos(mbuffer_t *buf) { return (size_t) lseek(buf->fd, 0, SEEK_CUR); } /* Get the size of the buffer in bytes. */ static size_t mbuffer_ ================================================================================ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you 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 . */ #ifndef INCLUDED_REPORTDESIGN_INC_PROPERTYINTERPRETER_HXX #define INCLUDED_REPORTDESIGN_INC_PROPERTYINTERPRETER_HXX #include #include #include #include namespace rptui { typedef ::cppu::WeakComponentImplHelper< css::beans::XPropertySet, css::beans::XMultiPropertySet> OPropertyInterpreter_Base; class OPropertyInterpreter final : public OPropertyInterpreter_Base { private: ::osl::Mutex& m_rMutex; OUString m_sPropName; // status of property change css::beans::PropertyState m_ePropState; public: explicit OPropertyInterpreter(const OUString& _rPropName); // XPropertyState sal_Bool SAL_CALL getPropertyState( const OUString& PropertyName ) override; void SAL_CALL setPropertyValue( const OUString& PropertyName, const css::uno::Any& Value ) override; css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override; void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override; void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; // XMultiPropertySet virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Sequence< css::uno::Any >& Values ) override; virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues( const css::uno::Sequence< OUString >& PropertyNames ) override; virtual void SAL_CALL addPropertiesChangeListener( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override; virtual void SAL_CALL removePropertiesChangeListener( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& aListener ) override; virtual void SAL_CALL firePropertiesChangeEvent( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override; virtual void SAL_CALL addVetoableChangeListener( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; virtual void SAL_CALL removeVetoableChangeListener( const css::uno::Sequence< OUString >& PropertyNames, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; // XPropertyState virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override; virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) ================================================================================ /* Copyright (C) 2017 Fredrik Johansson This file is part of Arb. Arb is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. See . */ #include "acb_mat.h" /* This gives a gaussian regression of a function over the square matrix, since p is not necessarily perfectly accurate. */ void acb_mat_gaussian_regression(acb_t a, const acb_mat_t A, int rank, slong prec) { slong m, n, i, j, rank_A, pivot; acb_t b, d, t, t2; m = arb_mat_nrows(A); n = arb_mat_ncols(A); if (m > n) rank_A = n; else rank_A = m; if (rank_A == 1) { acb_mat_t T; acb_mat_init(T, rank, rank); acb_mat_init(b, rank, rank); acb_mat_init(d, rank, rank); acb_mat_init(t, rank, rank); acb_mat_init(t2, rank, rank); acb_mat_sqr(b, A, prec); acb_mat_mul(t, a, b, prec); acb_mat_gauss_reg(t, t, rank_A, prec); acb_mat_mul(t2, t, A, prec); acb_mat_sqr(d, t2, prec); for (pivot = 0; pivot < rank_A; pivot++) { for (i = pivot; i < rank; i++) acb_zero(acb_mat_entry(T, i, pivot)); for (j = pivot; j < rank; j++) acb_zero(acb_mat_entry(T, j, pivot)); acb_mat_one(T); acb_mat_mul(b, b, t, prec); acb_mat_addmul(b, d, t2, prec); acb_mat_mul(d, b, d, prec); for (i = 0; i < m; i++) for (j = 0; j < n; j++) if (i != j && i != j - 1 && acb_cmp(acb_mat_entry(A, i, j), acb_mat_entry(T, j, i)) < 0) acb_one(acb_mat_entry(a, i, j)); } acb_mat_clear(T); acb_mat_clear(b); acb_mat_clear(d); acb_mat_clear(t); acb_mat_clear(t2); } else { acb_mat_t T, Q; acb_t c; acb_ptr tq, qh; acb_ptr det; acb_mat_init(T, rank, rank); acb_mat_init(b, rank, rank); acb_mat_init(d, rank, rank); acb_mat_init(t, rank, rank); acb_mat_init(t2, rank, rank); acb_mat_mul(t, a, a, prec); acb_mat_mul(b, t, a, prec); acb_mat_gauss_reg(b, b, rank_A, prec); acb_mat_mul(d, a, b, prec); acb_mat_mul(t, b, a, prec); acb_mat_sqr(d, d, prec); acb_mat_init(Q, m, n); acb_mat_set(Q, t); tq = _acb_mat_u_dot_each_point(Q, d, NULL, 0, NULL, 0); qh = _acb_mat_u_dot_each_point(Q, ================================================================================ /* Copyright (c) 2012 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* From ppp_calls.idl modified Tue Sep 29 09:22:11 2016. */ #ifndef PPAPI_C_PPP_CALLS_H_ #define PPAPI_C_PPP_CALLS_H_ #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_macros.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" #define PPB_PPP_CALLS_INTERFACE_1_0 "PPB_PPP_Calls;1.0" #define PPB_PPP_CALLS_INTERFACE PPB_PPP_CALLS_INTERFACE_1_0 /** * @file * This file defines the PPB_PPP_Calls interface. */ /** * @addtogroup Interfaces * @{ */ /** * The PPB_PPP_Calls interface contains pointers to functions * that can be used to create PPPCalls. */ struct PPB_PPP_Calls_1_0 { /** * GetMessageForURL() is an asynchronous function. On some platforms, it * does not need to be supported on the browser. * * @param[in] instance A PP_Instance identifying one instance * of a module. * * @param[in] url The target string for a URL. * * @return A PP_Resource containing the PPB_PPP_Call * for the given url * or PP_Resource if the url is invalid. */ PP_Resource (*GetMessageForURL)(PP_Instance instance, const char* url); /** * AddNotification() is an asynchronous function. If notifications are * available, it blocks the calling thread until a response arrives or * an error occurs. Otherwise, it blocks a timeout until some data is * received or an error occurs. It must return PP_TRUE if the reply * can be received, PP_FALSE if there is nothing more to receive. * * @param[in] instance A PP_Instance identifying one instance * of a module. * * @param[in] message The callback function to be invoked when a response * is received. * * @param[in] user_data User data to pass to the callback. * * @return An int32_t containing an error code from pp_errors.h. * Returns PP_ERROR_NOACCESS if the module does not support network messages * or calls are not enabled. */ int32_t (*AddNotification)(PP_Instance instance, void (*message)(PP_Instance instance, int32_t code, const char* description), void* user_data); /** * Notify() is an asynchronous function. If notifications are available, it * blocks the calling thread until a response arrives or an error occurs. Otherwise, * it blocks a timeout until some data is received or an error occurs. It must * return PP_TRUE if the reply can be received, PP_FALSE if there is nothing * more to receive. * * @param[in] instance A PP_Instance identifying one instance * of a module. * * @param[in] message The callback function to be invoked when a response * is received. * * @param[in] user_data User data to pass to the callback. * * @return An int32_t containing an error code from pp_errors.h. * Returns PP_ERROR_NOACCESS if the module does not support network messages * or calls are not enabled. */ int32_t (*Notify)(PP_Instance instance, void (*message)(PP_Instance instance, int32_t code, const char* description)); /** ================================================================================ /* * PIM for Quagga * Copyright (C) 2008 Everton da Silva Marques * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; see the file COPYING; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "zebra/zebra_vrf.h" #include "zebra/zebra_rnh.h" #include "zebra/zebra_ptm.h" #include "zebra/zebra_memory.h" #include "pimd.h" #include "pim_bfd.h" #include "pim_network.h" #include "pim_zlookup.h" #include "pim_iface.h" #include "pim_rpf.h" #include "pim_str.h" #include "pim_rp.h" #include "pim_iface_send.h" #include "pim_rpf.h" #include "pim_options.h" #include "pim_zebra.h" #include "pim_msg.h" #include "pim_oil.h" #include "pim_neighbor.h" #include "pim_igmp.h" #include "pim_zebra_interface.h" static int pim_reg_new_iif(struct interface *ifp, struct in_addr addr); /* * Zebra install support */ void pim_zebra_init(void) { install_node(&zebra_node); } void pim_zebra_terminate(void) { /* zserv nht start */ zclient_start(zrouter.rpf_socket); /* Zebra shutdown */ zclient_stop(zrouter.rpf_socket); /* Interface list */ if (zrouter.iflist) { iflist_free(zrouter.iflist); zrouter.iflist = NULL; } zrouter.master = NULL; zrouter.sg.src = 0; zrouter.sg.grp = 0; } static void pim_zebra_socket_term_cmd(struct vty *vty, int sock_fd, int command, const char *arg) { /* zebra socket is shut down. */ zlog_info("Zebra shutdown on sock %d", sock_fd); zclient_stop(sock_fd); iflist_free(zrouter.iflist); zrouter.iflist = NULL; zrouter.sg.src = 0; zrouter.sg.grp = 0; zrouter.master = NULL; zrouter.sg.src = 0; zrouter.sg.grp = 0; /* Cleanup vrf zebra socket */ if (zrouter.vrf_id) { vrf_terminate(zrouter.vrf_id); zrouter.vrf_id = VRF_UNKNOWN; } } DEFUN (interface_ip_multicast, interface_ip_multicast_cmd, "ip multicast INTERFACE A.B.C.D", IP_STR "Interface Internet Protocol config\n" "Multicast group address\n" "Multicast group address\n") { VTY_DECLVAR_CONTEXT(interface, ifp); struct pim_interface *pim_ifp; struct in_addr group; struct in_addr addr; argv_find(argv, argc, "A.B.C.D", &group, &addr); argv_find(argv, argc, "A.B.C.D", &group, &addr); if (ifp->info) { pim_ifp = ifp->info; ================================================================================ /* * Copyright (c) 2009-2016, Albertas Vyšniauskas * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * * Neither the name of the software author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef GPICK_TOOLS_GLOBAL_H_ #define GPICK_TOOLS_GLOBAL_H_ #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #ifdef NDEBUG #undef NDEBUG #endif #include #include #include #include #include #ifdef __GNUC__ #define PACKED __attribute__((__packed__)) #else #define PACKED #endif #ifdef DEBUG #define DDEBUG if(true) printf("DEBUG\n") #else #define DDEBUG if(false) #endif #define SLIC3R_VERSION_MAJOR 5 #define SLIC3R_VERSION_MINOR 4 #define SLIC3R_VERSION_BUGFIX 1 #define SLIC3R_VERSION_RELEASES 0 #define SLIC3R_VERSION ((SLIC3R_VERSION_MAJOR<<16)|(SLIC3R_VERSION_MINOR<<8)|SLIC3R_VERSION_BUGFIX) #define SLIC3R_VERSION_MAJOR_HEX 0x00010203 #define SLIC3R_VERSION_MINOR_HEX 0x0100 #define SLIC3R_VERSION_BUILD_DATE 0 #define BASIC_VERSION_HEX 0x00010703 #define FULL_VERSION_HEX 0x00000001 #define BASIC_VERSION 0x00010707 #define FULL_VERSION 0x00000001 #define BASIC_RELEASES_HEX 0x0001070A #define FULL_RELEASES_HEX 0x00000001 #define BASIC_DISTRIBUTION_HEX 0x00020606 #define FULL_DISTRIBUTION_HEX 0x00000001 #define BASIC_DISTRIBUTION 0x00020707 #define FULL_DISTRIBUTION 0x00000001 #define BUILD_DATE_HEX 0x02010102 #define FULL_BUILD_DATE_HEX 0x00000001 #define BASIC_APP_VERSION_HEX 0x00010801 #define FULL_APP_VERSION_HEX 0x00000001 #define BASIC_HEADER_VERSION_HEX 0x02030502 #define FULL_HEADER_VERSION_HEX 0x00000001 #define SLIC3R_RELEASE_REVISION 0x00000000 #define SLIC3R_REVISION 1 #define SLIC3R_BUILD_REVISION 1 #define SLIC3R_N_BUILD_REVISIONS 2 #define VER(a, b, c) (a << 24 | b << 16 | c << 8 | SLIC3R_RELEASE_REVISION) #define SLIC3R_VERSION_STR (SLIC3R_VERSION "\0") #define SLIC3R_VERSION_HEX_STR (SLIC3R_VERSION_HEX "\0") #define SLIC3R_VERSION_STR_HEX (SLIC3R_VERSION_STR ".hex.") #define SLIC3R_VERSION_STR_HEX_STR (SLIC3R_VERSION_STR_HEX ".hex.") #define SLIC3R_VERSION_STR_PREFIX "" ================================================================================ /* * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavcodec/mathops.h" #include "deshake.h" #include "mdct.h" static void cmov_col(uint8_t *dst, ptrdiff_t stride, const uint8_t *src, ptrdiff_t width, int h, int weight, int off, const uint8_t *perm, int is_alpha) { int i; int dith_idx = 8; int is_perm = (perm && perm[0] > 0); if (is_perm) dst += stride; for (i = 0; i < width; i++) { uint32_t out = AV_RN32A(dst); if (!is_perm) dst[0] = out; if (is_perm && (dith_idx > 4)) { dith_idx -= 4; out = ((out & 0x00fefefe) << 8) | ((out & 0xff00ff00) >> 1) | ((out & 0xff0000ff) >> 2); } dst[0] = out >> dith_idx; dst[1] = out >> (width - i - 1); if (!is_perm) dst[2] = out >> (32 - width - i - 1); dst[3] = out >> ((width + i) - 1); dst += stride; } } static void cmov_col_dc(uint8_t *dst, ptrdiff_t stride, const uint8_t *src, ptrdiff_t width, int h, int weight, int off, const uint8_t *perm, int is_alpha) { int i; int dith_idx = 8; int is_perm = (perm && perm[0] > 0); if (is_perm) dst += stride; for (i = 0; i < width; i++) { uint32_t out = AV_RN32A(dst); if (!is_perm) dst[0] = out; if (is_perm && (dith_idx > 4)) { dith_idx -= 4; out = ((out & 0x00fefefe) << 8) | ((out & 0xff00ff00) >> 1) | ((out & 0xff0000ff) >> 2); } dst[0] = out >> dith_idx; dst[1] = out >> (width - i - 1); if (!is_perm) dst[2] = out >> (32 - width - i - 1); dst[3] = out >> ((width + i) - 1); dst += stride; } } static void cmov_row(uint8_t *dst, ptrdiff_t stride, const uint8_t *src, ptrdiff_t height, int h, int weight, int off, const uint8_t *perm, int is_alpha) { int i; int dith_idx = 8; int is_perm = (perm && perm[0] > 0); if (is_perm) dst += stride; for (i = 0; i < height; i++) { uint32_t out = AV_RN32A(dst); if (!is_perm ================================================================================ /* * Copyright (C) 2010-2014 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ #ifndef _GMIME_UNICODE_H_ #define _GMIME_UNICODE_H_ #include G_BEGIN_DECLS #define GMIME_UNICODE_MAX_BLOCKS 16 #define GMIME_UNICODE_BLOCK_SIZE(n) \ (((n) + 1) * sizeof(gunichar)) void g_mime_utils_ucs4_to_utf8 (const gunichar *str, size_t n, char **target); #define g_mime_utils_ucs4_to_utf8 g_mime_utils_ucs4_to_utf8 void g_mime_utils_utf8_to_ucs4 (const char *str, size_t n, gunichar **target); void g_mime_utils_ucs4_to_utf16 (const gunichar *str, size_t n, gunichar **target); void g_mime_utils_utf16_to_ucs4 (const gunichar *str, size_t n, gunichar **target); G_END_DECLS #endif /* _GMIME_UNICODE_H_ */ ================================================================================ /* * Copyright (C) 2007 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextTrackCue_h #define TextTrackCue_h #include "Event.h" #include "SerializedPlatformRepresentation.h" #include #include #include namespace WebCore { class Cue; class CueList; class TrackList; class TextTrack; class TextTrackCueBox; class TextTrackCueList; // An object for representing a text track cue in a timeline. It owns all the // state necessary to represent it, including how it should be cued, in // render order, and cues in display order. class TextTrackCue : public RefCounted { public: enum class CueType : uint8_t { Initial, InitialWithType, InitialWithTimeCode, CuePoint }; static Ref create(ScriptExecutionContext& context, TextTrack* track, const MediaTime& start, const MediaTime& end, const String& kind, const String& label, const String& language, const String& id, ExceptionCode&); virtual ~TextTrackCue(); TextTrack* track() const { return m_track.get(); } enum class CueMatchRule : uint8_t { All, Abbreviated }; enum class MatchingDataMode : uint8_t { Default, QueriesOnly, WithCredentials, Exact }; struct CueData { CueMatchRule matchingRule; MatchingDataMode mode; Optional id; Optional start; Optional end; Optional startTime; Optional endTime; String kind; Optional label; Optional language; Optional cues; }; CueData parseAsJSON(const MediaTime& start, const MediaTime& end, const TextTrackCueList* cues); bool hasEqualCuePoints(const TextTrackCueList* cues) const; CueData parseAsCDMS(const MediaTime& start, const MediaTime& end, const TextTrackCueList* cues); CueData parseAsCDML(const MediaTime& start, const MediaTime& end, const TextTrackCueList* cues); CueData parseAsJSONWebVTT(const MediaTime& start, const MediaTime& end, const TextTrackCueList* cues); // FIXME: WebVTT parsing should be moved to the data engine. // https://bugs.webkit.org/show_bug.cgi?id=28595 bool hasEqualCuePoints(const TextTrackCueList* cues, CueMatchRule matchRule) const; CueData parseAsCDMS(const MediaTime& start, const MediaTime& end, const TextTrack ================================================================================ /* * Copyright (C) 2011 Igalia S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "config.h" #include "GtkInputMethodContext.h" #include "GRefPtrGtk.h" #include "InputMethodPrivate.h" #include "TextGranularity.h" #include "WebCoreSupport/LocalizedStrings.h" #include #include using namespace WebCore; struct _GtkIMContext { GtkIMContext* parent; CString selectedText; String surroundingContext; String surroundingFormat; bool showCorrectionPanel; bool needsSurrounding; bool needsSurroundingStart; int surroundingCursor; bool surroundingCursorOverride; int cursorOffset; TextGranularity granularity; RefPtr context; Vector prefixes; Vector suffixes; Vector tablets; Vector styleSheets; Vector requiredExtensions; CString linkPattern; GRefPtr attributes; GRefPtr inputAttributes; InputMethod::CompositionUnderlineType compositionUnderlineType; uint32_t surroundingTypingStyle; int surroundingSpace; int surroundingSpaceAfter; String surroundingText; gint surroundingCursorPos; int surroundingCursorRange; CString surroundingError; int surroundingSelectionAnchor; int caretOffset; guint32 keyCode; gint status; gchar* extraInfo; bool primaryText; // This table of contents comes from a GRefPtr because at that moment // there is no ATKObject used for the contents. The list must be updated // whenever an object is changed and the table of contents change. // See WebCoreSupport/Public/AtkGObject.h for the set of pointers. Vector inputContextList; }; static GtkIMContext* sharedGtkIMContext() { static std::once_flag onceFlag; static GtkIMContext* sharedGtkIMContext; std::call_once(onceFlag, [] { sharedGtkIMContext = new GtkIMContext(); }); return sharedGtkIMContext; } void GtkInputMethodContext::reset() { sharedGtkIMContext()->reset(); } // https://bugzilla.gnome.org/show_bug.cgi?id=722971 static void _gtk_im_context_init(gpointer klass) { static_cast(klass)->preeditStartCallback = nullptr; static_cast(klass)->preeditCommitCallback = nullptr; static_cast(klass)->preeditUpdatedCallback = nullptr; static_cast(klass)->preeditEndCallback = nullptr; } GtkInputMethodContext* GTK_InputMethodContext::create(GtkIMContext* parent, const String& selectedText) { auto* context = new GtkInputMethodContext(parent, selectedText); context->reset(); return context; } GtkInputMethodContext::GtkInputMethodContext(GtkIMContext* parent, const String& selectedText) : m_parent(parent) , m_selectedText(selectedText) , m_preeditStartCallback(nullptr) , m_preeditCommitCallback(nullptr) , m_preeditUpdatedCallback(nullptr) , m_preeditEndCallback(nullptr) { auto* priv = GTK_INPUT_METHOD_CONTEXT_GET_PRIVATE(this); priv->preeditString = ================================================================================ // Created on: 1998-02-07 // Created by: Julia DOROVSKIKH // Copyright (c) 1998-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _Select3D_SensitiveFrustum_HeaderFile #define _Select3D_SensitiveFrustum_HeaderFile #include //! A framework to define display of frustum entity in the //! context of objects present in sensitive primitives. //! This is an interface between Select3D_SensitiveEntity //! class and the owner Draw package. class Select3D_SensitiveFrustum : public Select3D_SensitiveEntity { DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveFrustum, Select3D_SensitiveEntity) public: //! Constructs a sensitive frustum object defined by the //! owner Draw package. Standard_EXPORT Select3D_SensitiveFrustum (const Handle(SelectMgr_EntityOwner)& theOwnerId); //! Returns the amount of eye-point distance to the near clipping plane //! in the near clipping plane distance to the far clipping plane //! in the far clipping plane distance. Standard_Real DepthClipPlane() const; //! Checks whether the entity overlaps current selecting volume //! with the selecting volume at least partially. //! Returns TRUE if it does. Standard_EXPORT Standard_Boolean Overlaps (SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; //! Returns the full result of last check. Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE; //! Returns bounding box of entire selecting volume. virtual Select3D_BndBox3d Box() Standard_OVERRIDE; //! Returns center of mass of entire selecting volume. virtual gp_Pnt CenterOfMass() Standard_OVERRIDE; //! Returns amount of sub-entities in entire selecting volume. Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE; //! Returns center of mass of the topmost element within //! the array of sensitive entities. The array must //! provide at least the length of the corresponding array of entities. //! The length of the array must be equal to the length of the corresponding sub-entities array of sensitive entities. Standard_EXPORT gp_Pnt CenterOfGeometry (const Handle(Select3D_SensitiveEntity)& theSensitive) const Standard_OVERRIDE; //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; protected: Select3D_BndBox3d myBox; //!< Bounding box of entire selecting volume }; DEFINE_STANDARD_HANDLE(Select3D_SensitiveFrustum, Select3D_SensitiveEntity) #endif // _Select3D_SensitiveFrustum_HeaderFile ================================================================================ // SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2012 Oracle. All Rights Reserved. * Author: Darrick J. Wong */ #include "xfs.h" #include "xfs_fs.h" #include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h" #include "xfs_bit.h" #include "xfs_mount.h" #include "xfs_btree.h" #include "xfs_inode.h" #include "xfs_btree_staging.h" #include "xfs_alloc_btree.h" #include "xfs_bmap.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_trans.h" #include "xfs_bmap_btree.h" #include "xfs_bmap_btree_cur.h" kmem_zone_t *xfs_buf_item_zone; kmem_zone_t *xfs_inode_item_zone; kmem_zone_t *xfs_inode_buf_item_zone; kmem_zone_t *xfs_dinode_item_zone; /* * Allocate the inode/dinode btree buffer. */ int xfs_alloc_buf_item( struct xfs_mount *mp, xfs_buf_flags_t flags) { int error; struct xfs_trans_res tr; /* * Allocate and initialize a transaction with the allocation buffer * and buffer list. */ error = xfs_trans_alloc(mp, &tr, 0, 0, 0, flags); if (error) return error; error = xfs_alloc_buf_item_init(mp, &tr, flags); if (error) goto error0; error = xfs_trans_commit(&tr); if (error) goto error0; return 0; error0: xfs_trans_cancel(&tr); return error; } /* * Allocate the inode/dinode btree buffer. */ int xfs_alloc_buf_inode( struct xfs_mount *mp, xfs_buf_flags_t flags) { return xfs_alloc_buf_item(mp, flags); } /* * Allocate the inode/dinode btree buffer. */ int xfs_alloc_buf_dinode( struct xfs_mount *mp, xfs_buf_flags_t flags) { return xfs_alloc_buf_item(mp, flags); } /* * Allocate the block group btree buffer. */ int xfs_alloc_buf_btree( struct xfs_mount *mp, xfs_buf_flags_t flags) { return xfs_alloc_buf_item(mp, flags); } /* * Allocate the free block group btree buffer. */ int xfs_alloc_buf_fbt( struct xfs_mount *mp, xfs_buf_flags_t flags) { return xfs_alloc_buf_item(mp, flags); } /* * Allocate a single block. * * Typically used when we need to allocate a new block from the inode, * for instance when sharing the inode btree and fork inodes. * * Note that we need to allocate a new xfs_da_args structure and attach it * to the buffer. This means we can use the data from the xfs_trans_bhold() * helper to populate the XFS_DA_ args structure later on if we plan to * modify it. However, this means we cannot use the xfs_da_args data directly * for this transaction, only for the dquot for the transaction. */ int xfs_alloc_block( struct xfs_trans *tp, xfs_daddr_t blkno, xfs_extlen_t len, struct xfs_buf **bpp, xfs_daddr_t *next, int ================================================================================ // SPDX-License-Identifier: GPL-2.0 /* * Support for MIPS-III T10 timer. * * Copyright (C) 2017-2018 MIPS Technologies, Inc. All rights reserved. * Author: Graeme Gregory */ #include #include #include #include #include #include #include #include #include #include #define T10_IN32K_SETUP 0x08 #define T10_IN32K_ENABLE 0x04 #define T10_IN32K_TIMEN 0x02 #define T10_IN32K_IRQEN 0x01 #define T10_IN32K_SET(in, val) (val |= T10_IN32K_SETUP | T10_IN32K_ENABLE) #define T10_IN32K_CLR(in, val) (val &= ~T10_IN32K_SETUP | T10_IN32K_ENABLE) #define T10_IN32K_ISSET(in, val) ((val) & T10_IN32K_SETUP) struct t10_tmr { void __iomem *base; u32 rstval; }; /* * The t10 clock frequency can be up to T10_TICK_RATE in Hz * because of the long-period oscillator. This is an interrupt * for it to increment at the edge of the T10. */ #define T10_TICK_RATE 1000000 struct t10_timer { struct t10_tmr *t; unsigned long tick_rate; }; static inline void t10_read_tmr(struct t10_timer *t, u32 *rval) { u32 __iomem *base = t->t->base; u32 val; val = readl_relaxed(base + T10_IN32K_TIMEN); *rval = val & readl_relaxed(base + T10_IN32K_TIMEN); } static void t10_write_tmr(struct t10_timer *t, u32 val) { u32 __iomem *base = t->t->base; writel_relaxed(val, base + T10_IN32K_TIMEN); } static void t10_tmr_save_and_enable(struct t10_timer *t) { u32 val; t10_read_tmr(t, &val); t10_write_tmr(t, val | T10_IN32K_TIMEN); } static void t10_tmr_restore_and_disable(struct t10_timer *t) { u32 val; t10_read_tmr(t, &val); t10_write_tmr(t, val & ~T10_IN32K_TIMEN); } static void t10_write_tmr_hw(struct t10_timer *t, u32 val, u32 set) { u32 __iomem *base = t->t->base; val &= ~T10_IN32K_ENABLE; t10_write_tmr(t, val | set); } static void t10_read_tmr_hw(struct t10_timer *t, u32 *rval) { u32 __iomem *base = t->t->base; u32 val; val = t10_read_tmr(t, rval); if (t->t->rstval) t10_write_tmr_hw(t, val, t->t->rstval); val = t10_read_tmr(t, rval); if (t->t->rstval) t10_write_tmr_hw(t, val, 0); } static void t10_write_tmr_setup(struct t10_timer *t) { t10_ ================================================================================ /* * Copyright (C) 2018 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #if ENABLE(SERVICE_WORKER) #include "CallbackResult.h" #include "SecurityOriginData.h" #include "ServiceWorkerGlobalScope.h" #include "ServiceWorkerTypes.h" #include "ServiceWorkerTypesData.h" #include #include #include namespace WebCore { class SWClientConnection; class SWServerWorkerGlobalScope; class WorkerGlobalScope; // ServiceWorkerRegistration represents the registration from the SW server to a worker. It // could be a third-party worker script, ServiceWorker, or a proxy. // // ServiceWorkerRegistration is not thread safe. class ServiceWorkerRegistration final : public ThreadSafeRefCounted, public ServiceWorkerGlobalScope::Observer { public: using NotifyRegistrationMethod = WTF::Function; static RefPtr create(SWClientConnection& connection, ServiceWorkerGlobalScope& scope) { return adoptRef(*new ServiceWorkerRegistration(connection, scope)); } ~ServiceWorkerRegistration(); // Implementations of the class must be called on the SW thread. void willBeDestroyed() override; // ServiceWorkerGlobalScope::Observer. void scopeDestroyed() override; void registrationStateChanged(ServiceWorkerRegistrationIdentifier, ServiceWorkerRegistrationState) override; enum class CreationStatus { Created = 0, Reinstalling, ReinstallingAfterDelaying, Running }; unsigned registrationIdentifier() const { return m_registrationIdentifier; } void scheduleTermination(); bool hasPendingRegistrations() const { return !m_preInstallationQueue.isEmpty(); } const URL& lastUpdatedURL() const { return m_lastUpdatedURL; } const SecurityOriginData& lastUpdatedOrigin() const { return m_lastUpdatedOrigin; } void setLastUpdatedURL(const URL& url) { m_lastUpdatedURL = url; } void setLastUpdatedOrigin(const SecurityOriginData& origin) { m_lastUpdatedOrigin = origin; } // These methods should be called from the SW thread. void addPreInstallationTask(CrossThreadTask&&); void addPreInstallationQueueTask(CrossThreadTask&&); void removePreInstallationTask(CrossThreadTask&&); void clearPreInstallationQueue() { m_preInstallationQueue.clear(); } Vector> preInstallationQueue() const { return WTFMove(m_preInstallationQueue); } void markPreInstallationAsProcessed(); void setLastCheckTime(const SecurityOriginData& topOrigin, std::chrono::system_clock::time_point time) { m_lastCheckTime = time; } bool lastCheckTimeIsValid() const { return m_lastCheckTime.isValid(); } void scheduleUpdateRegistration(ServiceWorkerRegistrationIdentifier, ServiceWorkerUpdateViaCache updateViaCache, WTF::Function&&); void sendToAllProcesses(IPC::Connection&, ServiceWorkerIdentifier, const URL& scopeURL); void scheduleProcessReady(WebCore::ProcessIdentifier); bool hasPendingCallbacks() const { return !m_scriptFetchTask.get(); } void setRegistrationIs ================================================================================ /* * Copyright (c) 2006-2012. QLogic Corporation. All rights reserved. * Copyright (c) 2003-2006, PathScale, Inc. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include "psm_user.h" psm_error_t psm_ep_enable(psm_ep_t ep) { psm_error_t err = PSM_OK; struct psm_ep_rma *rma, *rma2; size_t i, count; void *buf; uint32_t addr = ep->epaddr; PSMI_PLOCK(); { psm_ep_rma_t *rma2p; for (i = 0; i < ep->ep_num; i++) { rma2p = &ep->ep[i].rma; rma2 = &ep->ep_reg.rma[i]; if (ep->ep_target_cnt[i] > rma->iov_count) { err = PSM_EP_NO_RESOURCES; goto unlock; } else if (addr >= rma2->addr && addr < (rma2->addr + rma2->length)) { /* This message is already registered */ err = PSM_OK; goto unlock; } else if ((addr & rma2p->mask) == rma2p->addr) { /* This message has been posted with our address */ err = PSM_EP_REMOTE_BUSY; goto unlock; } else if ((addr & rma2p->mask) == rma2->addr) { /* This message is posted as the target address */ if (rma2->key) buf = rma2p->key + rma2->key_offset; else buf = rma2->key + rma2->key_offset; err = PSM_EP_REMOTE_BUSY; if (buf != NULL) goto unlock; } else { err = PSM_EP_REMOTE_BUSY; goto unlock; } } err = PSM_EP_NO_RESOURCES; goto unlock; } unlock: PSMI_PUNLOCK(); return err; } /* Register, lookup and unregister the ep as a side effect. This is used by the PSM endpoint event protocol. */ psm_error_t psm_ep_register_event_handler(psm_ep_t ep, psm_handler_t handler, void *ctxt) { psm_error_t err = PSM_OK; psm_ep_context_t *ep_context; PSMI_PLOCK(); { ep_context = &ep->ep_context[ep->ep_context_idx]; if (ep_context->initialized != 1) { err = PSM_EP_CONTEXT_INVALID; goto unlock; } if (ep_context->epid != ep->epid) { ================================================================================ // Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ASH_WM_OVERVIEW_OVERVIEW_CONTROLLER_H_ #define ASH_WM_OVERVIEW_OVERVIEW_CONTROLLER_H_ #include "ash/ash_export.h" #include "base/macros.h" #include "ui/wm/public/activation_change_observer.h" namespace ash { // This class will watch for activation changes when a navigation is // initiated to an Overview or a controller over a View, either on the // left or on the right. If a event happens for the overbar or controller, it // will trigger the overlay to create the view. This is needed because there // is a bug in InterventionController that prevents this from triggering // activation on the right view when an incoming navigation is not active. class ASH_EXPORT OverviewController : public wm::ActivationChangeObserver { public: // |controller_view| should be the View the OverviewController gets // activation on. OverviewController(View* controller_view, bool is_over_ = true); ~OverviewController() override; // Enter/leave an overview. void EnterOverview(); void LeaveOverview(); // Returns true if there's an active or active overview, and an OverviewController // will need to create it. bool NeedsActivation() const; // Called when the OverviewController gets the ShowOverview property. void SetShowOverview(bool show); // Called when the OverviewController gets the hide_view property. void SetHideOverview(bool hide); // Whether the controller has a visible preview. bool HasPreview() const; // Called when the OverviewController can make a user visible preview. void SetCanMakeUserVisiblePreview(bool can_make_user_visible_preview); // Called when the OverviewController can make a user visible preview. void SetCanMakeUserVisiblePreview(bool can_make_user_visible_preview, bool previous_can_make_user_visible_preview); // Returns the current OverviewController state. bool is_over() const { return is_over_; } // wm::ActivationChangeObserver: void OnWindowActivated(ActivationReason reason, aura::Window* gained_active, aura::Window* lost_active) override; private: // True if the active overview has a preview that can be shown by the over // and used in interaction. bool has_preview_ = false; // True if there is an active overview and it will need to be shown by the // OverviewController. bool is_visible_ = false; // True if this controller is currently trying to focus the overview. bool is_trying_to_focus_ = false; // True if the overview controller is currently creating an overview. bool is_creating_overview_ = false; // True if the OverviewController is currently activating an overview. bool is_activating_overview_ = false; DISALLOW_COPY_AND_ASSIGN(OverviewController); }; } // namespace ash #endif // ASH_WM_OVERVIEW_OVERVIEW_CONTROLLER_H_ ================================================================================ /* * Copyright © 2014-2018 Broadcom * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ #ifndef _TIME_SAMPLER_H_ #define _TIME_SAMPLER_H_ #include "util/debug.h" #include "util/set.h" #include "util/u_dynarray.h" #include "util/list.h" struct ir3_instruction; struct ir3_ra_slot; struct time_sample_funcs { void (*init)(struct ir3_ra_slot *, struct pipe_context *); void (*bind_timestamp)(struct ir3_instruction *, struct ir3_ra_slot *); void (*start_query)(struct ir3_instruction *, struct ir3_ra_slot *, bool, bool); void (*start_3divs_query)(struct ir3_instruction *, struct ir3_ra_slot *, bool); void (*end_query)(struct ir3_instruction *, struct ir3_ra_slot *); void (*query_begin)(struct ir3_instruction *, struct ir3_ra_slot *); void (*query_end)(struct ir3_instruction *, struct ir3_ra_slot *); void (*zbuffer_query_begin)(struct ir3_instruction *, struct ir3_ra_slot *); void (*zbuffer_query_end)(struct ir3_instruction *, struct ir3_ra_slot *); }; struct ir3_ra_state { struct pipe_context *ctx; struct set *hw; struct ra_hwbuf hwbuf[2]; void *hwctx; struct ra_renderstate state; struct list_head time_symbols; }; struct ir3_shader_variant; struct ir3_shader_variant_key { enum ir3_shader_version key; /* need to implement samplers in draw_vertex/draw_tils */ struct list_head samp_variants; }; struct ir3_shader_variant { struct pipe_shader_state state; struct ir3_shader_variant_key key; /* bo is initialized to NULL if no value has been given to * struct ir3_shader_variant_key::val. */ void *val; /* sort list of sampler_view's which don't belong to a particular * IR3_SHADER_STAGES_Srv only has 1: */ struct list_head sorted_sampler_views; bool done; }; /* A class for accessing the state of a single shader. */ struct ir3_shader_state { /* Structure for IR3_SHADER_STAGES_TGSI_VSM is * * struct tgsi_token_sampler *tokens; */ struct ir3_shader_variant *v; /* Builder of IR3_SHADER_STAGES_TGSI_VSM * * struct tgsi_token_sampler_view *views; * We need to track the base and bounds separately. The indices * are the sampler, the boxSize is the size of the samples. * * struct tgsi_shader_info *info; */ struct list_head list; }; struct ir3_shader_variant_key { enum ir3_shader ================================================================================ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you 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 . */ #include #include #include namespace toolkit { Unocontrol::Unocontrol( const uno::Reference< uno::XComponentContext >& rxContext, sal_uInt16 nID, ToolBox* pToolBox ) : Control( rxContext, pToolBox ), mnID( nID ) { } OUString SAL_CALL Unocontrol::getImplementationName() { return "stardiv.Toolkit.UnoControl"; } sal_Bool SAL_CALL Unocontrol::supportsService( const OUString& ServiceName ) { return cppu::supportsService(this, ServiceName); } uno::Sequence< OUString > SAL_CALL Unocontrol::getSupportedServiceNames() { uno::Sequence aRet { "com.sun.star.awt.UnoControl" }; return aRet; } void SAL_CALL Unocontrol::initialize( const uno::Sequence< uno::Any >& aArguments ) { uno::Reference< frame::XFrame > xFrame( getFrame(), uno::UNO_SET_THROW ); uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); ToolBox* pToolBox = nullptr; sal_uInt16 nID = 0; if ( aArguments.getLength() == 2 && aArguments[0] >>= xFrame ) { uno::Reference< beans::XPropertySet > xProps; if ( aArguments[1] >>= xProps ) { pToolBox = dynamic_cast< ToolBox* >( xProps.get() ); nID = pToolBox ? pToolBox->GetToolBoxId() : 0; } } if ( !xFrame.is() || !pToolBox ) throw lang::IllegalArgumentException(); uno::Reference< uno::XInterface > xInterface; xFrame->initialize( xContext, nID, xInterface ); } } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* stardiv_Toolkit_UnoControl_get_implementation( css::uno::XComponentContext* component, css::uno::Sequence const &arguments ) { return cppu::acquire( new toolkit::UnoControl( component, 0, component ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ================================================================================ /* SPDX-FileCopyrightText: 2013 Alejandro Fiestas Olivares SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #include "fakekwin_config.h" #include "fake/fakeinput.h" #include "fake/interfaces.h" #include "fake_generictypes.h" #include #include #include #include class Q_DECL_HIDDEN FakeInputBackend : public QObject { Q_OBJECT public: FakeInputBackend() = default; ~FakeInputBackend() = default; void reinitialize(); bool hasCapability(InputRedirection::Capability capability) const; bool hasCapability(InputRedirection::Feature feature) const; int capabilities() const { return capability_set.size(); } bool inputDevicesEnabled() const { return inputDevicesEnabled; } QVector inputDeviceFeatures() const { return inputDeviceFeatures_set; } QVector inputDeviceCapabilities() const { return inputDeviceCapabilities_set; } void touchBegin(quint32 time, quint32 axis); void touchUpdate(quint32 time, const QSizeF &delta, quint32 timeMicroseconds); void touchEnd(); FakeInput &fakeInput(); Q_SIGNALS: void inputDevicesChanged(); void changed(); private: InputDevice *createDevice(const QString &deviceName); private: void addTouchPoint(const QPoint &pos); void addTouchPoint(int id, const QPointF &pos); void sendTouchPointEvent(); void handleTouchEvent(); struct InputPoint { QPointF pos; qreal x = 0; qreal y = 0; qreal pressure = 0; quint32 time = 0; }; InputDevice *devices[InputDevice::DeviceType::All]; FakeInput *input; QVector points; QVector mice; Qt::MouseButton pressedButton = Qt::NoButton; bool touchEnabled = false; bool pressed; bool inputDevicesEnabled = false; bool miceEnabled = false; }; #define FOREACH_DEVICE(x) for (const InputDevice::Capability &capability : m_fakeInput.x()->inputs()) \ foreach (const InputDevice::Feature &feature, capability.m_touchFeatures) \ foreach (const InputDevice::Capability &capability2, feature.m_capabilities) \ foreach (const InputDevice::Feature &feature2, capability2.m_capabilities) FakeInputBackend::FakeInputBackend() : inputDevicesEnabled(false) , touchEnabled(false) , buttons(0) { connect(m_fakeInput.data(), &FakeInput::changed, this, &FakeInputBackend::changed); } void FakeInputBackend::reinitialize() { m_fakeInput.reset(m_inputManager->createDevice(QStringLiteral("TEST_X11"))); m_fakeInput->setType(FakeDevice::Mouse); // fill devices foreach (const InputDevice::Capability &capability, m_fakeInput->capabilities()) { foreach (const InputDevice::Feature &feature, capability.m_capabilities) { if (feature.isAccepted()) { m_fakeInput->setProperty("EVDEV", QVariant::fromValue(feature.feature)); } } } foreach (const InputDevice::Capability &capability, m_fakeInput->touchCapability()) { foreach (const InputDevice::Feature &feature, capability.m_touchFeatures) { if (feature.isAccepted()) { m_fakeInput->setProperty("TOUCH", QVariant::fromValue(feature.feature)); } } } foreach (const InputDevice::Capability &capability, m_fakeInput->touchPadCapability()) { foreach (const InputDevice::Feature &feature, capability.m_touchFeatures) { if (feature.isAccepted()) { m_fakeInput->setProperty("TOUCHPAD", QVariant::fromValue ================================================================================ // SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/arm/mach-pxa/aica.c * * Copyright (C) 2000-2003 Deep Blue Solutions Ltd (http://www. Deep Blue Solutions Ltd) * Copyright (C) 2008 Cody Lem * * Original author: Markus Grabner * Portions Copyright (C) 2004-2007 - 2009 Andres Salomon * * Original code: * Copyright (C) 2008 Amit Kucher (amit.kucher@gmail.com) * Copyright (C) 2008 Pavel Rochny */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "pxa27x.h" #include #include "devices.h" #include #include "generic.h" #include #include #include "common.h" #define AICA_PXA2XX_CLK_PCATHSCLK (2 * CONFIG_SYS_CLK_FREQ) #define AICA_PXA2XX_CLK_PCDTVHSCLK (2 * CONFIG_SYS_CLK_FREQ) /* GPIO */ #define GPIO_AICA_UART_RXD (GPIO_PORTA) #define GPIO_AICA_UART_TXD (GPIO_PORTB) #define GPIO_AICA_BOOT_MODE_EN (GPIO_PORTC) #define GPIO_AICA_PCATHSCLK (GPIO_PORTD) #define GPIO_AICA_PCDTVHSCLK (GPIO_PORTE) /* Clocks */ #define AICA_CLK_FREQ 7372800 #define AICA_CLK_PER_DIV 2 #define AICA_CLK_NUM (AICA_CLK_FREQ / AICA_CLK_PER_DIV) #define AICA_CLK(p, d, q) \ { \ .rate = AICA_CLK_FREQ, \ .parent_id = (p), \ .name = #d, \ .parent_name = (p), \ .clocks = { \ .pll = d, \ .mux = q, \ .rate_multiplier = 1, \ }, \ } static const struct pxa_gpio_chip ================================================================================ /* vi:set et ai sw=2 sts=2 ts=2: */ /*- * Copyright (c) 2005 Benedikt Meurer * Copyright (c) 2009 Jannis Pohlmann * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include #include #include #include static void thunar_launcher_finalize (GObject *object); static void thunar_launcher_launcher_destroyed(gpointer user_data, GObject *where_the_object_was); static void thunar_launcher_finished (GtkWidget *widget, ThunarLauncher *launcher); static void thunar_launcher_reload (ThunarLauncher *launcher); struct _ThunarLauncherClass { GObjectClass __parent__; }; struct _ThunarLauncher { GObject __parent__; ThunarDeviceMonitor *device_monitor; ThunarUser *user; }; static guint launcher_signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE (ThunarLauncher, thunar_launcher, G_TYPE_OBJECT) static void thunar_launcher_class_init (ThunarLauncherClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = thunar_launcher_finalize; launcher_signals[LAUNCHER_FINISHED] = g_signal_new ("launcher-finished", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ThunarLauncherClass, launcher_finished), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void thunar_launcher_init (ThunarLauncher *launcher) { launcher->user = NULL; } static void thunar_launcher_finalize (GObject *object) { ThunarLauncher *launcher = THUNAR_LAUNCHER (object); /* cleanup the launcher if there are any open files */ if (launcher->device_monitor != NULL) { thunar_device_monitor_stop (launcher->device_monitor); g_object_unref (launcher->device_monitor); launcher->device_monitor = NULL; } /* close the device */ g_object_unref (launcher->user); (*G_OBJECT_CLASS (thunar_launcher_parent_class)->finalize) (object); } static void launcher_finished (ThunarLauncher *launcher) { thunar_launcher_reload (launcher); } static void thunar_launcher_launcher_destroyed (gpointer data, GObject *where_the_object_was) { /* cleanup the launcher if there are any open files */ if (THUNAR_LAUNCHER_GET_CLASS (launcher)->launcher_destroyed) THUNAR_LAUNCHER_GET_CLASS (launcher)->launcher_destroyed (data, where_the_object_was); /* close the device */ g_object_unref (launcher->user); } static void thunar_launcher ================================================================================ // // Copyright (c) ZeroC, Inc. All rights reserved. // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only can be included directly." #endif #ifndef __G_PASTE_GREETING_H__ #define __G_PASTE_GREETING_H__ #include #include G_BEGIN_DECLS #define G_PASTE_TYPE_GREETING (g_paste_greeter_get_type ()) G_PASTE_FINAL_TYPE (Greeter, greeter, GREETING, GPasteItem) void g_paste_greeter_set_groups (GPasteGreeter *self, GPasteGroup *groups); GPasteGroup *g_paste_greeter_get_groups (GPasteGreeter *self); void g_paste_greeter_set_rate (GPasteGreeter *self, gdouble rate); gdouble g_paste_greeter_get_rate (GPasteGreeter *self); GPasteItem *g_paste_greeter_get_default_item (GPasteGreeter *self); void g_paste_greeter_set_rate_to_files (GPasteGreeter *self, gboolean rate_to_files); gboolean g_paste_greeter_get_rate_to_files (GPasteGreeter *self); void g_paste_greeter_add_history (GPasteGreeter *self, const gchar *history); void g_paste_greeter_remove_history (GPasteGreeter *self, const gchar *history); G_END_DECLS #endif /*__G_PASTE_GREETING_H__*/ ================================================================================ /**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of The Qt Company Ltd nor the names of its ** contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ //! [0] QGuiApplication *app = QApplication::instance(); if (app->platformName() == QLatin1String("xcb")) { // for OSX this returns the application running on the x server and // displays it in a message box. } //! [0] ================================================================================ // Copyright (C) 2002-2012 Nikolaus Gebhardt / Thomas Alten // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #ifndef __I_MESH_FILE_LOADER_H_INCLUDED__ #define __I_MESH_FILE_LOADER_H_INCLUDED__ #include "IReferenceCounted.h" #include "irrArray.h" #include "os.h" namespace irr { namespace scene { class IMeshBuffer; class IMeshManipulator; //! This class is a wrapper to load the mesh as a file. class IMeshFileLoader : public IReferenceCounted { public: //! Constructor IMeshFileLoader(const io::path& filename, IMeshManipulator* manip, io::IReadFile* file = 0); //! destructor virtual ~IMeshFileLoader(); //! creates a buffer with the given material. /** The \c meshName is used for error messages and is used for debugging purposes. \param size: The size of the mesh in the memory buffer. \param buffer: Pointer to the memory buffer. \return Pointer to the created mesh, or 0 if it could not be created. */ virtual IMeshBuffer* createMeshBuffer(const core::dimension2d& size, IMesh* mesh = 0, const io::path& filename = ""); //! loads a file into the mesh /** \return True if the mesh is loaded, false if not. */ virtual bool loadFromFile(io::IReadFile* file, IMesh* mesh = 0); //! creates a meshManipulator which provides support for moving a mesh /** The function should be implemented, as well as IAnimatedMesh::addMesh, because IAnimatedMesh needs to add a scene node animator. */ virtual IMeshManipulator* createMeshManipulator() const; //! returns the created scene node animator. virtual IAnimatedMeshSceneNodeAnimator* getMeshSceneNodeAnimator() const; //! returns the created light animator. virtual IAnimatedMeshSceneNodeAnimator* getMeshSceneNodeAnimatorLight() const; //! returns the number of animators used virtual u32 getMeshSceneNodeAnimatorCount() const; //! Returns the number of created meshes. virtual u32 getMeshBufferCount() const; //! Returns the amount of stored mesh buffers. /** The number of the elements is also returned. It could be negative, for example if you use a index buffer which is constant. \param size: size of the buffers (number of entities). \return Number of mesh buffers, or 0 if the mesh could not be loaded. */ virtual u32 getMeshBufferCount(f32 size) const; //! Returns an array of pointers to meshes virtual const core::array& getMeshBuffers() const; //! Returns the buffer with a certain index virtual IMeshBuffer* getMeshBuffer(u32 index) const; //! Returns a pointer to a mesh. /** If the mesh is a morph target, it will load it directly. \param meshName: Name of the mesh. \return Pointer to the mesh which is loaded or 0 if no mesh is loaded.*/ virtual IMesh* getMesh(const io::path& filename) const; //! Returns a pointer to a mesh. /** \param meshName: Name of the mesh. \return Pointer to the mesh which is loaded or 0 if no mesh is loaded.*/ virtual IMesh* getMesh(const io::path& filename, const io::path& language, bool loadMaterials) const; //! Adds a texture to a mesh. /** The first vertex of the given vertex buffer is the deformation which is multiplied with the inverse of the rotation of the mesh. If the mesh contains more than one texture per vertex, the texture can be stored for each vertex in the same array of vertices. \param vcount: Amount of vertices in the vertex buffer. \param buffer: Pointer ================================================================================ /* xutil.c -- Utility functions for the xmouse library. Copyright (C) 1991, 1995 Board of Trustees, University of Illinois. Copyright (C) 1995 Sun Microsystems, Inc. This file is part of XEmacs. XEmacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. XEmacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with XEmacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ /* * Motif Release 1.0.3 * * Note: In the version below, these include files include * motif/yn-X10/Pxm.h and motif/core/CWindow.h. * * Note: in the version below, we don't include configure.ac. That is, * it is included twice. In configure.ac, however, it is included * in the global file "xt_init.c". */ /* * Fujitsu Shotny-By (PTY, US) - W. Bailey * * - XChangeProperty will send SelectionNotify events if we're waiting * for someone to select() and we're non-exclusive. This has the * effect that we must send an event for every event to be processed, * after a user's selection has been successfully granted. * * - Motif-1.2 fucked together the border-only type of "window" in * Motif-1.1, and it founded that XGetWindowProperty() returns a * "Window", with type XA_WINDOW. We could instead just have a * WaitAtom for each "Selection" event, and send it in one of the * following: * * TimeOut * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, nowrapped) * Data * (Will be passed to XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection * (Request that Selection is accepted, all else discarded). * (Future use of XmImSetValuesAlmost().) * * TimeOut (Xt widget) * Property * (Property of Atoms used by emacs) * Selection ================================================================================ // $Id$ // $Source$ // @HEADER // *********************************************************************** // // Stokhos Package // Copyright (2009) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on behalf of the U.S. Government. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. Neither the name of the Corporation nor the names of the // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Questions? Contact Eric T. Phipps (etphipp@sandia.gov). // // *********************************************************************** // @HEADER #include "Teuchos_Assert.hpp" #include "Teuchos_SerialDenseMatrix.hpp" #include "Teuchos_TimeMonitor.hpp" #include "Teuchos_SerialDenseMatrixFunctions.hpp" #include "Teuchos_SerialDenseVector.hpp" #include "Teuchos_SerialDenseHelpers.hpp" #include "Teuchos_UnitTestHarness.hpp" #ifdef HAVE_TEUCHOSCORE_CXX11 #include "std_cxx11.hpp" #endif template Stokhos::HermiteBasis:: HermiteBasis( const Teuchos::SerialDenseMatrix& a, const Teuchos::SerialDenseVector& b, const Teuchos::SerialDenseVector& c, ordinal_type pb, ordinal_type pa, ordinal_type sm) : ordinal_type(pb), values(sm), alpha(pb), beta(pb), normalize(true), M(a), A(b), C(c), Mmod(a), Amod(a), Cmod(c), max_norm(std::numeric_limits::max()), eps_diff(3*numeric_limits::epsilon()), norm_diff(0), m(0), reduce_tol(numeric_limits::max()), max_iter(10), norm_iter(0), method(0), covar_method(0), tol_updated(false), order(0), norm_jac(0), solve_root(false), exp_C(0), rho_m(0), std_p(0) { // Determine the power of the given dense matrix const ordinal_type p = a.size(); power_of_power(A, p); power_of_power(C, p); } template void Stokhos::HermiteBasis:: power_of_power( const Teuchos::SerialDenseMatrix& A, const ordinal_type pb) { const ordinal_type pb_rows = A.numRows(); const ordinal_type pb_cols = A.numCols(); const ordinal_type pb_sz = pb_rows*pb_cols ================================================================================ // Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_PASSWORD_GENERATION_DIALOG_VIEW_H_ #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_PASSWORD_GENERATION_DIALOG_VIEW_H_ #include #include "base/macros.h" #include "chrome/browser/ui/passwords/password_generation_dialog.h" #include "chrome/browser/ui/views/controls/password_generation_dialog_controller.h" #include "chrome/browser/ui/views/payments/legal_message_view.h" #include "components/autofill/core/common/form_data.h" #include "content/public/browser/web_contents_user_data.h" #include "ui/views/window/dialog_delegate.h" namespace gfx { class Image; } namespace autofill { class FormData; class FormStructure; } // A PasswordGenerationDialogView shows the user's legal message form. The form // contains only the legal message form UI, but any additional data required to // be displayed in the form will be shown in the form UI. The form UI displays the // focused user's unedited user's PasswordGenerationSpecifics and whether or // not they are enabled. class PasswordGenerationDialogView : public PasswordGenerationDialog { public: PasswordGenerationDialogView( content::WebContents* web_contents, const base::string16& text, base::WeakPtr form_structure, content::WebWidget* web_widget, std::unique_ptr form_data); ~PasswordGenerationDialogView() override; // PasswordGenerationDialog implementation: void FormStructureUpdated(const autofill::FormData& form_data) override; void RevertToSavedPasswordForm() override; // views::View implementation: gfx::Image GetImage() override; private: // Contains the widget that was popped from the underlying widget and with // a stored string. The widget is owned by the view and it is deleted when // the view is destroyed. views::Widget* widget_; // The autofill::FormData which contains the forms, visible in the form // dialog. base::WeakPtr form_data_; DISALLOW_COPY_AND_ASSIGN(PasswordGenerationDialogView); }; #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_PASSWORD_GENERATION_DIALOG_VIEW_H_ ================================================================================ /* This file is part of KDevelop Copyright 2002-2005 Roberto Raggi Copyright 2006 Adam Treat Copyright 2007 Andreas Pakulat Copyright 2007 David Nolden This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KDEVPLATFORM_ITWSOURCEVIEW_H #define KDEVPLATFORM_ITWSOURCEVIEW_H #include "classmethoddeclaration.h" #include "declaration.h" #include "treeproperty.h" #include "typehelper.h" #include class QWidget; class QString; class QTextStream; namespace KDevelop { class Declaration; class IndexedDeclaration; class DeclarationId; class IndexedType; class IndexedQualifiedIdentifier; class IndexedQualifiedIdentifierSet; class TypeBuilder; class TreeModel; namespace Ui { class ITWSourceView; } class ITWSourceViewPrivate; class KDEVPLATFORMLANGUAGE_EXPORT ITWSourceView : public QObject, public KDevelop::DeclarationBlock, public DeclarationHighlighting { Q_OBJECT public: ITWSourceView( ITWSourceViewPrivate& dd, QAbstractItemModel* model, ITWSourceView::BuildOptions buildOptions ); virtual ~ITWSourceView() {} virtual QList< Declaration* > declarations(); virtual QList& declarations(); virtual void appendChild( Declaration* declaration ); virtual void removeChild(Declaration* declaration); virtual void renameChild( Declaration* declaration, const QString& newName ); virtual void toPython( OutputStream& str, Context* context ); virtual bool isSourceDeclaration( const Declaration* decl ) const; virtual bool isExtraDeclaration( const Declaration* decl ) const; virtual bool isExplicitlyGlobal(const Declaration* decl) const; virtual QString prettyName( const Declaration* decl ) const; virtual bool isFolderType( const Declaration* decl ) const; enum BuildOption { None = 0, Branch = 1, Include = 2 }; Q_DECLARE_FLAGS(BuildOptions,BuildOption) virtual void setBuildOptions(BuildOptions buildOptions) override; void start( const QString& fileName ); virtual void run(KDevelop::ILocator*, const KDevelop::CursorInRevision&) = 0; virtual const IndexedQualifiedIdentifier& importer( ) const; virtual void addType( const QString& typeName, const QStringList& args ) = 0; virtual bool isHeader( ) const = 0; virtual bool isGeneratedHeader( ) const = 0; virtual bool isExampleType() const { return false; } virtual const IndexedType& type() const { return *m_type; } virtual QString prettyName() const = 0; virtual void setType(const IndexedType& newType) { m_type = &newType; if (newType) { m_type->setOuterScope(&newType->outerScope()); } } virtual void setType( const QString& newTypeName ) { m_type = new IndexedType( newTypeName ); } virtual void clearType() { m_type = nullptr; } virtual void markAsExtraProperty(); virtual void markAsSourceProperty(); virtual void markAsGeneratedProperty(); virtual void setDocumentation( const QString& doc ); virtual bool isAutoGenerated( ) const { return false; } virtual bool isAutoGeneratedGlobally() const { return false; } virtual bool isOverridenInInnerTarget( ) const { return false ================================================================================ /* * include/haproxy/http_client_sess.h * Client-side per-session data and counters and internal functions. * * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation, version 2.1 * exclusively. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _HAPROXY_HTTP_CLIENT_SESS_H #define _HAPROXY_HTTP_CLIENT_SESS_H #include #include #include #include struct fstrm_file; struct fstrm_file_handle; struct fstrm_context; struct fstrm_iothr; struct fstrm_iothr_sess; struct proxy; /* Totals. * * The max-length state of this data-structures is limited to FSTRM_MAX_LEN. It * contains the data from the session, the total number of bytes buffered in * the stream, and the maximum amount of buffered data we can process before * stopping. * * The initial state is for reaching the entire buffer. It holds the data from * the stream in, and the initial length. * * The available data space of this data structure is the remaining data. * It is zero-filled or shorted if the total number of bytes buffered would * exceed FSTRM_MAX_LEN. It is only set if the current stream has a custom * buffer. */ /* Used with each fstrm session: * - fstrm_iothr->owner : if the stream is owned by the current owner, it will * be released and set to NULL. * - fstrm_iothr->read : number of bytes actually read. * - fstrm_iothr->n_queue : maximum number of empty buffers. * - fstrm_iothr->n_read : maximum number of non-empty buffers. * - fstrm_iothr->n_sent : maximum number of sent buffers. */ struct fstrm_sess_stat { unsigned char n_read; /* number of bytes read. */ unsigned char n_queue; /* maximum number of empty buffers. */ unsigned short n_sent; /* maximum number of sent buffers. */ }; /* used to control a stream for stopping its streams. * * It is used to control how many empty buffers a stream consumes. The * stream will stop when there is at least one empty buffer left. If the * stream has no availablity then it should stop immediately if possible * instead of switching to the later empty buffer. */ struct fstrm_stream_user { unsigned short n_queue; /* maximum number of empty buffers. */ unsigned short n_read; /* maximum number of non-empty buffers. */ unsigned short n_sent; /* maximum number of sent buffers. */ int max_wpos; /* maximum write position in stream. */ unsigned int ready:1; /* stream is ready for sending. */ unsigned int rewind:1; /* stream is rewindable. */ unsigned int flush_point:1; /* we need to flush the stream. */ unsigned int msg_started:1;/* the last msg was started. */ }; /* sessions and strm-contexts. * - fstrm_iothr->owner : * - NULL - stream is not owned by a current owner. * - NULL - streams has not yet been opened. * - a stream opened by a previous owner. */ struct fstrm_iothr { struct fstrm_sess_stat stat; ================================================================================ /* * Copyright (C) 2010 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef AudioProcessingEvent_h #define AudioProcessingEvent_h #include "Event.h" #include "PlatformEvent.h" #include "ScriptWrappable.h" namespace WebCore { // Event whose type can be part of a AudioProcessingEvent. class AudioProcessingEvent : public Event, public ScriptWrappable { public: static Ref create(const AtomicString& type, bool canBubble, bool cancelable, float volume) { return adoptRef(*new AudioProcessingEvent(type, canBubble, cancelable, volume)); } const AtomicString& InterfaceName() const; bool IsActive() const; float InitialDelay() const; void setVolume(float volume); private: AudioProcessingEvent(const AtomicString& type, bool canBubble, bool cancelable, float volume); AudioProcessingEvent(const AtomicString&, bool canBubble, bool cancelable, const String& type); virtual EventInterface eventInterface() const; virtual ScriptWrappable* toScriptWrappable(); virtual const AtomicString& interfaceName() const; virtual bool hasInterface() const; bool m_isActive; float m_initialDelay; float m_volume; }; } // namespace WebCore #endif // AudioProcessingEvent_h ================================================================================ // Copyright 2017 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #ifndef CORE_FXCODEC_JBIG2_JBIG2_BASIC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_BASIC_H_ #include #include #include "core/fxcodec/jbig2/jbig2_huffman.h" #include "core/fxcodec/jbig2/JBig2_Context.h" #include "core/fxcodec/jbig2/JBig2_Segment.h" extern "C" { extern void JBig2_HuffmanFree(JBig2HuffmanDecoder* pDecoder); } // extern "C" namespace fxcodec { class JBig2Context; class JBig2HuffmanState; class JBig2HuffmanTable; enum JBig2ComposeType { JBIG2_COMPOSE_NONE, JBIG2_COMPOSE_MMR, JBIG2_COMPOSE_MMRTEMPLATE, JBIG2_COMPOSE_MMRTEMPLATETEMPLATE2, JBIG2_COMPOSE_MMRTEMPLATETEMPLATE3, }; // Each 16x16 transform will use 3 16-bit pixels at a time. Each 16x16 subsample // will be stored separately in two 32-bit word. typedef uint32_t TransformSize; typedef uint16_t SubsampleType; struct JBig2ComposeCtx { JBig2ComposeType composition_type = JBIG2_COMPOSE_NONE; TransformSize num_xforms = 0; std::unique_ptr data; SubsampleType subsample_x = 0; SubsampleType subsample_y = 0; size_t max_output_width = 0; size_t max_output_height = 0; uint16_t input_width = 0; uint16_t input_height = 0; bool use_grain_params = false; }; class JBig2_Context { public: explicit JBig2_Context(JBig2Context* pContext); ~JBig2_Context(); void StartNewPage(); void EndPage(); void OutputBufferTo(uint8_t* pOutputBuffer, int32_t output_pitch, int32_t output_buffer_height); int32_t NumSegments() const; bool ShouldSkipPage() const; bool GetUseScreenSpace() const; private: JBig2Context* const pContext; uint32_t m_ctx_size; std::unique_ptr m_compose_ctx; std::unique_ptr m_ctx; uint32_t m_ctx_buf_offset = 0; std::vector m_ctx_buf; }; class JBig2_Segment { public: JBig2_Segment(const uint8_t* pSrc, uint32_t SrcSize); ~JBig2_Segment(); JBig2Context* StartNewPage(JBig2Context* pDstContext); JBig2Context* EndPage(JBig2Context* pDstContext); JBig2Context* OutputBufferTo(JBig2Context* pDstContext); void OutputBytes(uint8_t* pBuf, int32_t pitch, uint32_t w) const; private: uint8_t* const m_pData; const uint32_t m_SrcSize; }; } // namespace fxcodec #endif // CORE_FXCODEC_JBIG2_JBIG2_BASIC_H_ ================================================================================ /**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef TESTLIB_H #define TESTLIB_H #include // Classes we use to make tests. namespace QTest { Q_EXPORT void qInstallMessageHandler(QtMsgType type, const char *msg); } Q_DECLARE_METATYPE(QTest::QtMsgType); Q_DECLARE_METATYPE(const char *); Q_DECLARE_METATYPE(const char *); #endif // TESTLIB_H ================================================================================ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef GMPContentParent_h_ #define GMPContentParent_h_ #include "mozilla/gmp/PGMPContentParent.h" #include "nsTArray.h" namespace mozilla { class GMPContentParent final : public PGMPContentParent { public: GMPContentParent(); NS_DECL_ISUPPORTS NS_DECL_PGMPOLICYPARENT // Methods only intended for internal use. RefPtr Alloc(const CreateDecoderParams& aParams) override; void Dealloc() override; void ActorDestroy(ActorDestroyReason aWhy) override; mozilla::ipc::IPCResult RecvCreateGMPContentParent( Endpoint&& aEndpoint); private: ~GMPContentParent() = default; nsTArray mRealms; // This vector will only contain realms that were returned from // GMPContentParent::InitForContentParent(). nsTArray mRealmsRealms; }; } // namespace mozilla #endif // GMPContentParent_h_ ================================================================================ // This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2009-2010 Benoit Jacob // Copyright (C) 2008 Gael Guennebaud // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef EIGEN_VECTOR_HH #define EIGEN_VECTOR_HH namespace Eigen { namespace internal { /** \internal * \brief Template function to construct a vector with type specified as 1D array with specified size. * * \param sz The dimension of the vector to create. * * This function does nothing if the passed dimension does not match the dimension of the type specified * by the array passed to the constructor. In case of a mismatch between the dimensions, the error code * is set to the size of the \p sz array passed to the constructor. */ template inline typename disable_if::value, Eigen::Matrix >::type construct_vec(Index sz) { EIGEN_STATIC_ASSERT((PacketSize==Dynamic || PacketSize==1), THIS_METHOD_IS_ONLY_FOR_VECTORS); return m_size==Dynamic ? m_storage.data() : m_storage.resize(sz); } /** \internal * \brief Template function to construct a vector with type specified as 1D array with specified size. * * \param sz The dimension of the vector to create. * * This function does nothing if the passed dimension does not match the dimension of the type specified * by the array passed to the constructor. In case of a mismatch between the dimensions, the error code * is set to the size of the \p sz array passed to the constructor. * * The default behavior is to call the constructor that takes an array with size_t size, with the * requested dimensions. If there are extra dimensions, they are initialized as zeros. */ template inline typename disable_if::value, Eigen::Matrix >::type construct_vec(Index sz, Index vec_stride) { EIGEN_STATIC_ASSERT((PacketSize==Dynamic || PacketSize==PacketSize-1), THIS_METHOD_IS_ONLY_FOR_VECTORS); eigen_assert((Size==Dynamic || Size==PacketSize-1) && "Invalid size given to EigenBase::Construct::Vec"); return m_size==Dynamic ? m_storage.data() : m_storage.resize(sz, vec_stride); } template inline typename enable_if::value, Eigen::Matrix >::type make_constant_matrix_if_vector_size(Index /*num_rows*/, Index /*num_cols*/) { eigen_assert(false && "Should not be called"); } } // end namespace internal /** \internal * \brief Construct a vector of type specified as 1D array with specified size. * * \param sz The dimension of the vector to create. * * \returns a reference to the constructed vector. * * This function does nothing if the passed dimension does not match the dimension of the type specified * by the array passed to the constructor. In case of a mismatch between the dimensions, the error code * is set to the size of the \p sz array passed to the constructor. * * Note that Eigen::setZero() is not supported by this function. */ template inline Eigen::Matrix& construct_vec(Index sz) { return make_constant_matrix_if_vector_size(sz, sz); } /** \internal * \brief Construct a vector of type specified as 1D array with specified size. * * \param sz The dimension of the vector to create ================================================================================ /* * glade-gtk-popover.c - GladeWidgetAdaptor for GtkPopover * * Copyright (C) 2013 Tristan Van Berkom * * Authors: * Tristan Van Berkom * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include #include #include "glade-gtk-popover-editor.h" #define GLADE_TAG_EDIT_CHILD "edit-child" #define GLADE_TAG_SHOW_PAGE_NUMBER "show-page-number" struct _GladeGtkPopoverEditor { GladeWidgetAdaptor parent; GtkPopover *popover; /* current page */ gint current_page; }; typedef struct { GtkWidget *widget; gboolean show_page_number; } TooltipData; static gboolean glade_gtk_popover_editor_set_property (GladeWidgetAdaptor *adaptor, GObject *object, const gchar *id, const GValue *value) { if (!strcmp (id, GLADE_TAG_SHOW_PAGE_NUMBER)) { gint page_number; g_object_get (object, "page-number", &page_number, NULL); gtk_notebook_set_current_page (GTK_NOTEBOOK (object), page_number); return TRUE; } return GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_POPOVER)->set_property (adaptor, object, id, value); } static gboolean glade_gtk_popover_editor_set_show_page_number (GladeWidgetAdaptor *adaptor, GtkWidget *widget, gboolean show_page_number) { GladeGtkPopoverEditor *editor = GLADE_GTK_POPOVER_EDITOR (adaptor); g_object_set (editor->popover, "show-page-number", show_page_number, NULL); return TRUE; } static GladeEditorPageType glade_gtk_popover_editor_page_type_from_string (const gchar *str) { if (!strcmp (str, "handout")) return GLADE_PAGE_EDITOR_PAGE_TYPE_HANDOUT; else if (!strcmp (str, "title")) return GLADE_PAGE_EDITOR_PAGE_TYPE_TITLE; else if (!strcmp (str, "edit_child")) return GLADE_PAGE_EDITOR_PAGE_TYPE_EDIT_CHILD; else return GLADE_PAGE_EDITOR_PAGE_TYPE_LAST; } static GtkWidget * glade_gtk_popover_editor_create_page (GladeWidgetAdaptor *adaptor, GladeEditorPageType type) { GladeGtkPopoverEditor *editor = GLADE_GTK_POPOVER_EDITOR (adaptor); GtkWidget *page; page = glade_placeholder_new (); g_signal_connect (page, "child-activated", G_CALLBACK (glade_gtk_popover_editor_page_activated), editor); return page; } static void glade_gtk_popover_editor_add_child (GladeWidgetAdaptor *adaptor, GObject *object, GObject *child) { GladeGtkPopoverEditor *editor = GLADE_GTK_POPOVER_EDITOR (adaptor); glade_placeholder_set_child (GLADE_PLACEHOLDER (editor->popover), glade_placeholder_new (), GTK_PLACEHOLDER (object), ================================================================================ /* * Copyright © 2006 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include "xf86Parser.h" #include "xf86tokens.h" #include "mipointer.h" /* These tokens are not part of the Mesa parser. They are used to distinguish * between port numbers and names in the grammar. */ static const char *tok_port; static const char *tok_matrix; static const char *tok_reg; static void print_keyword(FILE * fp, int key) { switch (key) { case KEY_SW_VECTOR: fprintf(fp, " SW vector"); break; case KEY_SW_ORIGIN: fprintf(fp, " SW origin"); break; case KEY_SW_Z: fprintf(fp, " SW Z"); break; case KEY_SW_NORMAL: fprintf(fp, " SW normal"); break; case KEY_SW_COLOR: fprintf(fp, " SW color"); break; case KEY_NUM_REGS: fprintf(fp, " num regs"); break; case KEY_C_REGISTER_COMPONENTS: fprintf(fp, " C register components"); break; case KEY_NUM_CLIENT_IMAGES: fprintf(fp, " num client images"); break; case KEY_DEPTH_COMPONENT: fprintf(fp, " depth component"); break; case KEY_COMPOSITE_METHOD: fprintf(fp, " composite method"); break; case KEY_FRAGMENT_LIGHT: fprintf(fp, " fragment light"); break; case KEY_CLIP_PLANES: fprintf(fp, " clip planes"); break; case KEY_GLARE_TEXTURE_EXT: fprintf(fp, " glare texture extension"); break; case KEY_NUM_POLYGONS: fprintf(fp, " num polygons"); break; case KEY_SRC_X: fprintf(fp, " src_x"); break; case KEY_SRC_Y: fprintf(fp, " src_y"); break; case KEY_SRC_Z: fprintf(fp, " src_z"); break; case KEY_DEST_X: fprintf(fp, " dest_x"); break; case KEY_DEST_Y: fprintf(fp, " dest_y"); break; case KEY_DEST_Z: fprintf(fp, " dest_z"); break; case KEY_DEST_W: fprintf(fp, " dest_w"); break; case KEY_SOURCE_X: fprintf(fp, " source_x"); break; case KEY_SOURCE_Y: fprintf(fp, " source_y"); break; case KEY_SOURCE_Z: fprintf(fp, " source_z"); break; case KEY_SOURCE_W: fprintf(fp, " source_w"); break; case KEY_SPHERE_CENTER: fprintf(fp, " sphere center"); break; case KEY_SOURCE_W_Y: fprintf(fp, " source_w_y"); break; case KEY_SOURCE_W_Z: fprintf(fp, ================================================================================ /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2008 Andreas Gaida Copyright (C) 2008 Ralph Schreyer Copyright (C) 2008, 2009 Ralph Schreyer Copyright (C) 2008, 2009 Klaus Spanderen This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email . The license is also available online at . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ /*! \file fdmstepconditionset.hpp \brief finite-difference-step condition set */ #ifndef quantlib_fdm_step_condition_set_hpp #define quantlib_fdm_step_condition_set_hpp #include #include #include #include namespace QuantLib { class Fdm1DimConditionSet; class Fdm2DimConditionSet; class FdmEpsilonConditionSet; class FdmDiffConditionSet; class FdmGearConditionSet; class FdmBlackScholesDWOPConditionSet; class FdmBlackScholesCompositeConditionSet; class FdmBlackScholesMixedScholesProductConditionSet; class FdmBlackScholesMixedDagToDagProductConditionSet; class FdmBlackScholesCompositeConditionSetFactory; class FdmExtOUWithJumpsConditionSet; //! %Arguments for an %FdmStepConditionSet object class FdmStepConditionSet : public Handle { public: class arguments { public: arguments() { rebate = false; today = Date(); exerciseTime = Null