Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
xfce4-screensaver
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Apps
xfce4-screensaver
Commits
37e0b342
Commit
37e0b342
authored
Sep 30, 2018
by
Sean Davis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy up xfce-rr.{c,h}
parent
711cd10e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
224 deletions
+0
-224
src/xfce-rr.c
src/xfce-rr.c
+0
-204
src/xfce-rr.h
src/xfce-rr.h
+0
-20
No files found.
src/xfce-rr.c
View file @
37e0b342
...
...
@@ -892,38 +892,6 @@ xfce_rr_screen_get_ranges (XfceRRScreen *screen,
*
max_height
=
priv
->
info
->
max_height
;
}
/**
* xfce_rr_screen_get_timestamps:
* @screen: a #XfceRRScreen
* @change_timestamp_ret: (out): Location in which to store the timestamp at which the RANDR configuration was last changed
* @config_timestamp_ret: (out): Location in which to store the timestamp at which the RANDR configuration was last obtained
*
* Queries the two timestamps that the X RANDR extension maintains. The X
* server will prevent change requests for stale configurations, those whose
* timestamp is not equal to that of the latest request for configuration. The
* X server will also prevent change requests that have an older timestamp to
* the latest change request.
*/
void
xfce_rr_screen_get_timestamps
(
XfceRRScreen
*
screen
,
guint32
*
change_timestamp_ret
,
guint32
*
config_timestamp_ret
)
{
XfceRRScreenPrivate
*
priv
;
g_return_if_fail
(
XFCE_IS_RR_SCREEN
(
screen
));
priv
=
screen
->
priv
;
#ifdef HAVE_RANDR
if
(
change_timestamp_ret
)
*
change_timestamp_ret
=
priv
->
info
->
resources
->
timestamp
;
if
(
config_timestamp_ret
)
*
config_timestamp_ret
=
priv
->
info
->
resources
->
configTimestamp
;
#endif
}
static
gboolean
force_timestamp_update
(
XfceRRScreen
*
screen
)
{
...
...
@@ -1008,38 +976,6 @@ xfce_rr_screen_refresh (XfceRRScreen *screen,
return
refreshed
;
}
/**
* xfce_rr_screen_list_modes:
*
* List available XRandR modes
*
* Returns: (array zero-terminated=1) (transfer none):
*/
XfceRRMode
**
xfce_rr_screen_list_modes
(
XfceRRScreen
*
screen
)
{
g_return_val_if_fail
(
XFCE_IS_RR_SCREEN
(
screen
),
NULL
);
g_return_val_if_fail
(
screen
->
priv
->
info
!=
NULL
,
NULL
);
return
screen
->
priv
->
info
->
modes
;
}
/**
* xfce_rr_screen_list_clone_modes:
*
* List available XRandR clone modes
*
* Returns: (array zero-terminated=1) (transfer none):
*/
XfceRRMode
**
xfce_rr_screen_list_clone_modes
(
XfceRRScreen
*
screen
)
{
g_return_val_if_fail
(
XFCE_IS_RR_SCREEN
(
screen
),
NULL
);
g_return_val_if_fail
(
screen
->
priv
->
info
!=
NULL
,
NULL
);
return
screen
->
priv
->
info
->
clone_modes
;
}
/**
* xfce_rr_screen_list_crtcs:
*
...
...
@@ -1072,58 +1008,6 @@ xfce_rr_screen_list_outputs (XfceRRScreen *screen)
return
screen
->
priv
->
info
->
outputs
;
}
/**
* xfce_rr_screen_get_crtc_by_id:
*
* Returns: (transfer none): the CRTC identified by @id
*/
XfceRRCrtc
*
xfce_rr_screen_get_crtc_by_id
(
XfceRRScreen
*
screen
,
guint32
id
)
{
XfceRRCrtc
**
crtcs
;
int
i
;
g_return_val_if_fail
(
XFCE_IS_RR_SCREEN
(
screen
),
NULL
);
g_return_val_if_fail
(
screen
->
priv
->
info
!=
NULL
,
NULL
);
crtcs
=
screen
->
priv
->
info
->
crtcs
;
for
(
i
=
0
;
crtcs
[
i
]
!=
NULL
;
++
i
)
{
if
(
crtcs
[
i
]
->
id
==
id
)
return
crtcs
[
i
];
}
return
NULL
;
}
/**
* xfce_rr_screen_get_output_by_id:
*
* Returns: (transfer none): the output identified by @id
*/
XfceRROutput
*
xfce_rr_screen_get_output_by_id
(
XfceRRScreen
*
screen
,
guint32
id
)
{
XfceRROutput
**
outputs
;
int
i
;
g_return_val_if_fail
(
XFCE_IS_RR_SCREEN
(
screen
),
NULL
);
g_return_val_if_fail
(
screen
->
priv
->
info
!=
NULL
,
NULL
);
outputs
=
screen
->
priv
->
info
->
outputs
;
for
(
i
=
0
;
outputs
[
i
]
!=
NULL
;
++
i
)
{
if
(
outputs
[
i
]
->
id
==
id
)
return
outputs
[
i
];
}
return
NULL
;
}
/* XfceRROutput */
static
XfceRROutput
*
output_new
(
ScreenInfo
*
info
,
RROutput
id
)
...
...
@@ -1380,14 +1264,6 @@ output_free (XfceRROutput *output)
g_slice_free
(
XfceRROutput
,
output
);
}
guint32
xfce_rr_output_get_id
(
XfceRROutput
*
output
)
{
g_assert
(
output
!=
NULL
);
return
output
->
id
;
}
const
guint8
*
xfce_rr_output_get_edid_data
(
XfceRROutput
*
output
)
{
...
...
@@ -1434,28 +1310,6 @@ xfce_rr_output_get_crtc (XfceRROutput *output)
return
output
->
current_crtc
;
}
/**
* xfce_rr_output_get_possible_crtcs:
* @output: a #XfceRROutput
* Returns: (array zero-terminated=1) (transfer none):
*/
XfceRRCrtc
**
xfce_rr_output_get_possible_crtcs
(
XfceRROutput
*
output
)
{
g_return_val_if_fail
(
output
!=
NULL
,
NULL
);
return
output
->
possible_crtcs
;
}
/* Returns NULL if the ConnectorType property is not available */
const
char
*
xfce_rr_output_get_connector_type
(
XfceRROutput
*
output
)
{
g_return_val_if_fail
(
output
!=
NULL
,
NULL
);
return
output
->
connector_type
;
}
gboolean
_xfce_rr_output_name_is_laptop
(
const
char
*
name
)
{
...
...
@@ -1487,43 +1341,6 @@ xfce_rr_output_is_laptop (XfceRROutput *output)
return
_xfce_rr_output_name_is_laptop
(
output
->
name
);
}
/**
* xfce_rr_output_get_current_mode:
* @output: a #XfceRROutput
* Returns: (transfer none): the current mode of this output
*/
XfceRRMode
*
xfce_rr_output_get_current_mode
(
XfceRROutput
*
output
)
{
XfceRRCrtc
*
crtc
;
g_return_val_if_fail
(
output
!=
NULL
,
NULL
);
if
((
crtc
=
xfce_rr_output_get_crtc
(
output
)))
return
xfce_rr_crtc_get_current_mode
(
crtc
);
return
NULL
;
}
/**
* xfce_rr_output_get_position:
* @output: a #XfceRROutput
* @x: (out) (allow-none):
* @y: (out) (allow-none):
*/
void
xfce_rr_output_get_position
(
XfceRROutput
*
output
,
int
*
x
,
int
*
y
)
{
XfceRRCrtc
*
crtc
;
g_return_if_fail
(
output
!=
NULL
);
if
((
crtc
=
xfce_rr_output_get_crtc
(
output
)))
xfce_rr_crtc_get_position
(
crtc
,
x
,
y
);
}
const
char
*
xfce_rr_output_get_name
(
XfceRROutput
*
output
)
{
...
...
@@ -1531,20 +1348,6 @@ xfce_rr_output_get_name (XfceRROutput *output)
return
output
->
name
;
}
int
xfce_rr_output_get_width_mm
(
XfceRROutput
*
output
)
{
g_assert
(
output
!=
NULL
);
return
output
->
width_mm
;
}
int
xfce_rr_output_get_height_mm
(
XfceRROutput
*
output
)
{
g_assert
(
output
!=
NULL
);
return
output
->
height_mm
;
}
/**
* xfce_rr_output_get_preferred_mode:
* @output: a #XfceRROutput
...
...
@@ -1861,13 +1664,6 @@ xfce_rr_crtc_get_current_rotation (XfceRRCrtc *crtc)
return
crtc
->
current_rotation
;
}
XfceRRRotation
xfce_rr_crtc_get_rotations
(
XfceRRCrtc
*
crtc
)
{
g_assert
(
crtc
!=
NULL
);
return
crtc
->
rotations
;
}
gboolean
xfce_rr_crtc_supports_rotation
(
XfceRRCrtc
*
crtc
,
XfceRRRotation
rotation
)
...
...
src/xfce-rr.h
View file @
37e0b342
...
...
@@ -92,19 +92,13 @@ XfceRRScreen * xfce_rr_screen_new (GdkScreen *screen,
GError
**
error
);
XfceRROutput
**
xfce_rr_screen_list_outputs
(
XfceRRScreen
*
screen
);
XfceRRCrtc
**
xfce_rr_screen_list_crtcs
(
XfceRRScreen
*
screen
);
XfceRRMode
**
xfce_rr_screen_list_modes
(
XfceRRScreen
*
screen
);
XfceRRMode
**
xfce_rr_screen_list_clone_modes
(
XfceRRScreen
*
screen
);
void
xfce_rr_screen_set_size
(
XfceRRScreen
*
screen
,
int
width
,
int
height
,
int
mm_width
,
int
mm_height
);
XfceRRCrtc
*
xfce_rr_screen_get_crtc_by_id
(
XfceRRScreen
*
screen
,
guint32
id
);
gboolean
xfce_rr_screen_refresh
(
XfceRRScreen
*
screen
,
GError
**
error
);
XfceRROutput
*
xfce_rr_screen_get_output_by_id
(
XfceRRScreen
*
screen
,
guint32
id
);
XfceRROutput
*
xfce_rr_screen_get_output_by_name
(
XfceRRScreen
*
screen
,
const
char
*
name
);
void
xfce_rr_screen_get_ranges
(
XfceRRScreen
*
screen
,
...
...
@@ -112,29 +106,16 @@ void xfce_rr_screen_get_ranges (XfceRRScreen *screen,
int
*
max_width
,
int
*
min_height
,
int
*
max_height
);
void
xfce_rr_screen_get_timestamps
(
XfceRRScreen
*
screen
,
guint32
*
change_timestamp_ret
,
guint32
*
config_timestamp_ret
);
void
xfce_rr_screen_set_primary_output
(
XfceRRScreen
*
screen
,
XfceRROutput
*
output
);
/* XfceRROutput */
guint32
xfce_rr_output_get_id
(
XfceRROutput
*
output
);
const
char
*
xfce_rr_output_get_name
(
XfceRROutput
*
output
);
gboolean
xfce_rr_output_is_connected
(
XfceRROutput
*
output
);
int
xfce_rr_output_get_size_inches
(
XfceRROutput
*
output
);
int
xfce_rr_output_get_width_mm
(
XfceRROutput
*
outout
);
int
xfce_rr_output_get_height_mm
(
XfceRROutput
*
output
);
const
guint8
*
xfce_rr_output_get_edid_data
(
XfceRROutput
*
output
);
XfceRRCrtc
**
xfce_rr_output_get_possible_crtcs
(
XfceRROutput
*
output
);
XfceRRMode
*
xfce_rr_output_get_current_mode
(
XfceRROutput
*
output
);
XfceRRCrtc
*
xfce_rr_output_get_crtc
(
XfceRROutput
*
output
);
const
char
*
xfce_rr_output_get_connector_type
(
XfceRROutput
*
output
);
gboolean
xfce_rr_output_is_laptop
(
XfceRROutput
*
output
);
void
xfce_rr_output_get_position
(
XfceRROutput
*
output
,
int
*
x
,
int
*
y
);
gboolean
xfce_rr_output_can_clone
(
XfceRROutput
*
output
,
XfceRROutput
*
clone
);
XfceRRMode
**
xfce_rr_output_list_modes
(
XfceRROutput
*
output
);
...
...
@@ -179,7 +160,6 @@ void xfce_rr_crtc_get_position (XfceRRCrtc *crtc,
int
*
x
,
int
*
y
);
XfceRRRotation
xfce_rr_crtc_get_current_rotation
(
XfceRRCrtc
*
crtc
);
XfceRRRotation
xfce_rr_crtc_get_rotations
(
XfceRRCrtc
*
crtc
);
gboolean
xfce_rr_crtc_supports_rotation
(
XfceRRCrtc
*
crtc
,
XfceRRRotation
rotation
);
...
...
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