1793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/*M/////////////////////////////////////////////////////////////////////////////////////// 2793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 3793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 5793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// By downloading, copying, installing or using the software you agree to this license. 6793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// If you do not agree to this license, do not download, install, 7793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// copy or use the software. 8793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 9793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 10793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Intel License Agreement 11793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// For Open Source Computer Vision Library 12793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 13793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Copyright (C) 2000, Intel Corporation, all rights reserved. 14793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Third party copyrights are property of their respective owners. 15793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 16793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Redistribution and use in source and binary forms, with or without modification, 17793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// are permitted provided that the following conditions are met: 18793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 19793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// * Redistribution's of source code must retain the above copyright notice, 20793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// this list of conditions and the following disclaimer. 21793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 22793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// * Redistribution's in binary form must reproduce the above copyright notice, 23793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// this list of conditions and the following disclaimer in the documentation 24793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// and/or other materials provided with the distribution. 25793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 26793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// * The name of Intel Corporation may not be used to endorse or promote products 27793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// derived from this software without specific prior written permission. 28793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 29793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// This software is provided by the copyright holders and contributors "as is" and 30793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// any express or implied warranties, including, but not limited to, the implied 31793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// warranties of merchantability and fitness for a particular purpose are disclaimed. 32793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// In no event shall the Intel Corporation or contributors be liable for any direct, 33793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// indirect, incidental, special, exemplary, or consequential damages 34793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// (including, but not limited to, procurement of substitute goods or services; 35793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// loss of use, data, or profits; or business interruption) however caused 36793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// and on any theory of liability, whether in contract, strict liability, 37793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// or tort (including negligence or otherwise) arising in any way out of 38793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// the use of this software, even if advised of the possibility of such damage. 39793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 40793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//M*/ 41793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 42793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#ifndef __OPENCV_HIGHGUI_H__ 43793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define __OPENCV_HIGHGUI_H__ 44793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 45793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#include "opencv2/core/core_c.h" 46793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#include "opencv2/imgproc/imgproc_c.h" 47793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#include "opencv2/imgcodecs/imgcodecs_c.h" 48793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#include "opencv2/videoio/videoio_c.h" 49793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 50793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#ifdef __cplusplus 51793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerextern "C" { 52793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#endif /* __cplusplus */ 53793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 54793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/** @addtogroup highgui_c 55793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler @{ 56793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 57793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 58793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/****************************************************************************************\ 59793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler* Basic GUI functions * 60793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler\****************************************************************************************/ 61793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//YV 62793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//-----------New for Qt 63793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* For font */ 64793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerenum { CV_FONT_LIGHT = 25,//QFont::Light, 65793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_FONT_NORMAL = 50,//QFont::Normal, 66793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_FONT_DEMIBOLD = 63,//QFont::DemiBold, 67793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_FONT_BOLD = 75,//QFont::Bold, 68793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_FONT_BLACK = 87 //QFont::Black 69793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}; 70793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 71793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerenum { CV_STYLE_NORMAL = 0,//QFont::StyleNormal, 72793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_STYLE_ITALIC = 1,//QFont::StyleItalic, 73793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_STYLE_OBLIQUE = 2 //QFont::StyleOblique 74793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}; 75793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* ---------*/ 76793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 77793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//for color cvScalar(blue_component, green_component, red_component[, alpha_component]) 78793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//and alpha= 0 <-> 0xFF (not transparent <-> transparent) 79793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(CvFont) cvFontQt(const char* nameFont, int pointSize CV_DEFAULT(-1), CvScalar color CV_DEFAULT(cvScalarAll(0)), int weight CV_DEFAULT(CV_FONT_NORMAL), int style CV_DEFAULT(CV_STYLE_NORMAL), int spacing CV_DEFAULT(0)); 80793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 81793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvAddText(const CvArr* img, const char* text, CvPoint org, CvFont *arg2); 82793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 83793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvDisplayOverlay(const char* name, const char* text, int delayms CV_DEFAULT(0)); 84793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvDisplayStatusBar(const char* name, const char* text, int delayms CV_DEFAULT(0)); 85793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 86793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSaveWindowParameters(const char* name); 87793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvLoadWindowParameters(const char* name); 88793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvStartLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[]); 89793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvStopLoop( void ); 90793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 91793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertypedef void (CV_CDECL *CvButtonCallback)(int state, void* userdata); 92793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerenum {CV_PUSH_BUTTON = 0, CV_CHECKBOX = 1, CV_RADIOBOX = 2}; 93793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvCreateButton( const char* button_name CV_DEFAULT(NULL),CvButtonCallback on_change CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL) , int button_type CV_DEFAULT(CV_PUSH_BUTTON), int initial_button_state CV_DEFAULT(0)); 94793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//---------------------- 95793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 96793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 97793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* this function is used to set some external parameters in case of X Window */ 98793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvInitSystem( int argc, char** argv ); 99793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 100793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvStartWindowThread( void ); 101793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 102793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// --------- YV --------- 103793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerenum 104793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler{ 105793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler //These 3 flags are used by cvSet/GetWindowProperty 106793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WND_PROP_FULLSCREEN = 0, //to change/get window's fullscreen property 107793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WND_PROP_AUTOSIZE = 1, //to change/get window's autosize property 108793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WND_PROP_ASPECTRATIO= 2, //to change/get window's aspectratio property 109793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WND_PROP_OPENGL = 3, //to change/get window's opengl support 110793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 111793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler //These 2 flags are used by cvNamedWindow and cvSet/GetWindowProperty 112793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WINDOW_NORMAL = 0x00000000, //the user can resize the window (no constraint) / also use to switch a fullscreen window to a normal size 113793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WINDOW_AUTOSIZE = 0x00000001, //the user cannot resize the window, the size is constrainted by the image displayed 114793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WINDOW_OPENGL = 0x00001000, //window with opengl support 115793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 116793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler //Those flags are only for Qt 117793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_GUI_EXPANDED = 0x00000000, //status bar and tool bar 118793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_GUI_NORMAL = 0x00000010, //old fashious way 119793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 120793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler //These 3 flags are used by cvNamedWindow and cvSet/GetWindowProperty 121793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WINDOW_FULLSCREEN = 1,//change the window to fullscreen 122793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WINDOW_FREERATIO = 0x00000100,//the image expends as much as it can (no ratio constraint) 123793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_WINDOW_KEEPRATIO = 0x00000000//the ration image is respected. 124793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}; 125793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 126793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* create window */ 127793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvNamedWindow( const char* name, int flags CV_DEFAULT(CV_WINDOW_AUTOSIZE) ); 128793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 129793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* Set and Get Property of the window */ 130793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetWindowProperty(const char* name, int prop_id, double prop_value); 131793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(double) cvGetWindowProperty(const char* name, int prop_id); 132793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 133793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* display image within window (highgui windows remember their content) */ 134793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvShowImage( const char* name, const CvArr* image ); 135793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 136793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* resize/move window */ 137793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvResizeWindow( const char* name, int width, int height ); 138793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvMoveWindow( const char* name, int x, int y ); 139793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 140793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 141793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* destroy window and all the trackers associated with it */ 142793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvDestroyWindow( const char* name ); 143793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 144793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvDestroyAllWindows(void); 145793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 146793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* get native window handle (HWND in case of Win32 and Widget in case of X Window) */ 147793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void*) cvGetWindowHandle( const char* name ); 148793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 149793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* get name of highgui window given its native handle */ 150793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(const char*) cvGetWindowName( void* window_handle ); 151793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 152793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 153793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertypedef void (CV_CDECL *CvTrackbarCallback)(int pos); 154793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 155793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* create trackbar and display it on top of given window, set callback */ 156793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvCreateTrackbar( const char* trackbar_name, const char* window_name, 157793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler int* value, int count, CvTrackbarCallback on_change CV_DEFAULT(NULL)); 158793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 159793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertypedef void (CV_CDECL *CvTrackbarCallback2)(int pos, void* userdata); 160793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 161793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvCreateTrackbar2( const char* trackbar_name, const char* window_name, 162793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler int* value, int count, CvTrackbarCallback2 on_change, 163793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler void* userdata CV_DEFAULT(0)); 164793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 165793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* retrieve or set trackbar position */ 166793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvGetTrackbarPos( const char* trackbar_name, const char* window_name ); 167793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos ); 168793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetTrackbarMax(const char* trackbar_name, const char* window_name, int maxval); 169793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 170793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerenum 171793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler{ 172793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_MOUSEMOVE =0, 173793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_LBUTTONDOWN =1, 174793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_RBUTTONDOWN =2, 175793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_MBUTTONDOWN =3, 176793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_LBUTTONUP =4, 177793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_RBUTTONUP =5, 178793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_MBUTTONUP =6, 179793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_LBUTTONDBLCLK =7, 180793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_RBUTTONDBLCLK =8, 181793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_MBUTTONDBLCLK =9, 182793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_MOUSEWHEEL =10, 183793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_MOUSEHWHEEL =11 184793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}; 185793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 186793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslerenum 187793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler{ 188793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_FLAG_LBUTTON =1, 189793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_FLAG_RBUTTON =2, 190793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_FLAG_MBUTTON =4, 191793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_FLAG_CTRLKEY =8, 192793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_FLAG_SHIFTKEY =16, 193793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler CV_EVENT_FLAG_ALTKEY =32 194793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}; 195793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 196793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 197793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_GET_WHEEL_DELTA(flags) ((short)((flags >> 16) & 0xffff)) // upper 16 bits 198793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 199793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertypedef void (CV_CDECL *CvMouseCallback )(int event, int x, int y, int flags, void* param); 200793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 201793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* assign callback for mouse events */ 202793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, 203793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler void* param CV_DEFAULT(NULL)); 204793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 205793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/* wait for key event infinitely (delay<=0) or for "delay" milliseconds */ 206793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(int) cvWaitKey(int delay CV_DEFAULT(0)); 207793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 208793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// OpenGL support 209793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 210793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertypedef void (CV_CDECL *CvOpenGlDrawCallback)(void* userdata); 211793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetOpenGlDrawCallback(const char* window_name, CvOpenGlDrawCallback callback, void* userdata CV_DEFAULT(NULL)); 212793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 213793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetOpenGlContext(const char* window_name); 214793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvUpdateWindow(const char* window_name); 215793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 216793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 217793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/****************************************************************************************\ 218793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 219793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler* Obsolete functions/synonyms * 220793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler\****************************************************************************************/ 221793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 222793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvAddSearchPath(path) 223793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvInitSystem cvInitSystem 224793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvNamedWindow cvNamedWindow 225793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvShowImage cvShowImage 226793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvResizeWindow cvResizeWindow 227793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvDestroyWindow cvDestroyWindow 228793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvCreateTrackbar cvCreateTrackbar 229793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvAddSearchPath cvAddSearchPath 230793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvWaitKey(name) cvWaitKey(0) 231793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvvWaitKeyEx(name,delay) cvWaitKey(delay) 232793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define HG_AUTOSIZE CV_WINDOW_AUTOSIZE 233793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define set_preprocess_func cvSetPreprocessFuncWin32 234793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define set_postprocess_func cvSetPostprocessFuncWin32 235793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 236793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#if defined WIN32 || defined _WIN32 237793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 238793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetPreprocessFuncWin32_(const void* callback); 239793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCVAPI(void) cvSetPostprocessFuncWin32_(const void* callback); 240793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvSetPreprocessFuncWin32(callback) cvSetPreprocessFuncWin32_((const void*)(callback)) 241793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define cvSetPostprocessFuncWin32(callback) cvSetPostprocessFuncWin32_((const void*)(callback)) 242793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 243793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#endif 244793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 245793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/** @} highgui_c */ 246793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 247793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#ifdef __cplusplus 248793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler} 249793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#endif 250793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 251793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#endif 252