~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/modules/highgui/src/window.cpp

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*M///////////////////////////////////////////////////////////////////////////////////////
 
2
//
 
3
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
 
4
//
 
5
//  By downloading, copying, installing or using the software you agree to this license.
 
6
//  If you do not agree to this license, do not download, install,
 
7
//  copy or use the software.
 
8
//
 
9
//
 
10
//                        Intel License Agreement
 
11
//                For Open Source Computer Vision Library
 
12
//
 
13
// Copyright (C) 2000, Intel Corporation, all rights reserved.
 
14
// Third party copyrights are property of their respective owners.
 
15
//
 
16
// Redistribution and use in source and binary forms, with or without modification,
 
17
// are permitted provided that the following conditions are met:
 
18
//
 
19
//   * Redistribution's of source code must retain the above copyright notice,
 
20
//     this list of conditions and the following disclaimer.
 
21
//
 
22
//   * Redistribution's in binary form must reproduce the above copyright notice,
 
23
//     this list of conditions and the following disclaimer in the documentation
 
24
//     and/or other materials provided with the distribution.
 
25
//
 
26
//   * The name of Intel Corporation may not be used to endorse or promote products
 
27
//     derived from this software without specific prior written permission.
 
28
//
 
29
// This software is provided by the copyright holders and contributors "as is" and
 
30
// any express or implied warranties, including, but not limited to, the implied
 
31
// warranties of merchantability and fitness for a particular purpose are disclaimed.
 
32
// In no event shall the Intel Corporation or contributors be liable for any direct,
 
33
// indirect, incidental, special, exemplary, or consequential damages
 
34
// (including, but not limited to, procurement of substitute goods or services;
 
35
// loss of use, data, or profits; or business interruption) however caused
 
36
// and on any theory of liability, whether in contract, strict liability,
 
37
// or tort (including negligence or otherwise) arising in any way out of
 
38
// the use of this software, even if advised of the possibility of such damage.
 
39
//
 
40
//M*/
 
41
 
 
42
#include "precomp.hpp"
 
43
#include <map>
 
44
#include "opencv2/core/opengl.hpp"
 
45
 
 
46
// in later times, use this file as a dispatcher to implementations like cvcap.cpp
 
47
 
 
48
CV_IMPL void cvSetWindowProperty(const char* name, int prop_id, double prop_value)
 
49
{
 
50
    switch(prop_id)
 
51
    {
 
52
    //change between fullscreen or not.
 
53
    case CV_WND_PROP_FULLSCREEN:
 
54
 
 
55
        if (!name || (prop_value!=CV_WINDOW_NORMAL && prop_value!=CV_WINDOW_FULLSCREEN))//bad argument
 
56
            break;
 
57
 
 
58
        #if defined (HAVE_QT)
 
59
            cvSetModeWindow_QT(name,prop_value);
 
60
        #elif defined(HAVE_WIN32UI)
 
61
            cvSetModeWindow_W32(name,prop_value);
 
62
        #elif defined (HAVE_GTK)
 
63
            cvSetModeWindow_GTK(name,prop_value);
 
64
        #elif defined (HAVE_CARBON)
 
65
            cvSetModeWindow_CARBON(name,prop_value);
 
66
        #elif defined (HAVE_COCOA)
 
67
            cvSetModeWindow_COCOA(name,prop_value);
 
68
        #elif defined (WINRT)
 
69
            cvSetModeWindow_WinRT(name, prop_value);
 
70
        #endif
 
71
 
 
72
    break;
 
73
 
 
74
    case CV_WND_PROP_AUTOSIZE:
 
75
        #if defined (HAVE_QT)
 
76
            cvSetPropWindow_QT(name,prop_value);
 
77
        #endif
 
78
    break;
 
79
 
 
80
    case CV_WND_PROP_ASPECTRATIO:
 
81
        #if defined (HAVE_QT)
 
82
            cvSetRatioWindow_QT(name,prop_value);
 
83
        #endif
 
84
    break;
 
85
 
 
86
    default:;
 
87
    }
 
88
}
 
89
 
 
90
/* return -1 if error */
 
91
CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
 
92
{
 
93
    if (!name)
 
94
        return -1;
 
95
 
 
96
    switch(prop_id)
 
97
    {
 
98
    case CV_WND_PROP_FULLSCREEN:
 
99
 
 
100
        #if defined (HAVE_QT)
 
101
            return cvGetModeWindow_QT(name);
 
102
        #elif defined(HAVE_WIN32UI)
 
103
            return cvGetModeWindow_W32(name);
 
104
        #elif defined (HAVE_GTK)
 
105
            return cvGetModeWindow_GTK(name);
 
106
        #elif defined (HAVE_CARBON)
 
107
            return cvGetModeWindow_CARBON(name);
 
108
        #elif defined (HAVE_COCOA)
 
109
            return cvGetModeWindow_COCOA(name);
 
110
        #elif defined (WINRT)
 
111
            return cvGetModeWindow_WinRT(name);
 
112
        #else
 
113
            return -1;
 
114
        #endif
 
115
    break;
 
116
 
 
117
    case CV_WND_PROP_AUTOSIZE:
 
118
 
 
119
        #if defined (HAVE_QT)
 
120
            return cvGetPropWindow_QT(name);
 
121
        #elif defined(HAVE_WIN32UI)
 
122
            return cvGetPropWindowAutoSize_W32(name);
 
123
        #elif defined (HAVE_GTK)
 
124
            return cvGetPropWindowAutoSize_GTK(name);
 
125
        #else
 
126
            return -1;
 
127
        #endif
 
128
    break;
 
129
 
 
130
    case CV_WND_PROP_ASPECTRATIO:
 
131
 
 
132
        #if defined (HAVE_QT)
 
133
            return cvGetRatioWindow_QT(name);
 
134
        #elif defined(HAVE_WIN32UI)
 
135
            return cvGetRatioWindow_W32(name);
 
136
        #elif defined (HAVE_GTK)
 
137
            return cvGetRatioWindow_GTK(name);
 
138
        #else
 
139
            return -1;
 
140
        #endif
 
141
    break;
 
142
 
 
143
    case CV_WND_PROP_OPENGL:
 
144
 
 
145
        #if defined (HAVE_QT)
 
146
            return cvGetOpenGlProp_QT(name);
 
147
        #elif defined(HAVE_WIN32UI)
 
148
            return cvGetOpenGlProp_W32(name);
 
149
        #elif defined (HAVE_GTK)
 
150
            return cvGetOpenGlProp_GTK(name);
 
151
        #else
 
152
            return -1;
 
153
        #endif
 
154
    break;
 
155
 
 
156
    default:
 
157
        return -1;
 
158
    }
 
159
}
 
160
 
 
161
void cv::namedWindow( const String& winname, int flags )
 
162
{
 
163
    cvNamedWindow( winname.c_str(), flags );
 
164
}
 
165
 
 
166
void cv::destroyWindow( const String& winname )
 
167
{
 
168
    cvDestroyWindow( winname.c_str() );
 
169
}
 
170
 
 
171
void cv::destroyAllWindows()
 
172
{
 
173
    cvDestroyAllWindows();
 
174
}
 
175
 
 
176
void cv::resizeWindow( const String& winname, int width, int height )
 
177
{
 
178
    cvResizeWindow( winname.c_str(), width, height );
 
179
}
 
180
 
 
181
void cv::moveWindow( const String& winname, int x, int y )
 
182
{
 
183
    cvMoveWindow( winname.c_str(), x, y );
 
184
}
 
185
 
 
186
void cv::setWindowProperty(const String& winname, int prop_id, double prop_value)
 
187
{
 
188
    cvSetWindowProperty( winname.c_str(), prop_id, prop_value);
 
189
}
 
190
 
 
191
double cv::getWindowProperty(const String& winname, int prop_id)
 
192
{
 
193
    return cvGetWindowProperty(winname.c_str(), prop_id);
 
194
}
 
195
 
 
196
int cv::waitKey(int delay)
 
197
{
 
198
    return cvWaitKey(delay);
 
199
}
 
200
 
 
201
int cv::createTrackbar(const String& trackbarName, const String& winName,
 
202
                   int* value, int count, TrackbarCallback callback,
 
203
                   void* userdata)
 
204
{
 
205
    return cvCreateTrackbar2(trackbarName.c_str(), winName.c_str(),
 
206
                             value, count, callback, userdata);
 
207
}
 
208
 
 
209
void cv::setTrackbarPos( const String& trackbarName, const String& winName, int value )
 
210
{
 
211
    cvSetTrackbarPos(trackbarName.c_str(), winName.c_str(), value );
 
212
}
 
213
 
 
214
void cv::setTrackbarMax(const String& trackbarName, const String& winName, int maxval)
 
215
{
 
216
    cvSetTrackbarMax(trackbarName.c_str(), winName.c_str(), maxval);
 
217
}
 
218
 
 
219
void cv::setTrackbarMin(const String& trackbarName, const String& winName, int minval)
 
220
{
 
221
    cvSetTrackbarMin(trackbarName.c_str(), winName.c_str(), minval);
 
222
}
 
223
 
 
224
int cv::getTrackbarPos( const String& trackbarName, const String& winName )
 
225
{
 
226
    return cvGetTrackbarPos(trackbarName.c_str(), winName.c_str());
 
227
}
 
228
 
 
229
void cv::setMouseCallback( const String& windowName, MouseCallback onMouse, void* param)
 
230
{
 
231
    cvSetMouseCallback(windowName.c_str(), onMouse, param);
 
232
}
 
233
 
 
234
int cv::getMouseWheelDelta( int flags )
 
235
{
 
236
    return CV_GET_WHEEL_DELTA(flags);
 
237
}
 
238
 
 
239
int cv::startWindowThread()
 
240
{
 
241
    return cvStartWindowThread();
 
242
}
 
243
 
 
244
// OpenGL support
 
245
 
 
246
void cv::setOpenGlDrawCallback(const String& name, OpenGlDrawCallback callback, void* userdata)
 
247
{
 
248
    cvSetOpenGlDrawCallback(name.c_str(), callback, userdata);
 
249
}
 
250
 
 
251
void cv::setOpenGlContext(const String& windowName)
 
252
{
 
253
    cvSetOpenGlContext(windowName.c_str());
 
254
}
 
255
 
 
256
void cv::updateWindow(const String& windowName)
 
257
{
 
258
    cvUpdateWindow(windowName.c_str());
 
259
}
 
260
 
 
261
#ifdef HAVE_OPENGL
 
262
namespace
 
263
{
 
264
    std::map<cv::String, cv::ogl::Texture2D> wndTexs;
 
265
    std::map<cv::String, cv::ogl::Texture2D> ownWndTexs;
 
266
    std::map<cv::String, cv::ogl::Buffer> ownWndBufs;
 
267
 
 
268
    void glDrawTextureCallback(void* userdata)
 
269
    {
 
270
        cv::ogl::Texture2D* texObj = static_cast<cv::ogl::Texture2D*>(userdata);
 
271
 
 
272
        cv::ogl::render(*texObj);
 
273
    }
 
274
}
 
275
#endif // HAVE_OPENGL
 
276
 
 
277
void cv::imshow( const String& winname, InputArray _img )
 
278
{
 
279
    const Size size = _img.size();
 
280
#ifndef HAVE_OPENGL
 
281
    CV_Assert(size.width>0 && size.height>0);
 
282
    {
 
283
        Mat img = _img.getMat();
 
284
        CvMat c_img = img;
 
285
        cvShowImage(winname.c_str(), &c_img);
 
286
    }
 
287
#else
 
288
    const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
 
289
    CV_Assert(size.width>0 && size.height>0);
 
290
 
 
291
    if (useGl <= 0)
 
292
    {
 
293
        Mat img = _img.getMat();
 
294
        CvMat c_img = img;
 
295
        cvShowImage(winname.c_str(), &c_img);
 
296
    }
 
297
    else
 
298
    {
 
299
        const double autoSize = getWindowProperty(winname, WND_PROP_AUTOSIZE);
 
300
 
 
301
        if (autoSize > 0)
 
302
        {
 
303
            resizeWindow(winname, size.width, size.height);
 
304
        }
 
305
 
 
306
        setOpenGlContext(winname);
 
307
 
 
308
        cv::ogl::Texture2D& tex = ownWndTexs[winname];
 
309
 
 
310
        if (_img.kind() == _InputArray::CUDA_GPU_MAT)
 
311
        {
 
312
            cv::ogl::Buffer& buf = ownWndBufs[winname];
 
313
            buf.copyFrom(_img);
 
314
            buf.setAutoRelease(false);
 
315
 
 
316
            tex.copyFrom(buf);
 
317
            tex.setAutoRelease(false);
 
318
        }
 
319
        else
 
320
        {
 
321
            tex.copyFrom(_img);
 
322
        }
 
323
 
 
324
        tex.setAutoRelease(false);
 
325
 
 
326
        setOpenGlDrawCallback(winname, glDrawTextureCallback, &tex);
 
327
 
 
328
        updateWindow(winname);
 
329
    }
 
330
#endif
 
331
}
 
332
 
 
333
void cv::imshow(const String& winname, const ogl::Texture2D& _tex)
 
334
{
 
335
#ifndef HAVE_OPENGL
 
336
    (void) winname;
 
337
    (void) _tex;
 
338
    CV_Error(cv::Error::OpenGlNotSupported, "The library is compiled without OpenGL support");
 
339
#else
 
340
    const double useGl = getWindowProperty(winname, WND_PROP_OPENGL);
 
341
 
 
342
    if (useGl <= 0)
 
343
    {
 
344
        CV_Error(cv::Error::OpenGlNotSupported, "The window was created without OpenGL context");
 
345
    }
 
346
    else
 
347
    {
 
348
        const double autoSize = getWindowProperty(winname, WND_PROP_AUTOSIZE);
 
349
 
 
350
        if (autoSize > 0)
 
351
        {
 
352
            Size size = _tex.size();
 
353
            resizeWindow(winname, size.width, size.height);
 
354
        }
 
355
 
 
356
        setOpenGlContext(winname);
 
357
 
 
358
        cv::ogl::Texture2D& tex = wndTexs[winname];
 
359
 
 
360
        tex = _tex;
 
361
 
 
362
        tex.setAutoRelease(false);
 
363
 
 
364
        setOpenGlDrawCallback(winname, glDrawTextureCallback, &tex);
 
365
 
 
366
        updateWindow(winname);
 
367
    }
 
368
#endif
 
369
}
 
370
 
 
371
// Without OpenGL
 
372
 
 
373
#ifndef HAVE_OPENGL
 
374
 
 
375
CV_IMPL void cvSetOpenGlDrawCallback(const char*, CvOpenGlDrawCallback, void*)
 
376
{
 
377
    CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
 
378
}
 
379
 
 
380
CV_IMPL void cvSetOpenGlContext(const char*)
 
381
{
 
382
    CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
 
383
}
 
384
 
 
385
CV_IMPL void cvUpdateWindow(const char*)
 
386
{
 
387
    CV_Error(CV_OpenGlNotSupported, "The library is compiled without OpenGL support");
 
388
}
 
389
 
 
390
#endif // !HAVE_OPENGL
 
391
 
 
392
#if defined (HAVE_QT)
 
393
 
 
394
cv::QtFont cv::fontQt(const String& nameFont, int pointSize, Scalar color, int weight,  int style, int /*spacing*/)
 
395
{
 
396
    CvFont f = cvFontQt(nameFont.c_str(), pointSize,color,weight, style);
 
397
    void* pf = &f; // to suppress strict-aliasing
 
398
    return *(cv::QtFont*)pf;
 
399
}
 
400
 
 
401
void cv::addText( const Mat& img, const String& text, Point org, const QtFont& font)
 
402
{
 
403
    CvMat _img = img;
 
404
    cvAddText( &_img, text.c_str(), org, (CvFont*)&font);
 
405
}
 
406
 
 
407
void cv::displayStatusBar(const String& name,  const String& text, int delayms)
 
408
{
 
409
    cvDisplayStatusBar(name.c_str(),text.c_str(), delayms);
 
410
}
 
411
 
 
412
void cv::displayOverlay(const String& name,  const String& text, int delayms)
 
413
{
 
414
    cvDisplayOverlay(name.c_str(),text.c_str(), delayms);
 
415
}
 
416
 
 
417
int cv::startLoop(int (*pt2Func)(int argc, char *argv[]), int argc, char* argv[])
 
418
{
 
419
    return cvStartLoop(pt2Func, argc, argv);
 
420
}
 
421
 
 
422
void cv::stopLoop()
 
423
{
 
424
    cvStopLoop();
 
425
}
 
426
 
 
427
void cv::saveWindowParameters(const String& windowName)
 
428
{
 
429
    cvSaveWindowParameters(windowName.c_str());
 
430
}
 
431
 
 
432
void cv::loadWindowParameters(const String& windowName)
 
433
{
 
434
    cvLoadWindowParameters(windowName.c_str());
 
435
}
 
436
 
 
437
int cv::createButton(const String& button_name, ButtonCallback on_change, void* userdata, int button_type , bool initial_button_state  )
 
438
{
 
439
    return cvCreateButton(button_name.c_str(), on_change, userdata, button_type , initial_button_state );
 
440
}
 
441
 
 
442
#else
 
443
 
 
444
cv::QtFont cv::fontQt(const String&, int, Scalar, int,  int, int)
 
445
{
 
446
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
447
    return QtFont();
 
448
}
 
449
 
 
450
void cv::addText( const Mat&, const String&, Point, const QtFont&)
 
451
{
 
452
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
453
}
 
454
 
 
455
void cv::displayStatusBar(const String&,  const String&, int)
 
456
{
 
457
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
458
}
 
459
 
 
460
void cv::displayOverlay(const String&,  const String&, int )
 
461
{
 
462
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
463
}
 
464
 
 
465
int cv::startLoop(int (*)(int argc, char *argv[]), int , char**)
 
466
{
 
467
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
468
    return 0;
 
469
}
 
470
 
 
471
void cv::stopLoop()
 
472
{
 
473
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
474
}
 
475
 
 
476
void cv::saveWindowParameters(const String&)
 
477
{
 
478
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
479
}
 
480
 
 
481
void cv::loadWindowParameters(const String&)
 
482
{
 
483
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
484
}
 
485
 
 
486
int cv::createButton(const String&, ButtonCallback, void*, int , bool )
 
487
{
 
488
    CV_Error(CV_StsNotImplemented, "The library is compiled without QT support");
 
489
    return 0;
 
490
}
 
491
 
 
492
#endif
 
493
 
 
494
#if   defined (HAVE_WIN32UI)  // see window_w32.cpp
 
495
#elif defined (HAVE_GTK)      // see window_gtk.cpp
 
496
#elif defined (HAVE_COCOA)    // see window_carbon.cpp
 
497
#elif defined (HAVE_CARBON)
 
498
#elif defined (HAVE_QT)       // see window_QT.cpp
 
499
#elif defined (WINRT) && !defined (WINRT_8_0) // see window_winrt.cpp
 
500
 
 
501
#else
 
502
 
 
503
// No windowing system present at compile time ;-(
 
504
//
 
505
// We will build place holders that don't break the API but give an error
 
506
// at runtime. This way people can choose to replace an installed HighGUI
 
507
// version with a more capable one without a need to recompile dependent
 
508
// applications or libraries.
 
509
 
 
510
void cv::setWindowTitle(const String&, const String&)
 
511
{
 
512
    CV_Error(Error::StsNotImplemented, "The function is not implemented. "
 
513
        "Rebuild the library with Windows, GTK+ 2.x or Carbon support. "
 
514
        "If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script");
 
515
}
 
516
 
 
517
#define CV_NO_GUI_ERROR(funcname) \
 
518
    cvError( CV_StsError, funcname, \
 
519
    "The function is not implemented. " \
 
520
    "Rebuild the library with Windows, GTK+ 2.x or Carbon support. "\
 
521
    "If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script", \
 
522
    __FILE__, __LINE__ )
 
523
 
 
524
 
 
525
CV_IMPL int cvNamedWindow( const char*, int )
 
526
{
 
527
    CV_NO_GUI_ERROR("cvNamedWindow");
 
528
    return -1;
 
529
}
 
530
 
 
531
CV_IMPL void cvDestroyWindow( const char* )
 
532
{
 
533
    CV_NO_GUI_ERROR( "cvDestroyWindow" );
 
534
}
 
535
 
 
536
CV_IMPL void
 
537
cvDestroyAllWindows( void )
 
538
{
 
539
    CV_NO_GUI_ERROR( "cvDestroyAllWindows" );
 
540
}
 
541
 
 
542
CV_IMPL void
 
543
cvShowImage( const char*, const CvArr* )
 
544
{
 
545
    CV_NO_GUI_ERROR( "cvShowImage" );
 
546
}
 
547
 
 
548
CV_IMPL void cvResizeWindow( const char*, int, int )
 
549
{
 
550
    CV_NO_GUI_ERROR( "cvResizeWindow" );
 
551
}
 
552
 
 
553
CV_IMPL void cvMoveWindow( const char*, int, int )
 
554
{
 
555
    CV_NO_GUI_ERROR( "cvMoveWindow" );
 
556
}
 
557
 
 
558
CV_IMPL int
 
559
cvCreateTrackbar( const char*, const char*,
 
560
                  int*, int, CvTrackbarCallback )
 
561
{
 
562
    CV_NO_GUI_ERROR( "cvCreateTrackbar" );
 
563
    return -1;
 
564
}
 
565
 
 
566
CV_IMPL int
 
567
cvCreateTrackbar2( const char* /*trackbar_name*/, const char* /*window_name*/,
 
568
                   int* /*val*/, int /*count*/, CvTrackbarCallback2 /*on_notify2*/,
 
569
                   void* /*userdata*/ )
 
570
{
 
571
    CV_NO_GUI_ERROR( "cvCreateTrackbar2" );
 
572
    return -1;
 
573
}
 
574
 
 
575
CV_IMPL void
 
576
cvSetMouseCallback( const char*, CvMouseCallback, void* )
 
577
{
 
578
    CV_NO_GUI_ERROR( "cvSetMouseCallback" );
 
579
}
 
580
 
 
581
CV_IMPL int cvGetTrackbarPos( const char*, const char* )
 
582
{
 
583
    CV_NO_GUI_ERROR( "cvGetTrackbarPos" );
 
584
    return -1;
 
585
}
 
586
 
 
587
CV_IMPL void cvSetTrackbarPos( const char*, const char*, int )
 
588
{
 
589
    CV_NO_GUI_ERROR( "cvSetTrackbarPos" );
 
590
}
 
591
 
 
592
CV_IMPL void cvSetTrackbarMax(const char*, const char*, int)
 
593
{
 
594
    CV_NO_GUI_ERROR( "cvSetTrackbarMax" );
 
595
}
 
596
 
 
597
CV_IMPL void cvSetTrackbarMin(const char*, const char*, int)
 
598
{
 
599
    CV_NO_GUI_ERROR( "cvSetTrackbarMin" );
 
600
}
 
601
 
 
602
CV_IMPL void* cvGetWindowHandle( const char* )
 
603
{
 
604
    CV_NO_GUI_ERROR( "cvGetWindowHandle" );
 
605
    return 0;
 
606
}
 
607
 
 
608
CV_IMPL const char* cvGetWindowName( void* )
 
609
{
 
610
    CV_NO_GUI_ERROR( "cvGetWindowName" );
 
611
    return 0;
 
612
}
 
613
 
 
614
CV_IMPL int cvWaitKey( int )
 
615
{
 
616
    CV_NO_GUI_ERROR( "cvWaitKey" );
 
617
    return -1;
 
618
}
 
619
 
 
620
CV_IMPL int cvInitSystem( int , char** )
 
621
{
 
622
 
 
623
    CV_NO_GUI_ERROR( "cvInitSystem" );
 
624
    return -1;
 
625
}
 
626
 
 
627
CV_IMPL int cvStartWindowThread()
 
628
{
 
629
 
 
630
    CV_NO_GUI_ERROR( "cvStartWindowThread" );
 
631
    return -1;
 
632
}
 
633
 
 
634
//-------- Qt ---------
 
635
CV_IMPL void cvAddText( const CvArr*, const char*, CvPoint , CvFont* )
 
636
{
 
637
    CV_NO_GUI_ERROR("cvAddText");
 
638
}
 
639
 
 
640
CV_IMPL void cvDisplayStatusBar(const char* , const char* , int )
 
641
{
 
642
    CV_NO_GUI_ERROR("cvDisplayStatusBar");
 
643
}
 
644
 
 
645
CV_IMPL void cvDisplayOverlay(const char* , const char* , int )
 
646
{
 
647
    CV_NO_GUI_ERROR("cvNamedWindow");
 
648
}
 
649
 
 
650
CV_IMPL int cvStartLoop(int (*)(int argc, char *argv[]), int , char* argv[])
 
651
{
 
652
    (void)argv;
 
653
    CV_NO_GUI_ERROR("cvStartLoop");
 
654
    return -1;
 
655
}
 
656
 
 
657
CV_IMPL void cvStopLoop()
 
658
{
 
659
    CV_NO_GUI_ERROR("cvStopLoop");
 
660
}
 
661
 
 
662
CV_IMPL void cvSaveWindowParameters(const char* )
 
663
{
 
664
    CV_NO_GUI_ERROR("cvSaveWindowParameters");
 
665
}
 
666
 
 
667
// CV_IMPL void cvLoadWindowParameterss(const char* name)
 
668
// {
 
669
//     CV_NO_GUI_ERROR("cvLoadWindowParameters");
 
670
// }
 
671
 
 
672
CV_IMPL int cvCreateButton(const char*, void (*)(int, void*), void*, int, int)
 
673
{
 
674
    CV_NO_GUI_ERROR("cvCreateButton");
 
675
    return -1;
 
676
}
 
677
 
 
678
 
 
679
#endif
 
680
 
 
681
/* End of file. */