50
* Returns a pointer to a clips array (that you need to free()
51
* afterwards if not NULL).
52
* Pass the GdkWindow that you want to get the clip status of.
53
* num_clips get filled with the number of clips in the array.
56
x11_get_clips(GdkWindow * win, gint x, gint y, gint w, gint h, gint *
52
x11_display_name (void);
60
55
* Maps and unmaps a window of the given (screen) geometry, thus
61
56
* forcing an expose event in that area
64
x11_force_expose(gint x, gint y, gint w, gint h);
59
x11_force_expose(gint x, gint y, guint w, guint h);
67
62
* Returns TRUE if the window is viewable
70
65
x11_window_viewable(GdkWindow *window);
73
* Sets the X screen saver on/off
76
x11_set_screensaver(gboolean on);
79
* XvImage handling (SHM, etc)
84
gint data_size; /* in bytes */
85
struct _xvzImagePrivate *priv; /* X-related data, not interesting */
89
* Create a new XV image with the given attributes, returns NULL on error.
91
xvzImage * xvzImage_new(enum tveng_frame_pixformat pixformat,
92
gint width, gint height);
95
* Puts the image in the given drawable, scales to the drawable's size.
97
void xvzImage_put(xvzImage *image, GdkWindow *window, GdkGC *gc);
100
* Frees the data associated with the image
102
void xvzImage_destroy(xvzImage *image);
105
* Tries to grab a port for displaying the xvzImages. FALSE on error.
106
* Must be called before all the rest of xvz routines, or they won't
109
gboolean xvz_grab_port(tveng_device_info *info);
112
* Ungrabs any previously grabbed port.
114
void xvz_ungrab_port(tveng_device_info *info);
117
* Inits the video backends.
119
void startup_xvz(void);
122
* Closes the video backends.
124
void shutdown_xvz(void);
126
/* some useful constants */
135
* Struct for video backends
138
/* A descriptive name for the backend */
140
/* see xvz_grab_port, open devices in here, FALSE on error */
141
gboolean (*grab)(tveng_device_info *info);
142
/* see xvz_ungrab_port, close devices */
143
void (*ungrab)(tveng_device_info *info);
144
/* Create a suitable image, will always be called with the port
146
xvzImage* (*image_new)(enum tveng_frame_pixformat pixformat,
147
gint width, gint height);
148
/* Destroy the given image */
149
void (*image_destroy)(xvzImage *image);
150
/* Put the image in the drawable, do scaling as necessary */
151
void (*image_put)(xvzImage *image, GdkWindow *window,
155
extern void (* window_on_top)(GtkWidget *widget, gboolean on);
156
extern int wm_detect (void);
67
/* Keep-window-on-top routines */
70
(* x11_window_on_top) (GtkWindow *window, gboolean on);
72
(* x11_window_fullscreen) (GtkWindow *window, gboolean on);
74
(* x11_window_below) (GtkWindow *window, gboolean on);
76
wm_hints_detect (void);
78
/* VidMode routines */
80
typedef struct _x11_vidmode_info x11_vidmode_info;
82
struct _x11_vidmode_info {
83
x11_vidmode_info * next;
87
double hfreq; /* Hz */
88
double vfreq; /* Hz */
89
double aspect; /* pixel y/x */
92
typedef struct _x11_vidmode_state x11_vidmode_state;
94
struct _x11_vidmode_state {
97
const x11_vidmode_info *vm;
106
x11_vidmode_list_delete (x11_vidmode_info * list);
107
extern x11_vidmode_info *
108
x11_vidmode_list_new (const char * display_name,
110
extern const x11_vidmode_info *
111
x11_vidmode_by_name (const x11_vidmode_info *list,
113
extern const x11_vidmode_info *
114
x11_vidmode_current (const x11_vidmode_info *list);
116
x11_vidmode_clear_state (x11_vidmode_state * vs);
118
x11_vidmode_switch (const x11_vidmode_info *vlist,
119
const tv_screen * slist,
120
const x11_vidmode_info *vm,
121
x11_vidmode_state * vs);
123
x11_vidmode_restore (const x11_vidmode_info *list,
124
x11_vidmode_state * vs);
126
/* Screensaver routines */
128
#define X11_SCREENSAVER_ON 0
129
#define X11_SCREENSAVER_DISPLAY_ACTIVE (1 << 0) /* for overlay modes */
130
#define X11_SCREENSAVER_CPU_ACTIVE (1 << 1) /* for capture modes */
133
x11_screensaver_set (unsigned int level);
135
x11_screensaver_control (gboolean enable);
137
x11_screensaver_init (void);
139
/* XVideo routines */
141
#ifdef HAVE_XV_EXTENSION
143
#include <X11/extensions/Xvlib.h>
146
x11_xv_image_format_to_pixfmt (const XvImageFormatValues *format);
151
x11_xvideo_dump (void);
156
x11_window_clip_vector (tv_clip_vector * vector,
162
unsigned int height);
158
164
#endif /* x11stuff.h */