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
1,152
Issues
1,152
List
Boards
Labels
Service Desk
Milestones
Merge Requests
143
Merge Requests
143
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
GNOME
gtk
Commits
b46d583f
Commit
b46d583f
authored
Jul 04, 2013
by
Kalev Lember
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GtkListBox: Add a function for getting the index of a row
https://bugzilla.gnome.org/show_bug.cgi?id=703618
parent
a5d2565b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
gtk/gtklistbox.c
gtk/gtklistbox.c
+21
-0
gtk/gtklistbox.h
gtk/gtklistbox.h
+2
-0
No files found.
gtk/gtklistbox.c
View file @
b46d583f
...
...
@@ -2673,6 +2673,27 @@ gtk_list_box_row_set_header (GtkListBoxRow *row,
g_object_ref
(
header
);
}
/**
* gtk_list_box_row_get_index:
* @row: a #GtkListBoxRow
*
* Gets the current index of the @row in its #GtkListBox container.
*
* Returns: the index of the @row, or -1 if the @row is not in a listbox
*
* Since: 3.10
*/
gint
gtk_list_box_row_get_index
(
GtkListBoxRow
*
row
)
{
GtkListBoxRowPrivate
*
priv
=
gtk_list_box_row_get_instance_private
(
row
);
if
(
priv
->
iter
!=
NULL
)
return
g_sequence_iter_get_position
(
priv
->
iter
);
return
-
1
;
}
static
void
gtk_list_box_row_finalize
(
GObject
*
obj
)
{
...
...
gtk/gtklistbox.h
View file @
b46d583f
...
...
@@ -153,6 +153,8 @@ GDK_AVAILABLE_IN_3_10
void
gtk_list_box_row_set_header
(
GtkListBoxRow
*
row
,
GtkWidget
*
header
);
GDK_AVAILABLE_IN_3_10
gint
gtk_list_box_row_get_index
(
GtkListBoxRow
*
row
);
GDK_AVAILABLE_IN_3_10
void
gtk_list_box_row_changed
(
GtkListBoxRow
*
row
);
...
...
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