File: x_display.h

package info (click to toggle)
mlterm 3.1.2-1.3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 23,168 kB
  • sloc: ansic: 102,795; sh: 9,676; java: 2,018; perl: 1,601; makefile: 1,595; cpp: 771; sed: 16
file content (105 lines) | stat: -rw-r--r-- 2,159 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
 *	$Id$
 */

#ifndef  __X_DISPLAY_H__
#define  __X_DISPLAY_H__


#include  <kiklib/kik_types.h>		/* u_int */

#include  "x.h"
#include  "x_gc.h"


/* Defined in x_window.h */
typedef struct  x_window *  x_window_ptr_t ;

typedef struct  x_modifier_mapping
{
	u_long  serial ;
	XModifierKeymap *  map ;

} x_modifier_mapping_t ;

typedef struct  x_display
{
	/*
	 * Public(read only)
	 */
	Display *  display ;	/* Don't change position, which pixmap_engine depends on. */
	int  screen ;		/* DefaultScreen */
	char *  name ;

	Window  my_window ;	/* DefaultRootWindow */

#ifndef  USE_WIN32GUI
	/* Only one visual, colormap or depth is permitted per display. */
	Visual *  visual ;
	Colormap  colormap ;
#endif
	u_int  depth ;
	x_gc_t *  gc ;

	u_int  width ;
	u_int  height ;

	/*
	 * Private
	 */
	x_window_ptr_t *  roots ;
	u_int  num_of_roots ;

	x_window_ptr_t  selection_owner ;

	x_modifier_mapping_t  modmap ;

#ifndef  USE_WIN32GUI
	Cursor  cursors[3] ;
#endif

} x_display_t ;


x_display_t *  x_display_open( char *  disp_name , u_int  depth) ;

int  x_display_close( x_display_t *  disp) ;

int  x_display_close_all(void) ;

x_display_t **  x_get_opened_displays( u_int *  num) ;

int  x_display_fd( x_display_t *  disp) ;

int  x_display_show_root( x_display_t *  disp , x_window_ptr_t  root ,
	int  x , int  y , int  hint , char *  app_name , Window  parent_window) ;

int  x_display_remove_root( x_display_t *  disp , x_window_ptr_t  root) ;

void  x_display_idling( x_display_t *  disp) ;

int  x_display_receive_next_event( x_display_t *  disp) ;


/*
 * Folloing functions called from x_window.c
 */

int  x_display_own_selection( x_display_t *  disp , x_window_ptr_t  win) ;

int  x_display_clear_selection( x_display_t *  disp , x_window_ptr_t  win) ;

XModifierKeymap *  x_display_get_modifier_mapping( x_display_t *  disp) ;

#ifndef  USE_WIN32GUI
Cursor  x_display_get_cursor( x_display_t *  disp , u_int  shape) ;

XVisualInfo *  x_display_get_visual_info( x_display_t *  disp) ;
#endif

void  x_display_update_modifier_mapping( x_display_t *  disp ,	u_int  serial) ;

XID  x_display_get_group_leader( x_display_t *  disp) ;


#endif