C API

// typedefs

typedef void (*CvButtonCallback)(
    int state,
    void *userdata
    );

typedef void (*CvMouseCallback)(
    int event,
    int x,
    int y,
    int flags,
    void *param
    );

typedef void (*CvOpenGlDrawCallback)(void *userdata);
typedef void (*CvTrackbarCallback)(int pos);

typedef void (*CvTrackbarCallback2)(
    int pos,
    void *userdata
    );

// enums

enum
{
    @132::CV_FONT_LIGHT    = 25,
    @132::CV_FONT_NORMAL   = 50,
    @132::CV_FONT_DEMIBOLD = 63,
    @132::CV_FONT_BOLD     = 75,
    @132::CV_FONT_BLACK    = 87,
};

enum
{
    @133::CV_STYLE_NORMAL  = 0,
    @133::CV_STYLE_ITALIC  = 1,
    @133::CV_STYLE_OBLIQUE = 2,
};

enum
{
    @134::CV_PUSH_BUTTON = 0,
    @134::CV_CHECKBOX    = 1,
    @134::CV_RADIOBOX    = 2,
};

enum
{
    @135::CV_WND_PROP_FULLSCREEN  = 0,
    @135::CV_WND_PROP_AUTOSIZE    = 1,
    @135::CV_WND_PROP_ASPECTRATIO = 2,
    @135::CV_WND_PROP_OPENGL      = 3,
    @135::CV_WND_PROP_VISIBLE     = 4,
    @135::CV_WINDOW_NORMAL        = 0x00000000,
    @135::CV_WINDOW_AUTOSIZE      = 0x00000001,
    @135::CV_WINDOW_OPENGL        = 0x00001000,
    @135::CV_GUI_EXPANDED         = 0x00000000,
    @135::CV_GUI_NORMAL           = 0x00000010,
    @135::CV_WINDOW_FULLSCREEN    = 1,
    @135::CV_WINDOW_FREERATIO     = 0x00000100,
    @135::CV_WINDOW_KEEPRATIO     = 0x00000000,
};

enum
{
    @136::CV_EVENT_MOUSEMOVE     =0,
    @136::CV_EVENT_LBUTTONDOWN   =1,
    @136::CV_EVENT_RBUTTONDOWN   =2,
    @136::CV_EVENT_MBUTTONDOWN   =3,
    @136::CV_EVENT_LBUTTONUP     =4,
    @136::CV_EVENT_RBUTTONUP     =5,
    @136::CV_EVENT_MBUTTONUP     =6,
    @136::CV_EVENT_LBUTTONDBLCLK =7,
    @136::CV_EVENT_RBUTTONDBLCLK =8,
    @136::CV_EVENT_MBUTTONDBLCLK =9,
    @136::CV_EVENT_MOUSEWHEEL    =10,
    @136::CV_EVENT_MOUSEHWHEEL   =11,
};

enum
{
    @137::CV_EVENT_FLAG_LBUTTON  =1,
    @137::CV_EVENT_FLAG_RBUTTON  =2,
    @137::CV_EVENT_FLAG_MBUTTON  =4,
    @137::CV_EVENT_FLAG_CTRLKEY  =8,
    @137::CV_EVENT_FLAG_SHIFTKEY =16,
    @137::CV_EVENT_FLAG_ALTKEY   =32,
};

// global functions

void
cvAddText(
    const CvArr* img,
    const char* text,
    CvPoint org,
    CvFont* arg2
    );

int
cvCreateButton(
    const char* button_name = NULL,
    CvButtonCallback on_change = NULL,
    void* userdata = NULL,
    int button_type = CV_PUSH_BUTTON,
    int initial_button_state = 0
    );

int
cvCreateTrackbar(
    const char* trackbar_name,
    const char* window_name,
    int* value,
    int count,
    CvTrackbarCallback on_change = NULL
    );

int
cvCreateTrackbar2(
    const char* trackbar_name,
    const char* window_name,
    int* value,
    int count,
    CvTrackbarCallback2 on_change,
    void* userdata = 0
    );

void
cvDestroyAllWindows(void);

void
cvDestroyWindow(const char* name);

void
cvDisplayOverlay(
    const char* name,
    const char* text,
    int delayms = 0
    );

void
cvDisplayStatusBar(
    const char* name,
    const char* text,
    int delayms = 0
    );

CvFont
cvFontQt(
    const char* nameFont,
    int pointSize = -1,
    CvScalar color = cvScalarAll(0),
    int weight = CV_FONT_NORMAL,
    int style = CV_STYLE_NORMAL,
    int spacing = 0
    );

int
cvGetTrackbarPos(
    const char* trackbar_name,
    const char* window_name
    );

void*
cvGetWindowHandle(const char* name);

const char*
cvGetWindowName(void* window_handle);

double
cvGetWindowProperty(
    const char* name,
    int prop_id
    );

int
cvInitSystem(
    int argc,
    char** argv
    );

void
cvLoadWindowParameters(const char* name);

void
cvMoveWindow(
    const char* name,
    int x,
    int y
    );

int
cvNamedWindow(
    const char* name,
    int flags = CV_WINDOW_AUTOSIZE
    );

void
cvResizeWindow(
    const char* name,
    int width,
    int height
    );

void
cvSaveWindowParameters(const char* name);

void
cvSetMouseCallback(
    const char* window_name,
    CvMouseCallback on_mouse,
    void* param = NULL
    );

void
cvSetOpenGlContext(const char* window_name);

void
cvSetOpenGlDrawCallback(
    const char* window_name,
    CvOpenGlDrawCallback callback,
    void* userdata = NULL
    );

void
cvSetTrackbarMax(
    const char* trackbar_name,
    const char* window_name,
    int maxval
    );

void
cvSetTrackbarMin(
    const char* trackbar_name,
    const char* window_name,
    int minval
    );

void
cvSetTrackbarPos(
    const char* trackbar_name,
    const char* window_name,
    int pos
    );

void
cvSetWindowProperty(
    const char* name,
    int prop_id,
    double prop_value
    );

void
cvShowImage(
    const char* name,
    const CvArr* image
    );

int
cvStartLoop(
    int(*)(int argc, char*argv[]) pt2Func,
    int argc,
    char* argv []
    );

int
cvStartWindowThread(void);

void
cvStopLoop(void);

void
cvUpdateWindow(const char* window_name);

int
cvWaitKey(int delay = 0);

// macros

#define CV_GET_WHEEL_DELTA(flags)
#define HG_AUTOSIZE
#define cvAddSearchPath(path)
#define cvvAddSearchPath
#define cvvCreateTrackbar
#define cvvDestroyWindow
#define cvvInitSystem
#define cvvNamedWindow
#define cvvResizeWindow
#define cvvShowImage
#define cvvWaitKey(name)

#define cvvWaitKeyEx( \
    name, \
    delay \
    )

#define set_postprocess_func
#define set_preprocess_func