Guitarix
|
#include <lo/lo.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
Classes | |
struct | _nsm_client_t |
Macros | |
#define | NSM_API_VERSION_MAJOR 1 |
#define | NSM_API_VERSION_MINOR 0 |
#define | _NSM() ((struct _nsm_client_t*)nsm) |
#define | NSM_EXPORT __attribute__((unused)) static |
#define | OSC_REPLY(value) lo_send_from( ((struct _nsm_client_t*)user_data)->nsm_addr, ((struct _nsm_client_t*)user_data)->_server, LO_TT_IMMEDIATE, "/reply", "ss", path, value ) |
#define | OSC_REPLY_ERR(errcode, value) lo_send_from( ((struct _nsm_client_t*)user_data)->nsm_addr, ((struct _nsm_client_t*)user_data)->_server, LO_TT_IMMEDIATE, "/error", "sis", path, errcode, value ) |
Typedefs | |
typedef void * | nsm_client_t |
typedef int() | nsm_open_callback(const char *name, const char *display_name, const char *client_id, char **out_msg, void *userdata) |
typedef int() | nsm_save_callback(char **out_msg, void *userdata) |
typedef void() | nsm_show_gui_callback(void *userdata) |
typedef void() | nsm_hide_gui_callback(void *userdata) |
typedef void() | nsm_active_callback(int b, void *userdata) |
typedef void() | nsm_session_is_loaded_callback(void *userdata) |
typedef int() | nsm_broadcast_callback(const char *, lo_message m, void *userdata) |
Enumerations | |
enum | { ERR_OK = 0 , ERR_GENERAL = -1 , ERR_INCOMPATIBLE_API = -2 , ERR_BLACKLISTED = -3 , ERR_LAUNCH_FAILED = -4 , ERR_NO_SUCH_FILE = -5 , ERR_NO_SESSION_OPEN = -6 , ERR_UNSAVED_CHANGES = -7 , ERR_NOT_NOW = -8 } |
Functions | |
NSM_EXPORT int | nsm_is_active (nsm_client_t *nsm) |
NSM_EXPORT const char * | nsm_get_session_manager_name (nsm_client_t *nsm) |
NSM_EXPORT const char * | nsm_get_session_manager_features (nsm_client_t *nsm) |
NSM_EXPORT nsm_client_t * | nsm_new (void) |
NSM_EXPORT void | nsm_send_is_dirty (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_send_is_clean (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_send_is_shown (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_send_is_hidden (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_send_progress (nsm_client_t *nsm, float p) |
NSM_EXPORT void | nsm_send_message (nsm_client_t *nsm, int priority, const char *msg) |
NSM_EXPORT void | nsm_send_announce (nsm_client_t *nsm, const char *app_name, const char *capabilities, const char *process_name) |
NSM_EXPORT void | nsm_send_broadcast (nsm_client_t *nsm, lo_message msg) |
NSM_EXPORT void | nsm_check_wait (nsm_client_t *nsm, int timeout) |
NSM_EXPORT void | nsm_check_nowait (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_thread_start (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_thread_stop (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_free (nsm_client_t *nsm) |
NSM_EXPORT void | nsm_set_open_callback (nsm_client_t *nsm, nsm_open_callback *open_callback, void *userdata) |
NSM_EXPORT void | nsm_set_save_callback (nsm_client_t *nsm, nsm_save_callback *save_callback, void *userdata) |
NSM_EXPORT void | nsm_set_show_callback (nsm_client_t *nsm, nsm_show_gui_callback *show_callback, void *userdata) |
NSM_EXPORT void | nsm_set_hide_callback (nsm_client_t *nsm, nsm_hide_gui_callback *hide_callback, void *userdata) |
NSM_EXPORT void | nsm_set_active_callback (nsm_client_t *nsm, nsm_active_callback *active_callback, void *userdata) |
NSM_EXPORT void | nsm_set_session_is_loaded_callback (nsm_client_t *nsm, nsm_session_is_loaded_callback *session_is_loaded_callback, void *userdata) |
NSM_EXPORT void | nsm_set_broadcast_callback (nsm_client_t *nsm, nsm_broadcast_callback *broadcast_callback, void *userdata) |
NSM_EXPORT int | _nsm_osc_open (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_save (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_announce_reply (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_error (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_session_is_loaded (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_show (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_hide (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | _nsm_osc_broadcast (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data) |
NSM_EXPORT int | nsm_init (nsm_client_t *nsm, const char *nsm_url) |
NSM_EXPORT int | nsm_init_thread (nsm_client_t *nsm, const char *nsm_url) |
#define _NSM | ( | ) | ((struct _nsm_client_t*)nsm) |
#define OSC_REPLY | ( | value | ) | lo_send_from( ((struct _nsm_client_t*)user_data)->nsm_addr, ((struct _nsm_client_t*)user_data)->_server, LO_TT_IMMEDIATE, "/reply", "ss", path, value ) |
#define OSC_REPLY_ERR | ( | errcode, | |
value | |||
) | lo_send_from( ((struct _nsm_client_t*)user_data)->nsm_addr, ((struct _nsm_client_t*)user_data)->_server, LO_TT_IMMEDIATE, "/error", "sis", path, errcode, value ) |
typedef int() nsm_broadcast_callback(const char *, lo_message m, void *userdata) |
typedef void* nsm_client_t |
typedef int() nsm_open_callback(const char *name, const char *display_name, const char *client_id, char **out_msg, void *userdata) |
typedef int() nsm_save_callback(char **out_msg, void *userdata) |
anonymous enum |
NSM_EXPORT int _nsm_osc_announce_reply | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 465 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_broadcast | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 556 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_error | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 490 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_hide | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 543 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_open | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 410 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_save | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 438 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_session_is_loaded | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 512 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT int _nsm_osc_show | ( | const char * | path, |
const char * | types, | ||
lo_arg ** | argv, | ||
int | argc, | ||
lo_message | msg, | ||
void * | user_data | ||
) |
Definition at line 530 of file nsm.h.
Referenced by nsm_init(), and nsm_init_thread().
NSM_EXPORT void nsm_check_nowait | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT void nsm_check_wait | ( | nsm_client_t * | nsm, |
int | timeout | ||
) |
Definition at line 284 of file nsm.h.
Referenced by nsm_check_nowait().
NSM_EXPORT void nsm_free | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT const char * nsm_get_session_manager_features | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT const char * nsm_get_session_manager_name | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT int nsm_init | ( | nsm_client_t * | nsm, |
const char * | nsm_url | ||
) |
NSM_EXPORT int nsm_init_thread | ( | nsm_client_t * | nsm, |
const char * | nsm_url | ||
) |
NSM_EXPORT int nsm_is_active | ( | nsm_client_t * | nsm | ) |
Definition at line 150 of file nsm.h.
Referenced by nsm_send_broadcast(), nsm_send_is_clean(), nsm_send_is_dirty(), nsm_send_is_hidden(), nsm_send_is_shown(), nsm_send_message(), and nsm_send_progress().
NSM_EXPORT nsm_client_t * nsm_new | ( | void | ) |
NSM_EXPORT void nsm_send_announce | ( | nsm_client_t * | nsm, |
const char * | app_name, | ||
const char * | capabilities, | ||
const char * | process_name | ||
) |
NSM_EXPORT void nsm_send_broadcast | ( | nsm_client_t * | nsm, |
lo_message | msg | ||
) |
NSM_EXPORT void nsm_send_is_clean | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT void nsm_send_is_dirty | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT void nsm_send_is_hidden | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT void nsm_send_is_shown | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT void nsm_send_message | ( | nsm_client_t * | nsm, |
int | priority, | ||
const char * | msg | ||
) |
NSM_EXPORT void nsm_send_progress | ( | nsm_client_t * | nsm, |
float | p | ||
) |
NSM_EXPORT void nsm_set_active_callback | ( | nsm_client_t * | nsm, |
nsm_active_callback * | active_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_set_broadcast_callback | ( | nsm_client_t * | nsm, |
nsm_broadcast_callback * | broadcast_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_set_hide_callback | ( | nsm_client_t * | nsm, |
nsm_hide_gui_callback * | hide_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_set_open_callback | ( | nsm_client_t * | nsm, |
nsm_open_callback * | open_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_set_save_callback | ( | nsm_client_t * | nsm, |
nsm_save_callback * | save_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_set_session_is_loaded_callback | ( | nsm_client_t * | nsm, |
nsm_session_is_loaded_callback * | session_is_loaded_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_set_show_callback | ( | nsm_client_t * | nsm, |
nsm_show_gui_callback * | show_callback, | ||
void * | userdata | ||
) |
NSM_EXPORT void nsm_thread_start | ( | nsm_client_t * | nsm | ) |
NSM_EXPORT void nsm_thread_stop | ( | nsm_client_t * | nsm | ) |
Definition at line 308 of file nsm.h.
Referenced by nsm_free().