Download O2Look User Manual

Transcript
4
Graphic Resources
*sch1_agency.application.titleString:
Just testing...
• All of t h e r esou r ces for icon ic r epr esen tation s of objects ar e available
t o t h e applicat ion icon it self; t h e ed_name of t h e icon is t h e n am e of
t h e applicat ion . Con t in u in g t h e above exam ple, if you wan t t o display
t h e pr ogr am m en u in r ed on a yellow back gr ou n d, t h e followin g
r esou r ce specification s wou ld do so:
*sch1_agency.application.agency.menuForegroundColor: red
*sch1_agency.application.agency.menuBackgroundColor: yellow
4.3 Resource arrays
Th e gr aph ic r esou r ces specified in r esou r ce files (or left at t h eir defau lt
valu es) m ay be over r idden at r u n -t im e by calls to var iou s O 2 Look
fu n ct ion s.
Th is m ay be don e eith er wh en a pr esen t at ion or m ask is cr eated (by
passin g a list of r esou r ces t o t h e fu n ct ion t h at cr eat es it ), or lat er
(t h r ou gh t h e lk_refresh_presentation fu n ct ion ).
In eit h er case, t h e caller m u st su pply t wo ar gu m en t s: a cou n t of t h e
n u m ber of r esou r ces t o be cu st om ized (gen er ally called rcount) an d a
poin t er t o an ar r ay of r esou r ce specificat ion s (u su ally called
resources).
Each elem en t in t h e ar r ay m u st be of t ype Lk_resource, wh ich is
k n own t o th e syst em as t h e followin g C st r u ct u r e:
typedef struct {
char* name;
char* value;
} Lk_resource;
Th e name st r in g iden t ifies th e r esou r ce, an d t h e value st r in g in dicat es
wh at it is to be set t o.
Note
Th e name st r in g is n ot t h e fu ll n am e specificat ion r equ ir ed for a
r esou r ce file; it is on ly t h e last par t of t h at specificat ion , su ch as
"fontList" or "foregroundColor".
106
O2 Look User Man u al