xcb_vlc.h File Reference

X C Bindings VLC module common header. More...

Include dependency graph for xcb_vlc.h:

Go to the source code of this file.

Data Structures

struct  picture_sys_t

Defines

#define ORDER   XCB_IMAGE_ORDER_LSB_FIRST

Typedefs

typedef struct key_handler_t key_handler_t

Functions

int ManageEvent (vout_display_t *vd, xcb_connection_t *conn, bool *)
 Process incoming X events.
key_handler_tCreateKeyHandler (vlc_object_t *, xcb_connection_t *)
 Create an X11 key event handler for a VLC window.
void DestroyKeyHandler (key_handler_t *)
int ProcessKeyEvent (key_handler_t *, xcb_generic_event_t *)
 Process an X11 event, convert into VLC hotkey event if applicable.
xcb_connection_t * Connect (vlc_object_t *obj)
 Connect to the X server.
struct vout_window_tGetWindow (vout_display_t *obj, xcb_connection_t *pconn, const xcb_screen_t **restrict pscreen, bool *restrict pshm)
 Create a VLC video X window object, find the corresponding X server screen, and probe the MIT-SHM extension.
int GetWindowSize (struct vout_window_t *wnd, xcb_connection_t *conn, unsigned *restrict width, unsigned *restrict height)
 Gets the size of an X window.
xcb_cursor_t CreateBlankCursor (xcb_connection_t *, const xcb_screen_t *)
 Create a blank cursor.
int CheckError (vout_display_t *, xcb_connection_t *conn, const char *str, xcb_void_cookie_t)
 Check for an error.
int PictureResourceAlloc (vout_display_t *vd, picture_resource_t *res, size_t size, xcb_connection_t *conn, bool attach)
 Initialize a picture buffer as shared memory, according to the video output format.
void PictureResourceFree (picture_resource_t *res, xcb_connection_t *conn)
 Release picture private data: detach the shared memory segment.


Detailed Description

X C Bindings VLC module common header.


Define Documentation

#define ORDER   XCB_IMAGE_ORDER_LSB_FIRST

Referenced by ParseFormat().


Typedef Documentation

typedef struct key_handler_t key_handler_t


Function Documentation

int CheckError ( vout_display_t ,
xcb_connection_t *  conn,
const char *  str,
xcb_void_cookie_t   
)

Check for an error.

References err, msg_Err, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by PictureResourceAlloc().

xcb_connection_t* Connect ( vlc_object_t obj  ) 

Connect to the X server.

References msg_Dbg, msg_Err, strndup(), and var_CreateGetNonEmptyString.

xcb_cursor_t CreateBlankCursor ( xcb_connection_t *  conn,
const xcb_screen_t *  scr 
)

Create a blank cursor.

Note that the pixmaps are leaked (until the X disconnection). Hence, this function should be called no more than once per X connection.

Parameters:
conn XCB connection
scr target XCB screen

key_handler_t* CreateKeyHandler ( vlc_object_t obj,
xcb_connection_t *  conn 
)

Create an X11 key event handler for a VLC window.

The caller shall arrange receiving applicable X11 events, and pass them to ProcessKeyEvent() later.

Parameters:
obj VLC object owning an X window
conn XCB connection to the X server (to fetch key mappings)
Returns:
NULL on error, or a key handling context.

References ctx, key_handler_t::obj, and key_handler_t::syms.

Referenced by EmOpen().

void DestroyKeyHandler ( key_handler_t  ) 

References key_handler_t::syms.

Referenced by EmOpen().

struct vout_window_t* GetWindow ( vout_display_t obj,
xcb_connection_t *  pconn,
const xcb_screen_t **restrict  pscreen,
bool *restrict  pshm 
) [read]

int GetWindowSize ( struct vout_window_t wnd,
xcb_connection_t *  conn,
unsigned *restrict  width,
unsigned *restrict  height 
)

Gets the size of an X window.

References vout_window_t::handle, and vout_window_t::xid.

int ManageEvent ( vout_display_t vd,
xcb_connection_t *  conn,
bool *   
)

Process incoming X events.

References msg_Err, ProcessEvent(), VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Manage().

int PictureResourceAlloc ( vout_display_t vd,
picture_resource_t res,
size_t  size,
xcb_connection_t *  conn,
bool  attach 
)

Initialize a picture buffer as shared memory, according to the video output format.

If a attach is true, the segment is attached to the X server (MIT-SHM extension).

References CheckError(), msg_Err, msg_Info, picture_resource_t::p, picture_resource_t::p_pixels, picture_resource_t::p_sys, picture_sys_t::segment, VLC_EGENERIC, and VLC_SUCCESS.

Referenced by Get().

void PictureResourceFree ( picture_resource_t res,
xcb_connection_t *  conn 
)

Release picture private data: detach the shared memory segment.

References picture_resource_t::p, picture_resource_t::p_pixels, picture_resource_t::p_sys, and picture_sys_t::segment.

Referenced by Get(), and ResetPictures().

int ProcessKeyEvent ( key_handler_t ctx,
xcb_generic_event_t *  ev 
)

Process an X11 event, convert into VLC hotkey event if applicable.

Parameters:
ctx key handler created with CreateKeyHandler()
ev XCB event to process
Returns:
0 if the event was handled and free()'d, non-zero otherwise

References ConvertKeySym(), KEY_MODIFIER_ALT, KEY_MODIFIER_COMMAND, KEY_MODIFIER_CTRL, KEY_MODIFIER_SHIFT, KEY_UNSET, msg_Dbg, key_handler_t::obj, vlc_object_t::p_libvlc, key_handler_t::syms, and var_SetInteger.

Referenced by Thread().


Generated on Sun Nov 22 08:05:52 2009 for VLC by  doxygen 1.5.6