1 /*****************************************************************************
2 ** Copyright (C) 1998-2005 Ljubomir Milanovic & Horst Wagner
3 ** This file is part of the g2 library
5 ** This library is free software; you can redistribute it and/or
6 ** modify it under the terms of the GNU Lesser General Public
7 ** License as published by the Free Software Foundation; either
8 ** version 2.1 of the License, or (at your option) any later version.
10 ** This library is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ** Lesser General Public License for more details.
15 ** You should have received a copy of the GNU Lesser General Public
16 ** License along with this library; if not, write to the Free Software
17 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ******************************************************************************/
29 void *handles[G2_PD_HANDLES_SIZE];
35 d1=g2_open_X11(100, 100);
36 g2_line(d1, 10, 10, 90, 90);
38 g2_get_pd_handles(d1, handles);
40 drawable = handles[5];
43 printf("%p %p %p\n", display, drawable, gc);
45 XDrawString(display, *drawable, *gc,
50 d2=g2_open_PS("handles.ps", g2_A4, g2_PS_port);
51 g2_get_pd_handles(d2, handles);
52 printf("%p %p %p\n", handles[0], handles[1], handles[2]);