wm_attachwindow.txt
来自「STM32F103ZET6+UCOSII+UCGUI源码」· 文本 代码 · 共 125 行
TXT
125 行
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\wm_attachwindow.o --depend=.\Obj\wm_attachwindow.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\WM\WM_AttachWindow.c]
THUMB
AREA ||i.WM_AttachWindow||, CODE, READONLY, ALIGN=1
WM_AttachWindow PROC
;;;55 */
;;;56 void WM_AttachWindow(WM_HWIN hWin, WM_HWIN hParent) {
000000 e92d41f0 PUSH {r4-r8,lr}
000004 4606 MOV r6,r0
000006 000d MOVS r5,r1
;;;57 WM_LOCK();
;;;58 if (hParent && (hParent != hWin)) {
000008 d01d BEQ |L1.70|
00000a 42b5 CMP r5,r6
00000c d01b BEQ |L1.70|
;;;59 WM_Obj* pWin = WM_H2P(hWin);
00000e 4630 MOV r0,r6
000010 f7fffffe BL GUI_ALLOC_h2p
000014 4607 MOV r7,r0
;;;60 WM_Obj* pParent = WM_H2P(hParent);
000016 4628 MOV r0,r5
000018 f7fffffe BL GUI_ALLOC_h2p
00001c 4604 MOV r4,r0
;;;61 if (pWin->hParent != hParent) {
00001e f9b70016 LDRSH r0,[r7,#0x16]
000022 42a8 CMP r0,r5
000024 d00f BEQ |L1.70|
;;;62 WM_DetachWindow(hWin);
000026 4630 MOV r0,r6
000028 f7fffffe BL WM_DetachWindow
;;;63 WM__InsertWindowIntoList(hWin, hParent);
00002c 4629 MOV r1,r5
00002e 4630 MOV r0,r6
000030 f7fffffe BL WM__InsertWindowIntoList
;;;64 WM_MoveWindow(hWin, pParent->Rect.x0, pParent->Rect.y0); /* Convert parent coordinates -> screen coordinates */
000034 f9b42002 LDRSH r2,[r4,#2]
000038 f9b41000 LDRSH r1,[r4,#0]
00003c 4630 MOV r0,r6
00003e e8bd41f0 POP {r4-r8,lr}
000042 f7ffbffe B.W WM_MoveWindow
|L1.70|
;;;65 }
;;;66 }
;;;67 WM_UNLOCK();
;;;68 }
000046 e8bd81f0 POP {r4-r8,pc}
;;;69
ENDP
AREA ||i.WM_AttachWindowAt||, CODE, READONLY, ALIGN=1
WM_AttachWindowAt PROC
;;;73 */
;;;74 void WM_AttachWindowAt(WM_HWIN hWin, WM_HWIN hParent, int x, int y) {
000000 e92d41f0 PUSH {r4-r8,lr}
000004 4604 MOV r4,r0
000006 460d MOV r5,r1
000008 4616 MOV r6,r2
00000a 461f MOV r7,r3
;;;75 WM_DetachWindow(hWin);
00000c f7fffffe BL WM_DetachWindow
;;;76 WM_MoveTo(hWin, x, y);
000010 463a MOV r2,r7
000012 4631 MOV r1,r6
000014 4620 MOV r0,r4
000016 f7fffffe BL WM_MoveTo
;;;77 WM_AttachWindow(hWin, hParent);
00001a 4629 MOV r1,r5
00001c 4620 MOV r0,r4
00001e e8bd41f0 POP {r4-r8,lr}
000022 f7ffbffe B.W WM_AttachWindow
;;;78 }
;;;79
ENDP
AREA ||i.WM_DetachWindow||, CODE, READONLY, ALIGN=1
WM_DetachWindow PROC
;;;33 */
;;;34 void WM_DetachWindow(WM_HWIN hWin) {
000000 b570 PUSH {r4-r6,lr}
000002 0005 MOVS r5,r0
;;;35 if (hWin) {
000004 d017 BEQ |L3.54|
;;;36 WM_HWIN hParent;
;;;37 WM_Obj* pWin;
;;;38 WM_LOCK();
;;;39 pWin = WM_H2P(hWin);
000006 4628 MOV r0,r5
000008 f7fffffe BL GUI_ALLOC_h2p
;;;40 hParent = pWin->hParent;
00000c f9b04016 LDRSH r4,[r0,#0x16]
;;;41 if (hParent) {
000010 2c00 CMP r4,#0
000012 d010 BEQ |L3.54|
;;;42 WM_Obj* pParent;
;;;43 WM__DetachWindow(hWin);
000014 4628 MOV r0,r5
000016 f7fffffe BL WM__DetachWindow
;;;44 pParent = WM_H2P(hParent);
00001a 4620 MOV r0,r4
00001c f7fffffe BL GUI_ALLOC_h2p
;;;45 WM_MoveWindow(hWin, -pParent->Rect.x0, -pParent->Rect.y0); /* Convert screen coordinates -> parent coordinates */
000020 f9b01002 LDRSH r1,[r0,#2]
000024 f9b00000 LDRSH r0,[r0,#0]
000028 424a RSBS r2,r1,#0
00002a 4241 RSBS r1,r0,#0
00002c 4628 MOV r0,r5
00002e e8bd4070 POP {r4-r6,lr}
000032 f7ffbffe B.W WM_MoveWindow
|L3.54|
;;;46 /* ToDo: Invalidate. If Parent window is located at (0,0). */
;;;47 }
;;;48 WM_UNLOCK();
;;;49 }
;;;50 }
000036 bd70 POP {r4-r6,pc}
;;;51
ENDP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?