ncmpc  0.29
Data Structures | Functions
hscroll.h File Reference
#include "config.h"
#include "ncmpc_curses.h"
#include <glib.h>

Go to the source code of this file.

Data Structures

struct  hscroll
 

Functions

char * strscroll (struct hscroll *hscroll, const char *str, const char *separator, unsigned width)
 
void hscroll_set (struct hscroll *hscroll, unsigned x, unsigned y, unsigned width, const char *text)
 
void hscroll_clear (struct hscroll *hscroll)
 
void hscroll_draw (struct hscroll *hscroll)
 

Function Documentation

◆ strscroll()

char* strscroll ( struct hscroll hscroll,
const char *  str,
const char *  separator,
unsigned  width 
)

◆ hscroll_set()

void hscroll_set ( struct hscroll hscroll,
unsigned  x,
unsigned  y,
unsigned  width,
const char *  text 
)

Sets a text to scroll. This installs a timer which redraws every second with the current window attributes. Call hscroll_clear() to disable it. This function automatically removes the old text.

◆ hscroll_clear()

void hscroll_clear ( struct hscroll hscroll)

Removes the text and the timer. It may be reused with hscroll_set().

◆ hscroll_draw()

void hscroll_draw ( struct hscroll hscroll)

Explicitly draws the scrolled text. Calling this function is only allowed if there is a text currently.