2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
7 This is an example for a pseudolanguage to use our OOP
15 /* This is a global constant for this class */
19 FindHIDD takes three arguments: A string with the type
20 and the subtype of the HIDD (eg. "gfx"/"printer")
21 and a list of attributes.
23 It returns an array of HIDDs which match the specified
33 hiddTableLock
.lock ();
35 Array hiddTable
= classTable
.get (type
);
36 Array hidds
= Array (hiddTable
.len ());
39 for (t
=0; hiddTable
[t
]; t
++)
41 if (!strcasecmp (hiddTable
[t
].subType
, subType
)
42 && hiddTable
[t
].match (attrs
)
45 hidds
.append (hiddTable
[t
])
49 hiddTableLock
.unlock ();
54 /* These are global class variables */
55 static HashTable hiddTable
= HashTable (256, HashTable
.calcStringHashCode
);
56 static Semaphore hiddTableLock
= Semaphore ();
61 /* Position and size of the window. The attribute can be read
62 and written from outside. */
63 [RW
] UWORD x
, y
, width
, height
;
64 [RW
] UWORD minWidth
, minHeight
, maxWidth
, maxHeight
;
66 /* Before writing to width, execute this code */
70 Raise
IllegalValue ("width (%d) too small, must be > 0", width
);
73 /* This could also raise an error */
82 this.resize (this.width
, this.height
);