PIPS
xv_utils.c
Go to the documentation of this file.
1 /*
2 
3  $Id: xv_utils.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 #include <stdio.h>
28 #include <sys/types.h>
29 #include <sys/param.h>
30 
31 #include <sys/time.h>
32 #include <sys/resource.h>
33 #include <xview/xview.h>
34 #include <xview/panel.h>
35 
36 #include "genC.h"
37 #include "misc.h"
38 
39 #include "wpips.h"
40 
41 extern char *getwd();
42 
43 
44 
45 /* unmap a frame from the screen */
46 void hide_window(frame)
47 Frame frame;
48 {
49  xv_set(frame, XV_SHOW, FALSE, NULL);
50 }
51 
52 
53 
54 /* map a frame on the screen */
55 void unhide_window(frame)
56 Frame frame;
57 {
58  xv_set(frame, FRAME_CLOSED, FALSE, NULL);
59  xv_set(frame, XV_SHOW, TRUE, NULL);
60 }
61 
62 
63 /* Centre la souris sur une fene^tre : */
64 void pointer_in_center_of_frame(Frame frame)
65 {
66  Display *dpy;
67  Window xwindow;
68  Rect rect;
69 
70  dpy = (Display *)xv_get(main_frame, XV_DISPLAY);
71  xwindow = (Window) xv_get(frame, XV_XID);
72  frame_get_rect(frame, &rect);
73  XWarpPointer(dpy, None, xwindow, None, None, None, None,
74  rect.r_width/2, rect.r_height/2);
75 }
GtkWidget * main_frame
If we are in the Emacs mode, the log_frame is no longer really used:
Definition: gpips.c:60
void unhide_window(Frame frame)
map a frame on the screen
Definition: xv_utils.c:55
char * getwd()
void pointer_in_center_of_frame(Frame frame)
Centre la souris sur une fene^tre :
Definition: xv_utils.c:64
void hide_window(Frame frame)
unmap a frame from the screen
Definition: xv_utils.c:46