Ejemplo n.º 1
0
// NOTE: The QGraphicsLayout stuff is not based on QGraphicsItem nor
// QObject. This makes it difficult to check types safely and, much
// worse, there is no easy way to manage their memory. See notes in
// Reference.cpp.
SEXP qt_qaddItem_QGraphicsGridLayout(SEXP rself, SEXP ritem, SEXP rrow,
                                     SEXP rcol, SEXP rrowSpan, SEXP rcolSpan)
{
  QGraphicsGridLayout *layout = unwrapPointer(rself, QGraphicsGridLayout);
  QGraphicsLayoutItem *item = unwrapPointer(ritem, QGraphicsLayoutItem);
  layout->addItem(item, asInteger(rrow), asInteger(rcol), asInteger(rrowSpan),
                  asInteger(rcolSpan));
  return rself;
}
Ejemplo n.º 2
0
SEXP qt_qsetRowStretch_QGraphicsGridLayout(SEXP rself, SEXP rstretch) {
  QGraphicsGridLayout *layout = unwrapPointer(rself, QGraphicsGridLayout);
  for (int i = 0; i < length(rstretch); i++) {
    layout->setRowStretchFactor(i, INTEGER(rstretch)[i]);
  }
  return rself;
}
Ejemplo n.º 3
0
SEXP qt_qrowStretch_QGraphicsGridLayout(SEXP rself) {
  QGraphicsGridLayout *layout = unwrapPointer(rself, QGraphicsGridLayout);
  SEXP ans = allocVector(INTSXP, layout->rowCount());
  for (int i = 0; i < length(ans); i++) {
    INTEGER(ans)[i] = layout->rowStretchFactor(i);
  }
  return ans;
}
Ejemplo n.º 4
0
libusb_context* unwrapContext(JNIEnv* env, jobject context)
{
    return (libusb_context *) unwrapPointer(env, context, "contextPointer");
}
struct libusb_bos_dev_capability_descriptor*
    unwrapBosDevCapabilityDescriptor(JNIEnv *env, jobject descriptor)
{
    return (struct libusb_bos_dev_capability_descriptor *) unwrapPointer(env,
        descriptor, "bosDevCapabilityDescriptorPointer");
}
Ejemplo n.º 6
0
struct libusb_container_id_descriptor* unwrapContainerIdDescriptor(
    JNIEnv* env, jobject descriptor)
{
    return (struct libusb_container_id_descriptor*) unwrapPointer(env,
        descriptor, "containerIdDescriptorPointer");
}
Ejemplo n.º 7
0
SEXP qt_qsetVerticalSpacing_QGraphicsGridLayout(SEXP rself, SEXP rspacing) {
  QGraphicsGridLayout *layout = unwrapPointer(rself, QGraphicsGridLayout);
  layout->setVerticalSpacing(asReal(rspacing));
  return rself;
}
Ejemplo n.º 8
0
libusb_device_handle* unwrapDeviceHandle(JNIEnv* env, jobject deviceHandle)
{
    return (libusb_device_handle *) unwrapPointer(env, deviceHandle,
        "deviceHandlePointer");
}
Ejemplo n.º 9
0
struct libusb_interface *unwrapInterface(JNIEnv *env, jobject iface)
{
    return (struct libusb_interface *) unwrapPointer(env, iface,
        "interfacePointer");
}