Freeciv-3.3
Loading...
Searching...
No Matches
gui_main.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <stdio.h>
19
20/* utility */
21#include "fc_cmdline.h"
22#include "fciconv.h"
23#include "log.h"
24
25/* gui main header */
26#include "gui_stub.h"
27
28/* client */
29#include "gui_cbsetter.h"
30#include "client_main.h"
31#include "editgui_g.h"
32#include "options.h"
33
34#include "gui_main.h"
35
36const char *client_string = "gui-stub";
37
38const char * const gui_character_encoding = "UTF-8";
40
41/**********************************************************************/
44void gui_ui_init(void)
45{
46 /* PORTME */
47}
48
49/**********************************************************************/
52int main(int argc, char **argv)
53{
55 return client_main(argc, argv, FALSE);
56}
57
58/**********************************************************************/
62static void print_usage(const char *argv0)
63{
64 /* PORTME */
65 /* add client-specific usage information here */
67 _("This client has no special command line options\n\n"));
68
69 /* TRANS: No full stop after the URL, could cause confusion. */
70 fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
71}
72
73/**********************************************************************/
76static bool parse_options(int argc, char **argv)
77{
78 int i = 1;
79
80 while (i < argc) {
81 if (is_option("--help", argv[i])) {
82 print_usage(argv[0]);
83
84 return FALSE;
85 } else {
86 fc_fprintf(stderr, _("Unrecognized option: \"%s\"\n"), argv[i]);
88 }
89
90 i++;
91 }
92
93 return TRUE;
94}
95
96/**********************************************************************/
100int gui_ui_main(int argc, char *argv[])
101{
102 if (parse_options(argc, argv)) {
103 /* PORTME */
104 fc_fprintf(stderr, "Freeciv rules!\n");
105
106 /* Main loop here */
107
109 }
110
111 return EXIT_SUCCESS;
112}
113
114/**********************************************************************/
118{
119 /* Nothing to do. */
120}
121
122/**********************************************************************/
125void gui_ui_exit(void)
126{
127 /* PORTME */
128}
129
130/**********************************************************************/
133enum gui_type gui_get_gui_type(void)
134{
135 return GUI_STUB;
136}
137
138/**********************************************************************/
142{
143 /* PORTME */
144}
145
146/**********************************************************************/
151{
152 /* PORTME */
153}
154
155/**********************************************************************/
162void gui_add_net_input(int sock)
163{
164 /* PORTME */
165}
166
167/**********************************************************************/
173{
174 /* PORTME */
175}
176
177/**********************************************************************/
188void gui_set_unit_icon(int idx, struct unit *punit)
189{
190 /* PORTME */
191}
192
193/**********************************************************************/
201{
202 /* PORTME */
203}
204
205/**********************************************************************/
211{
212 /* PORTME */
213}
214
215/**********************************************************************/
220void gui_add_idle_callback(void (callback)(void *), void *data)
221{
222 /* PORTME */
223
224 /* This is a reasonable fallback if it's not ported. */
225 log_error("Unimplemented add_idle_callback.");
226 (callback)(data);
227}
228
229/**********************************************************************/
234
235/**********************************************************************/
239{}
240
241/**********************************************************************/
244void gui_editgui_popup_properties(const struct tile_list *tiles, int objtype)
245{}
246
247/**********************************************************************/
251{}
252
253/**********************************************************************/
257 bool removal)
258{}
259
260/**********************************************************************/
264{}
265
266/**********************************************************************/
269void gui_gui_update_font(const char *font_name, const char *font_value)
270{
271 /* PORTME */
272}
273
274/**********************************************************************/
278{
279 /* PORTME */
280}
281
282/**********************************************************************/
286{
287 /* PORTME */
288}
int client_main(int argc, char *argv[], bool postpone_tileset)
void start_quitting(void)
char * incite_cost
Definition comments.c:76
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
int objtype
Definition editgui_g.h:28
bool is_option(const char *option_name, char *option)
Definition fc_cmdline.c:112
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
#define _(String)
Definition fcintl.h:67
const char * client_string
Definition gui_main.c:106
static void print_usage(void)
Definition gui_main.c:266
int main(int argc, char **argv)
Definition gui_main.c:1766
const char *const gui_character_encoding
Definition gui_main.c:162
static bool parse_options(int argc, char **argv)
Definition gui_main.c:287
const bool gui_use_transliteration
Definition gui_main.c:163
void gui_real_conn_list_dialog_update(void *unused)
Definition gui_main.c:141
void gui_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.c:277
void gui_editgui_tileset_changed(void)
Definition gui_main.c:232
void gui_editgui_popdown_all(void)
Definition gui_main.c:250
void gui_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.c:188
void gui_sound_bell(void)
Definition gui_main.c:150
void gui_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.c:256
void gui_remove_net_input(void)
Definition gui_main.c:172
void gui_real_focus_units_changed(void)
Definition gui_main.c:210
void gui_add_net_input(int sock)
Definition gui_main.c:162
void gui_editgui_notify_object_created(int tag, int id)
Definition gui_main.c:263
void gui_ui_init(void)
Definition gui_main.c:44
enum gui_type gui_get_gui_type(void)
Definition gui_main.c:133
int gui_ui_main(int argc, char *argv[])
Definition gui_main.c:100
void gui_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.c:269
void gui_options_extra_init(void)
Definition gui_main.c:117
void gui_editgui_refresh(void)
Definition gui_main.c:238
void gui_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.c:220
void gui_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.c:200
void gui_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.c:244
void gui_ui_exit(void)
Definition gui_main.c:125
void gui_setup_gui_properties(void)
Definition gui_main.c:285
const char * font_name
Definition gui_main_g.h:43
#define log_error(message,...)
Definition log.h:104
void setup_gui_funcs()
Definition unit.h:140
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47