Freeciv-3.4
Toggle main menu visibility
Main Page
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Loading...
Searching...
No Matches
client
gui-gtk-4.0
graphics.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
#include <stdlib.h>
20
#include <string.h>
21
22
#include <gtk/gtk.h>
23
24
/* utility */
25
#include "
log.h
"
26
#include "
mem.h
"
27
#include "
shared.h
"
28
#include "
support.h
"
29
30
/* common */
31
#include "
game.h
"
32
#include "
movement.h
"
33
#include "
unit.h
"
34
#include "
version.h
"
35
36
/* client */
37
#include "
climisc.h
"
38
#include "
colors.h
"
39
#include "
mapview_g.h
"
40
#include "
options.h
"
41
#include "
tilespec.h
"
42
43
/* client/gui-gtk-4.0 */
44
#include "
gui_main.h
"
45
46
#include "
graphics.h
"
47
48
GdkCursor
*
fc_cursors
[
CURSOR_LAST
][
NUM_CURSOR_FRAMES
];
49
50
/***********************************************************************/
53
void
tileset_type_set
(
enum
ts_type
type
)
54
{
55
}
53
void
tileset_type_set
(
enum
ts_type
type
) {
…
}
56
57
#define COLOR_MOTTO_FACE_R 0x2D
58
#define COLOR_MOTTO_FACE_G 0x71
59
#define COLOR_MOTTO_FACE_B 0xE3
60
61
/***********************************************************************/
64
void
load_cursors
(
void
)
65
{
66
enum
cursor_type
cursor;
67
int
frame;
68
69
for
(cursor = 0; cursor <
CURSOR_LAST
; cursor++) {
70
for
(frame = 0; frame <
NUM_CURSOR_FRAMES
; frame++) {
71
int
hot_x, hot_y;
72
struct
sprite
*
sprite
73
=
get_cursor_sprite
(
tileset
, cursor, &hot_x, &hot_y, frame);
74
GdkPixbuf
*
pixbuf
=
sprite_get_pixbuf
(
sprite
);
75
GdkTexture
*
texture
=
gdk_texture_new_for_pixbuf
(
pixbuf
);
76
77
fc_cursors
[cursor][frame] =
gdk_cursor_new_from_texture
(
texture
, hot_x, hot_y,
NULL
);
78
g_object_unref
(
texture
);
79
g_object_unref
(
G_OBJECT
(
pixbuf
));
80
}
81
}
82
}
64
void
load_cursors
(
void
) {
…
}
BODYGUARD_NONE
@ BODYGUARD_NONE
Definition
aiguard.c:37
climisc.h
game.h
tileset_type_set
void tileset_type_set(enum ts_type type)
Definition
graphics.c:53
fc_cursors
GdkCursor * fc_cursors[CURSOR_LAST][NUM_CURSOR_FRAMES]
Definition
graphics.c:48
load_cursors
void load_cursors(void)
Definition
graphics.c:64
type
GType type
Definition
repodlgs.c:1313
sprite_get_pixbuf
GdkPixbuf * sprite_get_pixbuf(struct sprite *sprite)
Definition
sprite.c:402
colors.h
graphics.h
gui_main.h
log.h
mapview_g.h
mem.h
movement.h
options.h
shared.h
sprite
Definition
sprite.h:22
tileset
Definition
tilespec.c:501
support.h
get_cursor_sprite
struct sprite * get_cursor_sprite(const struct tileset *t, enum cursor_type cursor, int *hot_x, int *hot_y, int frame)
Definition
tilespec.c:7200
tilespec.h
NUM_CURSOR_FRAMES
#define NUM_CURSOR_FRAMES
Definition
tilespec.h:305
cursor_type
cursor_type
Definition
tilespec.h:289
CURSOR_LAST
@ CURSOR_LAST
Definition
tilespec.h:301
unit.h
version.h
Generated on Sun Mar 9 2025 22:30:09 for Freeciv-3.4 by
1.9.8