2 This is an example for a pseudolanguage to use out OOP
10 /* This is a global constant for this class */
14 FindHIDD takes three arguments: A string with the type
15 and the subtype of the HIDD (eg. "gfx"/"printer")
16 and a list of attributes.
18 It returns an array of HIDDs which match the specified
28 hiddTableLock
.lock ();
30 Array hiddTable
= classTable
.get (type
);
31 Array hidds
= Array (hiddTable
.len ());
34 for (t
=0; hiddTable
[t
]; t
++)
36 if (!strcasecmp (hiddTable
[t
].subType
, subType
)
37 && hiddTable
[t
].match (attrs
)
40 hidds
.append (hiddTable
[t
])
44 hiddTableLock
.unlock ();
49 /* These are global class variables */
50 static HashTable hiddTable
= HashTable (256, HashTable
.calcStringHashCode
);
51 static Semaphore hiddTableLock
= Semaphore ();
56 /* Position and size of the window. The attribute can be read
57 and written from outside. */
58 [RW
] UWORD x
, y
, width
, height
;
59 [RW
] UWORD minWidth
, minHeight
, maxWidth
, maxHeight
;
61 /* Before writing to width, execute this code */
65 Raise
IllegalValue ("width (%d) too small, must be > 0", width
);
68 /* This could also raise an error */
77 this.resize (this.width
, this.height
);