Commit Graph

17 Commits

Author SHA1 Message Date
Frediano Ziglio
e0b395fb68 Declare exported functions as C
Allows to be used by both C and C++ code.
So to leave part of the code in C and part move to C++.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:08 +01:00
Christophe Fergeau
bc5326b1ce Unify header guards
This changes the header guards in all .h files to follow this format:

/*
 * Licensing block
 */

/* ... */

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-03-30 18:17:20 +01:00
Jonathon Jongsma
b3c96d6ab3 DisplayChannel: start documenting drawable tree
The code that manages pending QXL Drawable operations is fairly complex
and difficult to understand. This is an attempt to start documenting
that code to save time when we have to work on this code in the future.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-03-09 12:01:35 -06:00
Christophe Fergeau
6377b72d44 Use bool rather than int return values when appropriate
This commit changes all functions returning TRUE/FALSE from having an
'int' return value to 'bool'.
This way it's obvious that such a function is not going to return
anything else than TRUE or FALSE.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-03-09 18:39:29 +01:00
Jonathon Jongsma
43f62e46ca Shadow: remove unused 'owner' field
This field is set but is never read. The only usage of this field was
removed in 3dffeb25ed

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-02-06 10:12:15 +00:00
Frediano Ziglio
02adcf354e Introduce SPICE_UPCAST macro
This was proposed by Christophe as improvement over some typesafe
patches.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-24 18:00:51 +01:00
Frediano Ziglio
70f04bdab3 Get code more typesafe
Scan remaining code searching for problems with structure
layout assumptions in the code.
Where code required some restructuring put some verify checks
to make sure code won't compile if these assumptions are not
in place anymore.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-05-21 04:14:13 +01:00
Frediano Ziglio
4585fa9cbd unify header include order
Use this style for include headers inside headers:

  #include <system_headers.h>
  #include <no_spice_no_system_libraries.h>
  #include <spice_protocol.h>
  #include <spice_common.h>

  #include "spice_server.h"

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-12 11:02:54 +01:00
Frediano Ziglio
1e4800507b use #include<> style for spice-common header inclusions.
The include directory is specified with the -I which is the directory
used directly by #include<>.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-09 12:45:27 +01:00
Jonathon Jongsma
5897952f46 Move some tree item functions to tree.[ch]
Also rename some functions slightly:
     __find_shadow -> tree_item_find_shadow()
     __contained_by -> tree_item_contained_by()
     ring_of -> tree_item_container_items();

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-17 17:22:05 +00:00
Marc-André Lureau
120c9ae38b worker: move some tree container functions
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-12 12:26:47 +00:00
Jonathon Jongsma
0e7617e51f worker: Move is_opaque_item() to tree.h
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-11 11:59:58 +00:00
Marc-André Lureau
e76f402952 worker: move shadow_new() and container_new()
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 10:10:40 +00:00
Marc-André Lureau
81cf3997db worker: minor simplification
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-05 11:13:25 +00:00
Marc-André Lureau
5f1bdb2166 worker: Move some dpi code to display channel
This commit moves some DrawablePipeItem declarations to
display-channel.h, though the function implementations remain in
red_worker.c until they can be disentangled some more.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-04 13:03:53 +00:00
Marc-André Lureau
23e17c2fc9 server: move bitmap related to spice-bitmap-utils
Also remove some unused function parameters from
bitmap_get_graduality_level()

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-03 16:32:26 +00:00
Marc-André Lureau
372eb0072a tree: move that to a separate unit
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-02 12:12:14 +00:00