Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
0154c07d
Commit
0154c07d
authored
11 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Do the DLL im/ex-port dance.
parent
2aebfd81
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/conio/CMakeLists.txt
+2
-0
2 additions, 0 deletions
src/conio/CMakeLists.txt
src/conio/ciolib.h
+12
-12
12 additions, 12 deletions
src/conio/ciolib.h
src/conio/mouse.c
+15
-15
15 additions, 15 deletions
src/conio/mouse.c
with
29 additions
and
27 deletions
src/conio/CMakeLists.txt
+
2
−
0
View file @
0154c07d
...
@@ -58,6 +58,8 @@ target_include_directories(ciolib PRIVATE "${XPDev_DIR}/../../../include/xpdev")
...
@@ -58,6 +58,8 @@ target_include_directories(ciolib PRIVATE "${XPDev_DIR}/../../../include/xpdev")
target_compile_definitions
(
ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>
)
target_compile_definitions
(
ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>
)
target_include_directories
(
ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>
)
target_include_directories
(
ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>
)
target_link_libraries
(
ciolib xpdev
)
target_link_libraries
(
ciolib xpdev
)
target_compile_definitions
(
ciolib PRIVATE CIOLIB_EXPORTS
)
target_compile_definitions
(
ciolib INTERFACE CIOLIB_IMPORTS
)
if
(
SDL_FOUND
)
if
(
SDL_FOUND
)
target_include_directories
(
ciolib PRIVATE
${
SDL_INCLUDE_DIR
}
)
target_include_directories
(
ciolib PRIVATE
${
SDL_INCLUDE_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
src/conio/ciolib.h
+
12
−
12
View file @
0154c07d
...
@@ -493,18 +493,18 @@ extern int ciolib_mouse_initialized;
...
@@ -493,18 +493,18 @@ extern int ciolib_mouse_initialized;
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
void
ciomouse_gotevent
(
int
event
,
int
x
,
int
y
);
CIOLIBEXPORT
void
CIOLIBCALL
ciomouse_gotevent
(
int
event
,
int
x
,
int
y
);
int
mouse_trywait
(
void
);
CIOLIBEXPORT
int
CIOLIBCALL
mouse_trywait
(
void
);
int
mouse_wait
(
void
);
CIOLIBEXPORT
int
CIOLIBCALL
mouse_wait
(
void
);
int
mouse_pending
(
void
);
CIOLIBEXPORT
int
CIOLIBCALL
mouse_pending
(
void
);
int
ciolib_getmouse
(
struct
mouse_event
*
mevent
);
CIOLIBEXPORT
int
CIOLIBCALL
ciolib_getmouse
(
struct
mouse_event
*
mevent
);
int
ciolib_ungetmouse
(
struct
mouse_event
*
mevent
);
CIOLIBEXPORT
int
CIOLIBCALL
ciolib_ungetmouse
(
struct
mouse_event
*
mevent
);
void
ciolib_mouse_thread
(
void
*
data
);
CIOLIBEXPORT
void
CIOLIBCALL
ciolib_mouse_thread
(
void
*
data
);
int
ciomouse_setevents
(
int
events
);
CIOLIBEXPORT
int
CIOLIBCALL
ciomouse_setevents
(
int
events
);
int
ciomouse_addevents
(
int
events
);
CIOLIBEXPORT
int
CIOLIBCALL
ciomouse_addevents
(
int
events
);
int
ciomouse_delevents
(
int
events
);
CIOLIBEXPORT
int
CIOLIBCALL
ciomouse_delevents
(
int
events
);
int
ciomouse_addevent
(
int
event
);
CIOLIBEXPORT
int
CIOLIBCALL
ciomouse_addevent
(
int
event
);
int
ciomouse_delevent
(
int
event
);
CIOLIBEXPORT
int
CIOLIBCALL
ciomouse_delevent
(
int
event
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
src/conio/mouse.c
+
15
−
15
View file @
0154c07d
...
@@ -100,7 +100,7 @@ int ciolib_mouse_initialized=0;
...
@@ -100,7 +100,7 @@ int ciolib_mouse_initialized=0;
static
int
ungot
=
0
;
static
int
ungot
=
0
;
pthread_mutex_t
unget_mutex
;
pthread_mutex_t
unget_mutex
;
void
init_mouse
(
void
)
void
CIOLIBCALL
init_mouse
(
void
)
{
{
memset
(
&
state
,
0
,
sizeof
(
state
));
memset
(
&
state
,
0
,
sizeof
(
state
));
state
.
click_timeout
=
0
;
state
.
click_timeout
=
0
;
...
@@ -111,37 +111,37 @@ void init_mouse(void)
...
@@ -111,37 +111,37 @@ void init_mouse(void)
ciolib_mouse_initialized
=
1
;
ciolib_mouse_initialized
=
1
;
}
}
int
ciomouse_setevents
(
int
events
)
int
CIOLIBCALL
ciomouse_setevents
(
int
events
)
{
{
mouse_events
=
events
;
mouse_events
=
events
;
return
mouse_events
;
return
mouse_events
;
}
}
int
ciomouse_addevents
(
int
events
)
int
CIOLIBCALL
ciomouse_addevents
(
int
events
)
{
{
mouse_events
|=
events
;
mouse_events
|=
events
;
return
mouse_events
;
return
mouse_events
;
}
}
int
ciomouse_delevents
(
int
events
)
int
CIOLIBCALL
ciomouse_delevents
(
int
events
)
{
{
mouse_events
&=
~
events
;
mouse_events
&=
~
events
;
return
mouse_events
;
return
mouse_events
;
}
}
int
ciomouse_addevent
(
int
event
)
int
CIOLIBCALL
ciomouse_addevent
(
int
event
)
{
{
mouse_events
|=
(
1
<<
event
);
mouse_events
|=
(
1
<<
event
);
return
mouse_events
;
return
mouse_events
;
}
}
int
ciomouse_delevent
(
int
event
)
int
CIOLIBCALL
ciomouse_delevent
(
int
event
)
{
{
mouse_events
&=
~
(
1
<<
event
);
mouse_events
&=
~
(
1
<<
event
);
return
mouse_events
;
return
mouse_events
;
}
}
void
ciomouse_gotevent
(
int
event
,
int
x
,
int
y
)
void
CIOLIBCALL
ciomouse_gotevent
(
int
event
,
int
x
,
int
y
)
{
{
struct
in_mouse_event
*
ime
;
struct
in_mouse_event
*
ime
;
...
@@ -157,7 +157,7 @@ void ciomouse_gotevent(int event, int x, int y)
...
@@ -157,7 +157,7 @@ void ciomouse_gotevent(int event, int x, int y)
listPushNode
(
&
state
.
input
,
ime
);
listPushNode
(
&
state
.
input
,
ime
);
}
}
void
add_outevent
(
int
event
,
int
x
,
int
y
)
void
CIOLIBCALL
add_outevent
(
int
event
,
int
x
,
int
y
)
{
{
struct
out_mouse_event
*
ome
;
struct
out_mouse_event
*
ome
;
int
but
;
int
but
;
...
@@ -179,7 +179,7 @@ void add_outevent(int event, int x, int y)
...
@@ -179,7 +179,7 @@ void add_outevent(int event, int x, int y)
listPushNode
(
&
state
.
output
,
ome
);
listPushNode
(
&
state
.
output
,
ome
);
}
}
int
more_multies
(
int
button
,
int
clicks
)
int
CIOLIBCALL
more_multies
(
int
button
,
int
clicks
)
{
{
switch
(
clicks
)
{
switch
(
clicks
)
{
case
0
:
case
0
:
...
@@ -198,7 +198,7 @@ int more_multies(int button, int clicks)
...
@@ -198,7 +198,7 @@ int more_multies(int button, int clicks)
return
(
0
);
return
(
0
);
}
}
void
ciolib_mouse_thread
(
void
*
data
)
void
CIOLIBCALL
ciolib_mouse_thread
(
void
*
data
)
{
{
int
timedout
;
int
timedout
;
int
timeout_button
=
0
;
int
timeout_button
=
0
;
...
@@ -431,7 +431,7 @@ void ciolib_mouse_thread(void *data)
...
@@ -431,7 +431,7 @@ void ciolib_mouse_thread(void *data)
}
}
}
}
int
mouse_trywait
(
void
)
int
CIOLIBCALL
mouse_trywait
(
void
)
{
{
int
result
;
int
result
;
...
@@ -449,7 +449,7 @@ int mouse_trywait(void)
...
@@ -449,7 +449,7 @@ int mouse_trywait(void)
}
}
}
}
int
mouse_wait
(
void
)
int
CIOLIBCALL
mouse_wait
(
void
)
{
{
int
result
;
int
result
;
...
@@ -467,14 +467,14 @@ int mouse_wait(void)
...
@@ -467,14 +467,14 @@ int mouse_wait(void)
}
}
}
}
int
mouse_pending
(
void
)
int
CIOLIBCALL
mouse_pending
(
void
)
{
{
while
(
!
ciolib_mouse_initialized
)
while
(
!
ciolib_mouse_initialized
)
SLEEP
(
1
);
SLEEP
(
1
);
return
(
listCountNodes
(
&
state
.
output
));
return
(
listCountNodes
(
&
state
.
output
));
}
}
int
ciolib_getmouse
(
struct
mouse_event
*
mevent
)
int
CIOLIBCALL
ciolib_getmouse
(
struct
mouse_event
*
mevent
)
{
{
int
retval
=
0
;
int
retval
=
0
;
...
@@ -505,7 +505,7 @@ int ciolib_getmouse(struct mouse_event *mevent)
...
@@ -505,7 +505,7 @@ int ciolib_getmouse(struct mouse_event *mevent)
return
(
retval
);
return
(
retval
);
}
}
int
ciolib_ungetmouse
(
struct
mouse_event
*
mevent
)
int
CIOLIBCALL
ciolib_ungetmouse
(
struct
mouse_event
*
mevent
)
{
{
struct
mouse_event
*
me
;
struct
mouse_event
*
me
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment