The CTK VNC server

Functions

void vnc_server_update_add (struct vnc_server_state *vs, struct vnc_server_update *a)
 Add an update request from a client to the list of pending updates for the connection.
struct vnc_server_update * vnc_server_update_alloc (struct vnc_server_state *vs)
 Allocate an update request from the VNC connection state.
void vnc_server_update_free (struct vnc_server_state *vs, struct vnc_server_update *a)
 Deallocate an update request from the VNC connection state.
struct vnc_server_update * vnc_server_update_dequeue (struct vnc_server_state *vs)
 Dequeue the first update on the queue of updates.
void vnc_server_update_remove (struct vnc_server_state *vs, struct vnc_server_update *a)
 Remove a specific update on the queue of updates.
void ctk_draw_init (void)
 Initialize the VNC ctk-draw module.
void ctk_draw_widget (struct ctk_widget *w, unsigned char focus, unsigned char clipy1, unsigned char clipy2)
 Draw a widget on the VNC screen.
void ctk_draw_clear_window (struct ctk_window *window, unsigned char focus, unsigned char clipy1, unsigned char clipy2)
 Clear a window on the VNC screen.
void ctk_draw_window (struct ctk_window *window, unsigned char focus, unsigned char clipy1, unsigned char clipy2, unsigned char draw_borders)
 Draw a window on the VNC screen.
void ctk_draw_dialog (struct ctk_window *dialog)
 Draw a dialog on the VNC screen.
void ctk_draw_clear (unsigned char y1, unsigned char y2)
 Clear parts of the VNC desktop.
void ctk_draw_menus (struct ctk_menus *menus)
 Draw the menus on the virtual VNC desktop.
unsigned char ctk_draw_height (void)
 Obtain the height of the VNC desktop.
unsigned char ctk_draw_width (void)
 Obtain the height of the VNC desktop.
void ctk_arch_draw_char (char c, unsigned char xpos, unsigned char ypos, unsigned char reversedflag, unsigned char color)
 Draws a character on the virtual VNC screen.
unsigned char ctk_arch_keyavail (void)
 Checks the key press input queue to see if there are pending keys.
ctk_arch_key_t ctk_arch_getkey (void)
 Retrieves key presses from the VNC client.

Function Documentation

void ctk_arch_draw_char ( char  c,
unsigned char  xpos,
unsigned char  ypos,
unsigned char  reversedflag,
unsigned char  color 
)

Draws a character on the virtual VNC screen.

Called by the libconio module.

Parameters:
c The character to be drawn.
xpos The x position of the character.
ypos The y position of the character.
reversedflag Determines if the character should be reversed or not.
color The color of the character.

Definition at line 1005 of file ctk-vncserver.c.

ctk_arch_key_t ctk_arch_getkey ( void   ) 

Retrieves key presses from the VNC client.

Called by the CTK module.

Returns:
The next key in the input queue.

Definition at line 1040 of file ctk-vncserver.c.

unsigned char ctk_arch_keyavail ( void   ) 

Checks the key press input queue to see if there are pending keys.

Called by the CTK module.

Returns:
Zero if no key presses are in buffer, non-zero if there are key presses in input buffer.

Definition at line 1027 of file ctk-vncserver.c.

void ctk_draw_clear ( unsigned char  y1,
unsigned char  y2 
)

Clear parts of the VNC desktop.

Clear the screen between the clip bounds.

Called by the CTK module.

Parameters:
y1 The lower y coordinate bound.
y2 The upped y coordinate bound.

Definition at line 819 of file ctk-vncserver.c.

void ctk_draw_clear_window ( struct ctk_window window,
unsigned char  focus,
unsigned char  clipy1,
unsigned char  clipy2 
)

Clear a window on the VNC screen.

Draw the window background.

Called by the CTK module.

Parameters:
window The window to be cleared.
focus The focus of the window.
clipy1 The lower y coordinate bound.
clipy2 The upper y coordinate bound.

Definition at line 593 of file ctk-vncserver.c.

References ctk_window::h, and ctk_window::w.

void ctk_draw_dialog ( struct ctk_window dialog  ) 

Draw a dialog on the VNC screen.

Draw a dialog onto the screen.

Called by the CTK module.

Parameters:
dialog The dialog to be drawn.

Definition at line 754 of file ctk-vncserver.c.

References CTK_FOCUS_DIALOG, ctk_window::h, and ctk_window::w.

unsigned char ctk_draw_height ( void   ) 

Obtain the height of the VNC desktop.

Called by the CTK module.

Returns:
The height of the VNC desktop, in characters.

Definition at line 936 of file ctk-vncserver.c.

void ctk_draw_init ( void   ) 

Initialize the VNC ctk-draw module.

The initialization function.

Called by the CTK module.

Definition at line 316 of file ctk-vncserver.c.

References ctk_draw_clear().

void ctk_draw_menus ( struct ctk_menus menus  ) 

Draw the menus on the virtual VNC desktop.

Called by the CTK module.

Parameters:
menus The CTK menubar.

Definition at line 884 of file ctk-vncserver.c.

References ctk_menus::desktopmenu, ctk_menus::menus, ctk_menu::next, ctk_menus::open, and ctk_menu::title.

void ctk_draw_widget ( struct ctk_widget w,
unsigned char  focus,
unsigned char  clipy1,
unsigned char  clipy2 
)

Draw a widget on the VNC screen.

Draw a widget on a window.

Called by the CTK module.

Parameters:
w The widget to be drawn.
focus The focus of the widget.
clipy1 The lower y coordinate bound.
clipy2 The upper y coordinate bound.

Definition at line 541 of file ctk-vncserver.c.

References CTK_FOCUS_WIDGET, CTK_WIDGET_ICON, ctk_window::focused, ctk_widget::h, ctk_window::h, ctk_widget::type, ctk_widget::w, ctk_window::w, ctk_widget::window, ctk_widget::x, and ctk_widget::y.

unsigned char ctk_draw_width ( void   ) 

Obtain the height of the VNC desktop.

Called by the CTK module.

Returns:
The height of the VNC desktop, in characters.

Definition at line 948 of file ctk-vncserver.c.

void ctk_draw_window ( struct ctk_window window,
unsigned char  focus,
unsigned char  clipy1,
unsigned char  clipy2,
unsigned char  draw_borders 
)

Draw a window on the VNC screen.

Draw a window onto the screen.

Called by the CTK module.

Parameters:
window The window to be drawn.
focus The focus of the window.
clipy1 The lower y coordinate bound.
clipy2 The upper y coordinate bound.
draw_borders The flag for border drawing.

Definition at line 664 of file ctk-vncserver.c.

References ctk_window::h, ctk_window::titlelen, and ctk_window::w.

void vnc_server_update_add ( struct vnc_server_state *  vs,
struct vnc_server_update *  a 
)

Add an update request from a client to the list of pending updates for the connection.

This function is called from the vnc-out module.

Parameters:
vs The VNC connection state.
a The area that is requested to be updated.

Definition at line 139 of file ctk-vncserver.c.

struct vnc_server_update* vnc_server_update_alloc ( struct vnc_server_state *  vs  )  [read]

Allocate an update request from the VNC connection state.

This function is called from the vnc-out module.

Parameters:
vs The VNC connection state.
Returns:
Memory for an update structure, or NULL if no update could be allocated.

Definition at line 159 of file ctk-vncserver.c.

struct vnc_server_update* vnc_server_update_dequeue ( struct vnc_server_state *  vs  )  [read]

Dequeue the first update on the queue of updates.

This function is called from the vnc-out module.

Parameters:
vs The VNC connection state.
Returns:
The first update on the queue, or NULL if the queue is empty.

Definition at line 201 of file ctk-vncserver.c.

void vnc_server_update_free ( struct vnc_server_state *  vs,
struct vnc_server_update *  a 
)

Deallocate an update request from the VNC connection state.

This function is called from the vnc-out module.

Parameters:
vs The VNC connection state.
a The update structure to be deallocated.

Definition at line 183 of file ctk-vncserver.c.

void vnc_server_update_remove ( struct vnc_server_state *  vs,
struct vnc_server_update *  a 
)

Remove a specific update on the queue of updates.

Parameters:
vs The VNC connection state.
a The update to be removed.

Definition at line 222 of file ctk-vncserver.c.


Generated on Mon Apr 11 14:23:51 2011 for Contiki 2.5 by  doxygen 1.6.1