interp bilinear fix
[goodguy/history.git] / cinelerra-5.1 / guicast / bcwindow.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "bcdisplayinfo.h"
23 #include "bcwindow.h"
24 #include <string.h>
25
26
27
28 char BC_Window::default_x11_host[BCTEXTLEN] = "";
29
30 BC_Window::BC_Window(const char *title,
31                                 int x,
32                                 int y,
33                                 int w,
34                                 int h,
35                                 int minw,
36                                 int minh,
37                                 int allow_resize,
38                                 int private_color,
39                                 int hide,
40                                 int bg_color,
41                                 const char *display_name,
42                                 int group_it,
43                                 int options)
44  : BC_WindowBase(options)
45 {
46         create_window(0,
47                                 title,
48                                 x,
49                                 y,
50                                 w,
51                                 h,
52                                 (minw < 0) ? w : minw,
53                                 (minh < 0) ? h : minh,
54                                 allow_resize,
55                                 private_color,
56                                 hide,
57                                 bg_color,
58                                 display_name ? display_name :
59                                         default_x11_host[0] ? default_x11_host :
60                                                 0,
61                                 MAIN_WINDOW,
62                                 0,
63                                 group_it);
64 }
65
66
67 BC_Window::~BC_Window()
68 {
69 }
70
71 void BC_Window::set_default_x11_host(const char *host)
72 {
73         if( !strcmp(host, default_x11_host) ) return;
74         strcpy(default_x11_host, host);
75         BC_DisplayInfo::top_border = -1;
76 }
77