~ubuntu-branches/debian/experimental/gtk+2.0/experimental

« back to all changes in this revision

Viewing changes to docs/faq/html/x642.html

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-12-23 03:09:40 UTC
  • mfrom: (1.13.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20101223030940-ctsv8mereipe1e2p
Tags: 2.23.3-1
* New upstream release.
  + debian/control.in:
    - Bump the libglib2.0-dev build requirement.
  + debian/patches/070_mandatory-relibtoolize.patch:
    - Refreshed.
  + debian/libgtk2.0-0.symbols:
    - Updated for the new symbols.
  + debian/rules:
    - Bump the shver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<HTML
3
 
><HEAD
4
 
><TITLE
5
 
>How could I get any widgets position?</TITLE
6
 
><META
7
 
NAME="GENERATOR"
8
 
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9
 
REL="HOME"
10
 
TITLE="GTK+ FAQ"
11
 
HREF="book1.html"><LINK
12
 
REL="UP"
13
 
TITLE="Development with GTK+: general questions"
14
 
HREF="c475.html"><LINK
15
 
REL="PREVIOUS"
16
 
TITLE="How do I reparent a widget?"
17
 
HREF="x635.html"><LINK
18
 
REL="NEXT"
19
 
TITLE="How do I set the size of a widget/window? How do I
20
 
prevent the user resizing my window? [GTK 2.x]"
21
 
HREF="x662.html"></HEAD
22
 
><BODY
23
 
CLASS="SECT1"
24
 
BGCOLOR="#FFFFFF"
25
 
TEXT="#000000"
26
 
LINK="#0000FF"
27
 
VLINK="#840084"
28
 
ALINK="#0000FF"
29
 
><DIV
30
 
CLASS="NAVHEADER"
31
 
><TABLE
32
 
SUMMARY="Header navigation table"
33
 
WIDTH="100%"
34
 
BORDER="0"
35
 
CELLPADDING="0"
36
 
CELLSPACING="0"
37
 
><TR
38
 
><TH
39
 
COLSPAN="3"
40
 
ALIGN="center"
41
 
>GTK+ FAQ</TH
42
 
></TR
43
 
><TR
44
 
><TD
45
 
WIDTH="10%"
46
 
ALIGN="left"
47
 
VALIGN="bottom"
48
 
><A
49
 
HREF="x635.html"
50
 
ACCESSKEY="P"
51
 
>&#60;&#60;&#60; Previous</A
52
 
></TD
53
 
><TD
54
 
WIDTH="80%"
55
 
ALIGN="center"
56
 
VALIGN="bottom"
57
 
>Development with GTK+: general questions</TD
58
 
><TD
59
 
WIDTH="10%"
60
 
ALIGN="right"
61
 
VALIGN="bottom"
62
 
><A
63
 
HREF="x662.html"
64
 
ACCESSKEY="N"
65
 
>Next &#62;&#62;&#62;</A
66
 
></TD
67
 
></TR
68
 
></TABLE
69
 
><HR
70
 
ALIGN="LEFT"
71
 
WIDTH="100%"></DIV
72
 
><DIV
73
 
CLASS="SECT1"
74
 
><H1
75
 
CLASS="SECT1"
76
 
><A
77
 
NAME="AEN642"
78
 
>How could I get any widgets position?</A
79
 
></H1
80
 
><P
81
 
>As Tim Janik pointed out, there are different cases, and
82
 
each case requires a different solution.</P
83
 
><P
84
 
></P
85
 
><UL
86
 
><LI
87
 
><P
88
 
> If you want the position of a widget
89
 
relative to its parent, you should use
90
 
<TT
91
 
CLASS="LITERAL"
92
 
>widget-&#62;allocation.x</TT
93
 
> and
94
 
<TT
95
 
CLASS="LITERAL"
96
 
>widget-&#62;allocation.y</TT
97
 
>.</P
98
 
></LI
99
 
><LI
100
 
><P
101
 
> If you want the position of a window
102
 
relative to the X root window, you should use
103
 
<TT
104
 
CLASS="LITERAL"
105
 
>gdk_window_get_geometry()</TT
106
 
>
107
 
<TT
108
 
CLASS="LITERAL"
109
 
>gdk_window_get_position()</TT
110
 
> or
111
 
<TT
112
 
CLASS="LITERAL"
113
 
>gdk_window_get_origin()</TT
114
 
>.</P
115
 
></LI
116
 
><LI
117
 
><P
118
 
> If you want to get the position of the
119
 
window (including the WM decorations), you should use
120
 
<TT
121
 
CLASS="LITERAL"
122
 
>gdk_window_get_root_origin()</TT
123
 
>.</P
124
 
></LI
125
 
><LI
126
 
><P
127
 
> Last but not least, if you want to get a Window
128
 
Manager frame position, you should use
129
 
<TT
130
 
CLASS="LITERAL"
131
 
>gdk_window_get_deskrelative_origin()</TT
132
 
>.</P
133
 
></LI
134
 
></UL
135
 
><P
136
 
>Your choice of Window Manager will have an effect of the
137
 
results of the above functions. You should keep this in mind
138
 
when writing your application. This is dependant upon how the
139
 
Window Managers manage the decorations that they add around
140
 
windows.</P
141
 
></DIV
142
 
><DIV
143
 
CLASS="NAVFOOTER"
144
 
><HR
145
 
ALIGN="LEFT"
146
 
WIDTH="100%"><TABLE
147
 
SUMMARY="Footer navigation table"
148
 
WIDTH="100%"
149
 
BORDER="0"
150
 
CELLPADDING="0"
151
 
CELLSPACING="0"
152
 
><TR
153
 
><TD
154
 
WIDTH="33%"
155
 
ALIGN="left"
156
 
VALIGN="top"
157
 
><A
158
 
HREF="x635.html"
159
 
ACCESSKEY="P"
160
 
>&#60;&#60;&#60; Previous</A
161
 
></TD
162
 
><TD
163
 
WIDTH="34%"
164
 
ALIGN="center"
165
 
VALIGN="top"
166
 
><A
167
 
HREF="book1.html"
168
 
ACCESSKEY="H"
169
 
>Home</A
170
 
></TD
171
 
><TD
172
 
WIDTH="33%"
173
 
ALIGN="right"
174
 
VALIGN="top"
175
 
><A
176
 
HREF="x662.html"
177
 
ACCESSKEY="N"
178
 
>Next &#62;&#62;&#62;</A
179
 
></TD
180
 
></TR
181
 
><TR
182
 
><TD
183
 
WIDTH="33%"
184
 
ALIGN="left"
185
 
VALIGN="top"
186
 
>How do I reparent a widget?</TD
187
 
><TD
188
 
WIDTH="34%"
189
 
ALIGN="center"
190
 
VALIGN="top"
191
 
><A
192
 
HREF="c475.html"
193
 
ACCESSKEY="U"
194
 
>Up</A
195
 
></TD
196
 
><TD
197
 
WIDTH="33%"
198
 
ALIGN="right"
199
 
VALIGN="top"
200
 
>How do I set the size of a widget/window? How do I
201
 
prevent the user resizing my window? <I
202
 
CLASS="EMPHASIS"
203
 
>[GTK 2.x]</I
204
 
></TD
205
 
></TR
206
 
></TABLE
207
 
></DIV
208
 
></BODY
209
 
></HTML
210
 
>
 
 
b'\\ No newline at end of file'