4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
28 #include <X11/extensions/XShm.h>
37 BC_Capture(int w, int h, const char *display_path = "");
38 virtual ~BC_Capture();
40 int init_window(const char *display_path);
41 // x1 and y1 are automatically adjusted if out of bounds
42 int capture_frame(VFrame *frame, int &x1, int &y1,
43 int do_cursor=0); // the scale of the cursor if nonzero
49 Window bar(int x, int y, int w, int h, int color);
50 void bars_on(int bw, int color, int x, int y, int w, int h);
52 void bars_reposition(int x, int y, int w, int h);
54 int w, h, default_depth;
55 unsigned char **row_data;
63 inline void import_RGB565_to_RGB888(unsigned char* &output, unsigned char* &input)
65 *output++ = (*input & 0xf800) >> 8;
66 *output++ = (*input & 0x7e0) >> 3;
67 *output++ = (*input & 0x1f) << 3;
73 inline void import_BGR888_to_RGB888(unsigned char* &output, unsigned char* &input)
83 inline void import_BGR8888_to_RGB888(unsigned char* &output, unsigned char* &input)
94 int bitmap_color_model;
97 XShmSegmentInfo shm_info;
104 int client_byte_order, server_byte_order;