GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
shoes / shoes / world.h
100644 64 lines (54 sloc) 1.422 kb
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// shoes/world.h
//
// The shoes_world struct contains global information about the environment which is shared between
// app windows.
//
#ifndef SHOES_WORLD_H
#define SHOES_WORLD_H
 
#include "shoes/config.h"
#include "shoes/ruby.h"
#include "shoes/code.h"
 
#ifdef __cplusplus
extern "C" {
#endif
 
SHOES_EXTERN typedef struct _shoes_world_t {
  SHOES_WORLD_OS os;
  int mainloop;
  char path[SHOES_BUFSIZE];
  VALUE apps, msgs;
  st_table *image_cache;
  guint thread_event;
  cairo_surface_t *blank_image;
  shoes_cached_image *blank_cache;
  PangoFontDescription *default_font;
#ifdef VLC_0_9
  libvlc_instance_t *vlc;
#endif
} shoes_world_t;
 
extern SHOES_EXTERN shoes_world_t *shoes_world;
 
#define GLOBAL_APP(appvar) \
  shoes_app *appvar = NULL; \
  if (RARRAY_LEN(shoes_world->apps) > 0) \
    Data_Get_Struct(rb_ary_entry(shoes_world->apps, 0), shoes_app, appvar)
 
//
// Shoes World
//
SHOES_EXTERN shoes_world_t *shoes_world_alloc(void);
SHOES_EXTERN void shoes_world_free(shoes_world_t *);
void shoes_update_fonts(VALUE);
 
//
// Shoes
//
SHOES_EXTERN shoes_code shoes_init(SHOES_INIT_ARGS);
SHOES_EXTERN shoes_code shoes_load(char *);
SHOES_EXTERN shoes_code shoes_start(char *, char *);
#ifdef SHOES_WIN32
SHOES_EXTERN int shoes_win32_cmdvector(const char *, char ***);
#endif
SHOES_EXTERN void shoes_set_argv(int, char **);
SHOES_EXTERN shoes_code shoes_final(void);
 
#ifdef __cplusplus
}
#endif
 
#endif