Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gtk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikita Churaev
gtk
Commits
4c530ae5
Commit
4c530ae5
authored
Dec 17, 1997
by
Elliot Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added root coords to button & motion events - sopwith
parent
13446699
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
22 deletions
+82
-22
gdk/gdk.c
gdk/gdk.c
+4
-0
gdk/gdktypes.h
gdk/gdktypes.h
+2
-0
gdk/x11/gdkmain-x11.c
gdk/x11/gdkmain-x11.c
+4
-0
gtk/gtkhandlebox.c
gtk/gtkhandlebox.c
+66
-19
gtk/gtkhandlebox.h
gtk/gtkhandlebox.h
+3
-1
ltconfig
ltconfig
+3
-2
No files found.
gdk/gdk.c
View file @
4c530ae5
...
...
@@ -1755,6 +1755,8 @@ gdk_event_translate (GdkEvent *event,
event
->
button
.
time
=
xevent
->
xbutton
.
time
;
event
->
button
.
x
=
xevent
->
xbutton
.
x
;
event
->
button
.
y
=
xevent
->
xbutton
.
y
;
event
->
button
.
x_root
=
xevent
->
xbutton
.
x_root
;
event
->
button
.
y_root
=
xevent
->
xbutton
.
y_root
;
event
->
button
.
pressure
=
0
.
5
;
event
->
button
.
xtilt
=
0
;
event
->
button
.
ytilt
=
0
;
...
...
@@ -1826,6 +1828,8 @@ gdk_event_translate (GdkEvent *event,
event
->
motion
.
time
=
xevent
->
xmotion
.
time
;
event
->
motion
.
x
=
xevent
->
xmotion
.
x
;
event
->
motion
.
y
=
xevent
->
xmotion
.
y
;
event
->
motion
.
x_root
=
xevent
->
xmotion
.
x_root
;
event
->
motion
.
y_root
=
xevent
->
xmotion
.
y_root
;
event
->
motion
.
pressure
=
0
.
5
;
event
->
motion
.
xtilt
=
0
;
event
->
motion
.
ytilt
=
0
;
...
...
gdk/gdktypes.h
View file @
4c530ae5
...
...
@@ -807,6 +807,7 @@ struct _GdkEventMotion
gint16
is_hint
;
GdkInputSource
source
;
guint32
deviceid
;
gdouble
x_root
,
y_root
;
};
struct
_GdkEventButton
...
...
@@ -823,6 +824,7 @@ struct _GdkEventButton
guint
button
;
GdkInputSource
source
;
guint32
deviceid
;
gdouble
x_root
,
y_root
;
};
struct
_GdkEventKey
...
...
gdk/x11/gdkmain-x11.c
View file @
4c530ae5
...
...
@@ -1755,6 +1755,8 @@ gdk_event_translate (GdkEvent *event,
event
->
button
.
time
=
xevent
->
xbutton
.
time
;
event
->
button
.
x
=
xevent
->
xbutton
.
x
;
event
->
button
.
y
=
xevent
->
xbutton
.
y
;
event
->
button
.
x_root
=
xevent
->
xbutton
.
x_root
;
event
->
button
.
y_root
=
xevent
->
xbutton
.
y_root
;
event
->
button
.
pressure
=
0
.
5
;
event
->
button
.
xtilt
=
0
;
event
->
button
.
ytilt
=
0
;
...
...
@@ -1826,6 +1828,8 @@ gdk_event_translate (GdkEvent *event,
event
->
motion
.
time
=
xevent
->
xmotion
.
time
;
event
->
motion
.
x
=
xevent
->
xmotion
.
x
;
event
->
motion
.
y
=
xevent
->
xmotion
.
y
;
event
->
motion
.
x_root
=
xevent
->
xmotion
.
x_root
;
event
->
motion
.
y_root
=
xevent
->
xmotion
.
y_root
;
event
->
motion
.
pressure
=
0
.
5
;
event
->
motion
.
xtilt
=
0
;
event
->
motion
.
ytilt
=
0
;
...
...
gtk/gtkhandlebox.c
View file @
4c530ae5
...
...
@@ -19,23 +19,27 @@
#include "gtkhandlebox.h"
static
void
gtk_handle_box_class_init
(
GtkHandleBoxClass
*
klass
);
static
void
gtk_handle_box_init
(
GtkHandleBox
*
event_box
);
static
void
gtk_handle_box_realize
(
GtkWidget
*
widget
);
static
void
gtk_handle_box_size_request
(
GtkWidget
*
widget
,
GtkRequisition
*
requisition
);
static
void
gtk_handle_box_size_allocate
(
GtkWidget
*
widget
,
GtkAllocation
*
allocation
);
static
void
gtk_handle_box_draw
(
GtkWidget
*
widget
,
GdkRectangle
*
area
);
static
gint
gtk_handle_box_expose
(
GtkWidget
*
widget
,
GdkEventExpose
*
event
);
static
void
gtk_handle_box_class_init
(
GtkHandleBoxClass
*
klass
);
static
void
gtk_handle_box_init
(
GtkHandleBox
*
handle_box
);
static
void
gtk_handle_box_realize
(
GtkWidget
*
widget
);
static
void
gtk_handle_box_size_request
(
GtkWidget
*
widget
,
GtkRequisition
*
requisition
);
static
void
gtk_handle_box_size_allocate
(
GtkWidget
*
widget
,
GtkAllocation
*
allocation
);
static
void
gtk_handle_box_draw
(
GtkWidget
*
widget
,
GdkRectangle
*
area
);
static
gint
gtk_handle_box_expose
(
GtkWidget
*
widget
,
GdkEventExpose
*
event
);
static
gint
gtk_handle_box_button_changed
(
GtkWidget
*
widget
,
GdkEventButton
*
event
);
static
gint
gtk_handle_box_motion
(
GtkWidget
*
widget
,
GdkEventMotion
*
event
);
guint
gtk_handle_box_get_type
()
{
static
guint
event
_box_type
=
0
;
static
guint
handle
_box_type
=
0
;
if
(
!
event_box_type
)
{
...
...
@@ -49,10 +53,10 @@ gtk_handle_box_get_type ()
(
GtkArgFunc
)
NULL
,
};
event
_box_type
=
gtk_type_unique
(
gtk_event_box_get_type
(),
&
handle_box_info
);
handle
_box_type
=
gtk_type_unique
(
gtk_event_box_get_type
(),
&
handle_box_info
);
}
return
event
_box_type
;
return
handle
_box_type
;
}
static
void
...
...
@@ -67,15 +71,18 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
widget_class
->
size_allocate
=
gtk_handle_box_size_allocate
;
widget_class
->
draw
=
gtk_handle_box_draw
;
widget_class
->
expose_event
=
gtk_handle_box_expose
;
widget_class
->
button_press_event
=
gtk_handle_box_button_change
;
widget_class
->
button_release_event
=
gtk_handle_box_button_change
;
widget_class
->
motion_notify_event
=
gtk_handle_box_motion
;
}
static
void
gtk_handle_box_init
(
GtkHandleBox
*
event
_box
)
gtk_handle_box_init
(
GtkHandleBox
*
handle
_box
)
{
GTK_WIDGET_UNSET_FLAGS
(
event
_box
,
GTK_NO_WINDOW
);
GTK_WIDGET_SET_FLAGS
(
event
_box
,
GTK_BASIC
);
event_box
->
show_handle
=
TRU
E
;
event
_box
->
real_parent
=
NULL
;
GTK_WIDGET_UNSET_FLAGS
(
handle
_box
,
GTK_NO_WINDOW
);
GTK_WIDGET_SET_FLAGS
(
handle
_box
,
GTK_BASIC
);
handle_box
->
is_being_dragged
=
FALS
E
;
handle
_box
->
real_parent
=
NULL
;
}
GtkWidget
*
...
...
@@ -226,3 +233,43 @@ gtk_handle_box_expose (GtkWidget *widget,
return
FALSE
;
}
static
gint
gtk_handle_box_button_changed
(
GtkWidget
*
widget
,
GdkEventButton
*
event
)
{
GtkHandleBox
*
hb
;
g_return_val_if_fail
(
widget
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
GTK_IS_HANDLE_BOX
(
widget
),
FALSE
);
g_return_val_if_fail
(
event
!=
NULL
,
FALSE
);
hb
=
GTK_HANDLE_BOX
(
widget
);
if
(
event
->
button
==
0
)
{
if
(
event
->
type
==
GDK_BUTTON_PRESS
)
{
hb
->
is_being_dragged
=
TRUE
;
real_parent
=
widget
->
parent
;
gdk_window_set_override_redirect
(
hb
->
window
,
TRUE
);
gdk_window_reparent
(
hb
->
window
,
GDK_ROOT_PARENT
(),
event
->
x
,
event
->
y
);
}
else
if
(
event
->
type
==
GDK_BUTTON_RELEASE
)
{
hb
->
is_being_dragged
=
FALSE
;
}
}
}
static
gint
gtk_handle_box_motion
(
GtkWidget
*
widget
,
GdkEventMotion
*
event
)
{
GtkHandleBox
*
hb
;
g_return_val_if_fail
(
widget
!=
NULL
,
FALSE
);
g_return_val_if_fail
(
GTK_IS_HANDLE_BOX
(
widget
),
FALSE
);
g_return_val_if_fail
(
event
!=
NULL
,
FALSE
);
hb
=
GTK_HANDLE_BOX
(
widget
);
if
(
hb
->
is_being_dragged
)
{
}
}
gtk/gtkhandlebox.h
View file @
4c530ae5
...
...
@@ -15,6 +15,7 @@
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* The GtkHandleBox is to allow
#ifndef __GTK_HANDLE_BOX_H__
#define __GTK_HANDLE_BOX_H__
...
...
@@ -38,8 +39,9 @@ typedef struct _GtkHandleBoxClass GtkHandleBoxClass;
struct
_GtkHandleBox
{
GtkEventBox
bin
;
GtkEventBox
event_box
;
GtkWidget
*
real_parent
;
gboolean
is_being_dragged
;
};
struct
_GtkHandleBoxClass
...
...
ltconfig
View file @
4c530ae5
...
...
@@ -776,7 +776,8 @@ else
hardcode_libdir_flag_spec
=
'-L$libdir'
hardcode_minus_L
=
yes
allow_undefined_flag
=
unsupported
archive_cmds
=
'echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
archive_cmds
=
'echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;e
mxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
old_archive_from_new_cmds
=
'emximp -o $objdir/$libname.a $objdir/$libname.def'
;;
...
...
@@ -1351,7 +1352,7 @@ hardcode_action=$hardcode_action
# Flag to hardcode
\$
libdir into a binary during linking.
# This must work even if
\$
libdir does not exist.
hardcode_libdir_flag_spec="
$hardcode_libdir_flag_spec
"
#
hardcode_libdir_flag_spec="
$hardcode_libdir_flag_spec
"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="
$hardcode_libdir_separator
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment