remove whitespace at eol
[goodguy/history.git] / cinelerra-5.1 / guicast / bcdisplayinfo.C
index ff701011691bce992ec434c41562b2ebf6dd63e0..a7c01e2ca71775b765646464f16150190ffc264e 100644 (file)
@@ -2,21 +2,21 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- * 
+ *
  */
 
 #include "bcdisplay.h"
  */
 
 #include "bcdisplay.h"
@@ -83,12 +83,12 @@ static void get_top_coords(Display *display, Window win, int &px,int &py, int &t
        tx = nx;  ty = ny;
 }
 
        tx = nx;  ty = ny;
 }
 
-       
-void BC_DisplayInfo::test_window(int &x_out, 
-       int &y_out, 
-       int &x_out2, 
-       int &y_out2, 
-       int x_in, 
+
+void BC_DisplayInfo::test_window(int &x_out,
+       int &y_out,
+       int &x_out2,
+       int &y_out2,
+       int x_in,
        int y_in)
 {
 #ifdef SINGLE_THREAD
        int y_in)
 {
 #ifdef SINGLE_THREAD
@@ -107,9 +107,9 @@ void BC_DisplayInfo::test_window(int &x_out,
        attr.event_mask = StructureNotifyMask;
        attr.win_gravity = SouthEastGravity;
        attr.background_pixel = BlackPixel(display,screen);
        attr.event_mask = StructureNotifyMask;
        attr.win_gravity = SouthEastGravity;
        attr.background_pixel = BlackPixel(display,screen);
-       Window win = XCreateWindow(display, rootwin, 
-                       x_in, y_in, TEST_SIZE, TEST_SIZE, 
-                       0, default_depth, InputOutput, 
+       Window win = XCreateWindow(display, rootwin,
+                       x_in, y_in, TEST_SIZE, TEST_SIZE,
+                       0, default_depth, InputOutput,
                        vis, mask, &attr);
        XSizeHints size_hints;
        XGetNormalHints(display, win, &size_hints);
                        vis, mask, &attr);
        XSizeHints size_hints;
        XGetNormalHints(display, win, &size_hints);
@@ -118,10 +118,10 @@ void BC_DisplayInfo::test_window(int &x_out,
        size_hints.y = y_in;
        size_hints.width = TEST_SIZE;
        size_hints.height = TEST_SIZE;
        size_hints.y = y_in;
        size_hints.width = TEST_SIZE;
        size_hints.height = TEST_SIZE;
-       XSetStandardProperties(display, win, 
+       XSetStandardProperties(display, win,
                "x", "x", None, 0, 0, &size_hints);
        XClearWindow(display, win);
                "x", "x", None, 0, 0, &size_hints);
        XClearWindow(display, win);
-       XMapWindow(display, win); 
+       XMapWindow(display, win);
        XFlush(display);  XSync(display, 0);  usleep(100000);
 
        XEvent event;
        XFlush(display);  XSync(display, 0);  usleep(100000);
 
        XEvent event;
@@ -187,11 +187,11 @@ void BC_DisplayInfo::init_borders()
        if(top_border < 0)
        {
                BC_DisplayInfo display_info;
        if(top_border < 0)
        {
                BC_DisplayInfo display_info;
-               display_info.test_window(left_border, top_border, 
+               display_info.test_window(left_border, top_border,
                        auto_reposition_x, auto_reposition_y, 100, 100);
                right_border = left_border;
                bottom_border = left_border;
                        auto_reposition_x, auto_reposition_y, 100, 100);
                right_border = left_border;
                bottom_border = left_border;
-//printf("BC_DisplayInfo::init_borders border=%d %d auto=%d %d\n", 
+//printf("BC_DisplayInfo::init_borders border=%d %d auto=%d %d\n",
 //  left_border, top_border, auto_reposition_x, auto_reposition_y);
        }
 }
 //  left_border, top_border, auto_reposition_x, auto_reposition_y);
        }
 }
@@ -228,7 +228,7 @@ void BC_DisplayInfo::init_window(const char *display_name, int show_error)
 #ifdef SINGLE_THREAD
        display = BC_Display::get_display(display_name);
 #else
 #ifdef SINGLE_THREAD
        display = BC_Display::get_display(display_name);
 #else
-       
+
 // This function must be the first Xlib
 // function a multi-threaded program calls
        XInitThreads();
 // This function must be the first Xlib
 // function a multi-threaded program calls
        XInitThreads();
@@ -295,14 +295,14 @@ int BC_DisplayInfo::get_abs_cursor_x()
 #ifdef SINGLE_THREAD
        BC_Display::lock_display("BC_DisplayInfo::get_abs_cursor_x");
 #endif
 #ifdef SINGLE_THREAD
        BC_Display::lock_display("BC_DisplayInfo::get_abs_cursor_x");
 #endif
-       XQueryPointer(display, 
-          rootwin, 
-          &temp_win, 
+       XQueryPointer(display,
+          rootwin,
           &temp_win,
           &temp_win,
-       &abs_x, 
-          &abs_y, 
-          &win_x, 
-          &win_y, 
+          &temp_win,
+       &abs_x,
+          &abs_y,
+          &win_x,
+          &win_y,
           &temp_mask);
 #ifdef SINGLE_THREAD
        BC_Display::unlock_display();
           &temp_mask);
 #ifdef SINGLE_THREAD
        BC_Display::unlock_display();
@@ -319,14 +319,14 @@ int BC_DisplayInfo::get_abs_cursor_y()
 #ifdef SINGLE_THREAD
        BC_Display::lock_display("BC_DisplayInfo::get_abs_cursor_y");
 #endif
 #ifdef SINGLE_THREAD
        BC_Display::lock_display("BC_DisplayInfo::get_abs_cursor_y");
 #endif
-       XQueryPointer(display, 
-          rootwin, 
-          &temp_win, 
+       XQueryPointer(display,
+          rootwin,
+          &temp_win,
           &temp_win,
           &temp_win,
-       &abs_x, 
-          &abs_y, 
-          &win_x, 
-          &win_y, 
+       &abs_x,
+          &abs_y,
+          &win_x,
+          &win_y,
           &temp_mask);
 #ifdef SINGLE_THREAD
        BC_Display::unlock_display();
           &temp_mask);
 #ifdef SINGLE_THREAD
        BC_Display::unlock_display();