forked from analogdevicesinc/iio-oscilloscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
osc_plugin.h
37 lines (29 loc) · 939 Bytes
/
osc_plugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Copyright (C) 2013 Analog Devices, Inc.
*
* Licensed under the GPL-2.
*
*/
#ifndef __OSC_PLUGIN_H__
#define __OSC_PLUGIN_H__
#include <gtk/gtk.h>
struct osc_plugin {
void *handle;
const char *name;
GThread *thd;
bool (*identify)(void);
GtkWidget * (*init)(GtkWidget *notebook, const char *ini_fn);
int (*handle_item) (int line, const char *attrib, const char *value);
int (*handle_external_request) (const char *request);
void (*update_active_page)(gint active_page, gboolean is_detached);
void (*get_preferred_size)(int *width, int *size);
void (*destroy)(const char *ini_fn);
void (*save_profile)(const char *ini_fn);
void (*load_profile)(const char *ini_fn);
};
void osc_plugin_register(const struct osc_plugin *plugin);
void * plugin_dlsym(const char *name, const char *symbol);
bool plugin_installed(const char *name);
extern GSList *plugin_list;
#define MATCH_ATTRIB(s) (strcmp(attrib, s) == 0)
#endif