What does the word 'customer' properly apply to?

The bill also required rotation of principal maintenance inspectors and stipulated that the word "customer" properly applies to the flying public, not those entities regulated by the FAA.


Context: This is the most common method of construction procurement and is well established and recognized. In this arrangement, the architect or engineer acts as the project coordinator. His or her role is to design the works, prepare the specifications and produce construction drawings, administer the contract, tender the works, and manage the works from inception to completion. There are direct contractual links between the architect's client and the main contractor. Any subcontractor has a direct contractual relationship with the main contractor. The procedure continues until the building is ready to occupy.

Question: There are direct contractual links between who?


Context: After strengthening his government in northern China, Kublai pursued an expansionist policy in line with the tradition of Mongol and Chinese imperialism. He renewed a massive drive against the Song dynasty to the south. Kublai besieged Xiangyang between 1268 and 1273, the last obstacle in his way to capture the rich Yangzi River basin. An unsuccessful naval expedition was undertaken against Japan in 1274. Kublai captured the Song capital of Hangzhou in 1276, the wealthiest city of China. Song loyalists escaped from the capital and enthroned a young child as Emperor Bing of Song. The Mongols defeated the loyalists at the battle of Yamen in 1279. The last Song emperor drowned, bringing an end to the Song dynasty. The conquest of the Song reunited northern and southern China for the first time in three hundred years.

Question: What area was Kublai trying to capture by defending Xiangyang?


Context: The neighborhood of Sunnyside is on Fresno's far southeast side, bounded by Chestnut Avenue to the West. Its major thoroughfares are Kings Canyon Avenue and Clovis Avenue. Although parts of Sunnyside are within the City of Fresno, much of the neighborhood is a "county island" within Fresno County. Largely developed in the 1950s through the 1970s, it has recently experienced a surge in new home construction. It is also the home of the Sunnyside Country Club, which maintains a golf course designed by William P. Bell.

Question: Where is the home of the Sunnyside Country Club?


Context: The historical measure of a steam engine's energy efficiency was its "duty". The concept of duty was first introduced by Watt in order to illustrate how much more efficient his engines were over the earlier Newcomen designs. Duty is the number of foot-pounds of work delivered by burning one bushel (94 pounds) of coal. The best examples of Newcomen designs had a duty of about 7 million, but most were closer to 5 million. Watt's original low-pressure designs were able to deliver duty as high as 25 million, but averaged about 17. This was a three-fold improvement over the average Newcomen design. Early Watt engines equipped with high-pressure steam improved this to 65 million.

Question: What was the ideal duty of a concept engine?


Context: Imperialism and colonialism both dictate the political and economic advantage over a land and the indigenous populations they control, yet scholars sometimes find it difficult to illustrate the difference between the two. Although imperialism and colonialism focus on the suppression of an other, if colonialism refers to the process of a country taking physical control of another, imperialism refers to the political and monetary dominance, either formally or informally. Colonialism is seen to be the architect deciding how to start dominating areas and then imperialism can be seen as creating the idea behind conquest cooperating with colonialism. Colonialism is when the imperial nation begins a conquest over an area and then eventually is able to rule over the areas the previous nation had controlled. Colonialism's core meaning is the exploitation of the valuable assets and supplies of the nation that was conquered and the conquering nation then gaining the benefits from the spoils of the war. The meaning of imperialism is to create an empire, by conquering the other state's lands and therefore increasing its own dominance. Colonialism is the builder and preserver of the colonial possessions in an area by a population coming from a foreign region. Colonialism can completely change the existing social structure, physical structure and economics of an area; it is not unusual that the characteristics of the conquering peoples are inherited by the conquered indigenous populations.

Question: what do conquering people take away from native populations?


Context: Bills can be introduced to Parliament in a number of ways; the Scottish Government can introduce new laws or amendments to existing laws as a bill; a committee of the Parliament can present a bill in one of the areas under its remit; a member of the Scottish Parliament can introduce a bill as a private member; or a private bill can be submitted to Parliament by an outside proposer. Most draft laws are government bills introduced by ministers in the governing party. Bills pass through Parliament in a number of stages:

Question: Who may also submit private bills to Parliament?

an outside proposer
an outside proposer
an outside proposer


Immunogenicity of an inactivated Rift Valley fever vaccine in humans: a 12-year experience.

Rift Valley fever (RVF) virus causes serious and fatal disease in animals and man.

To protect personnel who work with RVF virus in the laboratory, or troops who may be exposed to this virus, the US Army successfully developed an improved version of inactivated RVF vaccine, TSI-GSD-200.

From early 1986 to late 1997, 598 at-risk workers at the US Army Medical Research Institute of Infectious Diseases (USAMRIID) were vaccinated as part of an occupational safety and health program.

The subjects of this study received three subcutaneous doses (0, 7 and 28 days) of 0.5 ml of TSI-GSD-200.

A total of 540 vaccinees (90.3%) initially responded (group A) with an 80% plaque-reduction neutralization antibody titer (PRNT80) of > or =1:40; whereas 58 subjects (9.7%) were initial nonresponders (group B) failing to achieve this titer.

Volunteers who either failed to respond or who achieved a titer of > or =1:40 but whose titer waned below 1:40 were boosted 1-4 times with the same vaccine.

Among 247 group A subjects who received the first recall injection, 242 (98%) were successfully boosted, achieving a PRNT80 > or =1:40.

Thirty-three of 44 (75%) initial nonresponders were converted to responder status after the first booster, which is a lower rate than that of group A (P < 0.001).

After the primary series and the first booster, Kaplan-Meier analysis showed 50% probability of group A members maintaining a titer of > or =1:40 for approximately eight years; whereas group B had a 50% probability of maintaining a titer for only 204 days.

Group A immune response rates to boosts 1-4 ranged from 87 to 100% with geometric mean titers (GMTs) ranging from 80 to 916.

Boosts 1-4 immune response rates of group B volunteers ranged from 67 to 79% with GMTs ranging from 90 to 177.

Minor side effects to TSI-GSD-200 were noted in 2.7% of all vaccinees after primaries and 3.5% of all vaccinees who had primaries and up to four boosters.

We conclude that the use of TSI-GSD-200 is safe and provides good long-term immunity in humans when the primary series and one boost are administered.


Chyloptysis after ligation of the thoracic duct.

Chyloptysis is a very rare clinical finding.

We describe a 44-year-old man who presented with cough and milky-white sputum.

Fiberoptic bronchoscopy revealed white sputum, which originated from the right B(6) bronchus.

The finding of elevated triglyceride levels in his sputum led to the diagnosis of chyloptysis.

He had a surgical history of ligation of the thoracic duct for idiopathic chylopericarditis 7 years-previously.

He also suffered from postoperative bilateral empyema.

Since then, his pleural cavity has been adhered bilaterally.

It is thought that his abnormal postoperative lymphatic flow caused the chyloptysis.


Lung transplantation for severe pulmonary hypertension--awake extracorporeal membrane oxygenation for postoperative left ventricular remodelling.

Bilateral lung transplantation (BLTx) is an established treatment for end-stage pulmonary hypertension (PH).

Ventilator weaning failure and death are more common as in BLTx for other indications.

We hypothesized that left ventricular (LV) dysfunction is the main cause of early postoperative morbidity or mortality and investigated a weaning strategy using awake venoarterial extracorporeal membrane oxygenation (ECMO).

In 23 BLTx for severe PH, ECMO used during BLTx was continued for a minimum of 5 days (BLTx-ECMO group).

Echocardiography, left atrial (LA) and Swan-Ganz catheters were used for monitoring.

Early extubation after transplantation was attempted under continued ECMO.

Preoperatively, all patients had severely reduced cardiac index (mean, 2.1 L/min/m2).

On postoperative day 2, reduction of ECMO flow resulted in increasing LA and decreasing systemic blood pressures.

On the day of ECMO explantation (median, postoperative day 8), LV diameter had increased; LA and blood pressures remained stable.

Survival rates at 3 and 12 months were 100% and 96%, respectively.

Data were compared to two historic control groups of BLTx without ECMO (BLTx ventilation) or combined heart-lung transplantation for severe PH.

Early after BLTx for severe PH, the LV may be unable to handle normalized LV preload.

This can be effectively bridged with awake venoarterial ECMO.


The 7 Healthiest Things You Can Eat at McDonald's

While saying the word McDonald's in the fitness world sometimes feels like saying an expletive in front of a priest, the truth of the matter is, there are times when you don't have other options.

Whether you're on a road trip and there aren't rest stops for hundreds of miles or you simply don't have access to nutritious food on the go, the golden arches of gluttony may in fact be your only option.

Fortunately, if you take a conscious approach to ordering, there are a few options that can actually provide a somewhat nutritious snack or meal.


/*
 * 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
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and
 * limitations under the License.

 */
package org.apache.drill.exec.planner.logical;

import org.apache.calcite.plan.

SqlKind;

public class DrillUnnestRule extends RelOptRule {
  public static final RelOptRule INSTANCE = new DrillUnnestRule();

  private DrillUnnestRule() {
    super(RelOptHelper.some(Uncollect.class,
        RelOptHelper.some(LogicalProject.class, RelOptHelper.any(LogicalValues.class, Convention.

LOGICAL_BUILDER, "DrillUnnestRule");
  }

  @Override
  public void onMatch(RelOptRuleCall call) {
    final Uncollect uncollect = call.rel(0);
    final LogicalProject project = call.rel(1);

    RexNode projectedNode = project.getProjects().iterator().next();
    if (projectedNode.getKind() !

FIELD_ACCESS) {
      return;
    }
    final RelTraitSet traits = uncollect.getTraitSet().plus(DrillRel.

DRILL_LOGICAL);
    DrillUnnestRel unnest = new DrillUnnestRel(uncollect.getCluster(),
        traits, uncollect.getRowType(), projectedNode);
    call.transformTo(unnest);
  }
}


/*
 * gamin.c: glue to the gamin library for access from Python
 *
 * See Copyright for the status of this software.
 *
 * veillard@redhat.com
 */

#include <Python.h>
#include <fam.h>
#include "config.h"

#ifdef GAMIN_DEBUG_API
int FAMDebug(FAMConnection *fc, const char *filename, FAMRequest * fr,
             void *userData);
#endif

void init_gamin(void);

static FAMConnection **connections = NULL;
static int nb_connections = 0;
static int max_connections = 0;

static FAMRequest **requests = NULL;
static int nb_requests = 0;
static int max_requests = 0;

static int
get_connection(void) {
    int i;

    if (connections == NULL) {
        max_connections = 10;
        connections = (FAMConnection **) malloc(max_connections *
	                                        sizeof(FAMConnection *));
	if (connections == NULL) {
	    max_connections = 0;
	    return(-1);
	}
	memset(connections, 0, max_connections * sizeof(FAMConnection *));
    }
    for (i = 0;i < max_connections;i++)
        if (connections[i] == NULL)
	    break;
    if (i >= max_connections) {
        FAMConnection **tmp;

	tmp = (FAMConnection **) realloc(connections, max_connections * 2 *
	                                 sizeof(FAMConnection *));
	if (tmp == NULL)
	    return(-1);
	memset(&tmp[max_connections], 0,
	       max_connections * sizeof(FAMConnection *));
	max_connections *= 2;
	connections = tmp;
    }
    connections[i] = (FAMConnection *) malloc(sizeof(FAMConnection));
    if (connections[i] == NULL)
        return(-1);
    nb_connections++;
    return(i);
}

static int
release_connection(int no) {
    if ((no < 0) || (no >= max_connections))
        return(-1);
    if (connections[no] == NULL)
        return(-1);
    free(connections[no]);
    connections[no] = NULL;
    nb_connections--;
    return(0);
}

static FAMConnection *
check_connection(int no) {
    if ((no < 0) || (no >= max_connections))
        return(NULL);
    return(connections[no]);
}

static int
get_request(void) {
    int i;

    if (requests == NULL) {
        max_requests = 10;
        requests = (FAMRequest **) malloc(max_requests *
	                                        sizeof(FAMRequest *));
	if (requests == NULL) {
	    max_requests = 0;
	    return(-1);
	}
	memset(requests, 0, max_requests * sizeof(FAMRequest *));
    }
    for (i = 0;i < max_requests;i++)
        if (requests[i] == NULL)
	    break;
    if (i >= max_requests) {
        FAMRequest **tmp;

	tmp = (FAMRequest **) realloc(requests, max_requests * 2 *
	                                 sizeof(FAMRequest *));
	if (tmp == NULL)
	    return(-1);
	memset(&tmp[max_requests], 0,
	       max_requests * sizeof(FAMRequest *));
	max_requests *= 2;
	requests = tmp;
    }
    requests[i] = (FAMRequest *) malloc(sizeof(FAMRequest));
    if (requests[i] == NULL)
        return(-1);
    nb_requests++;
    return(i);
}

static int
release_request(int no) {
    if ((no < 0) || (no >= max_requests))
        return(-1);
    if (requests[no] == NULL)
        return(-1);
    free(requests[no]);
    requests[no] = NULL;
    nb_requests--;
    return(0);
}

static FAMRequest *
check_request(int no) {
    if ((no < 0) || (no >= max_requests))
        return(NULL);
    return(requests[no]);
}

static int fam_connect(void) {
    int ret;
    int no = get_connection();
    FAMConnection *conn;

    if (no < 0)
        return(-1);
    conn = connections[no];
    if (conn == NULL)
        return(-1);
    ret = FAMOpen2(conn, "gamin-python");
    if (ret < 0) {
        release_connection(no);
        return(ret);
    }
    return(no);
}

static int
call_internal_callback(PyObject *self, const char *filename, FAMCodes event) {
    PyObject *ret;

    if ((self == NULL) || (filename == NULL))
        return(-1);
/*    fprintf(stderr, "call_internal_callback(%p)\n", self); */
    ret = PyEval_CallMethod(self, (char *) "_internal_callback",
                            (char *) "(zi)", filename, (int) event);
    if (ret != NULL) {
        Py_DECREF(ret);
#if 0
    } else {
	fprintf(stderr, "call_internal_callback() failed\n");
#endif
    }
    return(0);
}

static PyObject *
gamin_Errno(PyObject *self, PyObject * args) {
    return(PyInt_FromLong(FAMErrno));
}

static PyObject *
gamin_MonitorConnect(PyObject *self, PyObject * args) {
    int ret;

    ret = fam_connect();
    if (ret < 0) {
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(ret));
}

static PyObject *
gamin_GetFd(PyObject *self, PyObject * args) {
    int no;
    FAMConnection *conn;

    if (!PyArg_ParseTuple(args, (char *)"i:GetFd", &no))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(FAMCONNECTION_GETFD(conn)));
}

static PyObject *
gamin_MonitorClose(PyObject *self, PyObject * args) {
    int no;
    int ret;

    if (!PyArg_ParseTuple(args, (char *)"i:MonitorClose", &no))
	return(NULL);

    ret = release_connection(no);
    return(PyInt_FromLong(ret));
}

static PyObject *
gamin_ProcessOneEvent(PyObject *self, PyObject * args) {
    int ret;
    FAMEvent fe;
    int no;
    FAMConnection *conn;

    if (!PyArg_ParseTuple(args, (char *)"i:ProcessOneEvent", &no))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }

    ret = FAMNextEvent(conn, &fe);
    if (ret < 0) {
	return(PyInt_FromLong(-1));
    }
    call_internal_callback(fe.userdata, &fe.filename[0], fe.code);

    return(PyInt_FromLong(ret));
}

static PyObject *
gamin_ProcessEvents(PyObject *self, PyObject * args) {
    int ret;
    int nb = 0;
    FAMEvent fe;
    int no;
    FAMConnection *conn;

    if (!PyArg_ParseTuple(args, (char *)"i:ProcessOneEvent", &no))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }

    do {
	ret = FAMPending(conn);
	if (ret < 0)
	    return(PyInt_FromLong(-1));
	if (ret == 0)
	    break;
	ret = FAMNextEvent(conn, &fe);
	if (ret < 0)
	    return(PyInt_FromLong(-1));
	call_internal_callback(fe.userdata, &fe.filename[0], fe.code);
	nb++;
    } while (ret >= 0);

    return(PyInt_FromLong(nb));
}

static PyObject *
gamin_EventPending(PyObject *self, PyObject * args) {
    int no;
    FAMConnection *conn;

    if (!PyArg_ParseTuple(args, (char *)"i:ProcessOneEvent", &no))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(FAMPending(conn)));
}

static PyObject *
gamin_MonitorNoExists(PyObject *self, PyObject * args) {
    int no;
    FAMConnection *conn;

    if (!PyArg_ParseTuple(args, (char *)"i:MonitorNoExists", &no))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(FAMNoExists(conn)));
}

static PyObject *
gamin_MonitorDirectory(PyObject *self, PyObject * args) {
    PyObject *userdata;
    char * filename;
    int ret;
    int noreq;
    int no;
    FAMConnection *conn;
    FAMRequest *request;

    if (!PyArg_ParseTuple(args, (char *)"izO:MonitorDirectory",
        &no, &filename, &userdata))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    noreq = get_request();
    if (noreq < 0) {
	return(PyInt_FromLong(-1));
    }
    request = check_request(noreq);

    ret = FAMMonitorDirectory(conn, filename, request, userdata);
    if (ret < 0) {
        release_request(noreq);
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(noreq));
}

static PyObject *
gamin_MonitorFile(PyObject *self, PyObject * args) {
    PyObject *userdata;
    char * filename;
    int ret;
    int noreq;
    int no;
    FAMConnection *conn;
    FAMRequest *request;

    if (!PyArg_ParseTuple(args, (char *)"izO:MonitorFile",
        &no, &filename, &userdata))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    noreq = get_request();
    if (noreq < 0) {
	return(PyInt_FromLong(-1));
    }
    request = check_request(noreq);

    ret = FAMMonitorFile(conn, filename, request, userdata);
    if (ret < 0) {
        release_request(noreq);
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(noreq));
}

static PyObject *
gamin_MonitorCancel(PyObject *self, PyObject * args) {
    int ret;
    int noreq;
    int no;
    FAMConnection *conn;
    FAMRequest *request;

    if (!PyArg_ParseTuple(args, (char *)"ii:MonitorCancel",
        &no, &noreq))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    request = check_request(noreq);
    if (request == NULL) {
	return(PyInt_FromLong(-1));
    }

    ret = FAMCancelMonitor(conn, request);
    if (ret < 0) {
        release_request(noreq);
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(ret));
}

#ifdef GAMIN_DEBUG_API
static PyObject *
gamin_MonitorDebug(PyObject *self, PyObject * args) {
    PyObject *userdata;
    char * filename;
    int ret;
    int noreq;
    int no;
    FAMConnection *conn;
    FAMRequest *request;

    if (!PyArg_ParseTuple(args, (char *)"izO:MonitorDebug",
        &no, &filename, &userdata))
	return(NULL);

    conn = check_connection(no);
    if (conn == NULL) {
	return(PyInt_FromLong(-1));
    }
    noreq = get_request();
    if (noreq < 0) {
	return(PyInt_FromLong(-1));
    }
    request = check_request(noreq);

    ret = FAMDebug(conn, filename, request, userdata);
    if (ret < 0) {
        release_request(noreq);
	return(PyInt_FromLong(-1));
    }
    return(PyInt_FromLong(noreq));
}
#endif

static PyMethodDef gaminMethods[] = {
    {(char *)"MonitorConnect", gamin_MonitorConnect, METH_VARARGS, NULL},
    {(char *)"MonitorDirectory", gamin_MonitorDirectory, METH_VARARGS, NULL},
    {(char *)"MonitorFile", gamin_MonitorFile, METH_VARARGS, NULL},
    {(char *)"MonitorCancel", gamin_MonitorCancel, METH_VARARGS, NULL},
    {(char *)"MonitorNoExists", gamin_MonitorNoExists, METH_VARARGS, NULL},
    {(char *)"EventPending", gamin_EventPending, METH_VARARGS, NULL},
    {(char *)"ProcessOneEvent", gamin_ProcessOneEvent, METH_VARARGS, NULL},
    {(char *)"ProcessEvents", gamin_ProcessEvents, METH_VARARGS, NULL},
    {(char *)"MonitorClose", gamin_MonitorClose, METH_VARARGS, NULL},
    {(char *)"GetFd", gamin_GetFd, METH_VARARGS, NULL},
    {(char *)"Errno", gamin_Errno, METH_VARARGS, NULL},
#ifdef GAMIN_DEBUG_API
    {(char *)"MonitorDebug", gamin_MonitorDebug, METH_VARARGS, NULL},
#endif
    {NULL, NULL, 0, NULL}
};

void
init_gamin(void)
{
    static int initialized = 0;

    if (initialized != 0)
        return;

    /* intialize the python extension module */
    Py_InitModule((char *) "_gamin", gaminMethods);

    initialized = 1;
}


/***********************************************************************************************************************************
Common Functions and Definitions for Backup and Expire Commands
***********************************************************************************************************************************/
#ifndef COMMAND_BACKUP_COMMON_H
#define COMMAND_BACKUP_COMMON_H

#include <stdbool.h>
#include <time.h>

#include "common/type/string.h"
#include "info/infoBackup.h"

/***********************************************************************************************************************************
Backup constants
***********************************************************************************************************************************/
#define BACKUP_PATH_HISTORY                                         "backup.history"

/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
// Format a backup label from a type and timestamp with an optional prior label
String *backupLabelFormat(BackupType type, const String *backupLabelPrior, time_t timestamp);

// Returns an anchored regex string for filtering backups based on the type (at least one type is required to be true)
typedef struct BackupRegExpParam
{
    bool full;
    bool differential;
    bool incremental;
    bool noAnchorEnd;
} BackupRegExpParam;

#define backupRegExpP(...)                                                                                \
    backupRegExp((BackupRegExpParam){__VA_ARGS__})

String *backupRegExp(BackupRegExpParam param);

// Create a symlink to the specified backup (if symlinks are supported)
void backupLinkLatest(const String *backupLabel, unsigned int repoIdx);

#endif

2015-2020 The PostgreSQL Global Development Group
           2013-2020 David Steele


/*
 * barrier -- mouse and keyboard sharing utility
 * Copyright (C) 2018 Debauchee Open Source Group
 * Copyright (C) 2012-2016 Symless Ltd.
 * Copyright (C) 2002 Chris Schoeneman
 *
 * This package is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * found in the file LICENSE that should have accompanied this file.
 *
 * This package 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, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include "base/EventTypes.h"

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

#if defined(synwinhk_EXPORTS)
#define CBARRIERHOOK_API __declspec(dllexport)
#else
#define CBARRIERHOOK_API __declspec(dllimport)
#endif

#define BARRIER_MSG_MARK            WM_APP + 0x0011    // mark id; <unused>
#define BARRIER_MSG_KEY                WM_APP + 0x0012    // vk code; key data
#define BARRIER_MSG_MOUSE_BUTTON    WM_APP + 0x0013    // button msg; <unused>
#define BARRIER_MSG_MOUSE_WHEEL        WM_APP + 0x0014    // delta; <unused>
#define BARRIER_MSG_MOUSE_MOVE        WM_APP + 0x0015    // x; y
#define BARRIER_MSG_POST_WARP        WM_APP + 0x0016    // <unused>; <unused>
#define BARRIER_MSG_PRE_WARP        WM_APP + 0x0017    // x; y
#define BARRIER_MSG_SCREEN_SAVER    WM_APP + 0x0018    // activated; <unused>
#define BARRIER_MSG_DEBUG            WM_APP + 0x0019    // data, data
#define BARRIER_MSG_INPUT_FIRST        BARRIER_MSG_KEY
#define BARRIER_MSG_INPUT_LAST        BARRIER_MSG_PRE_WARP
#define BARRIER_HOOK_LAST_MSG        BARRIER_MSG_DEBUG

#define BARRIER_HOOK_FAKE_INPUT_VIRTUAL_KEY    VK_CANCEL
#define BARRIER_HOOK_FAKE_INPUT_SCANCODE    0

extern "C" {

enum EHookMode {
    kHOOK_DISABLE,
    kHOOK_WATCH_JUMP_ZONE,
    kHOOK_RELAY_EVENTS
};

/* REMOVED ImmuneKeys for migration of synwinhk out of DLL

typedef void            (*SetImmuneKeysFunc)(const DWORD*, std::size_t);

// do not call setImmuneKeys() while the hooks are active!
CBARRIERHOOK_API void    setImmuneKeys(const DWORD *list, std::size_t size);

*/

}

2002-2014 Chris Schoeneman <crs23@users.sourceforge.net>
           2008-2014 Nick Bolton <nick@symless.com>
           2012-2016 Symless Ltd.
           2018-2021 Debauchee Open Source Group
           2021 Povilas Kanapickas <povilas@radix.lt>


/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright 2008 Simtec Electronics
 *      Ben Dooks <ben@simtec.co.uk>
 *      http://armlinux.simtec.co.uk/
 *
 * S3C - IRQ detection types.
 */

/* values for S3C2410_EXTINT0/1/2 and other cpus in the series, including
 * the S3C64XX
*/
#define S3C2410_EXTINT_LOWLEV	 (0x00)
#define S3C2410_EXTINT_HILEV	 (0x01)
#define S3C2410_EXTINT_FALLEDGE	 (0x02)
#define S3C2410_EXTINT_RISEEDGE	 (0x04)
#define S3C2410_EXTINT_BOTHEDGE	 (0x06)

1991-2012 Linus Torvalds and many others


/*         ______   ___    ___
 *        /\  _  \ /\_ \  /\_ \
 *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
 *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
 *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
 *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
 *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
 *                                           /\____/
 *                                           \_/__/
 *
 *      X-Windows mouse module.
 *
 *      By Michael Bukin.
 *
 *      See readme.txt for copyright information.
 */

#include "allegro.h"
#include "allegro/internal/aintern.h"
#include "allegro/platform/aintunix.h"
#include "xwin.h"
#include <X11/cursorfont.h>

/* TRUE if the requested mouse range extends beyond the regular
 * (0, 0, SCREEN_W-1, SCREEN_H-1) range. This is aimed at detecting
 * whether the user mouse coordinates are relative to the 'screen'
 * bitmap (semantics associated with scrolling) or to the video page
 * currently being displayed (semantics associated with page flipping).
 * We cannot differentiate them properly because both use the same
 * scroll_screen() method.
 */
int _xwin_mouse_extended_range = FALSE;

static int mouse_minx = 0;
static int mouse_miny = 0;
static int mouse_maxx = 319;
static int mouse_maxy = 199;

static int mymickey_x = 0;
static int mymickey_y = 0;

static int mouse_mult = -1;       /* mouse acceleration multiplier */
static int mouse_div = -1;        /* mouse acceleration divisor */
static int mouse_threshold = -1;  /* mouse acceleration threshold */

static int last_xspeed = -1;      /* latest set_mouse_speed() settings */
static int last_yspeed = -1;

static int _xwin_mousedrv_init(void);
static void _xwin_mousedrv_exit(void);
static void _xwin_mousedrv_position(int x, int y);
static void _xwin_mousedrv_set_range(int x1, int y1, int x2, int y2);
static void _xwin_mousedrv_set_speed(int xspeed, int yspeed);
static void _xwin_mousedrv_get_mickeys(int *mickeyx, int *mickeyy);
static int _xwin_select_system_cursor(AL_CONST int cursor);

static void _xwin_set_mouse_speed(int xspeed, int yspeed);

static MOUSE_DRIVER mouse_xwin =
{
   MOUSE_XWINDOWS,
   empty_string,
   empty_string,
   "X-Windows mouse",
   _xwin_mousedrv_init,
   _xwin_mousedrv_exit,
   NULL,
   NULL,
   _xwin_mousedrv_position,
   _xwin_mousedrv_set_range,
   _xwin_mousedrv_set_speed,
   _xwin_mousedrv_get_mickeys,
   NULL,
   _xwin_enable_hardware_cursor,
   _xwin_select_system_cursor
};

/* list the available drivers */
_DRIVER_INFO _xwin_mouse_driver_list[] =
{
   {  MOUSE_XWINDOWS, &mouse_xwin, TRUE  },
   {  0,              NULL,        0     }
};

/* _xwin_mousedrv_handler:
 *  Mouse "interrupt" handler for mickey-mode driver.
 */
static void _xwin_mousedrv_handler(int x, int y, int z, int w, int buttons)
{
   _mouse_b = buttons;

   mymickey_x += x;
   mymickey_y += y;

   _mouse_x += x;
   _mouse_y += y;
   _mouse_z += z;
   _mouse_w += w;

   if ((_mouse_x < mouse_minx) || (_mouse_x > mouse_maxx)
       || (_mouse_y < mouse_miny) || (_mouse_y > mouse_maxy)) {
      _mouse_x = CLAMP(mouse_minx, _mouse_x, mouse_maxx);
      _mouse_y = CLAMP(mouse_miny, _mouse_y, mouse_maxy);
   }

   _handle_mouse_input();
}

/* _xwin_mousedrv_init:
 *  Initializes the mickey-mode driver.
 */
static int _xwin_mousedrv_init(void)
{
   int num_buttons;
   unsigned char map[8];

   num_buttons = _xwin_get_pointer_mapping(map, sizeof(map));
   num_buttons = CLAMP(2, num_buttons, 3);

   last_xspeed = -1;
   last_yspeed = -1;

   XLOCK();

   _xwin_mouse_interrupt = _xwin_mousedrv_handler;

   XUNLOCK();

   return num_buttons;
}

/* _xwin_mousedrv_exit:
 *  Shuts down the mickey-mode driver.
 */
static void _xwin_mousedrv_exit(void)
{
   XLOCK();

   if (mouse_mult >= 0)
      XChangePointerControl(_xwin.display, 1, 1, mouse_mult,
         mouse_div, mouse_threshold);

   _xwin_mouse_interrupt = 0;

   XUNLOCK();
}

/* _xwin_mousedrv_position:
 *  Sets the position of the mickey-mode mouse.
 */
static void _xwin_mousedrv_position(int x, int y)
{
   XLOCK();

   _mouse_x = x;
   _mouse_y = y;

   mymickey_x = mymickey_y = 0;

   if (_xwin.hw_cursor_ok)
      XWarpPointer(_xwin.display, _xwin.window, _xwin.window, 0, 0,
                   _xwin.window_width, _xwin.window_height, x, y);
   XUNLOCK();

   _xwin_set_warped_mouse_mode(FALSE);
}

/* _xwin_mousedrv_set_range:
 *  Sets the range of the mickey-mode mouse.
 */
static void _xwin_mousedrv_set_range(int x1, int y1, int x2, int y2)
{
   mouse_minx = x1;
   mouse_miny = y1;
   mouse_maxx = x2;
   mouse_maxy = y2;

   if ((mouse_maxx >= SCREEN_W) || (mouse_maxy >= SCREEN_H))
      _xwin_mouse_extended_range = TRUE;
   else
      _xwin_mouse_extended_range = FALSE;

   XLOCK();

   _mouse_x = CLAMP(mouse_minx, _mouse_x, mouse_maxx);
   _mouse_y = CLAMP(mouse_miny, _mouse_y, mouse_maxy);

   XUNLOCK();
}

/* _xwin_mousedrv_set_speed:
 *  Sets the speed of the mouse cursor.  We don't set the speed if the cursor
 *  isn't in the window, but we remember the setting so it will be set the
 *  next time the cursor enters the window.
 */
static void _xwin_mousedrv_set_speed(int xspeed, int yspeed)
{
   if (_mouse_on) {
      _xwin_set_mouse_speed(xspeed, yspeed);
   }

   last_xspeed = xspeed;
   last_yspeed = yspeed;
}

/* _xwin_mousedrv_get_mickeys:
 *  Reads the mickey-mode count.
 */
static void _xwin_mousedrv_get_mickeys(int *mickeyx, int *mickeyy)
{
   int temp_x = mymickey_x;
   int temp_y = mymickey_y;

   mymickey_x -= temp_x;
   mymickey_y -= temp_y;

   *mickeyx = temp_x;
   *mickeyy = temp_y;

   _xwin_set_warped_mouse_mode(TRUE);
}

/* _xwin_select_system_cursor:
 *  Select an OS native cursor
 */
static int _xwin_select_system_cursor(AL_CONST int cursor)
{
   switch(cursor) {
      case MOUSE_CURSOR_ARROW:
         _xwin.cursor_shape = XC_left_ptr;
         break;
      case MOUSE_CURSOR_BUSY:
         _xwin.cursor_shape = XC_watch;
         break;
      case MOUSE_CURSOR_QUESTION:
         _xwin.cursor_shape = XC_question_arrow;
         break;
      case MOUSE_CURSOR_EDIT:
         _xwin.cursor_shape = XC_xterm;
         break;
      default:
         return 0;
   }

   XLOCK();

   if (_xwin.cursor != None) {
      XUndefineCursor(_xwin.display, _xwin.window);
      XFreeCursor(_xwin.display, _xwin.cursor);
   }

   _xwin.cursor = XCreateFontCursor(_xwin.display, _xwin.cursor_shape);
   XDefineCursor(_xwin.display, _xwin.window, _xwin.cursor);

   XUNLOCK();

   return cursor;
}

/* _xwin_set_mouse_speed:
 *  The actual function that sets the speed of the mouse cursor.
 *  Each step slows down or speeds the mouse up by 0.5x.
 */
static void _xwin_set_mouse_speed(int xspeed, int yspeed)
{
   int speed;
   int hundredths;

   XLOCK();

   if (mouse_mult < 0)
      XGetPointerControl(_xwin.display, &mouse_mult, &mouse_div,
         &mouse_threshold);

   speed = MAX(1, (xspeed + yspeed) / 2);

   if (mouse_div == 0)
      hundredths = mouse_mult * 100;
   else
      hundredths = (mouse_mult * 100 / mouse_div);
   hundredths -= (speed - 2) * 50;
   if (hundredths < 0)
      hundredths = 0;

   XChangePointerControl(_xwin.display, 1, 1, hundredths,
      100, mouse_threshold);

   XUNLOCK();
}

/* _xwin_mouse_leave_notify:
 *  Reset the mouse speed to its original value when the cursor leave the
 *  Allegro window.
 */
void _xwin_mouse_leave_notify(void)
{
   if (mouse_mult >= 0) {
      XLOCK();
      XChangePointerControl(_xwin.display, 1, 1, mouse_mult,
         mouse_div, mouse_threshold);
      XUNLOCK();
   }
}

/* _xwin_mouse_enter_notify:
 *  Restore the mouse speed setting when the mouse cursor re-enters the
 *  Allegro window.
 */
void _xwin_mouse_enter_notify(void)
{
   if (last_xspeed >= 0) {
      _xwin_set_mouse_speed(last_xspeed, last_yspeed);
   }
}

1996-2011 Shawn Hargreaves and the Allegro developers.


/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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/. */
#if !defined(MediaQueue_h_)
#  define MediaQueue_h_

#  include <type_traits>

#  include "mozilla/RecursiveMutex.h"
#  include "mozilla/TaskQueue.h"

#  include "nsDeque.h"
#  include "MediaEventSource.h"
#  include "TimeUnits.h"

namespace mozilla {

class AudioData;

template <class T>
class MediaQueue : private nsRefPtrDeque<T> {
 public:
  MediaQueue()
      : nsRefPtrDeque<T>(),
        mRecursiveMutex("mediaqueue"),
        mEndOfStream(false) {}

  ~MediaQueue() { Reset(); }

  inline size_t GetSize() const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    return nsRefPtrDeque<T>::GetSize();
  }

  inline void PushFront(T* aItem) {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    nsRefPtrDeque<T>::PushFront(aItem);
  }

  inline void Push(T* aItem) {
    MOZ_DIAGNOSTIC_ASSERT(aItem);
    Push(do_AddRef(aItem));
  }

  inline void Push(already_AddRefed<T> aItem) {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    T* item = aItem.take();

    MOZ_DIAGNOSTIC_ASSERT(item);
    MOZ_DIAGNOSTIC_ASSERT(item->GetEndTime() >= item->mTime);
    nsRefPtrDeque<T>::Push(dont_AddRef(item));
    mPushEvent.Notify(RefPtr<T>(item));

    // Pushing new data after queue has ended means that the stream is active
    // again, so we should not mark it as ended.
    if (mEndOfStream) {
      mEndOfStream = false;
    }
  }

  inline already_AddRefed<T> PopFront() {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    RefPtr<T> rv = nsRefPtrDeque<T>::PopFront();
    if (rv) {
      MOZ_DIAGNOSTIC_ASSERT(rv->GetEndTime() >= rv->mTime);
      mPopFrontEvent.Notify(RefPtr<T>(rv));
    }
    return rv.forget();
  }

  inline already_AddRefed<T> PopBack() {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    return nsRefPtrDeque<T>::Pop();
  }

  inline RefPtr<T> PeekFront() const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    return nsRefPtrDeque<T>::PeekFront();
  }

  inline RefPtr<T> PeekBack() const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    return nsRefPtrDeque<T>::Peek();
  }

  void Reset() {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    nsRefPtrDeque<T>::Erase();
    mEndOfStream = false;
  }

  bool AtEndOfStream() const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    return GetSize() == 0 && mEndOfStream;
  }

  // Returns true if the media queue has had its last item added to it.
  // This happens when the media stream has been completely decoded. Note this
  // does not mean that the corresponding stream has finished playback.
  bool IsFinished() const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    return mEndOfStream;
  }

  // Informs the media queue that it won't be receiving any more items.
  void Finish() {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    if (!mEndOfStream) {
      mEndOfStream = true;
      mFinishEvent.Notify();
    }
  }

  // Returns the approximate number of microseconds of items in the queue.
  int64_t Duration() const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    if (GetSize() == 0) {
      return 0;
    }
    T* last = nsRefPtrDeque<T>::Peek();
    T* first = nsRefPtrDeque<T>::PeekFront();
    return (last->GetEndTime() - first->mTime).ToMicroseconds();
  }

  void LockedForEach(nsDequeFunctor<T>& aFunctor) const {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    nsRefPtrDeque<T>::ForEach(aFunctor);
  }

  // Fill aResult with the elements which end later than the given time aTime.
  void GetElementsAfter(const media::TimeUnit& aTime,
                        nsTArray<RefPtr<T>>* aResult) {
    GetElementsAfterStrict(aTime.ToMicroseconds(), aResult);
  }

  void GetFirstElements(uint32_t aMaxElements, nsTArray<RefPtr<T>>* aResult) {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    for (size_t i = 0; i < aMaxElements && i < GetSize(); ++i) {
      *aResult->AppendElement() = nsRefPtrDeque<T>::ObjectAt(i);
    }
  }

  uint32_t AudioFramesCount() {
    static_assert(std::is_same_v<T, AudioData>,
                  "Only usable with MediaQueue<AudioData>");
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    uint32_t frames = 0;
    for (size_t i = 0; i < GetSize(); ++i) {
      T* v = nsRefPtrDeque<T>::ObjectAt(i);
      frames += v->Frames();
    }
    return frames;
  }

  MediaEventSource<RefPtr<T>>& PopFrontEvent() { return mPopFrontEvent; }

  MediaEventSource<RefPtr<T>>& PushEvent() { return mPushEvent; }

  MediaEventSource<void>& FinishEvent() { return mFinishEvent; }

 private:
  // Extracts elements from the queue into aResult, in order.
  // Elements whose end time is before or equal to aTime are ignored.
  void GetElementsAfterStrict(int64_t aTime, nsTArray<RefPtr<T>>* aResult) {
    RecursiveMutexAutoLock lock(mRecursiveMutex);
    if (GetSize() == 0) return;
    size_t i;
    for (i = GetSize() - 1; i > 0; --i) {
      T* v = nsRefPtrDeque<T>::ObjectAt(i);
      if (v->GetEndTime().ToMicroseconds() < aTime) break;
    }
    for (; i < GetSize(); ++i) {
      RefPtr<T> elem = nsRefPtrDeque<T>::ObjectAt(i);
      if (elem->GetEndTime().ToMicroseconds() > aTime) {
        aResult->AppendElement(elem);
      }
    }
  }

  mutable RecursiveMutex mRecursiveMutex;
  MediaEventProducer<RefPtr<T>> mPopFrontEvent;
  MediaEventProducer<RefPtr<T>> mPushEvent;
  MediaEventProducer<void> mFinishEvent;
  // True when we've decoded the last frame of data in the
  // bitstream for which we're queueing frame data.
  bool mEndOfStream;
};

}  // namespace mozilla

#endif


/* -*- 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_SW_INC_UNOTBL_HXX
#define INCLUDED_SW_INC_UNOTBL_HXX

#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/util/XSortable.hpp>
#include <com/sun/star/chart/XChartDataArray.hpp>
#include <com/sun/star/text/XTextTableCursor.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/sheet/XCellRangeData.hpp>
#include <com/sun/star/table/XAutoFormattable.hpp>

#include <cppuhelper/implbase.hxx>

#include <comphelper/uno3.hxx>

#include <svl/listener.hxx>

#include "TextCursorHelper.hxx"
#include "unotext.hxx"
#include "frmfmt.hxx"
#include "unocrsr.hxx"

class SwTable;
class SwTableBox;
class SwTableLine;
class SwTableCursor;
class SfxItemPropertySet;

typedef
cppu::WeakImplHelper
<
    css::table::XCell,
    css::lang::XServiceInfo,
    css::beans::XPropertySet,
    css::container::XEnumerationAccess
>
SwXCellBaseClass;
class SwXCell final : public SwXCellBaseClass,
    public SwXText,
    public SvtListener
{
    friend void   sw_setString( SwXCell &rCell, const OUString &rText,
                                bool bKeepNumberFormat );
    friend void   sw_setValue( SwXCell &rCell, double nVal );

    const SfxItemPropertySet*   m_pPropSet;
    SwTableBox*                 m_pBox;       // only set in non-XML import
    const SwStartNode*      m_pStartNode; // only set in XML import
    SwFrameFormat* m_pTableFormat;

    // table position where pBox was found last
    size_t m_nFndPos;
    css::uno::Reference<css::text::XText> m_xParentText;
    static size_t const NOTFOUND = SAL_MAX_SIZE;

    virtual const SwStartNode *GetStartNode() const override;

    virtual css::uno::Reference< css::text::XTextCursor >
        CreateCursor() override;

    bool IsValid() const;

    virtual ~SwXCell() override;

    virtual void Notify(const SfxHint&) override;

public:
    SwXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, size_t nPos);
    SwXCell(SwFrameFormat* pTableFormat, const SwStartNode& rStartNode); // XML import interface

    static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();

    //XUnoTunnel
    virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;

    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
    virtual void SAL_CALL acquire(  ) noexcept override;
    virtual void SAL_CALL release(  ) noexcept override;

    //XTypeProvider
    virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) override;
    virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) override;

    //XCell
    virtual OUString SAL_CALL getFormula(  ) override;
    virtual void SAL_CALL setFormula( const OUString& aFormula ) override;
    virtual double SAL_CALL getValue(  ) override;
    /// @throws css::uno::RuntimeException
    double getValue(  ) const
        { return const_cast<SwXCell*>(this)->getValue(); };
    virtual void SAL_CALL setValue( double nValue ) override;
    virtual css::table::CellContentType SAL_CALL getType(  ) override;
    virtual sal_Int32 SAL_CALL getError(  ) override;

    //XText
    virtual css::uno::Reference< css::text::XTextCursor >  SAL_CALL createTextCursor() override;
    virtual css::uno::Reference< css::text::XTextCursor >  SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > & aTextPosition) override;
    virtual void SAL_CALL  setString(const OUString& aString) override;

    //XPropertySet
    virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
    virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
    virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
    virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
    virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
    virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
    virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;

    //XEnumerationAccess - was: XParagraphEnumerationAccess
    virtual css::uno::Reference< css::container::XEnumeration >  SAL_CALL createEnumeration() override;

    //XElementAccess
    virtual css::uno::Type SAL_CALL getElementType(  ) override;
    virtual sal_Bool SAL_CALL hasElements(  ) override;

    SwTableBox* GetTableBox() const { return m_pBox; }
    static rtl::Reference<SwXCell> CreateXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, SwTable *pTable = nullptr );
    SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox);
    SwFrameFormat* GetFrameFormat() const { return m_pTableFormat; }
    double GetForcedNumericalValue() const;
    css::uno::Any GetAny() const;
};

class SwXTextTableRow final
    : public cppu::WeakImplHelper<css::beans::XPropertySet, css::lang::XServiceInfo>
    , public SvtListener
{
    SwFrameFormat* m_pFormat;
    SwTableLine* m_pLine;
    const SfxItemPropertySet* m_pPropSet;

    SwFrameFormat* GetFrameFormat() { return m_pFormat; }
    const SwFrameFormat* GetFrameFormat() const { return m_pFormat; }
    virtual ~SwXTextTableRow() override;

public:
    SwXTextTableRow(SwFrameFormat* pFormat, SwTableLine* pLine);

    //XPropertySet
    virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
    virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
    virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
    virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
    virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
    virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
    virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;

    static SwTableLine* FindLine(SwTable* pTable, SwTableLine const * pLine);

    void Notify(const SfxHint&) override;
};

typedef cppu::WeakImplHelper<
    css::text::XTextTableCursor,
    css::lang::XServiceInfo,
    css::beans::XPropertySet> SwXTextTableCursor_Base;
class SW_DLLPUBLIC SwXTextTableCursor final
    : public SwXTextTableCursor_Base
    , public SvtListener
    , public OTextCursorHelper
{
    SwFrameFormat* m_pFrameFormat;
    const SfxItemPropertySet* m_pPropSet;

public:
    SwXTextTableCursor(SwFrameFormat* pFormat, SwTableBox const* pBox);
    SwXTextTableCursor(SwFrameFormat& rTableFormat, const SwTableCursor* pTableSelection);
    DECLARE_XINTERFACE()

    //XTextTableCursor
    virtual OUString SAL_CALL getRangeName() override;
    virtual sal_Bool SAL_CALL gotoCellByName( const OUString& aCellName, sal_Bool bExpand ) override;
    virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) override;
    virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) override;
    virtual sal_Bool SAL_CALL goUp( sal_Int16 nCount, sal_Bool bExpand ) override;
    virtual sal_Bool SAL_CALL goDown( sal_Int16 nCount, sal_Bool bExpand ) override;
    virtual void SAL_CALL gotoStart( sal_Bool bExpand ) override;
    virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) override;
    virtual sal_Bool SAL_CALL mergeRange() override;
    virtual sal_Bool SAL_CALL splitRange( sal_Int16 Count, sal_Bool Horizontal ) override;

    //XPropertySet
    virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
    virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
    virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
    virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
    virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
    virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
    virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;

    // ITextCursorHelper
    virtual const SwPaM*        GetPaM() const override;
    virtual SwPaM*              GetPaM() override;
    virtual const SwDoc*        GetDoc() const override;
    virtual SwDoc*              GetDoc() override;

    virtual void Notify( const SfxHint& ) override;

    const SwUnoCursor&            GetCursor() const;
    SwUnoCursor&                  GetCursor();
    sw::UnoCursorPointer m_pUnoCursor;
    SwFrameFormat* GetFrameFormat() const { return m_pFrameFormat; }
};

struct SwRangeDescriptor
{
    sal_Int32 nTop;
    sal_Int32 nLeft;
    sal_Int32 nBottom;
    sal_Int32 nRight;

    void Normalize();
};

class SAL_DLLPUBLIC_RTTI SwXTextTable final : public cppu::WeakImplHelper
<
    css::text::XTextTable,
    css::lang::XServiceInfo,
    css::table::XCellRange,
    css::chart::XChartDataArray,
    css::beans::XPropertySet,
    css::container::XNamed,
    css::table::XAutoFormattable,
    css::util::XSortable,
    css::lang::XUnoTunnel,
    css::sheet::XCellRangeData
>
{
private:
    class Impl;
    ::sw::UnoImplPtr<Impl> m_pImpl;

    SwXTextTable();
    SwXTextTable(SwFrameFormat& rFrameFormat);
    virtual ~SwXTextTable() override;

public:
    static css::uno::Reference<css::text::XTextTable>
            CreateXTextTable(SwFrameFormat * pFrameFormat);

    SW_DLLPUBLIC static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();

    SW_DLLPUBLIC static void GetCellPosition(const OUString& rCellName, sal_Int32& o_rColumn, sal_Int32& o_rRow);

    SW_DLLPUBLIC SwFrameFormat* GetFrameFormat();

    //XUnoTunnel
    virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;

    //XTextTable
    virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) override;
    virtual css::uno::Reference< css::table::XTableRows > SAL_CALL getRows(  ) override;
    virtual css::uno::Reference< css::table::XTableColumns > SAL_CALL getColumns(  ) override;
    virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByName( const OUString& aCellName ) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getCellNames(  ) override;
    virtual css::uno::Reference< css::text::XTextTableCursor > SAL_CALL createCursorByCellName( const OUString& aCellName ) override;

    //XTextContent
    virtual void SAL_CALL attach(const css::uno::Reference< css::text::XTextRange > & xTextRange) override;
    virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getAnchor(  ) override;

    //XComponent
    virtual void SAL_CALL dispose() override;
    virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
    virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;

    //XCellRange
    virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) override;
    virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) override;
    virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName( const OUString& aRange ) override;

    //XChartDataArray
    virtual css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL getData(  ) override;
    virtual void SAL_CALL setData( const css::uno::Sequence< css::uno::Sequence< double > >& aData ) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getRowDescriptions(  ) override;
    virtual void SAL_CALL setRowDescriptions( const css::uno::Sequence< OUString >& aRowDescriptions ) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getColumnDescriptions(  ) override;
    virtual void SAL_CALL setColumnDescriptions( const css::uno::Sequence< OUString >& aColumnDescriptions ) override;

    //XChartData
    virtual void SAL_CALL addChartDataChangeEventListener( const css::uno::Reference< css::chart::XChartDataChangeEventListener >& aListener ) override;
    virtual void SAL_CALL removeChartDataChangeEventListener( const css::uno::Reference< css::chart::XChartDataChangeEventListener >& aListener ) override;
    virtual double SAL_CALL getNotANumber(  ) override;
    virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) override;

    //XSortable
    virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor() override;
    virtual void SAL_CALL sort(const css::uno::Sequence< css::beans::PropertyValue >& xDescriptor) override;

    //XAutoFormattable
    virtual void SAL_CALL autoFormat(const OUString& aName) override;

    //XPropertySet
    virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
    virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
    virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
    virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
    virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
    virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
    virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;

    //XNamed
    virtual OUString SAL_CALL getName() override;
    virtual void SAL_CALL setName(const OUString& Name_) override;

    //XCellRangeData
    virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDataArray(  ) override;
    virtual void SAL_CALL setDataArray( const css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& aArray ) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;

};

class SwXCellRange final : public cppu::WeakImplHelper
<
    css::table::XCellRange,
    css::lang::XServiceInfo,
    css::lang::XUnoTunnel,
    css::beans::XPropertySet,
    css::chart::XChartDataArray,
    css::util::XSortable,
    css::sheet::XCellRangeData
>
{
private:
    class Impl;
    ::sw::UnoImplPtr<Impl> m_pImpl;

    SwXCellRange(const sw::UnoCursorPointer& pCursor, SwFrameFormat& rFrameFormat, SwRangeDescriptor const & rDesc);
    virtual ~SwXCellRange() override;

public:
    static ::rtl::Reference<SwXCellRange> CreateXCellRange(
            const sw::UnoCursorPointer& pCursor, SwFrameFormat& rFrameFormat,
            SwRangeDescriptor const & rDesc);

    static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();

    void SetLabels(bool bFirstRowAsLabel, bool bFirstColumnAsLabel);

    std::vector<css::uno::Reference<css::table::XCell>> GetCells();

    const SwUnoCursor* GetTableCursor() const;

    //XUnoTunnel
    virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;

    //XCellRange
    virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) override;
    virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) override;
    virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName( const OUString& aRange ) override;

    //XPropertySet
    virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) override;
    virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const css::uno::Any& aValue) override;
    virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& PropertyName) override;
    virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
    virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
    virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
    virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;

    //XChartData
    virtual void SAL_CALL addChartDataChangeEventListener( const css::uno::Reference< css::chart::XChartDataChangeEventListener >& aListener ) override;
    virtual void SAL_CALL removeChartDataChangeEventListener( const css::uno::Reference< css::chart::XChartDataChangeEventListener >& aListener ) override;
    virtual double SAL_CALL getNotANumber(  ) override;
    virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) override;

    //XChartDataArray
    virtual css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL getData(  ) override;
    virtual void SAL_CALL setData( const css::uno::Sequence< css::uno::Sequence< double > >& aData ) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getRowDescriptions(  ) override;
    virtual void SAL_CALL setRowDescriptions( const css::uno::Sequence< OUString >& aRowDescriptions ) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getColumnDescriptions(  ) override;
    virtual void SAL_CALL setColumnDescriptions( const css::uno::Sequence< OUString >& aColumnDescriptions ) override;

    //XSortable
    virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor() override;
    virtual void SAL_CALL sort(const css::uno::Sequence< css::beans::PropertyValue >& xDescriptor) override;

    //XCellRangeData
    virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDataArray(  ) override;
    virtual void SAL_CALL setDataArray( const css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& aArray ) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;

};

class SwXTableRows final : public cppu::WeakImplHelper
<
    css::table::XTableRows,
    css::lang::XServiceInfo
>
{
    class Impl;
    ::sw::UnoImplPtr<Impl> m_pImpl;
    SwFrameFormat* GetFrameFormat();
    const SwFrameFormat* GetFrameFormat() const { return const_cast<SwXTableRows*>(this)->GetFrameFormat(); }
    virtual ~SwXTableRows() override;

public:
    SwXTableRows(SwFrameFormat& rFrameFormat);

    //XIndexAccess
    virtual sal_Int32 SAL_CALL getCount() override;
    virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override;

    //XElementAccess
    virtual css::uno::Type SAL_CALL getElementType(  ) override;
    virtual sal_Bool SAL_CALL hasElements(  ) override;

    //XTableRows
    virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) override;
    virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
};

class SwXTableColumns final : public cppu::WeakImplHelper
<
    css::table::XTableColumns,
    css::lang::XServiceInfo
>
{
private:
    class Impl;
    ::sw::UnoImplPtr<Impl> m_pImpl;
    SwFrameFormat* GetFrameFormat() const;

    virtual ~SwXTableColumns() override;
public:
    SwXTableColumns(SwFrameFormat& rFrameFormat);

    //XIndexAccess
    virtual sal_Int32 SAL_CALL getCount() override;
    virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) override;

    //XElementAccess
    virtual css::uno::Type SAL_CALL getElementType(  ) override;
    virtual sal_Bool SAL_CALL hasElements(  ) override;

    //XTableColumns
    virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) override;
    virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) override;

    //XServiceInfo
    virtual OUString SAL_CALL getImplementationName() override;
    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
};

int sw_CompareCellRanges(
        const OUString &rRange1StartCell, const OUString &rRange1EndCell,
        const OUString &rRange2StartCell, const OUString &rRange2EndCell,
        bool bCmpColsFirst );

void sw_NormalizeRange( OUString &rCell1, OUString &rCell2 );

OUString sw_GetCellName( sal_Int32 nColumn, sal_Int32 nRow );

int sw_CompareCellsByColFirst( const OUString &rCellName1, const OUString &rCellName2 );

int sw_CompareCellsByRowFirst( const OUString &rCellName1, const OUString &rCellName2 );

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Copyright 2000, 2010 Oracle and/or its affiliates.
           Copyright (c) 2000, 2010 LibreOffice contributors and/or their affiliates.


/* EGLSurface eglCreatePbufferFromClientBuffer ( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ) */
static jobject
android_eglCreatePbufferFromClientBuffer
  (JNIEnv *_env, jobject _this, jobject dpy, jint buftype, jlong buffer, jobject config, jintArray attrib_list_ref, jint offset) {
    jint _exception = 0;
    const char * _exceptionType = NULL;
    const char * _exceptionMessage = NULL;
    EGLSurface _returnValue = (EGLSurface) 0;
    EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
    EGLConfig config_native = (EGLConfig) fromEGLHandle(_env, eglconfigGetHandleID, config);
    bool attrib_list_sentinel = false;
    EGLint *attrib_list_base = (EGLint *) 0;
    jint _remaining;
    EGLint *attrib_list = (EGLint *) 0;

    if (attrib_list_ref) {
        if (offset < 0) {
            _exception = 1;
            _exceptionType = "java/lang/IllegalArgumentException";
            _exceptionMessage = "offset < 0";
            goto exit;
        }
        _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
        attrib_list_base = (EGLint *)
            _env->GetIntArrayElements(attrib_list_ref, (jboolean *)0);
        attrib_list = attrib_list_base + offset;
        attrib_list_sentinel = false;
        for (int i = _remaining - 1; i >= 0; i--)  {
            if (attrib_list[i] == EGL_NONE){
                attrib_list_sentinel = true;
                break;
            }
        }
        if (attrib_list_sentinel == false) {
            _exception = 1;
            _exceptionType = "java/lang/IllegalArgumentException";
            _exceptionMessage = "attrib_list must contain EGL_NONE!";
            goto exit;
        }
    }

    _returnValue = eglCreatePbufferFromClientBuffer(
        (EGLDisplay)dpy_native,
        (EGLenum)buftype,
        reinterpret_cast<EGLClientBuffer>(buffer),
        (EGLConfig)config_native,
        (EGLint *)attrib_list
    );

exit:
    if (attrib_list_base) {
        _env->ReleaseIntArrayElements(attrib_list_ref, attrib_list_base,
            JNI_ABORT);
    }
    if (_exception) {
        jniThrowException(_env, _exceptionType, _exceptionMessage);
        return nullptr;
    }
    return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, _returnValue);
}

static jobject
android_eglCreatePbufferFromClientBufferInt
  (JNIEnv *_env, jobject _this, jobject dpy, jint buftype, jint buffer, jobject config, jintArray attrib_list_ref, jint offset) {
    if(sizeof(void*) != sizeof(uint32_t)) {
        jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglCreatePbufferFromClientBuffer");
        return 0;
    }
    return android_eglCreatePbufferFromClientBuffer(_env, _this, dpy, buftype, buffer, config, attrib_list_ref, offset);
}

2005-2019, The Android Open Source Project


Minkah can play any defensive position.

Insa Oscar poate oricand sa preia rolul defensiv.


Sexy Babe Knows How To Suck A Cock


Blonde Milf Banged Up Her Butt And Sucks Penis Off


Gives To Suck Dick And Fuck In The Ass To Light Lamps


17:49

Look how I fuck and Cum on his dick


Bitch Needs It, Bitch Gets It


This Boston college professor who lives in #NH is on leave after being arrested for child pornography, endangerment:

Question: who is on leave


Question: what university professor in nh was on leave


Question: what college professor has been arrested


Clergy calls for end to conflict  #BeInTheKnow

Question: clergy, beintheknowknow


Question: what cleric calls for end to conflict


Question: clergy call for end to conflict


Okay, Larry, its time for the theme song
Uh y-yeah, Bob
What do I do?
Hm, lets see
Oh, I know! You play the guitar
Bob, I dont have any hands
Oh, youre right
I know! You play this
I dont want to play that, Ill look silly
Oh come on, itll be fun!
Nope, not gonna do it
Its for the kids
Oh, okay, but they better not laugh
Alright! Better get on out there!
If you like to talk to tomatoes
If a squash can make you smile
If you like to waltz with potatoes
Up and down the produce aisle
Have we got a show for you!
VeggieTales!
VeggieTales!
VeggieTales!
VeggieTales!
VeggieTales!
VeggieTales!
VeggieTales!
VeggieTales!
Broccoli, celery, gotta be
VeggieTales!
Lima beans, collard greens, peachy keen
VeggieTales!
Cauliflower
Sweet and sour
Half an hour
VeggieTales!
Theres never ever ever ever
Ever been a show like VeggieTales!
Theres never ever ever ever
Ever been a show like VeggieTales!
Its time for VeggieTales!


And now its time for Silly Songs with Larry, the part of the show where Larry comes out and sings a silly song
One day while talking with Dr. Archibald, Larry confronts one of his deepest fears...
If my lips ever left my mouth
Packed a bag and headed south
Thatd be too bad, Id be so sad
I see, thatd be too bad, youd be so sad?
Thatd be too bad
Alrighty
If my lips said Adios
I dont like you, I think youre gross
Thatd be too bad, I might get mad
Hm, thatd be too bad, you might get mad?
Thatd be too bad
Fascinating
If my lips moved to Duluth
Left a mess and took my tooth
Thatd be too bad, Id call my Dad
Oh dear, thatd be too bad, youd call your dad?
Thatd be too bad
Hold it! Did you say your father? Fascinating!
So what youre saying is if your lips left you...
Thatd be too bad, Id be so sad
I might get mad, I call my Dad
Thatd be too bad
Thatd be too bad?
Thatd be too bad
Why?
Because I love my lips!
Oh, my! This is more serious than I thought
Larry, what do you see here?
Um, that looks like a lip
What about this?
Its a lip
And this?
Its a lip, its a lip, its a lip, lip, lip
Its a lip, its a lip, its a lip, lip, lip
Its a lip, its a lip, its a lip, lip, lip
Liiiiiiiiiips, lip, lip, lip
Larry, tell me about your childhood
When I was just two years old
I left my lips out in the cold
And they turned blue
What could I do?
Oh dear, they turned blue, what could you do?
Oh, they turned blue
I see
On the day I got my tooth
I had to kiss my Great Aunt Ruth
She had a beard, and it felt weird
My, my, she had a beard and it felt weird?
She had a beard
Oh!
Ten days after I turned 8
Got my lips stuck in a gate
My friends all laughed
And I just stood there until the fire department came and broke the lock with a crowbar
And I had to spend the next six weeks in lip rehab with this kid named Oscar who got stung by a bee, right on the lip
And we couldnt even talk to each other until the fifth week because both our lips were so swollen
And when he did start speaking he just spoke Polish and I only knew like three words in Polish
Except now I know four because Oscar taught me the word for lip, usta!
Your friends all laughed. Usta. How do you spell that?
I dont know
So what youre saying is that when you were young...
They turned blue, what could I do?
She had a beard, and it felt weird
My friends all laughed... Usta!
Im confused
I love my lips!
Uh, Larry. Larry. Wait Larry, Larry! Thats about enough, thank you
This has been Silly Songs with Larry. Tune in next week when we hear Larry say...
Have I ever told you how I feel about my nose?
Oh, look at the time!


He said to her, Id like a cheeseburger
And I might like a milkshake as well
She said to him, I cant get you either
And he said, Isnt this Burger Bell?
She said, Yes, it is but were closed now
But we open tomorrow at ten
He said, I am extremely hungry
But I guess I can wait until then
Cause youre his cheeseburger
His yummy cheeseburger
Hell wait for you, ya
Hell wait for you
Oh, you are his cheeseburger
His tasty cheeseburger
Hell wait for you
Oh, he will wait for you
He stayed at the drive-thru till sunrise
He may have dozed off once or twice
When he spotted a billboard for Dennys
Bacon and eggs for half price
How could he resist such an offer?
He really needed something to munch
Cheeseburger, please do not get angry
Hell eat and be back here for lunch
Cause youre his cheeseburger
His precious cheeseburger
Be back for you
Hell be back for you
Wont be so long, cheeseburger
Oh, lovely cheeseburger
Be back for you
Oh, hell be back for you
Cause he loves you cheeseburger with all his heart
And theres nothin gonna tear you two apart
And if the world suddenly ran out of cheese
He would get down on his hands and knees
To see if someone accidentally
Dropped some cheese in the dirt
And he would wash it off for you
Wipe it off for you
Clean that dirty cheese off just for you
You are his cheeseburger


Oh, no! What we gonna do?
The king likes Daniel more than me and you
Oh, no! What we gonna do?
We gotta get him out of here
Oh, no! What we gonna do?
The king likes Daniel more than me and you
Oh, no! What we gonna do?
We gotta get him out of here
We could throw him in the dungeon
We could let him rot in jail
We could drag him to the ocean
Have him eaten by a whale
We could throw him in the Tigris, let him float a while
Then well all sit back and watch him meet a hungry crocodile
We could put him on a camels back and send him off to Ur
With a cowboy hat without a brim, a boot without a spur
We could give him jelly doughnuts, take em all away
Or we could fill his ears with cheese balls and his nostrils with sorbet
We could use him as a footstool or a table to play Scrabble on
Then tie him up and beat him up and throw him out of Babylon
Or....
Yeah... Mmhmm... Oh!
I like it!
Its sneaky!
And it just...
Might...
Work!
We could use him as a footstool or a table to play Scrabble on
Then tie him up and beat him up and throw him out of Babylon!
The very next morning, the wise men appeared before King Darius to try to trap Daniel with their scheme...
You wanted to see me?
Ahem...


Baby, I know your eyes see right through my disguise
Baby, that Im the one whose love is no surprise
But theres a secret Ive been hidin
I cant keep it no more
((Theres this thing about himself
Hes never told you before))
Baby
I dont got a belly button
Oh, I need to tell you something
He dont got a belly button
Belly button no, oh no, no...
Baby, please dont squeal, just tell me how you feel
And if you went away, my heart would never heal
Theres something missing in my middle
And its hard to ignore
(Theres this thing about himself
Hes never told you before)
Baby
I dont got a belly button
Oh, I need to tell you something
He dont got a belly button
Belly button no, oh no, no...
Belly button?
Belly button?
You say your belly buttons missing
Theres no reason for alarm
Its a common thing for gourds
It wont do you any harm
Youre technically a fruit
And with that much being said
Your umbilical equivocal
Is up there on your head!
You could opt for a prosthetic
But of course, youd have to know
Itd be covered by your shirt
But not your HMO!
Belly button
Belly button
A stylish something absent
From my midriffs decor
(Theres this thing about himself
Hes never told you before)
Baby
I dont got a belly button
Oh, I need to tell you something
He dont got a belly button
Belly button, no, oh no, no...
No belly button...


This little light of mine, Im gonna let it shine
This little light of mine, Im gonna let it shine
This little light of mine, Im gonna let it shine
Let it shine, let it shine, let it shine
Hide it under a bushel - NO!
Im gonna let it shine
Hide it under a bushel - NO!
Im gonna let it shine
Hide it under a bushel - NO!
Im gonna let it shine, Let it shine
Let it shine, let it shine
Dont let Satan blow it out
Im gonna let it shine
Dont let Satan blow it out
Im gonna let it shine
Dont let Satan blow it out
Im gonna let it shine
Let it shine, let it shine, let it shine
Let it shine til Jesus comes
Im gonna let it shine
Let it shine til Jesus comes
Im gonna let it shine
Let it shine til Jesus comes
Im gonna let it shine
Let it shine, let it shine, let it shine
This little light of mine, Im gonna let it shine
This little light of mine, Im gonna let it shine
This little light of mine, Im gonna let it shine
Let it shine, let it shine, let it shine
Let it shine, let it shine, let it shine


My God is so big
So strong and so mighty
Theres nothing my God cannot do
My God is so big
So strong and so mighty
Theres nothing my God cannot do
The mountains are His
The rivers are His
The stars are His handiwork too
My God is so big
So strong and so mighty
Theres nothing my God cannot do


A person on a horse jumps over a broken down airplane.

A person is at a diner, ordering an omelette.


Two dogs play on the wooden floor inside.


A woman in overalls is painting a landscape on the roof.


Small laughing child with blond-hair sitting at a table holding a green sippy cup.


A white dog chases something over a log outside.


Climbing over a fallen tree limb is a little animal.


Two young children are standing in hall.

The children are sitting on their desks.


A little girl with a white shirt and brown hair is swinging almost completely upside down in a park.


husband experimenting with open marriage


sparrow thinks it might have caught bird flu after puking seeds all morning


dozens of glowing exit signs mercilessly taunt multiplex employee


teen responsible for all six items in clarksburg police blotter


pentagon to surround self with pentagon decoys


epstein guards placed on disciplinary leave for allowing selves to be distracted by mischievous monkey that stole key ring


popes, ranked


toddler junkie immediately hooked on looking at trains after first exhilarating high


fast-talking computer hacker just has to break through encryption shield before uploading nano-virus


stealing tampons from office bathroom currently woman's only source of joy


How do people in the desert control their sweating?


What's the most embarrassing thing you've done to win a prize?


Which book should I refer to for UPSC Mains solved previous questions with answers?


Do Germany and Russia have an agreement to cooperate in finding and returning the remains of their fallen soldiers from WW 2?


What gpu and motherboard should I go pair with an X5460 in a budget (<175 EUR) build?


Could these scenarios happen of time travel comes into existence?


What would English be like if it followed the grammar of German?


Is there a software package to manage database server configuration and report changes to all the servers in the environment periodically?


Is there a tool that works like a marker but has acrylic paint inside?


They also have encrypted radios, but they're made by corrupt state firms and were built in China to save money reserved for embezzlement.

https://rusi.org/explore-our-research/publications/commentary/russian-comms-ukraine-world-hertz


lol many people in Kazakhstan are Russian mixed, you can find pure Kazakh people in rural areas or China and Mongolia. I am not saying that pure Kazakh people are not pretty just not as "caucasoid" as you claimed


I'm a regular John from city Kansas. I love burgers, soda and my native country very much, but I do not understand our government. Everyone says America is a great country, and I look around and see who else is a great China. China has a very strong government and economy. Chinese resident is a great man. And the greatest leader Xi. Thick hair, strong grip, jade rod! We would have such a leader instead of sleeping in negotiations, rare hair, soft pickle, bad memory old Beadon. Punch!

*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/shitposting) if you have any questions or concerns.*


I wouldn't be surprised if China has done the maths and worked out that Taiwan is just not worth the effort. There is zero appetite in the west to fight China. After what they've just done I doubt there'd even be much outrage if China started taking chunks out of Russia. It's probably easier for them just to operate it as a vassal state though.


Always do the opposite of what r/stock hive mind thinks. I am loading up $BABA like no tomorrow, if you ever been to China, $BABA is basically the biggest retailor + cloud service + payment processor in a country with 1.4 billion people. But hey let's post Jack Ma meme and get sweet social credits!


I think China is smelling blood in the water Russia is simply not a world power we thought they were

I think there going to try to take their sphere of influence in central asia


C ongressional employees are retained to perform public duties that include assisting Members in official responsibilities in personal, committee, leadership, or administrative office settings. The roles, duties, and activities of congressional staff are matters of ongoing interest to Members of Congress, congressional staff, groups, and individuals, including those who raise concerns about congressional operations. Most observers recognize that Congress does not function without staff, but there is little systematic attention to what staff do, or what Members expect of them. In congressional offices, there may be interest in identifying Member expectations of congressional staff duties by position from multiple perspectives, including assessment of staffing needs in Member offices; guidance in setting position expectations, qualifications, and experience when offices choose to hire staff; and informing current and potential congressional employees of position expectations. Members of the House and Senate generally establish their own employment policies and practices for their personal offices. It is arguably the case that within Member offices, a common group of activities is executed for which staff with relevant skillsets and other qualifications are necessary. A body of publicly available job advertisements for staff positions from a number of different offices can shed light on the expectations Members have for position duties, as well as staff skills, characteristics, experience, and other expectations. For 33 commonly used congressional staff position titles, this report describes the most frequently listed job duties, applicant skills, characteristics, prior experiences, and other expectations found in a sample of job advertisements placed by Members of Congress between approximately December 2014 and September 2019 seeking staff in their offices. Table 1 lists the position titles and the frequency with which advertisements for them appeared in the sample. Identifying Job Advertisements for Congressional Staff Positions Data used in developing sample position expectations were taken from several publicly available sources, including the following, over the periods specified: The House Employment Bulletin, published weekly by the House Vacancy Announcement and Placement Service (HVAPS) in the Human Resources Office of the House Chief Administrative Officer (CAO). Data were collected from ads published between approximately January 2015 and September 2019. The Employment Bulletin, published online by the Senate "as a service to Senate offices choosing to advertise staff vacancies." Data were collected from ads, which were not dated, appearing from approximately July 2016 to July 2019. The House GOP Job and Resume Bank, which posts ads on behalf of the House Republican Conference on Facebook. Ads were collected between approximately January and June 2017. Other ads were collected from the period between approximately December 2014 and January 2017 from the House GOP Job Bank web page on the website of Representative Virginia Foxx during part of her tenure as the House Republican Conference Secretary. The Job Announcements Board hosted by Representative Steny Hoyer during part of his tenure as House Minority Whip. Data were collected from ads posted between approximately January 2016 and December 2017. Categorizing and Coding Job Advertisements More than 1,800 ads were collected from all sources. Duplicate ads resulting from posts to more than one source, and ads that appear to have been frequently reposted, were removed, as were ads for positions in congressional settings other than personal offices, yielding 880 ads for positions in Member personal offices. Substantially similar position titles (e.g., deputy scheduler and state deputy scheduler) for which there were five or more ads were identified and grouped together, as were related job titles (e.g., positions designated as district, field, or regional representative that had essentially similar job duties and expectations) for which there were five or more substantially similar ads, yielding a total of 704 ads. Ads for the 33 identified position titles were further categorized if there were five or more ads that specified the advertised position as "not entry level" or other signifier of presumptive advanced status. The 704 ads were coded against a variety of variables within eight categories, including ad tracking information; ad details; position responsibilities and responsibility areas; expected job skills, qualifications, and credentials; application materials; and office type. The distribution of ads by job title and level is provided in Table 1 . Solicitations of applicants for congressional staff appear to originate in a highly decentralized manner. Means of identifying appropriate candidates might potentially include reassigning staff within offices, placing ads in services that make them available by subscription, word of mouth, and other nonpublic means of identifying potential applicants for congressional staff positions. Consequently, it cannot be determined whether the dataset of ads analyzed in this report is representative of all congressional employment solicitations. In addition, the process by which candidates for some Member office senior staff positions are identified may not be public-facing. Based on information specified within the ads, most position titles were identified by one of the following four primary responsibility areas (some positions were identified by up to three responsibility areas): Legislative, Policy, and Oversight, Media, Messaging, and Speeches, Constituent Communications, Outreach, and Service, and Office Administration and Support. For each position, at least one sample position description was created based on the coded data. Information includes the most frequently occurring of the following: primary responsibility areas; widely expected duties, typically up to six of the most frequently occurring duties specified in all ads for that position; other potential duties, typically up to six other duties mentioned in more than one ad; applicant information, including characteristics, skills, and knowledge and prior experience; and other expectations. Concluding Observations Categorizing congressional staff positions by position title relies on an assumption that similarly titled positions in House and Senate personal offices carry out the same tasks under essentially similar circumstances. While personal offices may carry out similar activities, the assumption might be questionable given the differences in staff resources in House and Senate offices, as well as potential differences within offices of each chamber. Generalizations about staff roles and duties may also be limited in some ways due to the broad discretion Members have with regard to running their office activities. Variations from office to office, which might include differences in job duties, work schedules, office emphases, and other factors, may limit the extent to which sample position expectations provided here match operational practices in all congressional offices. Sample Position Expectations Caseworker18 Communications Director19 Communications Director, "Senior Level" or "Not Entry Level"20 Constituent Services Representative21 Correspondence Manager22 Deputy Press Secretary23 Deputy Scheduler24 Deputy Scheduler/Assistant to Chief of Staff25 Digital Director/Press Assistant26 Digital Media Director27 District Director28 Executive Assistant29 Executive Assistant/Scheduler30 Executive Assistant/Scheduler, "Not Entry Level"31 Field, District, or Regional Representative32 Field Representative/Caseworker33 Legislative Aide34 Legislative Assistant35 Legislative Assistant, "Not Entry Level"36 Legislative Correspondent37 Legislative Correspondent/Press Assistant38 Legislative Correspondent/Staff Assistant39 Legislative Counsel40 Legislative Director, House41 Legislative Director "Senior Level," or "Not Entry Level"42 Legislative Director, Senate43 Military Legislative Assistant44 Press Assistant45 Press Secretary46 Regional Coordinator47 Scheduler48 Scheduler, "Not Entry Level"49 Scheduler/Office Manager50 Senior Legislative Assistant51 Speechwriter52 Staff Assistant53 Staff Assistant/Driver54 Staff Assistant/Press Assistant55 Systems Administrator56

The roles, duties, and activities of congressional staff are matters of ongoing interest to Members of Congress, congressional staff, and observers of Congress. Members of the House and Senate establish their own employment policies and practices for their personal offices. It is arguably the case that within Member offices, a common group of activities is executed for which staff are necessary. Accordingly, a group of job advertisements for those positions from a number of different offices can shed light on the expectations Members have for position duties, as well as staff skills, characteristics, experience, and other expectations. This report provides a set of 39 widely expected job duties, applicant skills, characteristics, prior experiences, and other expectations based on a sample of ads placed by Members of Congress between approximately December 2014 and September 2019 seeking staff in their offices for 33 position titles: Sample position expectations might assist Congress from multiple perspectives, including assessment of staffing needs in Member offices; guidance in setting position expectations, qualifications, and experience when offices need to hire staff; and informing current and potential congressional employees of position expectations. At the same time, categorizing congressional staff positions by position title relies on an assumption that similarly titled positions in House and Senate personal offices carry out the same tasks under essentially similar circumstances. Although personal offices may carry out similar activities, the assumption might be questionable given the differences in staff resources in House and Senate offices, as well as potential differences among offices of each chamber, particularly the Senate. Genera lizations about staff roles and duties may also be limited in some ways due to the broad discretion Members have with regard to running their office activities. Variations from office to office, which might include differences in job duties, work schedules, office emphases, and other factors, may limit the extent to which sample position expectations might match operational practices in all congressional offices. This is one of several CRS products on congressional staff. To access those products, see CRS Report R44688, Congressional Staff: CRS Products on Size, Pay, and Job Tenure .


EU rejects German call to boycott British lamb .


The European Commission said on Thursday it disagreed with German advice to consumers to shun British lamb until scientists determine whether mad cow disease can be transmitted to sheep .

O B-ORG I-ORG O O O O O O B-MISC O O O O O B-MISC O O O O O O O O O O O O O O


Germany 's representative to the European Union 's veterinary committee Werner Zwingmann said on Wednesday consumers should buy sheepmeat from countries other than Britain until the scientific advice was clearer .

B-LOC O O O O B-ORG I-ORG O O O B-PER I-PER O O O O O O O O O O O B-LOC O O O O O O O


" We do n't support any such recommendation because we do n't see any grounds for it , " the Commission 's chief spokesman Nikolaus van der Pas told a news briefing .

O O O O O O O O O O O O O O O O O O O O B-ORG O O O B-PER I-PER I-PER I-PER O O O O O


He said further scientific study was required and if it was found that action was needed it should be taken by the European Union .

O O O O O O O O O O O O O O O O O O O O O O B-ORG I-ORG O


Bass loops 045 short loop 120 bpm.wav

More loops on my youtube channelhttps://www.youtube.com/watch?v=jDYSxscqfiM&list=PL9BdtoyT75AVYNpU55sc1V6fHAMAFegIX&index=78Donations directly to me are welcome at this link below, I appreciate it.https://www.paypal.com/paypalme/josefpres1This sound can be combined with other sounds in the pack. Otherwise, it is well usable up to 120 bpm.Subscribe my youtube channel :-)for new sampleshttps://youtu.be/FZhu2RkAXvc?t=17Facebookhttps://www.facebook.com/simplesamplesweb


Tribal Dark Night Forest Sounds Thriller Horror Scary Atmo Folk Ethno Drum Cinematic Surrround.wav


Eftos Exa-Nano

Eftos Trivy [Opp. 44,47] Analogue synthesizers, a facile flow.


birds on the river nature atmosphere

birds on the river nature atmosphere recorded with mixpre 6 and audio technica bp4025.recorded in Leipzig Germany 8. Mai 2022 Saale-Leipzig-Kanal 5.15 am.All sound are free.here you can see the recording location: https://www.youtube.com/watch?v=kNUVUaVHN84if you like the quality of the sound, please give the sound 4 or 5 stars ... I would be delighted.Thanks for support.


river ship jetfighter 1211PM 220421_0338.mp3

Ambience at river Maas. Wave on 1 m. Diesel cargo passing. Than two F16 jet fighters.  Date/time: April 21st Thursday 2022, start 12:15 AMWeather in time: 14c, 24% cloudy, wind NE 3 bft with gusts to 30 km/h, 1014 hPa, humidity 43%. Location; river Maas near Maximakanaal, between village Empel and Gewande, Noord-Brabant, Netherlands (Holland), Europe. Gps: 51.74663 5.32585Gear chain: Sennheiser mkh30/50 MS, in Rycote cyclone small, windjammer > Sound Devices 302 >Tascam dr-100 Mk2. Decoded Mid-side to STEREO. Low-cut 160 Hz, 12 dB/Oct. If any of these sounds have been of help, and you are feeling charitable, please do consider donating to Freesound to help keep the site running (a link is also on the home page). Any donations are greatly appreciated!YOU ALWAYS HAVE TO CREDIT/ATTRIBUTE me (klankbeeld) and freesound.org in your work if you use this sound. Please do it like this if possible: https://freesound.org/people/klankbeeld/Thank you.This sound may NOT be used in (royalty free) stock material. Don't put my raw sounds/files on youtube or anywhere else. You can use them in creative way as a part of art-form, but not "re-distribute" as (royalty free) stock material. Thank you.


16EDO_Notes Sine Sustain (refnote 130_815Hz) Note-005.wav

A sine wave tuned to 162.454 Hz


16EDO_Notes Sine Sustain (refnote 130_815Hz) Note-006.wav

A sine wave tuned to 169.646 Hz


16EDO_Notes Sine Sustain (refnote 130_815Hz) Note-007.wav

A sine wave tuned to 177.157 Hz


16EDO_Notes Sine Sustain (refnote 130_815Hz) Note-003.wav

A sine wave tuned to 148.971 Hz


hello, world


the quick brown fox