FreeBASIC  0.91.0
gfx_x11.c File Reference
#include "../fb_gfx.h"
#include "fb_gfx_x11.h"
#include "../../rtlib/unix/fb_private_scancodes_x11.h"
#include <pthread.h>
Include dependency graph for gfx_x11.c:

Go to the source code of this file.

Macros

#define Button6   6
 
#define Button7   7
 

Functions

static int calc_comp_height (int h)
 
static int key_repeated (XEvent *event)
 
static int translate_key (XEvent *event, int scancode)
 
static void hOnAltEnter ()
 
static void * window_thread (void *arg)
 
int fb_hX11EnterFullscreen (int *h)
 
void fb_hX11LeaveFullscreen (void)
 
void WaitMapped (Window w)
 
void fb_hX11InitWindow (int x, int y)
 
void fb_hXlibInit (void)
 
int fb_hX11Init (char *title, int w, int h, int depth, int refresh_rate, int flags)
 
void fb_hX11Exit (void)
 
void fb_hX11Lock (void)
 
void fb_hX11Unlock (void)
 
void fb_hX11SetPalette (int index, int r, int g, int b)
 
void fb_hX11WaitVSync (void)
 
int fb_hX11GetMouse (int *x, int *y, int *z, int *buttons, int *clip)
 
void fb_hX11SetMouse (int x, int y, int show, int clip)
 
void fb_hX11SetWindowTitle (char *title)
 
int fb_hX11SetWindowPos (int x, int y)
 
int * fb_hX11FetchModes (int depth, int *size)
 
int fb_hX11ScreenInfo (ssize_t *width, ssize_t *height, ssize_t *depth, ssize_t *refresh)
 
ssize_t fb_hGetWindowHandle (void)
 

Variables

X11DRIVER fb_x11
 
static pthread_t thread
 
static pthread_mutex_t mutex
 
static pthread_cond_t cond
 
static Drawable root_window
 
static Atom wm_delete_window
 
static Atom wm_intern_hints
 
static Colormap color_map = None
 
static Time last_click_time = 0
 
static int orig_size
 
static int target_size
 
static int current_size
 
static int real_h
 
static int orig_rate
 
static int target_rate
 
static Rotation orig_rotation
 
static Cursor blank_cursor
 
static Cursor arrow_cursor = None
 
static int is_running = FALSE
 
static int has_focus
 
static int cursor_shown
 
static int xlib_inited = FALSE
 
static int mouse_x
 
static int mouse_y
 
static int mouse_wheel
 
static int mouse_hwheel
 
static int mouse_buttons
 
static int mouse_on
 
static int mouse_x_root
 
static int mouse_y_root
 

Macro Definition Documentation

#define Button6   6

Definition at line 17 of file gfx_x11.c.

#define Button7   7

Definition at line 20 of file gfx_x11.c.

Function Documentation

static int calc_comp_height ( int  h)
static

Definition at line 41 of file gfx_x11.c.

Here is the caller graph for this function:

ssize_t fb_hGetWindowHandle ( void  )

Definition at line 865 of file gfx_x11.c.

int fb_hX11EnterFullscreen ( int *  h)

Definition at line 302 of file gfx_x11.c.

Here is the caller graph for this function:

void fb_hX11Exit ( void  )

Definition at line 609 of file gfx_x11.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int* fb_hX11FetchModes ( int  depth,
int *  size 
)

Definition at line 795 of file gfx_x11.c.

int fb_hX11GetMouse ( int *  x,
int *  y,
int *  z,
int *  buttons,
int *  clip 
)

Definition at line 687 of file gfx_x11.c.

int fb_hX11Init ( char *  title,
int  w,
int  h,
int  depth,
int  refresh_rate,
int  flags 
)

Definition at line 407 of file gfx_x11.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hX11InitWindow ( int  x,
int  y 
)

Definition at line 354 of file gfx_x11.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_hX11LeaveFullscreen ( void  )

Definition at line 331 of file gfx_x11.c.

Here is the caller graph for this function:

void fb_hX11Lock ( void  )

Definition at line 656 of file gfx_x11.c.

Here is the caller graph for this function:

int fb_hX11ScreenInfo ( ssize_t *  width,
ssize_t *  height,
ssize_t *  depth,
ssize_t *  refresh 
)

Definition at line 833 of file gfx_x11.c.

void fb_hX11SetMouse ( int  x,
int  y,
int  show,
int  clip 
)

Definition at line 714 of file gfx_x11.c.

void fb_hX11SetPalette ( int  index,
int  r,
int  g,
int  b 
)

Definition at line 668 of file gfx_x11.c.

int fb_hX11SetWindowPos ( int  x,
int  y 
)

Definition at line 751 of file gfx_x11.c.

Here is the call graph for this function:

void fb_hX11SetWindowTitle ( char *  title)

Definition at line 746 of file gfx_x11.c.

void fb_hX11Unlock ( void  )

Definition at line 662 of file gfx_x11.c.

Here is the caller graph for this function:

void fb_hX11WaitVSync ( void  )

Definition at line 682 of file gfx_x11.c.

void fb_hXlibInit ( void  )

Definition at line 399 of file gfx_x11.c.

Here is the caller graph for this function:

static void hOnAltEnter ( )
static

Definition at line 95 of file gfx_x11.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int key_repeated ( XEvent *  event)
static

Definition at line 57 of file gfx_x11.c.

Here is the caller graph for this function:

static int translate_key ( XEvent *  event,
int  scancode 
)
static

Definition at line 75 of file gfx_x11.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void WaitMapped ( Window  w)

Definition at line 346 of file gfx_x11.c.

Here is the caller graph for this function:

static void* window_thread ( void *  arg)
static

Definition at line 108 of file gfx_x11.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Cursor arrow_cursor = None
static

Definition at line 36 of file gfx_x11.c.

Cursor blank_cursor
static

Definition at line 36 of file gfx_x11.c.

Colormap color_map = None
static

Definition at line 31 of file gfx_x11.c.

pthread_cond_t cond
static

Definition at line 27 of file gfx_x11.c.

int current_size
static

Definition at line 33 of file gfx_x11.c.

int cursor_shown
static

Definition at line 37 of file gfx_x11.c.

X11DRIVER fb_x11

Definition at line 23 of file gfx_x11.c.

int has_focus
static

Definition at line 37 of file gfx_x11.c.

int is_running = FALSE
static

Definition at line 37 of file gfx_x11.c.

Time last_click_time = 0
static

Definition at line 32 of file gfx_x11.c.

int mouse_buttons
static

Definition at line 38 of file gfx_x11.c.

int mouse_hwheel
static

Definition at line 38 of file gfx_x11.c.

int mouse_on
static

Definition at line 38 of file gfx_x11.c.

int mouse_wheel
static

Definition at line 38 of file gfx_x11.c.

int mouse_x
static

Definition at line 38 of file gfx_x11.c.

int mouse_x_root
static

Definition at line 39 of file gfx_x11.c.

int mouse_y
static

Definition at line 38 of file gfx_x11.c.

int mouse_y_root
static

Definition at line 39 of file gfx_x11.c.

pthread_mutex_t mutex
static

Definition at line 26 of file gfx_x11.c.

int orig_rate
static

Definition at line 34 of file gfx_x11.c.

Rotation orig_rotation
static

Definition at line 35 of file gfx_x11.c.

int orig_size
static

Definition at line 33 of file gfx_x11.c.

int real_h
static

Definition at line 33 of file gfx_x11.c.

Drawable root_window
static

Definition at line 29 of file gfx_x11.c.

int target_rate
static

Definition at line 34 of file gfx_x11.c.

int target_size
static

Definition at line 33 of file gfx_x11.c.

pthread_t thread
static

Definition at line 25 of file gfx_x11.c.

Atom wm_delete_window
static

Definition at line 30 of file gfx_x11.c.

Atom wm_intern_hints
static

Definition at line 30 of file gfx_x11.c.

int xlib_inited = FALSE
static

Definition at line 37 of file gfx_x11.c.