001/**
002 * Copyright (c) 2011, The University of Southampton and the individual contributors.
003 * All rights reserved.
004 *
005 * Redistribution and use in source and binary forms, with or without modification,
006 * are permitted provided that the following conditions are met:
007 *
008 *   *  Redistributions of source code must retain the above copyright notice,
009 *      this list of conditions and the following disclaimer.
010 *
011 *   *  Redistributions in binary form must reproduce the above copyright notice,
012 *      this list of conditions and the following disclaimer in the documentation
013 *      and/or other materials provided with the distribution.
014 *
015 *   *  Neither the name of the University of Southampton nor the names of its
016 *      contributors may be used to endorse or promote products derived from this
017 *      software without specific prior written permission.
018 *
019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
020 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
021 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
022 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
023 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
026 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
028 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
029 */
030package org.openimaj.hardware.kinect.freenect;
031
032import org.openimaj.hardware.kinect.freenect.libfreenectLibrary.freenect_resolution;
033import org.bridj.IntValuedEnum;
034import org.bridj.StructObject;
035import org.bridj.ann.Field;
036import org.bridj.ann.Library;
037/**
038 * <i>native declaration : /usr/include/stdint.h</i><br>
039 * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
040 * a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
041 * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> .
042 */
043@SuppressWarnings("all")
044@Library("freenect-combined") 
045public class freenect_frame_mode extends StructObject {
046        public freenect_frame_mode() {
047                super();
048        }
049        /// < unique ID used internally.  The meaning of values may change without notice.  Don't touch or depend on the contents of this field.  We mean it.
050        @Field(0) 
051        public int reserved() {
052                return this.io.getIntField(this, 0);
053        }
054        /// < unique ID used internally.  The meaning of values may change without notice.  Don't touch or depend on the contents of this field.  We mean it.
055        @Field(0) 
056        public freenect_frame_mode reserved(int reserved) {
057                this.io.setIntField(this, 0, reserved);
058                return this;
059        }
060        /**
061         * < Resolution this freenect_frame_mode describes, should you want to find it again with freenect_find_*_frame_mode().<br>
062         * C type : freenect_resolution
063         */
064        @Field(1) 
065        public IntValuedEnum<freenect_resolution > resolution() {
066                return this.io.getEnumField(this, 1);
067        }
068        /**
069         * < Resolution this freenect_frame_mode describes, should you want to find it again with freenect_find_*_frame_mode().<br>
070         * C type : freenect_resolution
071         */
072        @Field(1) 
073        public freenect_frame_mode resolution(IntValuedEnum<freenect_resolution > resolution) {
074                this.io.setEnumField(this, 1, resolution);
075                return this;
076        }
077        /// < Total buffer size in bytes to hold a single frame of data.  Should be equivalent to width * height * (data_bits_per_pixel+padding_bits_per_pixel) / 8
078        @Field(2) 
079        public int bytes() {
080                return this.io.getIntField(this, 2);
081        }
082        /// < Total buffer size in bytes to hold a single frame of data.  Should be equivalent to width * height * (data_bits_per_pixel+padding_bits_per_pixel) / 8
083        @Field(2) 
084        public freenect_frame_mode bytes(int bytes) {
085                this.io.setIntField(this, 2, bytes);
086                return this;
087        }
088        /// < Width of the frame, in pixels
089        @Field(3) 
090        public short width() {
091                return this.io.getShortField(this, 3);
092        }
093        /// < Width of the frame, in pixels
094        @Field(3) 
095        public freenect_frame_mode width(short width) {
096                this.io.setShortField(this, 3, width);
097                return this;
098        }
099        /// < Height of the frame, in pixels
100        @Field(4) 
101        public short height() {
102                return this.io.getShortField(this, 4);
103        }
104        /// < Height of the frame, in pixels
105        @Field(4) 
106        public freenect_frame_mode height(short height) {
107                this.io.setShortField(this, 4, height);
108                return this;
109        }
110        /// < Number of bits of information needed for each pixel
111        @Field(5) 
112        public byte data_bits_per_pixel() {
113                return this.io.getByteField(this, 5);
114        }
115        /// < Number of bits of information needed for each pixel
116        @Field(5) 
117        public freenect_frame_mode data_bits_per_pixel(byte data_bits_per_pixel) {
118                this.io.setByteField(this, 5, data_bits_per_pixel);
119                return this;
120        }
121        /// < Number of bits of padding for alignment used for each pixel
122        @Field(6) 
123        public byte padding_bits_per_pixel() {
124                return this.io.getByteField(this, 6);
125        }
126        /// < Number of bits of padding for alignment used for each pixel
127        @Field(6) 
128        public freenect_frame_mode padding_bits_per_pixel(byte padding_bits_per_pixel) {
129                this.io.setByteField(this, 6, padding_bits_per_pixel);
130                return this;
131        }
132        /// < Approximate expected frame rate, in Hz
133        @Field(7) 
134        public byte framerate() {
135                return this.io.getByteField(this, 7);
136        }
137        /// < Approximate expected frame rate, in Hz
138        @Field(7) 
139        public freenect_frame_mode framerate(byte framerate) {
140                this.io.setByteField(this, 7, framerate);
141                return this;
142        }
143        /// < If 0, this freenect_frame_mode is invalid and does not describe a supported mode.  Otherwise, the frame_mode is valid.
144        @Field(8) 
145        public byte is_valid() {
146                return this.io.getByteField(this, 8);
147        }
148        /// < If 0, this freenect_frame_mode is invalid and does not describe a supported mode.  Otherwise, the frame_mode is valid.
149        @Field(8) 
150        public freenect_frame_mode is_valid(byte is_valid) {
151                this.io.setByteField(this, 8, is_valid);
152                return this;
153        }
154}