mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 04:25:28 -04:00
@@ -335,8 +335,9 @@ static NativeValue* CreateJsSystemBarRegionTintObject(NativeEngine& engine, cons
|
||||
Rect rect = tint.region_;
|
||||
object->SetProperty("region", GetRectAndConvertToJsValue(engine, rect));
|
||||
|
||||
WLOGFI("[NAPI]Type %{public}u [%{public}u %{public}s %{public}s] [%{public}d %{public}d %{public}u %{public}u]",
|
||||
tint.type_, tint.prop_.enable_, bkgColor.c_str(), contentColor.c_str(),
|
||||
WLOGFI("[NAPI]Type %{public}u [%{public}u %{public}s %{public}s]",
|
||||
tint.type_, tint.prop_.enable_, bkgColor.c_str(), contentColor.c_str());
|
||||
WLOGFI("[NAPI]Region [%{public}d %{public}d %{public}u %{public}u]",
|
||||
rect.posX_, rect.posY_, rect.width_, rect.height_);
|
||||
return objValue;
|
||||
}
|
||||
|
||||
@@ -396,8 +396,8 @@ public:
|
||||
int32_t ymin = MathHelper::Min(a.y_, b.y_, c.y_, d.y_);
|
||||
int32_t xmax = MathHelper::Max(a.x_, b.x_, c.x_, d.x_);
|
||||
int32_t ymax = MathHelper::Max(a.y_, b.y_, c.y_, d.y_);
|
||||
uint32_t w = xmax - xmin;
|
||||
uint32_t h = ymax - ymin;
|
||||
uint32_t w = static_cast<uint32_t>(xmax - xmin);
|
||||
uint32_t h = static_cast<uint32_t>(ymax - ymin);
|
||||
return Rect { xmin, ymin, w, h };
|
||||
}
|
||||
|
||||
@@ -437,10 +437,10 @@ public:
|
||||
}
|
||||
hotArea.posX_ = windowRect.posX_ + rect.posX_;
|
||||
hotArea.posY_ = windowRect.posY_ + rect.posY_;
|
||||
hotArea.width_ =
|
||||
std::min(hotArea.posX_ + rect.width_, windowRect.posX_ + windowRect.width_) - hotArea.posX_;
|
||||
hotArea.height_ =
|
||||
std::min(hotArea.posY_ + rect.height_, windowRect.posY_ + windowRect.height_) - hotArea.posY_;
|
||||
hotArea.width_ = static_cast<uint32_t>(std::min(hotArea.posX_ + rect.width_,
|
||||
windowRect.posX_ + windowRect.width_) - hotArea.posX_);
|
||||
hotArea.height_ = static_cast<uint32_t>(std::min(hotArea.posY_ + rect.height_,
|
||||
windowRect.posY_ + windowRect.height_) - hotArea.posY_);
|
||||
outRects.emplace_back(hotArea);
|
||||
}
|
||||
return isOk;
|
||||
|
||||
@@ -632,7 +632,7 @@ bool WindowProperty::Write(Parcel& parcel, PropertyChangeAction action)
|
||||
bool ret = parcel.WriteUint32(static_cast<uint32_t>(windowId_));
|
||||
switch (action) {
|
||||
case PropertyChangeAction::ACTION_UPDATE_RECT:
|
||||
ret &= parcel.WriteBool(decoStatus_) && parcel.WriteUint32(static_cast<uint32_t>(dragType_)) &&
|
||||
ret = ret && parcel.WriteBool(decoStatus_) && parcel.WriteUint32(static_cast<uint32_t>(dragType_)) &&
|
||||
parcel.WriteInt32(originRect_.posX_) && parcel.WriteInt32(originRect_.posY_) &&
|
||||
parcel.WriteUint32(originRect_.width_) && parcel.WriteUint32(originRect_.height_) &&
|
||||
parcel.WriteInt32(requestRect_.posX_) && parcel.WriteInt32(requestRect_.posY_) &&
|
||||
@@ -640,46 +640,46 @@ bool WindowProperty::Write(Parcel& parcel, PropertyChangeAction action)
|
||||
parcel.WriteUint32(static_cast<uint32_t>(windowSizeChangeReason_));
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_MODE:
|
||||
ret &= parcel.WriteUint32(static_cast<uint32_t>(mode_));
|
||||
ret = ret && parcel.WriteUint32(static_cast<uint32_t>(mode_));
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_FLAGS:
|
||||
ret &= parcel.WriteUint32(flags_);
|
||||
ret = ret && parcel.WriteUint32(flags_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_OTHER_PROPS:
|
||||
ret &= MapMarshalling(parcel);
|
||||
ret = ret && MapMarshalling(parcel);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_FOCUSABLE:
|
||||
ret &= parcel.WriteBool(focusable_);
|
||||
ret = ret && parcel.WriteBool(focusable_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_TOUCHABLE:
|
||||
ret &= parcel.WriteBool(touchable_);
|
||||
ret = ret && parcel.WriteBool(touchable_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_CALLING_WINDOW:
|
||||
ret &= parcel.WriteUint32(callingWindow_);
|
||||
ret = ret && parcel.WriteUint32(callingWindow_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_ORIENTATION:
|
||||
ret &= parcel.WriteUint32(static_cast<uint32_t>(requestedOrientation_));
|
||||
ret = ret && parcel.WriteUint32(static_cast<uint32_t>(requestedOrientation_));
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_TURN_SCREEN_ON:
|
||||
ret &= parcel.WriteBool(turnScreenOn_);
|
||||
ret = ret && parcel.WriteBool(turnScreenOn_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_KEEP_SCREEN_ON:
|
||||
ret &= parcel.WriteBool(keepScreenOn_);
|
||||
ret = ret && parcel.WriteBool(keepScreenOn_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_SET_BRIGHTNESS:
|
||||
ret &= parcel.WriteFloat(brightness_);
|
||||
ret = ret && parcel.WriteFloat(brightness_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_MODE_SUPPORT_INFO:
|
||||
ret &= parcel.WriteUint32(modeSupportInfo_);
|
||||
ret = ret && parcel.WriteUint32(modeSupportInfo_);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_TOUCH_HOT_AREA:
|
||||
ret &= MarshallingTouchHotAreas(parcel);
|
||||
ret = ret && MarshallingTouchHotAreas(parcel);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_TRANSFORM_PROPERTY:
|
||||
ret &= MarshallingTransform(parcel);
|
||||
ret = ret && MarshallingTransform(parcel);
|
||||
break;
|
||||
case PropertyChangeAction::ACTION_UPDATE_ANIMATION_FLAG:
|
||||
ret &= parcel.WriteUint32(animationFlag_);
|
||||
ret = ret && parcel.WriteUint32(animationFlag_);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user