Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
6295237d
Commit
6295237d
authored
Aug 04, 2010
by
egottlieb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiling for cocoa now works. Does it run? We'll see.
parent
57c8f6a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
SDL_shape.c
src/video/SDL_shape.c
+1
-1
SDL_shape_internals.h
src/video/SDL_shape_internals.h
+3
-1
SDL_cocoashape.m
src/video/cocoa/SDL_cocoashape.m
+2
-2
No files found.
src/video/SDL_shape.c
View file @
6295237d
...
...
@@ -196,7 +196,7 @@ SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shap
return
result
;
}
void
SDL_TraverseShapeTree
(
SDL_ShapeTree
*
tree
,
void
(
*
function
)(
SDL_ShapeTree
*
,
void
*
)
,
void
*
closure
)
{
void
SDL_TraverseShapeTree
(
SDL_ShapeTree
*
tree
,
SDL_TraversalFunction
function
,
void
*
closure
)
{
if
(
tree
->
kind
==
QuadShape
)
{
SDL_TraverseShapeTree
((
SDL_ShapeTree
*
)
tree
->
data
.
children
.
upleft
,
function
,
closure
);
SDL_TraverseShapeTree
((
SDL_ShapeTree
*
)
tree
->
data
.
children
.
upright
,
function
,
closure
);
...
...
src/video/SDL_shape_internals.h
View file @
6295237d
...
...
@@ -51,10 +51,12 @@ typedef struct {
SDL_ShapeKind
kind
;
SDL_ShapeUnion
data
;
}
SDL_ShapeTree
;
typedef
void
(
*
SDL_TraversalFunction
)(
SDL_ShapeTree
*
,
void
*
);
extern
void
SDL_CalculateShapeBitmap
(
SDL_WindowShapeMode
mode
,
SDL_Surface
*
shape
,
Uint8
*
bitmap
,
Uint8
ppb
);
extern
SDL_ShapeTree
*
SDL_CalculateShapeTree
(
SDL_WindowShapeMode
mode
,
SDL_Surface
*
shape
,
SDL_bool
invert
);
extern
void
SDL_TraverseShapeTree
(
SDL_ShapeTree
*
tree
,
void
(
*
function
)(
SDL_ShapeTree
*
,
void
*
)
,
void
*
closure
);
extern
void
SDL_TraverseShapeTree
(
SDL_ShapeTree
*
tree
,
SDL_TraversalFunction
function
,
void
*
closure
);
extern
void
SDL_FreeShapeTree
(
SDL_ShapeTree
**
shapeTree
);
/* Ends C function definitions when using C++ */
...
...
src/video/cocoa/SDL_cocoashape.m
View file @
6295237d
...
...
@@ -59,7 +59,7 @@ NSRect convert_rect(SDL_Rect rect,SDL_Window* window) {
return
[[((
SDL
_
WindowData
*
)
window
->
driverdata
)
->
nswindow
contentView
]
convertRectFromBase
:
nsrect
]
;
}
void
ConglomerateShapeTree
(
SDL
_
ShapeTree
*
tree
,
SDL
_
PathConglomeration
cong
)
{
void
ConglomerateShapeTree
(
SDL
_
ShapeTree
*
tree
,
SDL
_
PathConglomeration
*
cong
)
{
if
(
tree
->
kind
==
OpaqueShape
)
{
NSRect
rect
=
convert
_
rect
(
tree
->
data
.
shape
,
cong
->
window
)
;
[
cong
->
clipPath
appendBezierPathWithRect
:
rect
]
;
...
...
@@ -84,7 +84,7 @@ int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowS
SDL
_
PathConglomeration
cong
=
{
clipPath
,
shaper
->
window
}
;
SDL
_
TraverseShapeTree
(
data
->
shape
,
&
ConglomerateShapeTree
,
cong
)
;
SDL
_
TraverseShapeTree
(
data
->
shape
,
(
SDL
_
TraversalFunction
)
&
ConglomerateShapeTree
,
(
void
*
)
&
cong
)
;
[
clipPath
addClip
]
;
}
...
...
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