Lines Matching refs:dev

41     DeviceIntRec dev;
47 memset(&dev, 0, sizeof(dev));
48 dev.name = xnfstrdup("test device");
49 dev.id = 2;
50 dev.valuator = &val;
52 dev.touch = &touch;
53 inputInfo.devices = &dev;
57 dev.last.num_touches = size;
58 dev.last.touches = calloc(dev.last.num_touches, sizeof(*dev.last.touches));
59 assert(dev.last.touches);
61 dev.last.touches[i].active = TRUE;
62 dev.last.touches[i].ddx_id = i;
63 dev.last.touches[i].client_id = i * 2;
67 assert(TouchBeginDDXTouch(&dev, 1234) != NULL);
70 assert(dev.last.num_touches == new_size);
74 DDXTouchPointInfoPtr t = &dev.last.touches[i];
81 assert(dev.last.touches[size].active == TRUE);
82 assert(dev.last.touches[size].ddx_id == 1234);
83 assert(dev.last.touches[size].client_id == 1);
87 DDXTouchPointInfoPtr t = &dev.last.touches[i];
94 free(dev.name);
100 DeviceIntRec dev;
107 memset(&dev, 0, sizeof(dev));
108 dev.name = xnfstrdup("test device");
109 dev.id = 2;
110 dev.valuator = &val;
112 dev.touch = &touch;
113 dev.last.num_touches = size;
114 dev.last.touches = calloc(dev.last.num_touches, sizeof(*dev.last.touches));
115 inputInfo.devices = &dev;
116 assert(dev.last.touches);
118 dev.last.touches[0].active = TRUE;
119 dev.last.touches[0].ddx_id = 10;
120 dev.last.touches[0].client_id = 20;
123 ti = TouchFindByDDXID(&dev, 10, FALSE);
124 assert(ti == &dev.last.touches[0]);
127 ti = TouchFindByDDXID(&dev, 20, FALSE);
131 dev.last.touches[0].active = FALSE;
132 ti = TouchFindByDDXID(&dev, 10, FALSE);
136 dev.last.touches[0].active = TRUE;
138 ti = TouchFindByDDXID(&dev, 20, TRUE);
139 assert(ti == &dev.last.touches[1]);
145 dev.last.touches[i].active = TRUE;
148 ti = TouchFindByDDXID(&dev, 30, TRUE);
150 ti2 = TouchFindByDDXID(&dev, 30, TRUE);
153 assert(dev.last.num_touches == 8); /* EQ grows from 5 to 8 */
156 dev.last.touches[2].active = FALSE;
157 ti = TouchFindByDDXID(&dev, 35, TRUE);
158 assert(ti == &dev.last.touches[2]);
159 ti = TouchFindByDDXID(&dev, 40, TRUE);
160 assert(ti == &dev.last.touches[size+1]);
162 free(dev.name);
168 DeviceIntRec dev;
176 memset(&dev, 0, sizeof(dev));
177 dev.name = xnfstrdup("test device");
178 dev.id = 2;
179 dev.valuator = &val;
182 dev.touch = &touch;
183 dev.last.num_touches = size;
184 dev.last.touches = calloc(dev.last.num_touches, sizeof(*dev.last.touches));
185 inputInfo.devices = &dev;
186 assert(dev.last.touches);
188 ti = TouchBeginDDXTouch(&dev, ddx_id);
199 ti = TouchBeginDDXTouch(&dev, ddx_id);
209 free(dev.name);
215 DeviceIntRec dev;
226 memset(&dev, 0, sizeof(dev));
227 dev.name = xnfstrdup("test device");
228 dev.id = 2;
231 dev.spriteInfo = &sprite;
237 dev.valuator = &val;
240 ti = TouchBeginTouch(&dev, sourceid, touchid, TRUE);
243 dev.touch = &touch;
244 ti = TouchBeginTouch(&dev, sourceid, touchid, TRUE);
253 free(dev.name);
259 DeviceIntRec dev;
267 memset(&dev, 0, sizeof(dev));
268 dev.name = xnfstrdup("test device");
271 dev.spriteInfo = &sprite;
274 rc = InitTouchClassDeviceStruct(&dev, 1, XIDirectTouch, 2);
277 InitValuatorClassDeviceStruct(&dev, 2, labels, 10, Absolute);
278 rc = InitTouchClassDeviceStruct(&dev, 1, XIDirectTouch, 2);
280 assert(dev.touch);
282 free(dev.name);