// 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; }
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; }
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; }
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"); }
struct libusb_container_id_descriptor* unwrapContainerIdDescriptor( JNIEnv* env, jobject descriptor) { return (struct libusb_container_id_descriptor*) unwrapPointer(env, descriptor, "containerIdDescriptorPointer"); }
SEXP qt_qsetVerticalSpacing_QGraphicsGridLayout(SEXP rself, SEXP rspacing) { QGraphicsGridLayout *layout = unwrapPointer(rself, QGraphicsGridLayout); layout->setVerticalSpacing(asReal(rspacing)); return rself; }
libusb_device_handle* unwrapDeviceHandle(JNIEnv* env, jobject deviceHandle) { return (libusb_device_handle *) unwrapPointer(env, deviceHandle, "deviceHandlePointer"); }
struct libusb_interface *unwrapInterface(JNIEnv *env, jobject iface) { return (struct libusb_interface *) unwrapPointer(env, iface, "interfacePointer"); }