import t, c
from stdint import *
from vqt6._types import *

# ============================================================
# vqt6/_qtgui.py — QtGui 的 t.State FFI 声明
# ============================================================

# ============================================================
# QColor — 颜色
# ============================================================
def vqt6_qcolor_create_rgb(r: t.CInt, g: t.CInt, b: t.CInt) -> QtColorPtr | t.State: pass
def vqt6_qcolor_create_rgba(r: t.CInt, g: t.CInt, b: t.CInt, a: t.CInt) -> QtColorPtr | t.State: pass
def vqt6_qcolor_create_name(name: QtStringPtr) -> QtColorPtr | t.State: pass
def vqt6_qcolor_create_hex(hex_str: QtStringPtr) -> QtColorPtr | t.State: pass
def vqt6_qcolor_red(c: QtColorPtr) -> t.CInt | t.State: pass
def vqt6_qcolor_green(c: QtColorPtr) -> t.CInt | t.State: pass
def vqt6_qcolor_blue(c: QtColorPtr) -> t.CInt | t.State: pass
def vqt6_qcolor_alpha(c: QtColorPtr) -> t.CInt | t.State: pass
def vqt6_qcolor_set_red(c: QtColorPtr, r: t.CInt) -> t.State: pass
def vqt6_qcolor_set_green(c: QtColorPtr, g: t.CInt) -> t.State: pass
def vqt6_qcolor_set_blue(c: QtColorPtr, b: t.CInt) -> t.State: pass
def vqt6_qcolor_set_alpha(c: QtColorPtr, a: t.CInt) -> t.State: pass
def vqt6_qcolor_set_rgb(c: QtColorPtr, r: t.CInt, g: t.CInt, b: t.CInt) -> t.State: pass
def vqt6_qcolor_set_rgba(c: QtColorPtr, r: t.CInt, g: t.CInt, b: t.CInt, a: t.CInt) -> t.State: pass
def vqt6_qcolor_name(c: QtColorPtr) -> QtStringPtr | t.State: pass
def vqt6_qcolor_is_valid(c: QtColorPtr) -> t.CInt | t.State: pass
def vqt6_qcolor_free(c: QtColorPtr) -> t.State: pass


# ============================================================
# QFont — 字体
# ============================================================
def vqt6_qfont_create() -> QtFontPtr | t.State: pass
def vqt6_qfont_create_with_family(family: QtStringPtr) -> QtFontPtr | t.State: pass
def vqt6_qfont_create_with_family_size(family: QtStringPtr, point_size: t.CInt) -> QtFontPtr | t.State: pass
def vqt6_qfont_set_family(font: QtFontPtr, family: QtStringPtr) -> t.State: pass
def vqt6_qfont_family(font: QtFontPtr) -> QtStringPtr | t.State: pass
def vqt6_qfont_set_point_size(font: QtFontPtr, point_size: t.CInt) -> t.State: pass
def vqt6_qfont_point_size(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_set_pixel_size(font: QtFontPtr, pixel_size: t.CInt) -> t.State: pass
def vqt6_qfont_pixel_size(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_set_bold(font: QtFontPtr, bold: t.CInt) -> t.State: pass
def vqt6_qfont_bold(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_set_italic(font: QtFontPtr, italic: t.CInt) -> t.State: pass
def vqt6_qfont_italic(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_set_underline(font: QtFontPtr, underline: t.CInt) -> t.State: pass
def vqt6_qfont_underline(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_set_strike_out(font: QtFontPtr, strike_out: t.CInt) -> t.State: pass
def vqt6_qfont_strike_out(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_set_weight(font: QtFontPtr, weight: t.CInt) -> t.State: pass
def vqt6_qfont_weight(font: QtFontPtr) -> t.CInt | t.State: pass
def vqt6_qfont_free(font: QtFontPtr) -> t.State: pass


# ============================================================
# QFontMetrics — 字体度量
# ============================================================
def vqt6_qfontmetrics_create(font: QtFontPtr) -> QtFontMetricsPtr | t.State: pass
def vqt6_qfontmetrics_width(fm: QtFontMetricsPtr, text: QtStringPtr) -> t.CInt | t.State: pass
def vqt6_qfontmetrics_height(fm: QtFontMetricsPtr) -> t.CInt | t.State: pass
def vqt6_qfontmetrics_ascent(fm: QtFontMetricsPtr) -> t.CInt | t.State: pass
def vqt6_qfontmetrics_descent(fm: QtFontMetricsPtr) -> t.CInt | t.State: pass
def vqt6_qfontmetrics_free(fm: QtFontMetricsPtr) -> t.State: pass


# ============================================================
# QPixmap — 像素图
# ============================================================
def vqt6_qpixmap_create() -> QtPixmapPtr | t.State: pass
def vqt6_qpixmap_create_with_size(w: t.CInt, h: t.CInt) -> QtPixmapPtr | t.State: pass
def vqt6_qpixmap_load(pm: QtPixmapPtr, file_name: QtStringPtr) -> t.CInt | t.State: pass
def vqt6_qpixmap_load_from_data(pm: QtPixmapPtr, data: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt | t.State: pass
def vqt6_qpixmap_save(pm: QtPixmapPtr, file_name: QtStringPtr) -> t.CInt | t.State: pass
def vqt6_qpixmap_width(pm: QtPixmapPtr) -> t.CInt | t.State: pass
def vqt6_qpixmap_height(pm: QtPixmapPtr) -> t.CInt | t.State: pass
def vqt6_qpixmap_is_null(pm: QtPixmapPtr) -> t.CInt | t.State: pass
def vqt6_qpixmap_scaled(pm: QtPixmapPtr, w: t.CInt, h: t.CInt) -> QtPixmapPtr | t.State: pass
def vqt6_qpixmap_fill(pm: QtPixmapPtr, color: QtColorPtr) -> t.State: pass
def vqt6_qpixmap_free(pm: QtPixmapPtr) -> t.State: pass


# ============================================================
# QImage — 图像
# ============================================================
def vqt6_qimage_create() -> QtImagePtr | t.State: pass
def vqt6_qimage_create_with_size(w: t.CInt, h: t.CInt, format: t.CInt) -> QtImagePtr | t.State: pass
def vqt6_qimage_load(img: QtImagePtr, file_name: QtStringPtr) -> t.CInt | t.State: pass
def vqt6_qimage_save(img: QtImagePtr, file_name: QtStringPtr) -> t.CInt | t.State: pass
def vqt6_qimage_width(img: QtImagePtr) -> t.CInt | t.State: pass
def vqt6_qimage_height(img: QtImagePtr) -> t.CInt | t.State: pass
def vqt6_qimage_format(img: QtImagePtr) -> t.CInt | t.State: pass
def vqt6_qimage_is_null(img: QtImagePtr) -> t.CInt | t.State: pass
def vqt6_qimage_fill(img: QtImagePtr, color: QtColorPtr) -> t.State: pass
def vqt6_qimage_scaled(img: QtImagePtr, w: t.CInt, h: t.CInt) -> QtImagePtr | t.State: pass
def vqt6_qimage_free(img: QtImagePtr) -> t.State: pass


# ============================================================
# QPainter — 绘画器
# ============================================================
def vqt6_qpainter_create() -> QtPainterPtr | t.State: pass
def vqt6_qpainter_begin(p: QtPainterPtr, device: QtPixmapPtr) -> t.CInt | t.State: pass
def vqt6_qpainter_end(p: QtPainterPtr) -> t.CInt | t.State: pass
def vqt6_qpainter_is_active(p: QtPainterPtr) -> t.CInt | t.State: pass
def vqt6_qpainter_set_pen(p: QtPainterPtr, pen: QtPenPtr) -> t.State: pass
def vqt6_qpainter_set_brush(p: QtPainterPtr, brush: QtBrushPtr) -> t.State: pass
def vqt6_qpainter_set_font(p: QtPainterPtr, font: QtFontPtr) -> t.State: pass
def vqt6_qpainter_pen(p: QtPainterPtr) -> QtPenPtr | t.State: pass
def vqt6_qpainter_brush(p: QtPainterPtr) -> QtBrushPtr | t.State: pass
def vqt6_qpainter_font(p: QtPainterPtr) -> QtFontPtr | t.State: pass
def vqt6_qpainter_set_opacity(p: QtPainterPtr, opacity: t.CDouble) -> t.State: pass
def vqt6_qpainter_opacity(p: QtPainterPtr) -> t.CDouble | t.State: pass

# 绘图原语
def vqt6_qpainter_draw_line(p: QtPainterPtr, x1: t.CInt, y1: t.CInt, x2: t.CInt, y2: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_rect(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt) -> t.State: pass
def vqt6_qpainter_fill_rect(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt, color: QtColorPtr) -> t.State: pass
def vqt6_qpainter_draw_ellipse(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_arc(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt, start_angle: t.CInt, span_angle: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_chord(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt, start_angle: t.CInt, span_angle: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_pie(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt, start_angle: t.CInt, span_angle: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_polygon(p: QtPainterPtr, points: t.CInt | t.CPtr, point_count: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_polyline(p: QtPainterPtr, points: t.CInt | t.CPtr, point_count: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_point(p: QtPainterPtr, x: t.CInt, y: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_points(p: QtPainterPtr, points: t.CInt | t.CPtr, point_count: t.CInt) -> t.State: pass
def vqt6_qpainter_draw_text(p: QtPainterPtr, x: t.CInt, y: t.CInt, text: QtStringPtr) -> t.State: pass
def vqt6_qpainter_draw_text_in_rect(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt, flags: t.CInt, text: QtStringPtr) -> t.State: pass
def vqt6_qpainter_draw_pixmap(p: QtPainterPtr, x: t.CInt, y: t.CInt, pixmap: QtPixmapPtr) -> t.State: pass
def vqt6_qpainter_draw_image(p: QtPainterPtr, x: t.CInt, y: t.CInt, image: QtImagePtr) -> t.State: pass
def vqt6_qpainter_draw_tiled_pixmap(p: QtPainterPtr, x: t.CInt, y: t.CInt, w: t.CInt, h: t.CInt, pixmap: QtPixmapPtr) -> t.State: pass

# 变换
def vqt6_qpainter_translate(p: QtPainterPtr, dx: t.CInt, dy: t.CInt) -> t.State: pass
def vqt6_qpainter_rotate(p: QtPainterPtr, angle: t.CDouble) -> t.State: pass
def vqt6_qpainter_scale(p: QtPainterPtr, sx: t.CDouble, sy: t.CDouble) -> t.State: pass
def vqt6_qpainter_reset_transform(p: QtPainterPtr) -> t.State: pass
def vqt6_qpainter_save(p: QtPainterPtr) -> t.State: pass
def vqt6_qpainter_restore(p: QtPainterPtr) -> t.State: pass

def vqt6_qpainter_free(p: QtPainterPtr) -> t.State: pass


# ============================================================
# QPen — 画笔
# ============================================================
def vqt6_qpen_create() -> QtPenPtr | t.State: pass
def vqt6_qpen_create_with_color(color: QtColorPtr) -> QtPenPtr | t.State: pass
def vqt6_qpen_create_with_color_width(color: QtColorPtr, width: t.CInt) -> QtPenPtr | t.State: pass
def vqt6_qpen_set_color(pen: QtPenPtr, color: QtColorPtr) -> t.State: pass
def vqt6_qpen_color(pen: QtPenPtr) -> QtColorPtr | t.State: pass
def vqt6_qpen_set_width(pen: QtPenPtr, width: t.CInt) -> t.State: pass
def vqt6_qpen_width(pen: QtPenPtr) -> t.CInt | t.State: pass
def vqt6_qpen_set_style(pen: QtPenPtr, style: t.CInt) -> t.State: pass
def vqt6_qpen_style(pen: QtPenPtr) -> t.CInt | t.State: pass
def vqt6_qpen_free(pen: QtPenPtr) -> t.State: pass


# ============================================================
# QBrush — 画刷
# ============================================================
def vqt6_qbrush_create() -> QtBrushPtr | t.State: pass
def vqt6_qbrush_create_with_color(color: QtColorPtr) -> QtBrushPtr | t.State: pass
def vqt6_qbrush_create_with_style(style: t.CInt) -> QtBrushPtr | t.State: pass
def vqt6_qbrush_set_color(brush: QtBrushPtr, color: QtColorPtr) -> t.State: pass
def vqt6_qbrush_color(brush: QtBrushPtr) -> QtColorPtr | t.State: pass
def vqt6_qbrush_set_style(brush: QtBrushPtr, style: t.CInt) -> t.State: pass
def vqt6_qbrush_style(brush: QtBrushPtr) -> t.CInt | t.State: pass
def vqt6_qbrush_free(brush: QtBrushPtr) -> t.State: pass


# ============================================================
# QIcon — 图标
# ============================================================
def vqt6_qicon_create() -> QtIconPtr | t.State: pass
def vqt6_qicon_create_with_file(file_name: QtStringPtr) -> QtIconPtr | t.State: pass
def vqt6_qicon_add_file(icon: QtIconPtr, file_name: QtStringPtr) -> t.State: pass
def vqt6_qicon_add_pixmap(icon: QtIconPtr, pixmap: QtPixmapPtr) -> t.State: pass
def vqt6_qicon_is_null(icon: QtIconPtr) -> t.CInt | t.State: pass
def vqt6_qicon_pixmap(icon: QtIconPtr, w: t.CInt, h: t.CInt) -> QtPixmapPtr | t.State: pass
def vqt6_qicon_free(icon: QtIconPtr) -> t.State: pass


# ============================================================
# QCursor — 鼠标光标
# ============================================================
def vqt6_qcursor_create() -> QtCursorPtr | t.State: pass
def vqt6_qcursor_create_with_shape(shape: t.CInt) -> QtCursorPtr | t.State: pass
def vqt6_qcursor_pos(x: t.CInt | t.CPtr, y: t.CInt | t.CPtr) -> t.State: pass
def vqt6_qcursor_set_pos(x: t.CInt, y: t.CInt) -> t.State: pass
def vqt6_qcursor_set_shape(cursor: QtCursorPtr, shape: t.CInt) -> t.State: pass
def vqt6_qcursor_shape(cursor: QtCursorPtr) -> t.CInt | t.State: pass
def vqt6_qcursor_free(cursor: QtCursorPtr) -> t.State: pass


# ============================================================
# QKeyEvent — 键盘事件
# ============================================================
def vqt6_qkeyevent_create(type: t.CInt, key: t.CInt, modifiers: t.CInt, text: QtStringPtr) -> QtKeyEventPtr | t.State: pass
def vqt6_qkeyevent_key(event: QtKeyEventPtr) -> t.CInt | t.State: pass
def vqt6_qkeyevent_text(event: QtKeyEventPtr) -> QtStringPtr | t.State: pass
def vqt6_qkeyevent_modifiers(event: QtKeyEventPtr) -> t.CInt | t.State: pass
def vqt6_qkeyevent_is_auto_repeat(event: QtKeyEventPtr) -> t.CInt | t.State: pass
def vqt6_qkeyevent_free(event: QtKeyEventPtr) -> t.State: pass


# ============================================================
# QMouseEvent — 鼠标事件
# ============================================================
def vqt6_qmouseevent_create(type: t.CInt, local_pos: QtObjectPtr, button: t.CInt, buttons: t.CInt, modifiers: t.CInt) -> QtMouseEventPtr | t.State: pass
def vqt6_qmouseevent_button(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_buttons(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_x(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_y(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_global_x(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_global_y(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_modifiers(event: QtMouseEventPtr) -> t.CInt | t.State: pass
def vqt6_qmouseevent_free(event: QtMouseEventPtr) -> t.State: pass


# ============================================================
# QResizeEvent / QPaintEvent / QCloseEvent
# ============================================================
def vqt6_qresizeevent_create(width: t.CInt, height: t.CInt, old_width: t.CInt, old_height: t.CInt) -> QtResizeEventPtr | t.State: pass
def vqt6_qresizeevent_size(event: QtResizeEventPtr, w: t.CInt | t.CPtr, h: t.CInt | t.CPtr) -> t.State: pass
def vqt6_qresizeevent_old_size(event: QtResizeEventPtr, w: t.CInt | t.CPtr, h: t.CInt | t.CPtr) -> t.State: pass
def vqt6_qresizeevent_free(event: QtResizeEventPtr) -> t.State: pass

def vqt6_qpaintevent_create(rect_x: t.CInt, rect_y: t.CInt, rect_w: t.CInt, rect_h: t.CInt) -> QtPaintEventPtr | t.State: pass
def vqt6_qpaintevent_rect(event: QtPaintEventPtr, x: t.CInt | t.CPtr, y: t.CInt | t.CPtr, w: t.CInt | t.CPtr, h: t.CInt | t.CPtr) -> t.State: pass
def vqt6_qpaintevent_free(event: QtPaintEventPtr) -> t.State: pass

def vqt6_qcloseevent_create() -> QtCloseEventPtr | t.State: pass
def vqt6_qcloseevent_is_accepted(event: QtCloseEventPtr) -> t.CInt | t.State: pass
def vqt6_qcloseevent_accept(event: QtCloseEventPtr) -> t.State: pass
def vqt6_qcloseevent_ignore(event: QtCloseEventPtr) -> t.State: pass
def vqt6_qcloseevent_free(event: QtCloseEventPtr) -> t.State: pass
