OpenCAX/entry/src/main/cpp/NativeEGLOCCT/V3d/V3dWin/V3dWin.cpp

34 lines
787 B
C++

//
// Created on 2026/3/23.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".
#include "V3dWin.h"
#ifndef NATIVE_TAG
#define NATIVE_TAG "WINDOW"
#endif
namespace NativeOpenCAX {
V3dWin::V3dWin():win(nullptr){
}
V3dWin::~V3dWin(){
}
bool V3dWin::InitV3dWin(int& width, int& height){
if(win.IsNull()){
win = new Aspect_NeutralWindow();
win->SetSize(width, height);
HILOG_INFO(NATIVE_TAG, "Init Window Done");
return true;
}
HILOG_INFO(NATIVE_TAG, "Init Window Done");
return false;
}
void V3dWin::Resize(int w, int h) {
win->SetSize(w, h);
win->DoResize();
HILOG_ERROR(NATIVE_TAG,"Resize:(%{public}d,%{public}d)",w,h);
}
}