43 #if defined(__cplusplus) 48 #ifndef WM_SUPPORT_STATIC_MEMDEV 49 #define WM_SUPPORT_STATIC_MEMDEV GUI_SUPPORT_MEMDEV 53 #ifndef WM_SUPPORT_TRANSPARENCY 54 #define WM_SUPPORT_TRANSPARENCY 1 59 #ifndef WM_SUPPORT_DIAG 61 #define WM_SUPPORT_DIAG GUI_WINSUPPORT 63 #define WM_SUPPORT_DIAG 0 79 #define WM_ASSERT(expr) GUI_DEBUG_ASSERT(expr) 82 #ifndef WM_SUPPORT_TOUCH 83 #define WM_SUPPORT_TOUCH GUI_SUPPORT_TOUCH 87 #ifndef WM_COMPATIBLE_MODE 88 #define WM_COMPATIBLE_MODE 1 92 #ifndef WM_SUPPORT_NOTIFY_VIS_CHANGED 93 #define WM_SUPPORT_NOTIFY_VIS_CHANGED 0 96 #ifndef WM_SUPPORT_CPP 97 #if defined (_MSC_VER) 98 #define WM_SUPPORT_CPP 1 100 #define WM_SUPPORT_CPP 0 108 #define WM_LOCK() GUI_LOCK() 109 #define WM_UNLOCK() GUI_UNLOCK() 111 #define WM_LOCK_H(hWin) (WM_Obj *)GUI_LOCK_H(hWin) 117 typedef struct WM_WINDOW_INFO WM_WINDOW_INFO;
119 struct WM_WINDOW_INFO {
127 WM_WINDOW_INFO * pNext;
135 int NumItems, v, PageSize;
147 } WM_PID_STATE_CHANGED_INFO;
181 WM_ZOOM_INFO * pZoomInfo;
192 #define WM_GF_BEGIN (1 << 0) 193 #define WM_GF_END (1 << 1) 194 #define WM_GF_PAN (1 << 2) 195 #define WM_GF_ZOOM (1 << 3) 196 #define WM_GF_ROTATE (1 << 4) 204 #define WM_CREATE 0x0001 205 #define WM_MOVE 0x0003 207 #define WM_SIZE 0x0005 211 #define WM_TOUCH 0x0240 212 #define WM_TOUCH_CHILD 13 215 #define WM_PAINT 0x000F 217 #if GUI_SUPPORT_MOUSE 218 #define WM_MOUSEOVER 16 219 #define WM_MOUSEOVER_END 18 222 #define WM_PID_STATE_CHANGED 17 224 #define WM_GET_INSIDE_RECT 20 227 #define WM_GET_CLIENT_WINDOW 23 228 #define WM_CAPTURE_RELEASED 24 230 #define WM_INIT_DIALOG 29 232 #define WM_SET_FOCUS 30 233 #define WM_GET_ACCEPT_FOCUS 31 234 #define WM_NOTIFY_CHILD_HAS_FOCUS 32 236 #define WM_NOTIFY_OWNER_KEY 33 238 #define WM_GET_BKCOLOR 34 239 #define WM_GET_SCROLL_STATE 35 241 #define WM_SET_SCROLL_STATE 36 243 #define WM_NOTIFY_CLIENTCHANGE 37 244 #define WM_NOTIFY_PARENT 38 245 #define WM_NOTIFY_PARENT_REFLECTION 39 249 #define WM_NOTIFY_ENABLE 40 250 #define WM_NOTIFY_VIS_CHANGED 41 252 #define WM_HANDLE_DIALOG_STATUS 42 253 #define WM_GET_RADIOGROUP 43 256 #define WM_SCREENSIZE_CHANGED 45 257 #define WM_PRE_PAINT 46 258 #define WM_POST_PAINT 47 262 #define WM_GET_WINDOW_ID 49 264 #define WM_GESTURE 0x0119 266 #define WM_TIMER 0x0113 267 #define WM_WIDGET 0x0300 268 #define WM_USER 0x0400 274 #define WM_MOTION_INIT 0 275 #define WM_MOTION_MOVE 1 276 #define WM_MOTION_GETPOS 2 277 #define WM_MOTION_GETCONTEXT 3 283 #define WM_MOTION_MANAGE_BY_WINDOW (1 << 0) // Window movement is managed by window itself 292 #define WM_NOTIFICATION_CLICKED 1 293 #define WM_NOTIFICATION_RELEASED 2 294 #define WM_NOTIFICATION_MOVED_OUT 3 295 #define WM_NOTIFICATION_SEL_CHANGED 4 296 #define WM_NOTIFICATION_VALUE_CHANGED 5 297 #define WM_NOTIFICATION_SCROLLBAR_ADDED 6 298 #define WM_NOTIFICATION_CHILD_DELETED 7 299 #define WM_NOTIFICATION_GOT_FOCUS 8 300 #define WM_NOTIFICATION_LOST_FOCUS 9 301 #define WM_NOTIFICATION_SCROLL_CHANGED 10 303 #define WM_NOTIFICATION_WIDGET 11 304 #define WM_NOTIFICATION_USER 16 310 #define WM_HWIN GUI_HWIN 311 #define WM_HWIN_NULL GUI_HMEM_NULL 312 #define WM_HMEM GUI_HMEM 313 #define WM_HMEM_NULL GUI_HMEM_NULL 314 #define WM_HTIMER GUI_HMEM 320 #define WM_HBKWIN WM_GetDesktopWindow() 321 #define WM_UNATTACHED ((WM_HMEM) - 1) 331 #define WM_CF_HASTRANS (1UL << 0) 333 #define WM_CF_HIDE (0UL << 1) 334 #define WM_CF_SHOW (1UL << 1) 335 #define WM_CF_MEMDEV (1UL << 2) 336 #define WM_CF_STAYONTOP (1UL << 3) 337 #define WM_CF_DISABLED (1UL << 4) 340 #define WM_CF_ACTIVATE (1UL << 5) 341 #define WM_CF_FGND (0UL << 6) 342 #define WM_CF_BGND (1UL << 6) 345 #define WM_CF_ANCHOR_RIGHT (1UL << 7) 346 #define WM_CF_ANCHOR_BOTTOM (1UL << 8) 347 #define WM_CF_ANCHOR_LEFT (1UL << 9) 348 #define WM_CF_ANCHOR_TOP (1UL << 10) 350 #define WM_CF_CONST_OUTLINE (1UL << 11) 353 #define WM_CF_LATE_CLIP (1UL << 12) 354 #define WM_CF_MEMDEV_ON_REDRAW (1UL << 13) 356 #define WM_SF_INVALID_DRAW (1UL << 14) 357 #define WM_SF_DELETE (1UL << 15) 359 #define WM_CF_STATIC (1UL << 16) 361 #define WM_CF_MOTION_X (1UL << 17) 362 #define WM_CF_MOTION_Y (1UL << 18) 364 #define WM_CF_GESTURE (1UL << 19) 366 #define WM_CF_ZOOM (1UL << 20) 368 #define WM_CF_MOTION_R (1UL << 21) // Window can be rotated 374 typedef struct WM_Obj WM_Obj;
375 typedef struct WM_MESSAGE WM_MESSAGE;
377 typedef void WM_CALLBACK( WM_MESSAGE * pMsg);
398 #if WM_SUPPORT_STATIC_MEMDEV 407 typedef void WM_tfPollPID(
void);
408 typedef void WM_tfForEach(WM_HWIN hWin,
void * pData);
410 typedef void (* WM_tfInvalidateParent) (
const GUI_RECT * pInvalidRect, WM_HWIN hParent, WM_HWIN hStop);
411 typedef void (* WM_tfInvalidateDrawFunc)(WM_HWIN hWin);
412 typedef void (* WM_tfPaint1Func) (WM_HWIN hWin);
424 void WM_Activate (
void);
425 void WM_Deactivate(
void);
428 U32 WM_SetCreateFlags(
U32 Flags);
429 WM_tfPollPID * WM_SetpfPollPID(WM_tfPollPID * pf);
435 void WM_AttachWindow (WM_HWIN hWin, WM_HWIN hParent);
436 void WM_AttachWindowAt (WM_HWIN hWin, WM_HWIN hParent,
int x,
int y);
437 int WM_CheckScrollPos (WM_SCROLL_STATE * pScrollState,
int Pos,
int LowerDist,
int UpperDist);
438 void WM_ClrHasTrans (WM_HWIN hWin);
439 WM_HWIN WM_CreateWindow (
int x0,
int y0,
int xSize,
int ySize,
U32 Style, WM_CALLBACK * cb,
int NumExtraBytes);
440 WM_HWIN WM_CreateWindowAsChild (
int x0,
int y0,
int xSize,
int ySize, WM_HWIN hWinParent,
U32 Style, WM_CALLBACK* cb,
int NumExtraBytes);
441 void WM_DeleteWindow (WM_HWIN hWin);
442 void WM_DetachWindow (WM_HWIN hWin);
443 void WM_EnableGestures (WM_HWIN hWin,
int OnOff);
444 int WM_GetHasTrans (WM_HWIN hWin);
445 WM_HWIN WM_GetFocussedWindow (
void);
446 int WM_GetInvalidRect (WM_HWIN hWin,
GUI_RECT * pRect);
447 int WM_GetStayOnTop (WM_HWIN hWin);
448 void WM_HideWindow (WM_HWIN hWin);
449 void WM_InvalidateArea (
const GUI_RECT * pRect);
450 void WM_InvalidateRect (WM_HWIN hWin,
const GUI_RECT * pRect);
451 void WM_InvalidateWindow (WM_HWIN hWin);
452 void WM_InvalidateWindowAndDescsEx(WM_HWIN hWin,
const GUI_RECT * pInvalidRect,
U16 Flags);
453 void WM_InvalidateWindowAndDescs (WM_HWIN hWin);
454 int WM_IsEnabled (WM_HWIN hObj);
455 char WM_IsCompletelyCovered (WM_HWIN hWin);
456 char WM_IsCompletelyVisible (WM_HWIN hWin);
457 int WM_IsFocussable (WM_HWIN hWin);
458 int WM_IsVisible (WM_HWIN hWin);
459 int WM_IsWindow (WM_HWIN hWin);
460 void WM_SetAnchor (WM_HWIN hWin,
U16 AnchorFlags);
461 void WM_SetHasTrans (WM_HWIN hWin);
462 void WM_SetId (WM_HWIN hObj,
int Id);
463 void WM_SetStayOnTop (WM_HWIN hWin,
int OnOff);
464 void WM_SetTransState (WM_HWIN hWin,
unsigned State);
465 void WM_ShowWindow (WM_HWIN hWin);
466 void WM_ValidateRect (WM_HWIN hWin,
const GUI_RECT * pRect);
467 void WM_ValidateWindow (WM_HWIN hWin);
470 void WM_GESTURE_Enable (
int OnOff);
471 int WM_GESTURE_EnableEx(
int OnOff,
int MaxFactor);
472 void WM_GESTURE_Exec (
void);
473 I32 WM_GESTURE_SetThresholdAngle(
I32 ThresholdAngle);
474 I32 WM_GESTURE_SetThresholdDist (
I32 ThresholdDist);
477 void WM_MOTION_Enable (
int OnOff);
478 void WM_MOTION_SetMovement (WM_HWIN hWin,
int Axis,
I32 Velocity,
I32 Dist);
479 void WM_MOTION_SetMotion (WM_HWIN hWin,
int Axis,
I32 Velocity,
I32 Deceleration);
480 void WM_MOTION_SetMoveable (WM_HWIN hWin,
U32 Flags,
int OnOff);
481 void WM_MOTION_SetDeceleration (WM_HWIN hWin,
int Axis,
I32 Deceleration);
482 unsigned WM_MOTION_SetDefaultPeriod(
unsigned Period);
483 void WM_MOTION_SetSpeed (WM_HWIN hWin,
int Axis,
I32 Velocity);
486 WM_HMEM WM_MOTION__CreateContext(
void);
487 void WM_MOTION__DeleteContext(WM_HMEM hContext);
490 void WM__SetMotionCallback (
void(* cbMotion) (
GUI_PID_STATE * pState,
void * p));
493 #if (GUI_SUPPORT_MEMDEV) 494 #define GUI_MEMDEV_EDGE_LEFT 0 495 #define GUI_MEMDEV_EDGE_RIGHT 1 496 #define GUI_MEMDEV_EDGE_TOP 2 497 #define GUI_MEMDEV_EDGE_BOTTOM 3 499 int GUI_MEMDEV_BlendWinBk (WM_HWIN hWin,
int Period,
U32 BlendColor,
U8 BlendIntens);
500 int GUI_MEMDEV_BlurAndBlendWinBk(WM_HWIN hWin,
int Period,
U8 BlurDepth,
U32 BlendColor,
U8 BlendIntens);
501 int GUI_MEMDEV_BlurWinBk (WM_HWIN hWin,
int Period,
U8 BlurDepth);
502 void GUI_MEMDEV_CreateStatic (WM_HWIN hWin);
503 int GUI_MEMDEV_FadeInWindow (WM_HWIN hWin,
int Period);
504 int GUI_MEMDEV_FadeOutWindow (WM_HWIN hWin,
int Period);
507 int GUI_MEMDEV_MoveInWindow (WM_HWIN hWin,
int x,
int y,
int a180,
int Period);
508 int GUI_MEMDEV_MoveOutWindow (WM_HWIN hWin,
int x,
int y,
int a180,
int Period);
509 void GUI_MEMDEV_Paint1Static (WM_HWIN hWin);
510 int GUI_MEMDEV_ShiftInWindow (WM_HWIN hWin,
int Period,
int Direction);
511 int GUI_MEMDEV_ShiftOutWindow (WM_HWIN hWin,
int Period,
int Direction);
512 int GUI_MEMDEV_SwapWindow (WM_HWIN hWin,
int Period,
int Edge);
517 void WM_MoveWindow (WM_HWIN hWin,
int dx,
int dy);
518 void WM_ResizeWindow (WM_HWIN hWin,
int dx,
int dy);
519 void WM_MoveTo (WM_HWIN hWin,
int x,
int y);
520 void WM_MoveChildTo (WM_HWIN hWin,
int x,
int y);
521 void WM_SetSize (WM_HWIN hWin,
int XSize,
int YSize);
522 void WM_SetWindowPos (WM_HWIN hWin,
int xPos,
int yPos,
int xSize,
int ySize);
523 int WM_SetXSize (WM_HWIN hWin,
int xSize);
524 int WM_SetYSize (WM_HWIN hWin,
int ySize);
525 int WM_SetScrollbarH (WM_HWIN hWin,
int OnOff);
526 int WM_SetScrollbarV (WM_HWIN hWin,
int OnOff);
529 #define WM_TOOLTIP_PI_FIRST 0 530 #define WM_TOOLTIP_PI_SHOW 1 531 #define WM_TOOLTIP_PI_NEXT 2 533 #define WM_TOOLTIP_CI_BK 0 534 #define WM_TOOLTIP_CI_FRAME 1 535 #define WM_TOOLTIP_CI_TEXT 2 537 typedef WM_HMEM WM_TOOLTIP_HANDLE;
544 int WM_TOOLTIP_AddTool (WM_TOOLTIP_HANDLE hToolTip, WM_HWIN hTool,
const char * pText);
545 WM_TOOLTIP_HANDLE WM_TOOLTIP_Create (WM_HWIN hDlg,
const TOOLTIP_INFO * pInfo,
unsigned NumItems);
546 void WM_TOOLTIP_Delete (WM_TOOLTIP_HANDLE hToolTip);
549 unsigned WM_TOOLTIP_SetDefaultPeriod(
unsigned Index,
unsigned Period);
552 void WM__SetToolTipCallback(
void(* cbToolTip)(
GUI_PID_STATE * pState, WM_HWIN));
555 #ifdef GUI_X_CREATE_TIMER 556 int WM_CreateTimer (WM_HWIN hWin,
int UserID,
int Period,
int Mode);
557 void WM_DeleteTimer (WM_HWIN hWin,
int UserId);
559 WM_HMEM WM_CreateTimer (WM_HWIN hWin,
int UserID,
int Period,
int Mode);
560 void WM_DeleteTimer (WM_HMEM hTimer);
561 void WM_RestartTimer(WM_HMEM hTimer,
int Period);
563 int WM_GetTimerId(WM_HTIMER hTimer);
566 int WM_GetNumWindows(
void);
567 int WM_GetNumInvalidWindows(
void);
570 void WM_CheckScrollBounds(WM_SCROLL_STATE * pScrollState);
571 int WM_GetScrollPosH (WM_HWIN hWin);
572 int WM_GetScrollPosV (WM_HWIN hWin);
573 void WM_SetScrollPosH (WM_HWIN hWin,
unsigned ScrollPos);
574 void WM_SetScrollPosV (WM_HWIN hWin,
unsigned ScrollPos);
575 int WM_SetScrollValue (WM_SCROLL_STATE * pScrollState,
int v);
578 WM_CALLBACK * WM_SetCallback(WM_HWIN hWin, WM_CALLBACK * cb);
579 WM_CALLBACK * WM_GetCallback(WM_HWIN hWin);
582 void WM_GetClientRect (
GUI_RECT * pRect);
583 void WM_GetClientRectEx (WM_HWIN hWin,
GUI_RECT * pRect);
584 void WM_GetInsideRect (
GUI_RECT * pRect);
585 void WM_GetInsideRectEx (WM_HWIN hWin,
GUI_RECT * pRect);
586 void WM_GetInsideRectExScrollbar(WM_HWIN hWin,
GUI_RECT * pRect);
587 void WM_GetWindowRect (
GUI_RECT * pRect);
588 void WM_GetWindowRectEx (WM_HWIN hWin,
GUI_RECT * pRect);
589 int WM_GetOrgX (
void);
590 int WM_GetOrgY (
void);
591 int WM_GetWindowOrgX (WM_HWIN hWin);
592 int WM_GetWindowOrgY (WM_HWIN hWin);
593 int WM_GetWindowSizeX (WM_HWIN hWin);
594 int WM_GetWindowSizeY (WM_HWIN hWin);
595 WM_HWIN WM_GetFirstChild (WM_HWIN hWin);
596 WM_HWIN WM_GetNextSibling (WM_HWIN hWin);
597 WM_HWIN WM_GetParent (WM_HWIN hWin);
598 WM_HWIN WM_GetPrevSibling (WM_HWIN hWin);
599 int WM_GetId (WM_HWIN hWin);
600 WM_HWIN WM_GetScrollbarV (WM_HWIN hWin);
601 WM_HWIN WM_GetScrollbarH (WM_HWIN hWin);
602 WM_HWIN WM_GetScrollPartner (WM_HWIN hWin);
603 WM_HWIN WM_GetClientWindow (WM_HWIN hObj);
607 void WM_BringToBottom(WM_HWIN hWin);
608 void WM_BringToTop(WM_HWIN hWin);
612 void WM_SetDesktopColors (
GUI_COLOR Color);
615 WM_HWIN WM_SelectWindow (WM_HWIN hWin);
616 WM_HWIN WM_GetActiveWindow (
void);
617 void WM_Paint (WM_HWIN hObj);
618 void WM_Update (WM_HWIN hWin);
619 void WM_PaintWindowAndDescs (WM_HWIN hWin);
620 void WM_UpdateWindowAndDescs (WM_HWIN hWin);
623 WM_HWIN WM_GetDesktopWindow (
void);
624 WM_HWIN WM_GetDesktopWindowEx(
unsigned int LayerIndex);
628 void WM_SetDefault (
void);
631 void WM_EnableMemdev (WM_HWIN hWin);
632 void WM_DisableMemdev (WM_HWIN hWin);
635 int WM_MULTIBUF_Enable(
int OnOff);
639 typedef void (* T_WM_EXEC_GESTURE)(void);
641 extern T_WM_EXEC_GESTURE WM__pExecGestures;
644 int WM_OnKey(
int Key,
int Pressed);
645 void WM_MakeModal(WM_HWIN hWin);
646 int WM_SetModalLayer(
int LayerIndex);
647 int WM_GetModalLayer(
void);
656 void WM_NotifyParent (WM_HWIN hWin,
int Notification);
657 void WM_SendMessage (WM_HWIN hWin, WM_MESSAGE * p);
658 void WM_SendMessageNoPara (WM_HWIN hWin,
int MsgId);
659 void WM_DefaultProc (WM_MESSAGE * pMsg);
660 int WM_BroadcastMessage (WM_MESSAGE * pMsg);
661 void WM_SetScrollState (WM_HWIN hWin,
const WM_SCROLL_STATE * pState);
662 void WM_SetEnableState (WM_HWIN hItem,
int State);
663 void WM_SendToParent (WM_HWIN hWin, WM_MESSAGE * pMsg);
664 int WM_HasFocus (WM_HWIN hWin);
665 int WM_SetFocus (WM_HWIN hWin);
666 WM_HWIN WM_SetFocusOnNextChild (WM_HWIN hParent);
667 WM_HWIN WM_SetFocusOnPrevChild (WM_HWIN hParent);
668 WM_HWIN WM_GetDialogItem (WM_HWIN hWin,
int Id);
669 void WM_EnableWindow (WM_HWIN hWin);
670 void WM_DisableWindow (WM_HWIN hWin);
671 void WM_GetScrollState (WM_HWIN hObj, WM_SCROLL_STATE * pScrollState);
677 int WM_GetUserData (WM_HWIN hWin,
void * pDest,
int SizeOfBuffer);
678 int WM_SetUserData (WM_HWIN hWin,
const void * pSrc,
int SizeOfBuffer);
679 int WM__GetUserDataEx(WM_HWIN hWin,
void * pDest,
int NumBytes,
int SizeOfObject);
680 int WM__SetUserDataEx(WM_HWIN hWin,
const void * pSrc,
int NumBytes,
int SizeOfObject);
686 int WM_HasCaptured (WM_HWIN hWin);
687 void WM_SetCapture (WM_HWIN hObj,
int AutoRelease);
688 void WM_SetCaptureMove(WM_HWIN hWin,
const GUI_PID_STATE * pState,
int MinVisibility,
int LimitTop);
689 void WM_ReleaseCapture(
void);
695 int WM_HandlePID (
void);
696 WM_HWIN WM_Screen2hWin (
int x,
int y);
697 WM_HWIN WM_Screen2hWinEx (WM_HWIN hStop,
int x,
int y);
698 void WM_ForEachDesc (WM_HWIN hWin, WM_tfForEach * pcb,
void * pData);
699 void WM_SetScreenSize (
int xSize,
int ySize);
700 int WM_PollSimMsg (
void);
701 int WM_GetWindowInfo (WM_WINDOW_INFO * pInfo,
int FirstWindow);
707 #if (WM_SUPPORT_DIAG) 708 void WM_DIAG_EnableInvalidationColoring(
int OnOff);
715 #if WM_COMPATIBLE_MODE 716 #define HBWIN WM_HWIN 717 #define HBWIN_NULL WM_HWIN_NULL 719 #define WM_HideWin WM_HideWindow 720 #define WM_ShowWin WM_ShowWindow 721 #define WM_GetKey GUI_GetKey 722 #define WM_WaitKey GUI_WaitKey 724 #define WM_ExecIdle WM_Exec 725 #define WM_ExecIdle1 WM_Exec1 727 #define WM_Invalidate WM_InvalidateWindow 728 #define WM_GetWinRect WM_GetWindowRect 729 #define WM_GetWinOrgX WM_GetWindowOrgX 730 #define WM_GetWinOrgY WM_GetWindowOrgY 731 #define WM_GetWinSizeX WM_GetWindowSizeX 732 #define WM_GetWinSizeY WM_GetWindowSizeY 733 #define WM_GetXSize WM_GetWindowSizeX 734 #define WM_GetYSize WM_GetWindowSizeY 735 #define WM_SelWin WM_SelectWindow 736 #define WM_GetBackgroundWindow WM_GetDesktopWindow 737 #define WM_GetForegroundWindow 0 738 #define WM_SetForegroundWindow WM_BringToTop 739 #define WM_SetUserClipArea WM_SetUserClipRect 744 #define WM_SetBkWindowColor(Color) WM_SetDesktopColor(Color) 751 #if defined(__cplusplus)
LCD Drawing point (pixel) geometric definition.
GUI_HMEM GUI_MEMDEV_Handle