Exemplo n.º 1
0
HANDLE APIENTRY
NtUserRemoveProp(HWND hWnd, ATOM Atom)
{
   PWND Window;
   PPROPERTY Prop;
   HANDLE Data;
   DECLARE_RETURN(HANDLE);

   TRACE("Enter NtUserRemoveProp\n");
   UserEnterExclusive();

   if (!(Window = UserGetWindowObject(hWnd)))
   {
      RETURN( NULL);
   }

   Prop = IntGetProp(Window, Atom);

   if (Prop == NULL)
   {
      RETURN(NULL);
   }
   Data = Prop->Data;
   RemoveEntryList(&Prop->PropListEntry);
   UserHeapFree(Prop);
   Window->PropListItems--;

   RETURN(Data);

CLEANUP:
   TRACE("Leave NtUserRemoveProp, ret=%i\n",_ret_);
   UserLeave();
   END_CLEANUP;
}
Exemplo n.º 2
0
HANDLE
FASTCALL
UserGetProp(PWND pWnd, ATOM Atom)
{
    PPROPERTY Prop;
    Prop = IntGetProp(pWnd, Atom);
    return Prop ? Prop->Data : NULL;
}
Exemplo n.º 3
0
DWORD
APIENTRY
NtUserCallHwnd(
   HWND hWnd,
   DWORD Routine)
{
   switch (Routine)
   {
      case HWND_ROUTINE_GETWNDCONTEXTHLPID:
      {
         PWND Window;
         PPROPERTY HelpId;
         USER_REFERENCE_ENTRY Ref;

         UserEnterExclusive();

         if (!(Window = UserGetWindowObject(hWnd)))
         {
            UserLeave();
            return 0;
         }
         UserRefObjectCo(Window, &Ref);

         HelpId = IntGetProp(Window, gpsi->atomContextHelpIdProp);

         UserDerefObjectCo(Window);
         UserLeave();
         return (DWORD)HelpId->Data;
      }
      case HWND_ROUTINE_REGISTERSHELLHOOKWINDOW:
         if (IntIsWindow(hWnd))
            return IntRegisterShellHookWindow(hWnd);
         return FALSE;
         break;
      case HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW:
         if (IntIsWindow(hWnd))
            return IntDeRegisterShellHookWindow(hWnd);
         return FALSE;
      case HWND_ROUTINE_SETMSGBOX:
      {
         PWND Window;
         UserEnterExclusive();
         if ((Window = UserGetWindowObject(hWnd)))
         {
            Window->state |= WNDS_MSGBOX;
         }
         UserLeave();
         return FALSE;
      }
   }
   STUB;

   return 0;
}
Exemplo n.º 4
0
BOOL FASTCALL
IntRemoveProp(PWND Window, ATOM Atom)
{
   PPROPERTY Prop;
   Prop = IntGetProp(Window, Atom);

   if (Prop == NULL)
   {
      return FALSE;
   }
   RemoveEntryList(&Prop->PropListEntry);
   UserHeapFree(Prop);
   Window->PropListItems--;
   return TRUE;
}
Exemplo n.º 5
0
/*
 * Updates all WNDOBJs of the given WND and calls the change-procs.
 */
VOID
FASTCALL
IntEngWindowChanged(
  PWND  Window,
  FLONG           flChanged)
{
  PPROPERTY pprop;
  WNDGDI *Current;
  HWND hWnd;

  ASSERT_IRQL_LESS_OR_EQUAL(PASSIVE_LEVEL);

  hWnd = Window->head.h;
  pprop = IntGetProp(Window, AtomWndObj);
  if (!pprop)
  {
     return;
  }
  Current = (WNDGDI *)pprop->Data;
  if ( gcountPWO &&
       Current &&
       Current->Hwnd == hWnd &&
       Current->WndObj.pvConsumer != NULL )
  {
     /* Update the WNDOBJ */
     switch (flChanged)
     {
        case WOC_RGN_CLIENT:
        /* Update the clipobj and client rect of the WNDOBJ */
           IntEngWndUpdateClipObj(Current, Window);
           break;

        case WOC_DELETE:
        /* FIXME: Should the WNDOBJs be deleted by win32k or by the driver? */
           break;
     }

     /* Call the change proc */
     IntEngWndCallChangeProc(&Current->WndObj, flChanged);

     /* HACK: Send WOC_CHANGED after WOC_RGN_CLIENT */
     if (flChanged == WOC_RGN_CLIENT)
     {
        IntEngWndCallChangeProc(&Current->WndObj, WOC_CHANGED);
     }
  }
}
Exemplo n.º 6
0
Arquivo: prop.c Projeto: RPG-7/reactos
/*
 * @implemented
 */
HANDLE WINAPI
GetPropW(HWND hWnd, LPCWSTR lpString)
{
  ATOM Atom;
  HANDLE Data = NULL;
  PPROPERTY Prop;
  if (HIWORD(lpString))
  {
     Atom = GlobalFindAtomW(lpString);
  }
  else
  {
     Atom = LOWORD((DWORD_PTR)lpString);
  }
  Prop = IntGetProp(hWnd, Atom);
  if (Prop != NULL) Data = Prop->Data;
  return Data;
}
Exemplo n.º 7
0
BOOL FASTCALL
IntSetProp(PWND pWnd, ATOM Atom, HANDLE Data)
{
   PPROPERTY Prop;

   Prop = IntGetProp(pWnd, Atom);

   if (Prop == NULL)
   {
      Prop = UserHeapAlloc(sizeof(PROPERTY));
      if (Prop == NULL)
      {
         return FALSE;
      }
      Prop->Atom = Atom;
      InsertTailList(&pWnd->PropListHead, &Prop->PropListEntry);
      pWnd->PropListItems++;
   }

   Prop->Data = Data;
   return TRUE;
}
Exemplo n.º 8
0
HWND FASTCALL
UserGethWnd( HDC hdc, PWNDOBJ *pwndo)
{
  XCLIPOBJ* Clip;
  PWND Wnd;
  HWND hWnd;
  PPROPERTY pprop;

  hWnd = IntWindowFromDC(hdc);

  if (hWnd && (Wnd = UserGetWindowObject(hWnd)))
  {
     pprop = IntGetProp(Wnd, AtomWndObj);

     Clip = (XCLIPOBJ*)pprop->Data;

     if ( Clip && Clip->Hwnd == hWnd )
     {
        if (pwndo) *pwndo = &Clip->WndObj;
     }
  }
  return hWnd;
}