⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nano-x-docs.ps

📁 开放源码实时操作系统源码.
💻 PS
📖 第 1 页 / 共 5 页
字号:
Black 948 587 a Fa(y)j Fh(:)50 b(the)24 b(Y)h(coordinate)f(of)h(the)g
(ne)n(w)f(windo)n(w)g(relati)n(v)o(e)g(to)g(the)h(parent)f(windo)n(w)
717 741 y Fa(width)g Fh(:)50 b(the)24 b(width)g(of)h(the)g(ne)n(w)f
(windo)n(w)657 895 y Fa(height)g Fh(:)50 b(the)24 b(height)g(of)h(the)g
(ne)n(w)f(windo)n(w)706 1050 y Fg(Returns)g Fh(:)50 b(the)24
b(ID)h(of)g(the)g(ne)n(wly)f(created)h(windo)n(w)396
1546 y Fb(GrDestr)n(o)n(yWindo)n(w)34 b(\(\))396 1762
y Fc(void)430 b(GrDestroyWindow)911 b(\(GR_WINDOW_ID)52
b(wid\);)396 1992 y Fh(Recursi)n(v)o(ely)24 b(unmaps)g(and)h(frees)g
(the)g(data)g(structures)f(associated)g(with)g(the)h(speci\002ed)g
(windo)n(w)396 2121 y(and)g(all)g(of)f(its)h(children.)833
2412 y Fa(wid)j Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i
(destro)o(y)396 2929 y Fb(GrMapWindo)n(w)34 b(\(\))396
3145 y Fc(void)430 b(GrMapWindow)1127 b(\(GR_WINDOW_ID)52
b(wid\);)396 3374 y Fh(Recursi)n(v)o(ely)24 b(maps)g(\(mak)o(es)h
(visible\))f(the)g(speci\002ed)h(windo)n(w)f(and)h(all)f(of)h(the)g
(child)f(windo)n(ws)396 3504 y(which)h(ha)n(v)o(e)f(a)h(suf)n
(\002cient)g(map)f(count.)30 b(The)25 b(border)g(and)g(background)f(of)
h(the)f(windo)n(w)g(are)396 3633 y(painted,)g(and)h(an)g(e)o(xposure)f
(e)n(v)o(ent)g(is)g(generated)h(for)g(the)g(windo)n(w)f(and)g(e)n(v)o
(ery)g(child)h(which)396 3763 y(becomes)g(visible.)833
4054 y Fa(wid)j Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i
(map)396 4571 y Fb(GrUnmapWindo)n(w)35 b(\(\))396 4787
y Fc(void)430 b(GrUnmapWindow)1019 b(\(GR_WINDOW_ID)52
b(wid\);)p Black 3784 5278 a Fg(11)p Black eop
%%Page: 12 12
12 11 bop Black -2 67 a Fg(Chapter)24 b(1.)31 b(libnano-X)p
Black 396 579 a Fh(Recursi)n(v)o(ely)24 b(unmaps)g(\(mak)o(es)h(in)l
(visible\))e(the)i(speci\002ed)g(windo)n(w)e(and)i(all)f(of)h(the)g
(child)396 708 y(windo)n(ws.)833 1000 y Fa(wid)j Fh(:)50
b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(unmap)396
1516 y Fb(GrRaiseWindo)n(w)35 b(\(\))396 1733 y Fc(void)430
b(GrRaiseWindow)1019 b(\(GR_WINDOW_ID)52 b(wid\);)396
1962 y Fh(Places)26 b(the)e(speci\002ed)h(windo)n(w)f(at)h(the)f(top)h
(of)f(its)h(parents)f(dra)o(wing)g(stack,)h(abo)o(v)o(e)e(all)i(of)g
(its)396 2091 y(sibling)e(windo)n(ws.)833 2403 y Fa(wid)28
b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(raise)396
2899 y Fb(GrLo)n(werWindo)n(w)34 b(\(\))396 3115 y Fc(void)430
b(GrLowerWindow)1019 b(\(GR_WINDOW_ID)52 b(wid\);)396
3345 y Fh(Places)26 b(the)e(speci\002ed)h(windo)n(w)f(at)h(the)f
(bottom)g(of)g(its)h(parents)f(dra)o(wing)g(stack,)h(belo)n(w)e(all)i
(of)g(its)396 3474 y(sibling)e(windo)n(ws.)833 3786 y
Fa(wid)28 b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(lo)n
(wer)396 4282 y Fb(GrMo)n(veWindo)n(w)34 b(\(\))396 4498
y Fc(void)430 b(GrMoveWindow)1073 b(\(GR_WINDOW_ID)52
b(wid,)2817 4615 y(GR_COORD)g(x,)2817 4731 y(GR_COORD)g(y\);)p
Black -2 5278 a Fg(12)p Black eop
%%Page: 13 13
13 12 bop Black 3023 67 a Fg(Chapter)25 b(1.)30 b(libnano-X)p
Black 396 579 a Fh(Mo)o(v)o(es)23 b(the)i(speci\002ed)g(windo)n(w)e(to)
i(the)g(speci\002ed)g(position)e(relati)n(v)o(e)g(to)i(its)f(parent)h
(windo)n(w)-6 b(.)833 890 y Fa(wid)28 b Fh(:)50 b(the)24
b(ID)h(of)g(the)g(windo)n(w)e(to)i(mo)o(v)o(e)951 1045
y Fa(x)30 b Fh(:)50 b(the)24 b(X)h(coordinate)f(to)h(mo)o(v)o(e)e(the)i
(windo)n(w)e(to)i(relati)n(v)o(e)e(to)i(its)f(parent.)948
1199 y Fa(y)33 b Fh(:)50 b(the)24 b(Y)h(coordinate)f(to)h(mo)o(v)o(e)e
(the)i(windo)n(w)e(to)i(relati)n(v)o(e)e(to)i(its)f(parent.)396
1696 y Fb(GrResiz)q(eWindo)n(w)35 b(\(\))396 1912 y Fc(void)430
b(GrResizeWindow)965 b(\(GR_WINDOW_ID)52 b(wid,)2817
2028 y(GR_SIZE)h(width,)2817 2145 y(GR_SIZE)g(height\);)396
2374 y Fh(Resizes)26 b(the)e(speci\002ed)h(windo)n(w)f(to)g(be)h(the)g
(speci\002ed)g(width)f(and)g(height.)833 2686 y Fa(wid)k
Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(resize)717
2840 y Fa(width)f Fh(:)50 b(the)24 b(width)g(to)g(resize)i(the)e(windo)
n(w)g(to)657 2995 y Fa(height)g Fh(:)50 b(the)24 b(height)g(to)h
(resize)g(the)f(windo)n(w)g(to)396 3491 y Fb(GrReparentWindo)n(w)35
b(\(\))396 3707 y Fc(void)430 b(GrReparentWindow)857
b(\(GR_WINDOW_ID)52 b(wid,)2817 3824 y(GR_WINDOW_ID)g(pwid,)2817
3940 y(GR_COORD)g(x,)2817 4057 y(GR_COORD)g(y\);)396
4286 y Fh(Changes)24 b(the)g(parent)g(windo)n(w)f(of)h(the)g
(speci\002ed)g(windo)n(w)e(to)i(the)g(speci\002ed)g(parent)g(windo)n(w)
e(and)396 4416 y(places)j(it)f(at)h(the)g(speci\002ed)g(coordinates)f
(relati)n(v)o(e)g(to)g(the)h(ne)n(w)f(parent.)833 4727
y Fa(wid)k Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i
(reparent)p Black 3784 5278 a Fg(13)p Black eop
%%Page: 14 14
14 13 bop Black -2 67 a Fg(Chapter)24 b(1.)31 b(libnano-X)p
Black 773 587 a Fa(pwid)d Fh(:)50 b(the)24 b(ID)h(of)g(the)g(ne)n(w)f
(parent)h(windo)n(w)951 741 y Fa(x)30 b Fh(:)50 b(the)24
b(X)h(coordinate)f(to)h(place)g(the)g(windo)n(w)e(at)i(relati)n(v)o(e)f
(to)g(the)h(ne)n(w)f(parent)948 895 y Fa(y)33 b Fh(:)50
b(the)24 b(Y)h(coordinate)f(to)h(place)g(the)g(windo)n(w)e(at)i(relati)
n(v)o(e)f(to)g(the)h(ne)n(w)f(parent)396 1392 y Fb(GrGetWindo)n(wInf)n
(o)33 b(\(\))396 1608 y Fc(void)430 b(GrGetWindowInfo)911
b(\(GR_WINDOW_ID)52 b(wid,)2817 1725 y(GR_WINDOW_INFO)f(*in-)396
1841 y(foptr\);)396 2070 y Fh(Fills)24 b(in)h(a)g(GR_WINDO)m(W_INFO)g
(structure)f(with)g(information)g(re)o(garding)f(the)i(windo)n(w)e
(with)396 2200 y(the)i(speci\002ed)g(windo)n(w)e(ID.)833
2511 y Fa(wid)28 b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i
(retrie)n(v)o(e)f(information)f(about)594 2666 y Fa(infoptr)k
Fh(:)50 b(pointer)24 b(to)g(a)h(GR_WINDO)m(W_INFO)g(structure)g(to)f
(return)h(the)g(information)1094 2795 y(in)396 3292 y
Fb(GrSetWMPr)n(oper)r(ties)33 b(\(\))396 3508 y Fc(void)430
b(GrSetWMProperties)803 b(\(GR_WINDOW_ID)52 b(wid,)2817
3624 y(GR_WM_PROPERTIES)f(*props\);)396 3854 y Fh(Copies)25
b(the)g(pro)o(vided)e(GR_WM_PR)l(OPER)-6 b(TIES)27 b(structure)d(into)g
(the)h(the)396 3983 y(GR_WM_PR)l(OPER)-6 b(TIES)27 b(structure)d(of)h
(the)g(speci\002ed)g(windo)n(w)e(id.)833 4295 y Fa(wid)28
b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(set)f(the)h(WM)f
(properties)h(of)717 4449 y Fa(props)f Fh(:)50 b(pointer)24
b(to)g(a)h(GR_WM_PR)l(OPER)-6 b(TIES)27 b(structure)p
Black -2 5278 a Fg(14)p Black eop
%%Page: 15 15
15 14 bop Black 3023 67 a Fg(Chapter)25 b(1.)30 b(libnano-X)p
Black 396 583 a Fb(GrGetWMPr)n(oper)r(ties)j(\(\))396
799 y Fc(void)430 b(GrGetWMProperties)803 b(\(GR_WINDOW_ID)52
b(wid,)2817 916 y(GR_WM_PROPERTIES)f(*props\);)396 1145
y Fh(Reads)26 b(the)e(GR_WM_PR)l(OPER)-6 b(TIES)27 b(structure)d(for)h
(the)g(windo)n(w)e(with)h(the)h(speci\002ed)g(id)f(and)396
1275 y(\002lls)h(in)f(the)h(pro)o(vided)e(structure)i(with)f(the)h
(information.)k(It)c(is)f(the)h(callers)f(responsibility)f(to)h(free)
396 1404 y(the)h(title)f(member)g(as)h(it)f(is)h(allocated)f
(dynamically)-6 b(.)29 b(The)c(title)f(\002eld)h(will)f(be)h(set)f(to)h
(NULL)f(if)h(the)396 1534 y(windo)n(w)f(has)g(no)h(title.)833
1825 y Fa(wid)j Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i
(retrei)n(v)o(e)f(the)g(WM)h(properties)f(of)717 1979
y Fa(props)g Fh(:)50 b(pointer)24 b(to)g(a)h(GR_WM_PR)l(OPER)-6
b(TIES)27 b(structure)d(to)h(\002ll)f(in)396 2496 y Fb(GrSetFocus)34
b(\(\))396 2712 y Fc(void)430 b(GrSetFocus)1181 b(\(GR_WINDOW_ID)52
b(wid\);)396 2941 y Fh(Sets)25 b(the)g(k)o(e)o(yboard)f(focus)h(to)f
(the)h(speci\002ed)g(windo)n(w)-6 b(.)833 3253 y Fa(wid)28
b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(set)f(the)h
(focus)g(to)396 3749 y Fb(GrGetFocus)34 b(\(\))396 3965
y Fc(GR_WINDOW_ID)52 b(GrGetFocus)1127 b(\(void\);)706
4365 y Fg(Returns)24 b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e
(which)i(currently)f(has)h(the)f(k)o(e)o(yboard)h(focus)p
Black 3784 5278 a Fg(15)p Black eop
%%Page: 16 16
16 15 bop Black -2 67 a Fg(Chapter)24 b(1.)31 b(libnano-X)p
Black 396 583 a Fb(GrSetBor)n(derColor)i(\(\))396 799
y Fc(void)430 b(GrSetBorderColor)857 b(\(GR_WINDOW_ID)52
b(wid,)2817 916 y(GR_COLOR)g(color\);)396 1145 y Fh(Sets)25
b(the)g(border)g(colour)f(of)h(the)g(speci\002ed)g(windo)n(w)e(to)i
(the)f(speci\002ed)h(colour)-5 b(.)833 1457 y Fa(wid)28
b Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(set)f(the)h
(border)g(colour)f(of)714 1611 y Fa(color)j Fh(:)396
2107 y Fb(GrSetBac)n(kgr)n(oundPixmap)35 b(\(\))396 2324
y Fc(void)430 b(GrSetBackgroundPixmap)587 b(\(GR_WINDOW_ID)52
b(wid,)2817 2440 y(GR_WINDOW_ID)g(pixmap,)2817 2557 y(int)h(flags\);)
396 2786 y Fh(Sets)25 b(the)g(background)f(of)h(the)g(speci\002ed)g
(windo)n(w)e(to)i(the)f(speci\002ed)h(pixmap.)30 b(The)25
b(\003ags)g(which)396 2915 y(specify)g(ho)n(w)f(to)g(dra)o(w)h(the)f
(pixmap)g(\(in)h(the)g(top)f(left)g(of)h(the)g(windo)n(w)-6
b(,)23 b(in)h(the)h(centre)g(of)g(the)396 3045 y(windo)n(w)-6
b(,)23 b(tiled,)h(etc.\))h(are)h(those)e(which)g(start)h(with)f(GR_B)m
(A)l(CKGR)l(OUND_)h(in)g(nano-X.h.)30 b(If)396 3174 y(the)25
b(pixmap)f(v)n(alue)g(is)g(0,)h(the)g(serv)o(er)f(will)g(disable)g(the)
h(background)f(pixmap)g(and)h(return)g(to)396 3304 y(using)f(a)h(solid)
f(colour)g(\002ll.)833 3615 y Fa(wid)k Fh(:)50 b(ID)25
b(of)f(the)h(windo)n(w)f(to)g(set)h(the)f(background)g(of)657
3770 y Fa(pixmap)g Fh(:)50 b(ID)25 b(of)f(the)h(pixmap)f(to)g(use)h(as)
g(the)g(background)717 3924 y Fa(flags)f Fh(:)50 b(\003ags)25
b(specifying)f(ho)n(w)g(to)g(dra)o(w)h(the)f(pixmap)g(onto)g(the)h
(windo)n(w)396 4421 y Fb(GrClearWindo)n(w)34 b(\(\))396
4637 y Fc(void)430 b(GrClearWindow)1019 b(\(GR_WINDOW_ID)52
b(wid,)2817 4753 y(GR_BOOL)h(expose-)396 4870 y(flag\);)p
Black -2 5278 a Fg(16)p Black eop
%%Page: 17 17
17 16 bop Black 3023 67 a Fg(Chapter)25 b(1.)30 b(libnano-X)p
Black 396 579 a Fh(Clears)c(the)e(speci\002ed)h(windo)n(w)f(by)g
(setting)g(it)g(to)h(its)f(background)g(color)-5 b(.)30
b(If)25 b(the)g(e)o(xpose\003ag)396 708 y(parameter)g(is)g(non)f(zero,)
h(an)g(e)o(xposure)f(e)n(v)o(ent)g(is)h(generated)g(for)g(the)f(windo)n
(w)g(after)h(it)g(has)f(been)396 838 y(cleared.)833 1129
y Fa(wid)k Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(clear)
438 1284 y Fa(exposeflag)j Fh(:)d(a)g(\003ag)g(indicating)e(whether)i
(to)g(also)f(generate)h(an)g(e)o(xposure)f(e)n(v)o(ent)396
1905 y Fb(GrCloseWindo)n(w)35 b(\(\))396 2121 y Fc(void)430
b(GrCloseWindow)1019 b(\(GR_WINDOW_ID)52 b(wid\);)396
2350 y Fh(Sends)24 b(a)h(CLOSE_REQ)f(e)n(v)o(ent)f(to)h(the)g
(speci\002ed)g(windo)n(w)f(if)h(the)g(client)f(has)h(selected)g(to)g
(recei)n(v)o(e)396 2480 y(CLOSE_REQ)i(e)n(v)o(ents)d(on)i(this)f(windo)
n(w)-6 b(.)28 b(Used)d(to)f(request)h(an)g(application)f(to)g(shut)g
(do)n(wn)g(b)n(ut)396 2609 y(not)g(force)i(it)e(to)h(do)f(so)h
(immediately)-6 b(,)22 b(so)j(the)f(application)g(can)h(ask)g(whether)g
(to)f(sa)n(v)o(e)h(changed)396 2739 y(\002les)g(before)h(shutting)d(do)
n(wn)g(cleanly)-6 b(.)833 3050 y Fa(wid)28 b Fh(:)50
b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(send)f(the)h(CLOSE_REQ)g(e)
n(v)o(ent)f(to)396 3547 y Fb(GrKillWindo)n(w)34 b(\(\))396
3763 y Fc(void)430 b(GrKillWindow)1073 b(\(GR_WINDOW_ID)52
b(wid\);)396 3992 y Fh(F)o(orcibly)24 b(disconnects)g(the)h(client)f
(which)g(o)n(wns)g(this)g(windo)n(w)f(with)h(the)h(speci\002ed)g(ID)g
(number)-5 b(.)396 4122 y(Used)25 b(to)f(kill)g(an)h(application)f
(which)g(has)h(lock)o(ed)f(up)h(and)g(is)f(not)g(responding)g(to)g
(CLOSE_REQ)396 4251 y(e)n(v)o(ents.)833 4542 y Fa(wid)k
Fh(:)50 b(the)24 b(ID)h(of)g(the)g(windo)n(w)e(to)i(kill)p
Black 3780 5278 a Fg(17)p Black eop
%%Page: 18 18
18 17 bop Black -2 67 a Fg(Chapter)24 b(1.)31 b(libnano-X)p
Black -2 621 a Ff(graphics)47 b(\(3\))396 1101 y Fe(Name)396
1303 y Fd(graphics)23 b Fh(\227)396 1696 y Fe(Synopsis)396
2146 y Fc(GR_GC_ID)214 b(GrNewGC)1343 b(\(void\);)396
2262 y(GR_GC_ID)214 b(GrCopyGC)1289 b(\(GR_GC_ID)52 b(gc\);)396
2379 y(void)430 b(GrGetGCInfo)1127 b(\(GR_GC_ID)52 b(gc,)2817
2495 y(GR_GC_INFO)g(*gcip\);)396 2612 y(void)430 b(GrDestroyGC)1127
b(\(GR_GC_ID)52 b(gc\);)396 2728 y(void)430 b(GrLine)1397
b(\(GR_DRAW_ID)52 b(id,)2817 2845 y(GR_GC_ID)g(gc,)2817
2962 y(GR_COORD)g(x1,)2817 3078 y(GR_COORD)g(y1,)2817
3195 y(GR_COORD)g(x2,)2817 3311 y(GR_COORD)g(y2\);)396
3428 y(void)430 b(GrPoint)1343 b(\(GR_DRAW_ID)52 b(id,)2817
3544 y(GR_GC_ID)g(gc,)2817 3661 y(GR_COORD)g(x,)2817
3777 y(GR_COORD)g(y\);)396 3894 y(void)430 b(GrPoints)1289
b(\(GR_DRAW_ID)52 b(id,)2817 4011 y(GR_GC_ID)g(gc,)2817
4127 y(GR_COUNT)g(count,)2817 4244 y(GR_POINT)g(*pointtable\);)396
4360 y(void)430 b(GrRect)1397 b(\(GR_DRAW_ID)52 b(id,)2817
4477 y(GR_GC_ID)g(gc,)2817 4593 y(GR_COORD)g(x,)2817
4710 y(GR_COORD)g(y,)2817 4827 y(GR_SIZE)h(width,)p Black
-2 5278 a Fg(18)p Black eop
%%Page: 19 19
19 18 bop Black 3023 67 a Fg(Chapter)25 b(1.)30 b(libnano-X)p
Black 2817 579 a Fc(GR_SIZE)53 b(height\);)396 695 y(void)430
b(GrFillRect)1181 b(\(GR_DRAW_ID)52 b(id,)2817 812 y(GR_GC_ID)g(gc,)
2817 929 y(GR_COORD)g(x,)2817 1045 y(GR_COORD)g(y,)2817
1162 y(GR_SIZE)h(width,)2817 1278 y(GR_SIZE)g(height\);)396
1395 y(void)430 b(GrPoly)1397 b(\(GR_DRAW_ID)52 b(id,)2817
1511 y(GR_GC_ID)g(gc,)2817 1628 y(GR_COUNT)g(count,)2817
1745 y(GR_POINT)g(*pointtable\);)396 1861 y(void)430
b(GrFillPoly)1181 b(\(GR_DRAW_ID)52 b(id,)2817 1978 y(GR_GC_ID)g(gc,)
2817 2094 y(GR_COUNT)g(count,)2817 2211 y(GR_POINT)g(*pointtable\);)396
2327 y(void)430 b(GrEllipse)1235 b(\(GR_DRAW_ID)52 b(id,)2817
2444 y(GR_GC_ID)g(gc,)2817 2560 y(GR_COORD)g(x,)2817
2677 y(GR_COORD)g(y,)2817 2794 y(GR_SIZE)h(rx,)2817 2910
y(GR_SIZE)g(ry\);)396 3027 y(void)430 b(GrFillEllipse)1019
b(\(GR_DRAW_ID)52 b(id,)2817 3143 y(GR_GC_ID)g(gc,)2817
3260 y(GR_COORD)g(x,)2817 3376 y(GR_COORD)g(y,)2817 3493
y(GR_SIZE)h(rx,)2817 3610 y(GR_SIZE)g(ry\);)396 3726
y(void)430 b(GrArc)1451 b(\(GR_DRAW_ID)52 b(id,)2817
3843 y(GR_GC_ID)g(gc,)2817 3959 y(GR_COORD)g(x,)2817
4076 y(GR_COORD)g(y,)2817 4192 y(GR_SIZE)h(rx,)2817 4309
y(GR_SIZE)g(ry,)2817 4425 y(GR_COORD)f(ax,)2817 4542

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -