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
a51d944e
Commit
a51d944e
authored
Dec 06, 1997
by
Arturo Espinosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for pixmap cursors -mig
parent
a7f427d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
3 deletions
+72
-3
gdk/gdk.h
gdk/gdk.h
+8
-2
gdk/gdkcursor.c
gdk/gdkcursor.c
+31
-0
gdk/gdktypes.h
gdk/gdktypes.h
+2
-1
gdk/x11/gdkcursor-x11.c
gdk/x11/gdkcursor-x11.c
+31
-0
No files found.
gdk/gdk.h
View file @
a51d944e
...
...
@@ -268,8 +268,14 @@ void gdk_window_set_events (GdkWindow *window,
/* Cursors
*/
GdkCursor
*
gdk_cursor_new
(
GdkCursorType
cursor_type
);
void
gdk_cursor_destroy
(
GdkCursor
*
cursor
);
GdkCursor
*
gdk_cursor_new
(
GdkCursorType
cursor_type
);
GdkCursor
*
gdk_cursor_new_from_pixmap
(
GdkPixmap
*
source
,
GdkPixmap
*
mask
,
GdkColor
*
fg
,
GdkColor
*
bg
,
int
x
,
int
y
);
void
gdk_cursor_destroy
(
GdkCursor
*
cursor
);
/* GCs
...
...
gdk/gdkcursor.c
View file @
a51d944e
...
...
@@ -38,6 +38,37 @@ gdk_cursor_new (GdkCursorType cursor_type)
return
cursor
;
}
GdkCursor
*
gdk_cursor_new_from_pixmap
(
GdkPixmap
*
source
,
GdkPixmap
*
mask
,
GdkColor
*
fg
,
GdkColor
*
bg
,
int
x
,
int
y
)
{
GdkCursorPrivate
*
private
;
GdkCursor
*
cursor
;
Pixmap
source_pixmap
,
mask_pixmap
;
Cursor
xcursor
;
XColor
xfg
,
xbg
;
source_pixmap
=
((
GdkPixmapPrivate
*
)
source
)
->
xwindow
;
mask_pixmap
=
((
GdkPixmapPrivate
*
)
mask
)
->
xwindow
;
xfg
.
pixel
=
fg
->
pixel
;
xfg
.
red
=
fg
->
red
;
xfg
.
blue
=
fg
->
blue
;
xfg
.
green
=
fg
->
green
;
xbg
.
pixel
=
bg
->
pixel
;
xbg
.
red
=
bg
->
red
;
xbg
.
blue
=
bg
->
blue
;
xbg
.
green
=
bg
->
green
;
xcursor
=
XCreatePixmapCursor
(
gdk_display
,
source_pixmap
,
mask_pixmap
,
&
xfg
,
&
xbg
,
x
,
y
);
private
=
g_new
(
GdkCursorPrivate
,
1
);
private
->
xdisplay
=
gdk_display
;
private
->
xcursor
=
xcursor
;
cursor
=
(
GdkCursor
*
)
private
;
cursor
->
type
=
GDK_CURSOR_IS_PIXMAP
;
return
cursor
;
}
void
gdk_cursor_destroy
(
GdkCursor
*
cursor
)
{
...
...
gdk/gdktypes.h
View file @
a51d944e
...
...
@@ -273,7 +273,8 @@ typedef enum
typedef
enum
{
#include <gdk/gdkcursors.h>
GDK_LAST_CURSOR
GDK_LAST_CURSOR
,
GDK_CURSOR_IS_PIXMAP
=
-
1
}
GdkCursorType
;
/* Event types.
...
...
gdk/x11/gdkcursor-x11.c
View file @
a51d944e
...
...
@@ -38,6 +38,37 @@ gdk_cursor_new (GdkCursorType cursor_type)
return
cursor
;
}
GdkCursor
*
gdk_cursor_new_from_pixmap
(
GdkPixmap
*
source
,
GdkPixmap
*
mask
,
GdkColor
*
fg
,
GdkColor
*
bg
,
int
x
,
int
y
)
{
GdkCursorPrivate
*
private
;
GdkCursor
*
cursor
;
Pixmap
source_pixmap
,
mask_pixmap
;
Cursor
xcursor
;
XColor
xfg
,
xbg
;
source_pixmap
=
((
GdkPixmapPrivate
*
)
source
)
->
xwindow
;
mask_pixmap
=
((
GdkPixmapPrivate
*
)
mask
)
->
xwindow
;
xfg
.
pixel
=
fg
->
pixel
;
xfg
.
red
=
fg
->
red
;
xfg
.
blue
=
fg
->
blue
;
xfg
.
green
=
fg
->
green
;
xbg
.
pixel
=
bg
->
pixel
;
xbg
.
red
=
bg
->
red
;
xbg
.
blue
=
bg
->
blue
;
xbg
.
green
=
bg
->
green
;
xcursor
=
XCreatePixmapCursor
(
gdk_display
,
source_pixmap
,
mask_pixmap
,
&
xfg
,
&
xbg
,
x
,
y
);
private
=
g_new
(
GdkCursorPrivate
,
1
);
private
->
xdisplay
=
gdk_display
;
private
->
xcursor
=
xcursor
;
cursor
=
(
GdkCursor
*
)
private
;
cursor
->
type
=
GDK_CURSOR_IS_PIXMAP
;
return
cursor
;
}
void
gdk_cursor_destroy
(
GdkCursor
*
cursor
)
{
...
...
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