import t
from stdint import *

# ============================================================
# vqt6/_types.py — 公共类型定义
#
# Qt6 C++ 类在 Viper 端都是不透明指针 (void*)
# 不暴露 C++ 类的内部布局，只暴露指针
# ============================================================

# 不透明指针 typedef（Qt6 C++ 类的 Viper 端表示）
QtObjectPtr: t.CTypedef = t.CVoid | t.CPtr         # void* 通用不透明指针
QtStringPtr: t.CTypedef = t.CVoid | t.CPtr         # QString*
QtByteArrayPtr: t.CTypedef = t.CVoid | t.CPtr      # QByteArray*
QtVariantPtr: t.CTypedef = t.CVoid | t.CPtr        # QVariant*
QtObjectListPtr: t.CTypedef = t.CVoid | t.CPtr     # QList<QObject*>*
QtStringListPtr: t.CTypedef = t.CVoid | t.CPtr     # QStringList*
QtByteArrayListPtr: t.CTypedef = t.CVoid | t.CPtr  # QList<QByteArray>*
QtEventPtr: t.CTypedef = t.CVoid | t.CPtr          # QEvent*

# QtCore
QtCoreAppPtr: t.CTypedef = t.CVoid | t.CPtr        # QCoreApplication*
QtTimerPtr: t.CTypedef = t.CVoid | t.CPtr          # QTimer*
QtObjectPtr: t.CTypedef = t.CVoid | t.CPtr         # QObject*
QtThreadPtr: t.CTypedef = t.CVoid | t.CPtr         # QThread*
QtMutexPtr: t.CTypedef = t.CVoid | t.CPtr          # QMutex*
QtWaitConditionPtr: t.CTypedef = t.CVoid | t.CPtr  # QWaitCondition*

# QtGui
QtColorPtr: t.CTypedef = t.CVoid | t.CPtr          # QColor*
QtFontPtr: t.CTypedef = t.CVoid | t.CPtr           # QFont*
QtFontMetricsPtr: t.CTypedef = t.CVoid | t.CPtr    # QFontMetrics*
QtPixmapPtr: t.CTypedef = t.CVoid | t.CPtr         # QPixmap*
QtImagePtr: t.CTypedef = t.CVoid | t.CPtr          # QImage*
QtPainterPtr: t.CTypedef = t.CVoid | t.CPtr        # QPainter*
QtPenPtr: t.CTypedef = t.CVoid | t.CPtr            # QPen*
QtBrushPtr: t.CTypedef = t.CVoid | t.CPtr          # QBrush*
QtIconPtr: t.CTypedef = t.CVoid | t.CPtr           # QIcon*
QtKeyEventPtr: t.CTypedef = t.CVoid | t.CPtr       # QKeyEvent*
QtMouseEventPtr: t.CTypedef = t.CVoid | t.CPtr     # QMouseEvent*
QtResizeEventPtr: t.CTypedef = t.CVoid | t.CPtr    # QResizeEvent*
QtPaintEventPtr: t.CTypedef = t.CVoid | t.CPtr     # QPaintEvent*
QtCloseEventPtr: t.CTypedef = t.CVoid | t.CPtr     # QCloseEvent*
QtCursorPtr: t.CTypedef = t.CVoid | t.CPtr         # QCursor*

# QtWidgets
QtAppPtr: t.CTypedef = t.CVoid | t.CPtr            # QApplication*
QtWidgetPtr: t.CTypedef = t.CVoid | t.CPtr         # QWidget*
QtDialogPtr: t.CTypedef = t.CVoid | t.CPtr         # QDialog*
QtMainWindowPtr: t.CTypedef = t.CVoid | t.CPtr     # QMainWindow*
QtLabelPtr: t.CTypedef = t.CVoid | t.CPtr          # QLabel*
QtPushButtonPtr: t.CTypedef = t.CVoid | t.CPtr     # QPushButton*
QtLineEditPtr: t.CTypedef = t.CVoid | t.CPtr       # QLineEdit*
QtTextEditPtr: t.CTypedef = t.CVoid | t.CPtr       # QTextEdit*
QtPlainTextEditPtr: t.CTypedef = t.CVoid | t.CPtr  # QPlainTextEdit*
QtCheckBoxPtr: t.CTypedef = t.CVoid | t.CPtr       # QCheckBox*
QtRadioButtonPtr: t.CTypedef = t.CVoid | t.CPtr    # QRadioButton*
QtComboBoxPtr: t.CTypedef = t.CVoid | t.CPtr       # QComboBox*
QtListWidgetPtr: t.CTypedef = t.CVoid | t.CPtr     # QListWidget*
QtListWidgetItemPtr: t.CTypedef = t.CVoid | t.CPtr # QListWidgetItem*
QtProgressBarPtr: t.CTypedef = t.CVoid | t.CPtr    # QProgressBar*
QtSliderPtr: t.CTypedef = t.CVoid | t.CPtr         # QSlider*
QtSpinBoxPtr: t.CTypedef = t.CVoid | t.CPtr        # QSpinBox*
QtLayoutPtr: t.CTypedef = t.CVoid | t.CPtr         # QLayout*
QtBoxLayoutPtr: t.CTypedef = t.CVoid | t.CPtr      # QHBoxLayout / QVBoxLayout*
QtGridLayoutPtr: t.CTypedef = t.CVoid | t.CPtr     # QGridLayout*
QtFormLayoutPtr: t.CTypedef = t.CVoid | t.CPtr     # QFormLayout*
QtStackedWidgetPtr: t.CTypedef = t.CVoid | t.CPtr  # QStackedWidget*
QtTabWidgetPtr: t.CTypedef = t.CVoid | t.CPtr      # QTabWidget*
QtMenuBarPtr: t.CTypedef = t.CVoid | t.CPtr        # QMenuBar*
QtMenuPtr: t.CTypedef = t.CVoid | t.CPtr           # QMenu*
QtActionPtr: t.CTypedef = t.CVoid | t.CPtr         # QAction*
QtStatusBarPtr: t.CTypedef = t.CVoid | t.CPtr      # QStatusBar*
QtToolBarPtr: t.CTypedef = t.CVoid | t.CPtr        # QToolBar*
QtMessageBoxPtr: t.CTypedef = t.CVoid | t.CPtr     # QMessageBox*
QtFileDialogPtr: t.CTypedef = t.CVoid | t.CPtr      # QFileDialog*
QtColorDialogPtr: t.CTypedef = t.CVoid | t.CPtr    # QColorDialog*
QtFontDialogPtr: t.CTypedef = t.CVoid | t.CPtr     # QFontDialog*
QtInputDialogPtr: t.CTypedef = t.CVoid | t.CPtr    # QInputDialog*

# QtNetwork
QtTcpSocketPtr: t.CTypedef = t.CVoid | t.CPtr      # QTcpSocket*
QtUdpSocketPtr: t.CTypedef = t.CVoid | t.CPtr      # QUdpSocket*
QtHostAddressPtr: t.CTypedef = t.CVoid | t.CPtr    # QHostAddress*
QtAbstractSocketPtr: t.CTypedef = t.CVoid | t.CPtr # QAbstractSocket*
QtNetworkAccessManagerPtr: t.CTypedef = t.CVoid | t.CPtr    # QNetworkAccessManager*
QtNetworkReplyPtr: t.CTypedef = t.CVoid | t.CPtr   # QNetworkReply*
QtNetworkRequestPtr: t.CTypedef = t.CVoid | t.CPtr # QNetworkRequest*

# ============================================================
# Qt 通用常量（C++ 枚举值的 C 兼容定义）
# ============================================================

# Qt 键盘按键 (Qt::Key)
QT_KEY_ESCAPE: t.CDefine = 0x01000000
QT_KEY_TAB: t.CDefine = 0x01000001
QT_KEY_BACKTAB: t.CDefine = 0x01000002
QT_KEY_BACKSPACE: t.CDefine = 0x01000003
QT_KEY_RETURN: t.CDefine = 0x01000004
QT_KEY_ENTER: t.CDefine = 0x01000005
QT_KEY_INSERT: t.CDefine = 0x01000006
QT_KEY_DELETE: t.CDefine = 0x01000007
QT_KEY_PAUSE: t.CDefine = 0x01000008
QT_KEY_PRINT: t.CDefine = 0x01000009
QT_KEY_HOME: t.CDefine = 0x01000010
QT_KEY_END: t.CDefine = 0x01000011
QT_KEY_LEFT: t.CDefine = 0x01000012
QT_KEY_UP: t.CDefine = 0x01000013
QT_KEY_RIGHT: t.CDefine = 0x01000014
QT_KEY_DOWN: t.CDefine = 0x01000015
QT_KEY_PAGEUP: t.CDefine = 0x01000016
QT_KEY_PAGEDOWN: t.CDefine = 0x01000017
QT_KEY_SHIFT: t.CDefine = 0x01000020
QT_KEY_CONTROL: t.CDefine = 0x01000021
QT_KEY_META: t.CDefine = 0x01000022
QT_KEY_ALT: t.CDefine = 0x01000023
QT_KEY_F1: t.CDefine = 0x01000030
QT_KEY_F2: t.CDefine = 0x01000031
QT_KEY_F12: t.CDefine = 0x0100003b
QT_KEY_SPACE: t.CDefine = 0x20
QT_KEY_A: t.CDefine = 0x41
QT_KEY_Z: t.CDefine = 0x5a
QT_KEY_0: t.CDefine = 0x30
QT_KEY_9: t.CDefine = 0x39

# Qt 鼠标按键 (Qt::MouseButton)
QT_NO_BUTTON: t.CDefine = 0x00000000
QT_LEFT_BUTTON: t.CDefine = 0x00000001
QT_RIGHT_BUTTON: t.CDefine = 0x00000002
QT_MID_BUTTON: t.CDefine = 0x00000004

# Qt::AlignmentFlag
QT_ALIGN_LEFT: t.CDefine = 0x0001
QT_ALIGN_RIGHT: t.CDefine = 0x0002
QT_ALIGN_HCENTER: t.CDefine = 0x0004
QT_ALIGN_TOP: t.CDefine = 0x0020
QT_ALIGN_BOTTOM: t.CDefine = 0x0040
QT_ALIGN_VCENTER: t.CDefine = 0x0080
QT_ALIGN_CENTER: t.CDefine = QT_ALIGN_HCENTER | QT_ALIGN_VCENTER

# Qt::Orientation
QT_HORIZONTAL: t.CDefine = 0x1
QT_VERTICAL: t.CDefine = 0x2

# Qt 焦点
QT_NO_FOCUS: t.CDefine = 0x00
QT_TAB_FOCUS: t.CDefine = 0x01
QT_CLICK_FOCUS: t.CDefine = 0x02
QT_STRONG_FOCUS: t.CDefine = QT_TAB_FOCUS | QT_CLICK_FOCUS
QT_WHEEL_FOCUS: t.CDefine = 0x04
QT_ALL_FOCUS: t.CDefine = QT_STRONG_FOCUS | QT_WHEEL_FOCUS

# Qt::WindowFlag
QT_WINDOW: t.CDefine = 0x00000001
QT_DIALOG: t.CDefine = 0x00000002 | QT_WINDOW
QT_SHEET: t.CDefine = 0x00000004 | QT_WINDOW
QT_DRAWER: t.CDefine = QT_SHEET | 0x00000008
QT_POPUP: t.CDefine = 0x00000008 | QT_WINDOW
QT_TOOL: t.CDefine = 0x0000000a | QT_WINDOW
QT_TOOLTIP: t.CDefine = 0x0000000c | QT_WINDOW
QT_SPLASH_SCREEN: t.CDefine = 0x0000000e | QT_WINDOW

QT_WINDOW_TITLE: t.CDefine = 0x00000001
QT_WINDOW_SYSTEM_MENU: t.CDefine = 0x00000002
QT_WINDOW_MIN_MAX_BUTTONS: t.CDefine = 0x00000004
QT_WINDOW_CLOSE_BUTTON: t.CDefine = 0x08000000
QT_WINDOW_CONTEXT_HELP_BUTTON: t.CDefine = 0x00000008

# QMessageBox 标准按钮
QT_OK: t.CDefine = 0x00000400
QT_CANCEL: t.CDefine = 0x00400000
QT_YES: t.CDefine = 0x00004000
QT_NO: t.CDefine = 0x00010000
QT_CLOSE: t.CDefine = 0x00200000

# 事件类型
QT_EVENT_NONE: t.CDefine = 0
QT_EVENT_KEY: t.CDefine = 6
QT_EVENT_MOUSE_BUTTON_PRESS: t.CDefine = 2
QT_EVENT_MOUSE_BUTTON_RELEASE: t.CDefine = 3
QT_EVENT_MOUSE_MOVE: t.CDefine = 5
QT_EVENT_PAINT: t.CDefine = 12
QT_EVENT_RESIZE: t.CDefine = 14
QT_EVENT_CLOSE: t.CDefine = 19
QT_EVENT_SHOW: t.CDefine = 17
QT_EVENT_HIDE: t.CDefine = 18
