📄 highgui.h
字号:
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// Intel License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of Intel Corporation may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef _HIGH_GUI_
#define _HIGH_GUI_
#ifdef __cplusplus
#define HIGHGUI_EXTERN_C extern "C"
extern "C" {
#else
#define HIGHGUI_EXTERN_C
#endif /* __cplusplus */
#ifdef HIGHGUI_EXPORTS
#define HIGHGUI_API HIGHGUI_EXTERN_C __declspec(dllexport)
#else
#define HIGHGUI_API
#endif /* HIGHGUI_DLLEXPORT */
#include <ipl.h>
typedef void* IMAGE;
/* Errors */
#define HG_OK 0 /* Don't bet on it! */
#define HG_BADNAME -1 /* Bad window or file name */
#define HG_INITFAILED -2 /* Can't initialize HighGUI. Possibly, can't find vlgrfmts.dll */
#define HG_WCFAILED -3 /* Can't create a window */
#define HG_NULLPTR -4 /* The null pointer where it should not appear */
#define HG_BADPARAM -5
/* Slider styles */
#define HG_LEFT 1
#define HG_TOP 2
#define HG_RIGHT 3
#define HG_BOTTOM 4
HIGHGUI_API void SetInstance(void* curInstance);
HIGHGUI_API void HGExit();
HIGHGUI_API int named_window(const char* name, unsigned long flags);
HIGHGUI_API int resize(const char* window_name, int width, int height);
HIGHGUI_API int destroy_window(const char* name);
HIGHGUI_API int attach_image(const char* window_name, IMAGE image);
HIGHGUI_API IMAGE load_bitmap(const char* filename);
HIGHGUI_API int save_bitmap(const char* filename, IMAGE bitmap);
HIGHGUI_API IMAGE create_image(int width, int height);
HIGHGUI_API int destroy_image(IMAGE image);
HIGHGUI_API int wait_key(const char* name);
HIGHGUI_API int wait_key_ex(const char* name, int delay);
HIGHGUI_API int check_key(const char* window_name);
HIGHGUI_API int reset_key(const char* window_name);
HIGHGUI_API int create_toolbar(const char* window_name/*, int pos*/);
HIGHGUI_API int create_trackbar(const char* trackbar_name, const char* window_name, int* val,
int count, void (*ON_NOTIFY)(int));
#define create_slider create_trackbar
HIGHGUI_API void add_search_path(const char* path);
HIGHGUI_API void destroy_all();
HIGHGUI_API void detach_all_controls();
/* For use with IPL */
typedef IplImage* IPLIMAGE;
HIGHGUI_API int show_iplimage(const char* window_name, IPLIMAGE image);
HIGHGUI_API IPLIMAGE load_iplimage(const char* filename);
HIGHGUI_API int save_iplimage(const char* filename, IPLIMAGE iplimage);
/* For use with Win32 */
#ifdef WIN32
HIGHGUI_API HWND get_hwnd_byname(const char* name);
HIGHGUI_API const char* get_name_byhwnd(HWND hwnd);
HIGHGUI_API void set_preprocess_func(int (__cdecl * on_preprocess)(HWND, UINT, WPARAM, LPARAM, int*));
HIGHGUI_API void set_postprocess_func(int (__cdecl *on_postprocess)(HWND, UINT, WPARAM, LPARAM, int*));
#endif // WIN32
// Window flags
#define HG_AUTOSIZE 1
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif // _HIGH_GUI_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -