NetSurf
Functions | Variables
clipboard.c File Reference

win32 clipboard implementation. More...

#include <windows.h>
#include "utils/log.h"
#include "netsurf/clipboard.h"
#include "windows/clipboard.h"
Include dependency graph for clipboard.c:

Go to the source code of this file.

Functions

static void gui_get_clipboard (char **buffer, size_t *length)
 Core asks front end for clipboard contents. More...
 
static void gui_set_clipboard (const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles)
 Core tells front end to put given text in clipboard. More...
 

Variables

static struct gui_clipboard_table clipboard_table
 
struct gui_clipboard_tablewin32_clipboard_table = &clipboard_table
 The clipboard operation function table for win32. More...
 

Detailed Description

win32 clipboard implementation.

Definition in file clipboard.c.

Function Documentation

◆ gui_get_clipboard()

static void gui_get_clipboard ( char **  buffer,
size_t *  length 
)
static

Core asks front end for clipboard contents.

Parameters
bufferUTF-8 text, allocated by front end, ownership yeilded to core
lengthByte length of UTF-8 text in buffer

Definition at line 37 of file clipboard.c.

References buffer.

◆ gui_set_clipboard()

static void gui_set_clipboard ( const char *  buffer,
size_t  length,
nsclipboard_styles  styles[],
int  n_styles 
)
static

Core tells front end to put given text in clipboard.

Parameters
bufferUTF-8 text, owned by core
lengthByte length of UTF-8 text in buffer
stylesArray of styles given to text runs, owned by core, or NULL
n_stylesNumber of text run styles in array

Definition at line 91 of file clipboard.c.

References buffer.

Variable Documentation

◆ clipboard_table

struct gui_clipboard_table clipboard_table
static
Initial value:
= {
}
static void gui_set_clipboard(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles)
Core tells front end to put given text in clipboard.
Definition: clipboard.c:91
static void gui_get_clipboard(char **buffer, size_t *length)
Core asks front end for clipboard contents.
Definition: clipboard.c:37

Definition at line 126 of file clipboard.c.

◆ win32_clipboard_table

struct gui_clipboard_table* win32_clipboard_table = &clipboard_table

The clipboard operation function table for win32.

Definition at line 131 of file clipboard.c.

Referenced by WinMain().