NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/ds3d/common/abi_window.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _DS3D_COMMON_ABI_WINDOW_H
19 #define _DS3D_COMMON_ABI_WINDOW_H
20 
21 #include <ds3d/common/common.h>
22 #include <ds3d/common/abi_obj.h>
23 #include <ds3d/common/abi_dataprocess.h>
24 
25 namespace ds3d {
26 
27 // ABI Interface for window system
28 class abiWindow {
29 public:
30  // window closed callback
32  // key pressed callback function(int key, int scancode, int action, int mods)
34  // framebuffer size changed callback function(int width, int height)
36 
37  // mouse cursor changed callback function(double xpos, double ypos)
39 
40  virtual ~abiWindow() = default;
41  // get GLFWwindow raw pointer
42  virtual void* getNativeWindow() = 0;
43  // set close event callback
44  virtual void setCloseCallback(const CloseCB* closeCb) = 0;
45  // set key pressed event callback
46  virtual void setKeyPressCallback(const KeyPressCB* keyCb) = 0;
47  // set frame buffer size changed event callback
48  virtual void setFbSizeChangedCallback(const FbSizeChangedCB* fbSizeChangedCb) = 0;
49  // set mouse changed event callback, replace all other callbacks
50  virtual void setMouseChangedCallback(const MouseChangedCB* mouseChangedCb) = 0;
51  // append mouse changed event callback
52  virtual void appendMouseChangedCallback(const MouseChangedCB* mouseChangedCb) = 0;
53 };
54 
55 // raw reference pointer for abiWindow
57 
58 } // namespace ds3d
59 
60 #endif // _DS3D_COMMON_ABI_WINDOW_H
ds3d::abiWindow::setMouseChangedCallback
virtual void setMouseChangedCallback(const MouseChangedCB *mouseChangedCb)=0
ds3d::abiWindow::setKeyPressCallback
virtual void setKeyPressCallback(const KeyPressCB *keyCb)=0
ds3d::abiWindow::KeyPressCB
abiCallBackT< int, int, int, int > KeyPressCB
Definition: sources/includes/ds3d/common/abi_window.h:33
ds3d::abiWindow::FbSizeChangedCB
abiCallBackT< int, int > FbSizeChangedCB
Definition: sources/includes/ds3d/common/abi_window.h:35
ds3d::abiRefT< abiWindow >
ds3d::abiWindow::CloseCB
abiCallBackT CloseCB
Definition: sources/includes/ds3d/common/abi_window.h:31
ds3d::abiRefWindow
abiRefT< abiWindow > abiRefWindow
Definition: sources/includes/ds3d/common/abi_window.h:56
ds3d::abiWindow::setCloseCallback
virtual void setCloseCallback(const CloseCB *closeCb)=0
ds3d::abiWindow
Definition: sources/includes/ds3d/common/abi_window.h:28
ds3d::abiWindow::getNativeWindow
virtual void * getNativeWindow()=0
ds3d::abiWindow::MouseChangedCB
abiCallBackT< double, double > MouseChangedCB
Definition: sources/includes/ds3d/common/abi_window.h:38
ds3d::abiWindow::appendMouseChangedCallback
virtual void appendMouseChangedCallback(const MouseChangedCB *mouseChangedCb)=0
ds3d::abiWindow::~abiWindow
virtual ~abiWindow()=default
ds3d
Definition: sources/includes/ds3d/common/abi_dataprocess.h:25
ds3d::abiCallBackT
Definition: sources/includes/ds3d/common/abi_obj.h:75
ds3d::abiWindow::setFbSizeChangedCallback
virtual void setFbSizeChangedCallback(const FbSizeChangedCB *fbSizeChangedCb)=0