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

📄 wm.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
📖 第 1 页 / 共 5 页
字号:
000000  e92d41ff          PUSH     {r0-r8,lr}
;;;1215     GUI_RECT r;
;;;1216     WM_Obj* pAWin;
;;;1217     GUI_ASSERT_LOCK();   /* GUI_LOCK must have been "called" before entering this (normally done indrawing routine) */
;;;1218      /* If WM is not active -> nothing to do, leave cliprect alone */
;;;1219     if (WM_IsActive==0) {
000004  4e2e              LDR      r6,|L23.192|
000006  4680              MOV      r8,r0                 ;1214
000008  7830              LDRB     r0,[r6,#0]  ; WM_IsActive
00000a  b910              CBNZ     r0,|L23.18|
;;;1220       WM__ActivateClipRect();
00000c  f7fffffe          BL       WM__ActivateClipRect
;;;1221       return 1;
000010  e005              B        |L23.30|
                  |L23.18|
;;;1222     }
;;;1223     /* If we entered multiple times, leave Cliprect alone */
;;;1224     if (++_ClipContext.EntranceCnt > 1)
000012  4d2c              LDR      r5,|L23.196|
000014  6968              LDR      r0,[r5,#0x14]  ; _ClipContext
000016  1c40              ADDS     r0,r0,#1
000018  6168              STR      r0,[r5,#0x14]  ; _ClipContext
00001a  2801              CMP      r0,#1
00001c  dd03              BLE      |L23.38|
                  |L23.30|
;;;1225       return 1;
00001e  2001              MOVS     r0,#1
                  |L23.32|
;;;1226     pAWin = WM_H2P(GUI_Context.hAWin);
;;;1227     _ClipContext.Cnt        = -1;
;;;1228    /* When using callback mechanism, it is legal to reduce drawing
;;;1229       area to the invalid area ! */
;;;1230     if (WM__PaintCallbackCnt) {
;;;1231       WM__GetInvalidRectAbs(pAWin, &r);
;;;1232     } else {  /* Not using callback mechanism, therefor allow entire rectangle */
;;;1233       if (pAWin->Status & WM_SF_ISVIS) {
;;;1234         r = pAWin->Rect;
;;;1235       } else {
;;;1236         --_ClipContext.EntranceCnt;
;;;1237         return 0;  /* window is not even visible ! */
;;;1238       }
;;;1239     }
;;;1240     /* If the drawing routine has specified a rectangle, use it to reduce the rectangle */
;;;1241     if (pMaxRect) {
;;;1242       GUI__IntersectRect(&r, pMaxRect);
;;;1243     }
;;;1244     /* If user has reduced the cliprect size, reduce the rectangle */
;;;1245     if (GUI_Context.WM__pUserClipRect) {
;;;1246       WM_Obj* pWin = pAWin;
;;;1247       GUI_RECT rUser = *(GUI_Context.WM__pUserClipRect);
;;;1248       #if WM_SUPPORT_TRANSPARENCY
;;;1249         if (WM__hATransWindow) {
;;;1250           pWin = WM_H2P(WM__hATransWindow);
;;;1251         }   
;;;1252       #endif
;;;1253       WM__Client2Screen(pWin, &rUser);
;;;1254       GUI__IntersectRect(&r, &rUser);
;;;1255     }
;;;1256     /* For transparent windows, we need to further reduce the rectangle */
;;;1257     #if WM_SUPPORT_TRANSPARENCY
;;;1258       if (WM__hATransWindow) {
;;;1259         if (WM__ClipAtParentBorders(&r, WM__hATransWindow) == 0) {
;;;1260           --_ClipContext.EntranceCnt;
;;;1261           return 0;           /* Nothing to draw */
;;;1262         }
;;;1263       }
;;;1264     #endif
;;;1265     /* Iterate over all ancestors and clip at their borders. If there is no visible part, we are done */
;;;1266     if (WM__ClipAtParentBorders(&r, GUI_Context.hAWin) == 0) {
;;;1267       --_ClipContext.EntranceCnt;
;;;1268       return 0;           /* Nothing to draw */
;;;1269     }
;;;1270     /* Store the rectangle and find the first rectangle of the area */
;;;1271     _ClipContext.ClientRect = r;
;;;1272     return WM__GetNextIVR();
;;;1273   }
000020  b004              ADD      sp,sp,#0x10
000022  e8bd81f0          POP      {r4-r8,pc}
                  |L23.38|
000026  4f28              LDR      r7,|L23.200|
000028  f9b7003c          LDRSH    r0,[r7,#0x3c]         ;1226  ; GUI_Context
00002c  f7fffffe          BL       GUI_ALLOC_h2p
000030  4604              MOV      r4,r0                 ;1226
000032  f04f30ff          MOV      r0,#0xffffffff        ;1227
000036  6128              STR      r0,[r5,#0x10]         ;1230  ; _ClipContext
000038  7870              LDRB     r0,[r6,#1]            ;1230  ; WM__PaintCallbackCnt
00003a  b130              CBZ      r0,|L23.74|
00003c  2208              MOVS     r2,#8                 ;1230
00003e  f1040108          ADD      r1,r4,#8              ;1230
000042  a802              ADD      r0,sp,#8              ;1230
000044  f7fffffe          BL       __aeabi_memcpy
000048  e006              B        |L23.88|
                  |L23.74|
00004a  8ba0              LDRH     r0,[r4,#0x1c]         ;1233
00004c  0780              LSLS     r0,r0,#30             ;1233
00004e  d52c              BPL      |L23.170|
000050  e9d40100          LDRD     r0,r1,[r4,#0]         ;1234
000054  e9cd0102          STRD     r0,r1,[sp,#8]         ;1234
                  |L23.88|
000058  f1b80f00          CMP      r8,#0                 ;1241
00005c  d003              BEQ      |L23.102|
00005e  4641              MOV      r1,r8                 ;1242
000060  a802              ADD      r0,sp,#8              ;1242
000062  f7fffffe          BL       GUI__IntersectRect
                  |L23.102|
000066  6bb8              LDR      r0,[r7,#0x38]         ;1245  ; GUI_Context
000068  b190              CBZ      r0,|L23.144|
00006a  4601              MOV      r1,r0                 ;1247
00006c  2208              MOVS     r2,#8                 ;1247
00006e  4668              MOV      r0,sp                 ;1247
000070  f7fffffe          BL       __aeabi_memcpy
000074  f9b60012          LDRSH    r0,[r6,#0x12]         ;1249  ; WM__hATransWindow
000078  b110              CBZ      r0,|L23.128|
00007a  f7fffffe          BL       GUI_ALLOC_h2p
00007e  4604              MOV      r4,r0                 ;1250
                  |L23.128|
000080  4669              MOV      r1,sp                 ;1253
000082  4620              MOV      r0,r4                 ;1253
000084  f7fffffe          BL       WM__Client2Screen
000088  4669              MOV      r1,sp                 ;1254
00008a  a802              ADD      r0,sp,#8              ;1254
00008c  f7fffffe          BL       GUI__IntersectRect
                  |L23.144|
000090  f9b61012          LDRSH    r1,[r6,#0x12]         ;1258  ; WM__hATransWindow
000094  b119              CBZ      r1,|L23.158|
000096  a802              ADD      r0,sp,#8              ;1259
000098  f7fffffe          BL       WM__ClipAtParentBorders
00009c  b128              CBZ      r0,|L23.170|
                  |L23.158|
00009e  f9b7103c          LDRSH    r1,[r7,#0x3c]         ;1266  ; GUI_Context
0000a2  a802              ADD      r0,sp,#8              ;1266
0000a4  f7fffffe          BL       WM__ClipAtParentBorders
0000a8  b920              CBNZ     r0,|L23.180|
                  |L23.170|
0000aa  6968              LDR      r0,[r5,#0x14]         ;1267  ; _ClipContext
0000ac  1e40              SUBS     r0,r0,#1              ;1267
0000ae  6168              STR      r0,[r5,#0x14]         ;1268  ; _ClipContext
0000b0  2000              MOVS     r0,#0                 ;1268
0000b2  e7b5              B        |L23.32|
                  |L23.180|
0000b4  e9dd0102          LDRD     r0,r1,[sp,#8]         ;1271
0000b8  c503              STM      r5!,{r0,r1}           ;1272
0000ba  f7fffffe          BL       WM__GetNextIVR
0000be  e7af              B        |L23.32|
;;;1274   
                          ENDP

                  |L23.192|
                          DCD      ||.data||
                  |L23.196|
                          DCD      ||area_number.47||
                  |L23.200|
                          DCD      GUI_Context

                          AREA ||i.WM__InsertWindowIntoList||, CODE, READONLY, ALIGN=1

                  WM__InsertWindowIntoList PROC
;;;350    */
;;;351    void WM__InsertWindowIntoList(WM_HWIN hWin, WM_HWIN hParent) {
000000  e92d47f0          PUSH     {r4-r10,lr}
000004  4606              MOV      r6,r0
000006  000c              MOVS     r4,r1
;;;352      int OnTop;
;;;353      WM_HWIN hi;
;;;354      WM_Obj * pWin;
;;;355      WM_Obj * pParent;
;;;356      WM_Obj * pi;
;;;357    
;;;358      if (hParent) {
000008  d013              BEQ      |L24.50|
;;;359        pWin = WM_H2P(hWin);
00000a  4630              MOV      r0,r6
00000c  f7fffffe          BL       GUI_ALLOC_h2p
;;;360        pWin->hNext = 0;
000010  2100              MOVS     r1,#0
000012  8341              STRH     r1,[r0,#0x1a]
000014  4605              MOV      r5,r0                 ;359
;;;361        pWin->hParent = hParent;
000016  82c4              STRH     r4,[r0,#0x16]
;;;362        pParent = WM_H2P(hParent);
000018  4620              MOV      r0,r4
00001a  f7fffffe          BL       GUI_ALLOC_h2p
00001e  4607              MOV      r7,r0
;;;363        OnTop   = pWin->Status & WM_CF_STAYONTOP;
000020  8ba8              LDRH     r0,[r5,#0x1c]
;;;364        hi = pParent->hFirstChild;
000022  f9b79018          LDRSH    r9,[r7,#0x18]
000026  f0000808          AND      r8,r0,#8              ;363
;;;365        /* Put it at beginning of the list if there is no child */
;;;366        if (hi == 0) {   /* No child yet ... Makes things easy ! */
00002a  f1b90f00          CMP      r9,#0
00002e  d102              BNE      |L24.54|
                  |L24.48|
;;;367          pParent->hFirstChild = hWin;
000030  833e              STRH     r6,[r7,#0x18]
                  |L24.50|
;;;368          return;                         /* Early out ... We are done */
;;;369        }
;;;370        /* Put it at beginning of the list if first child is a TOP window and new one is not */
;;;371        pi = WM_H2P(hi);
;;;372        if (!OnTop) {
;;;373          if (pi->Status & WM_SF_STAYONTOP) {
;;;374            pWin->hNext = hi;
;;;375            pParent->hFirstChild = hWin;
;;;376            return;                         /* Early out ... We are done */
;;;377          }
;;;378        }
;;;379        /* Put it at the end of the list or before the last non "STAY-ON-TOP" child */
;;;380        do {
;;;381          WM_Obj* pNext;
;;;382          WM_HWIN hNext;
;;;383          if ((hNext = pi->hNext) == 0) {   /* End of sibling list ? */
;;;384            pi->hNext = hWin;             /* Then modify this last element to point to new one and we are done */
;;;385            break;
;;;386          }
;;;387          pNext = WM_H2P(hNext);
;;;388          if (!OnTop) {
;;;389            if (pNext->Status & WM_SF_STAYONTOP) {
;;;390              pi->hNext = hWin;
;;;391              pWin->hNext = hNext;
;;;392              break;
;;;393            }
;;;394          }
;;;395          pi = pNext;
;;;396        }  while (1);
;;;397        #if WM_SUPPORT_NOTIFY_VIS_CHANGED
;;;398          WM__NotifyVisChanged(hWin, &pWin->Rect);
;;;399        #endif
;;;400      }
;;;401    }
000032  e8bd87f0          POP      {r4-r10,pc}
                  |L24.54|
000036  4648              MOV      r0,r9                 ;371
000038  f7fffffe          BL       GUI_ALLOC_h2p
00003c  4604              MOV      r4,r0                 ;371
00003e  f1b80f00          CMP      r8,#0                 ;372
000042  d105              BNE      |L24.80|
000044  8ba0              LDRH     r0,[r4,#0x1c]         ;373
000046  0700              LSLS     r0,r0,#28             ;373
000048  d502              BPL      |L24.80|
00004a  f8a5901a          STRH     r9,[r5,#0x1a]         ;374
00004e  e7ef              B        |L24.48|
                  |L24.80|
000050  f9b4701a          LDRSH    r7,[r4,#0x1a]         ;383
000054  b90f              CBNZ     r7,|L24.90|
000056  8366              STRH     r6,[r4,#0x1a]         ;384
000058  e7eb              B        |L24.50|
                  |L24.90|
00005a  4638              MOV      r0,r7                 ;387
00005c  f7fffffe          BL       GUI_ALLOC_h2p
000060  f1b80f00          CMP      r8,#0                 ;388
000064  d105              BNE      |L24.114|
000066  8b81              LDRH     r1,[r0,#0x1c]         ;389
000068  0709              LSLS     r1,r1,#28             ;389
00006a  d502              BPL      |L24.114|
00006c  8366              STRH     r6,[r4,#0x1a]         ;390
00006e  836f              STRH     r7,[r5,#0x1a]         ;391
000070  e7df              B        |L24.50|
                  |L24.114|
000072  4604              MOV      r4,r0                 ;395
000074  e7ec              B        |L24.80|
;;;402    
                          ENDP


                          AREA ||i.WM__InvalidateAreaBelow||, CODE, READONLY, ALIGN=1

                  WM__InvalidateAreaBelow PROC
;;;500    */
;;;501    void WM__InvalidateAreaBelow(const GUI_RECT* pRect, WM_HWIN StopWin) {
000000  f7ffbffe          B.W      WM_InvalidateArea
;;;502      GUI_USE_PARA(StopWin);
;;;503      WM_InvalidateArea(pRect);      /* Can be optimized to spare windows above */
;;;504    }
;;;505    
                          ENDP


                          AREA ||i.WM__IsWindow||, CODE, READONLY, ALIGN=2

                  WM__IsWindow PROC
;;;484    */
;;;485    int WM__IsWindow(WM_HWIN hWin) {
000000  b510              PUSH     {r4,lr}
000002  4604              MOV      r4,r0
;;;486      WM_HWIN iWin;
;;;487      for (iWin = WM__FirstWin; iWin; iWin = WM_H2P(iWin)->hNextLin) {
000004  4807              LDR      r0,|L26.36|
000006  f9b00008          LDRSH    r0,[r0,#8]  ; WM__FirstWin
00000a  e007              B        |L26.28|
                  |L26.12|
;;;488        if (iWin == hWin) {
00000c  42a0              CMP      r0,r4
00000e  d101              BNE      |L26.20|
;;;489          return 1;
000010  2001              MOVS     r0,#1
;;;490        }
;;;491      }
;;;492      return 0;
;;;493    }
000012  bd10              POP      {r4,pc}
                  |L26.20|
000014  f7fffffe          BL       GUI_ALLOC_h2p
000018  f9b00014          LDRSH    r0,[r0,#0x14]        

⌨️ 快捷键说明

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