Add log dump
[lash.git] / lash / client_interface_new.h
blob5493aa783242b3f2a4d440184dca8802f07b30db
1 /*
2 * LASH
4 * Copyright (C) 2008 Juuso Alasuutari <juuso.alasuutari@gmail.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __LASH_CLIENT_INTERFACE_NEW_H_
22 #define __LASH_CLIENT_INTERFACE_NEW_H_
24 #include <stdbool.h>
25 #include <lash/types.h>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 lash_client_t *
32 lash_client_open(const char *client_class,
33 int flags,
34 int argc,
35 char **argv);
37 const char *
38 lash_get_client_name(lash_client_t *client);
40 const char *
41 lash_get_project_name(lash_client_t *client);
43 bool
44 lash_client_is_being_restored(lash_client_t *client);
46 /**
47 * Set the Save callback function.
49 bool
50 lash_set_save_callback(lash_client_t *client,
51 LashEventCallback callback,
52 void *user_data);
54 /**
55 * Set the Load callback function.
57 bool
58 lash_set_load_callback(lash_client_t *client,
59 LashEventCallback callback,
60 void *user_data);
62 /**
63 * Set the SaveDataSet callback function.
65 bool
66 lash_set_save_data_set_callback(lash_client_t *client,
67 LashConfigCallback callback,
68 void *user_data);
70 /**
71 * Set the LoadDataSet callback function.
73 bool
74 lash_set_load_data_set_callback(lash_client_t *client,
75 LashConfigCallback callback,
76 void *user_data);
78 /**
79 * Set the Quit callback function
81 bool
82 lash_set_quit_callback(lash_client_t *client,
83 LashEventCallback callback,
84 void *user_data);
86 /**
87 * Set the ClientNameChanged callback function
89 bool
90 lash_set_name_change_callback(lash_client_t *client,
91 LashEventCallback callback,
92 void *user_data);
94 /**
95 * Set the ProjectChange callback function
97 bool
98 lash_set_project_change_callback(lash_client_t *client,
99 LashEventCallback callback,
100 void *user_data);
103 * Set the PathChange callback function
105 bool
106 lash_set_path_change_callback(lash_client_t *client,
107 LashEventCallback callback,
108 void *user_data);
110 void
111 lash_wait(lash_client_t *client);
113 void
114 lash_dispatch(lash_client_t *client);
116 bool
117 lash_dispatch_once(lash_client_t *client);
119 void
120 lash_notify_progress(lash_client_t *client,
121 uint8_t percentage);
123 lash_client_t *
124 lash_client_open_controller(void);
127 * Set the controller callback function.
129 bool
130 lash_set_control_callback(lash_client_t *client,
131 LashControlCallback callback,
132 void *user_data);
134 void
135 lash_control_load_project_path(lash_client_t *client,
136 const char *project_path);
138 void
139 lash_control_name_project(lash_client_t *client,
140 const char *project_name,
141 const char *new_name);
143 void
144 lash_control_move_project(lash_client_t *client,
145 const char *project_name,
146 const char *new_path);
148 void
149 lash_control_save_project(lash_client_t *client,
150 const char *project_name);
152 void
153 lash_control_close_project(lash_client_t *client,
154 const char *project_name);
157 #ifdef __cplusplus
159 #endif
162 #endif /* __LASH_CLIENT_INTERFACE_NEW_H_ */