Contiki 2.5
Functions
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. More...
 
struct vnc_server_update * vnc_server_update_alloc (struct vnc_server_state *vs)
 Allocate an update request from the VNC connection state. More...
 
void vnc_server_update_free (struct vnc_server_state *vs, struct vnc_server_update *a)
 Deallocate an update request from the VNC connection state. More...
 
struct vnc_server_update * vnc_server_update_dequeue (struct vnc_server_state *vs)
 Dequeue the first update on the queue of updates. More...
 
void vnc_server_update_remove (struct vnc_server_state *vs, struct vnc_server_update *a)
 Remove a specific update on the queue of updates. More...
 
void ctk_draw_init (void)
 Initialize the VNC ctk-draw module. More...
 
void ctk_draw_widget (struct ctk_widget *w, unsigned char focus, unsigned char clipy1, unsigned char clipy2)
 Draw a widget on the VNC screen. More...
 
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. More...
 
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. More...
 
void ctk_draw_dialog (struct ctk_window *dialog)
 Draw a dialog on the VNC screen. More...
 
void ctk_draw_clear (unsigned char y1, unsigned char y2)
 Clear parts of the VNC desktop. More...
 
void ctk_draw_menus (struct ctk_menus *menus)
 Draw the menus on the virtual VNC desktop. More...
 
unsigned char ctk_draw_height (void)
 Obtain the height of the VNC desktop. More...
 
unsigned char ctk_draw_width (void)
 Obtain the height of the VNC desktop. More...
 
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. More...
 
unsigned char ctk_arch_keyavail (void)
 Checks the key press input queue to see if there are pending keys. More...
 
ctk_arch_key_t ctk_arch_getkey (void)
 Retrieves key presses from the VNC client. More...
 

Detailed Description

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
cThe character to be drawn.
xposThe x position of the character.
yposThe y position of the character.
reversedflagDetermines if the character should be reversed or not.
colorThe 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
y1The lower y coordinate bound.
y2The 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
windowThe window to be cleared.
focusThe focus of the window.
clipy1The lower y coordinate bound.
clipy2The 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
dialogThe dialog to be drawn.

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

References CTK_FOCUS_DIALOG, ctk_window::h, ctk_window::w, ctk_widget::x, and ctk_widget::y.

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
menusThe CTK menubar.

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

References ctk_menus::desktopmenu, ctk_menus::menus, ctk_menu::next, NULL, 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
wThe widget to be drawn.
focusThe focus of the widget.
clipy1The lower y coordinate bound.
clipy2The 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
windowThe window to be drawn.
focusThe focus of the window.
clipy1The lower y coordinate bound.
clipy2The upper y coordinate bound.
draw_bordersThe flag for border drawing.

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

References ctk_widget::h, ctk_window::h, ctk_window::titlelen, ctk_window::w, ctk_widget::x, and ctk_widget::y.

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
vsThe VNC connection state.
aThe 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
vsThe 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.

References NULL.

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
vsThe 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.

References NULL.

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
vsThe VNC connection state.
aThe 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
vsThe VNC connection state.
aThe update to be removed.

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