Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-gpu
Commits
b6956269
Commit
b6956269
authored
Oct 28, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB: CreateBlankCursor common helper
parent
3e046d80
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
modules/video_output/xcb/common.c
modules/video_output/xcb/common.c
+32
-0
modules/video_output/xcb/xcb_vlc.h
modules/video_output/xcb/xcb_vlc.h
+1
-0
No files found.
modules/video_output/xcb/common.c
View file @
b6956269
...
...
@@ -199,6 +199,38 @@ int GetWindowSize (struct vout_window_t *wnd, xcb_connection_t *conn,
return
0
;
}
/**
* Create a blank cursor.
* Note that the pixmaps are leaked (until the X disconnection). Hence, this
* function should be called no more than once per X connection.
* @param conn XCB connection
* @param scr target XCB screen
*/
xcb_cursor_t
CreateBlankCursor
(
xcb_connection_t
*
conn
,
const
xcb_screen_t
*
scr
)
{
xcb_cursor_t
cur
=
xcb_generate_id
(
conn
);
xcb_pixmap_t
pix
=
xcb_generate_id
(
conn
);
xcb_void_cookie_t
ck
;
xcb_generic_error_t
*
err
;
ck
=
xcb_create_pixmap_checked
(
conn
,
1
,
pix
,
scr
->
root
,
1
,
1
);
err
=
xcb_request_check
(
conn
,
ck
);
if
(
err
)
{
fprintf
(
stderr
,
"Cannot create pixmap: %d"
,
err
->
error_code
);
free
(
err
);
}
ck
=
xcb_create_cursor_checked
(
conn
,
cur
,
pix
,
pix
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
err
=
xcb_request_check
(
conn
,
ck
);
if
(
err
)
{
fprintf
(
stderr
,
"Cannot create pixmap: %d"
,
err
->
error_code
);
free
(
err
);
}
return
cur
;
}
/**
* Initialize a picture buffer as shared memory, according to the video output
* format. If a attach is true, the segment is attached to
...
...
modules/video_output/xcb/xcb_vlc.h
View file @
b6956269
...
...
@@ -45,6 +45,7 @@ struct vout_window_t *GetWindow (vout_display_t *obj,
bool
*
restrict
pshm
);
int
GetWindowSize
(
struct
vout_window_t
*
wnd
,
xcb_connection_t
*
conn
,
unsigned
*
restrict
width
,
unsigned
*
restrict
height
);
xcb_cursor_t
CreateBlankCursor
(
xcb_connection_t
*
,
const
xcb_screen_t
*
);
int
CheckError
(
vout_display_t
*
,
xcb_connection_t
*
conn
,
const
char
*
str
,
xcb_void_cookie_t
);
...
...
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