Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cffb388

Browse files
committed
Move Linux shell docstrings to headers
Update docstrings for typos and grammar style specified in the style guide.
1 parent c2ffe61 commit cffb388

File tree

4 files changed

+77
-62
lines changed

4 files changed

+77
-62
lines changed

shell/platform/linux/fl_dart_project.cc

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66

77
#include <gmodule.h>
88

9-
/**
10-
* FlDartProject:
11-
*
12-
* #FlDartProject represents a Dart project. It is used provide information
13-
* about the application when creating a #FlView.
14-
*/
15-
169
struct _FlDartProject {
1710
GObject parent_instance;
1811

@@ -112,62 +105,21 @@ static void fl_dart_project_class_init(FlDartProjectClass* klass) {
112105

113106
static void fl_dart_project_init(FlDartProject* self) {}
114107

115-
/**
116-
* fl_dart_project_new:
117-
* @path: a file path, e.g. "my_dart_project"
118-
*
119-
* Create a Flutter project. The project path should contain the following
120-
* top-level items:
121-
* - icudtl.dat (provided as a resource by the Flutter tool)
122-
* - flutter_assets (as built by the Flutter tool)
123-
*
124-
* The path can either be absolute, or relative to the directory containing the
125-
* running executable.
126-
*
127-
* Returns: a new #FlDartProject
128-
*/
129108
G_MODULE_EXPORT FlDartProject* fl_dart_project_new(const gchar* path) {
130109
return static_cast<FlDartProject*>(
131110
g_object_new(fl_dart_project_get_type(), "path", path, nullptr));
132111
}
133112

134-
/**
135-
* fl_dart_project_get_path:
136-
* @view: a #FlDartProject
137-
*
138-
* Get the path to the directory containing the Flutter application.
139-
*
140-
* Returns: (type filename): a file path, e.g. "/projects/my_dart_project"
141-
*/
142113
G_MODULE_EXPORT const gchar* fl_dart_project_get_path(FlDartProject* self) {
143114
g_return_val_if_fail(FL_IS_DART_PROJECT(self), nullptr);
144115
return self->path;
145116
}
146117

147-
/**
148-
* fl_dart_project_get_assets_path:
149-
* @view: a #FlDartProject
150-
*
151-
* Get the path to the directory containing the assets used in the Flutter
152-
* application.
153-
*
154-
* Returns: (type filename): a file path, e.g.
155-
* "/projects/my_dart_project/assets"
156-
*/
157118
G_MODULE_EXPORT gchar* fl_dart_project_get_assets_path(FlDartProject* self) {
158119
g_return_val_if_fail(FL_IS_DART_PROJECT(self), nullptr);
159120
return g_build_filename(self->path, "flutter_assets", NULL);
160121
}
161122

162-
/**
163-
* fl_dart_project_get_icu_data_path:
164-
* @view: a #FlDartProject
165-
*
166-
* Get the path to the ICU data file in the Flutter application.
167-
*
168-
* Returns: (type filename): a file path, e.g.
169-
* "/projects/my_dart_project/icudtl.dat"
170-
*/
171123
G_MODULE_EXPORT gchar* fl_dart_project_get_icu_data_path(FlDartProject* self) {
172124
g_return_val_if_fail(FL_IS_DART_PROJECT(self), nullptr);
173125
return g_build_filename(self->path, "icudtl.dat", NULL);

shell/platform/linux/fl_view.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111

1212
#include "flutter/shell/platform/embedder/embedder.h"
1313

14-
/**
15-
* FlView:
16-
*
17-
* #FlView is a GTK widget that is capable of displaying a Flutter application.
18-
*/
19-
2014
struct _FlView {
2115
GtkWidget parent_instance;
2216

@@ -278,14 +272,6 @@ static void fl_view_class_init(FlViewClass* klass) {
278272

279273
static void fl_view_init(FlView* self) {}
280274

281-
/**
282-
* fl_view_new:
283-
* @project: The project to show.
284-
*
285-
* Create a widget to show Flutter application.
286-
*
287-
* Returns: a new #FlView
288-
*/
289275
G_MODULE_EXPORT FlView* fl_view_new(FlDartProject* project) {
290276
return static_cast<FlView*>(
291277
g_object_new(fl_view_get_type(), "flutter-project", project, nullptr));

shell/platform/linux/public/flutter_linux/fl_dart_project.h

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,75 @@ G_BEGIN_DECLS
1515

1616
G_DECLARE_FINAL_TYPE(FlDartProject, fl_dart_project, FL, DART_PROJECT, GObject)
1717

18+
/**
19+
* FlDartProject:
20+
*
21+
* #FlDartProject represents a Dart project. It is used to provide information
22+
* about the application when creating a #FlView.
23+
*/
24+
25+
/**
26+
* fl_dart_project_new:
27+
* @path: a file path, e.g. "my_dart_project"
28+
*
29+
* Create a Flutter project. The project path should contain the following
30+
* top-level items:
31+
* - icudtl.dat (provided as a resource by the Flutter tool)
32+
* - flutter_assets (as built by the Flutter tool)
33+
*
34+
* The path can either be absolute, or relative to the directory containing the
35+
* running executable.
36+
*
37+
* Returns: a new #FlDartProject
38+
*/
39+
40+
/**
41+
* fl_dart_project_new:
42+
* @path: a file path, e.g. "my_dart_project"
43+
*
44+
* Creates a Flutter project. The project path should contain the following
45+
* top-level items:
46+
* - icudtl.dat (provided as a resource by the Flutter tool)
47+
* - flutter_assets (as built by the Flutter tool)
48+
*
49+
* The path can either be absolute, or relative to the directory containing the
50+
* running executable.
51+
*
52+
* Returns: a new #FlDartProject
53+
*/
1854
FlDartProject* fl_dart_project_new(const gchar* path);
1955

56+
/**
57+
* fl_dart_project_get_path:
58+
* @project: a #FlDartProject
59+
*
60+
* Gets the path to the directory containing the Flutter application.
61+
*
62+
* Returns: (type filename): a file path, e.g. "/projects/my_dart_project"
63+
*/
2064
const gchar* fl_dart_project_get_path(FlDartProject* project);
2165

66+
/**
67+
* fl_dart_project_get_assets_path:
68+
* @project: a #FlDartProject
69+
*
70+
* Gets the path to the directory containing the assets used in the Flutter
71+
* application.
72+
*
73+
* Returns: (type filename): a file path, e.g.
74+
* "/projects/my_dart_project/assets"
75+
*/
2276
gchar* fl_dart_project_get_assets_path(FlDartProject* project);
2377

78+
/**
79+
* fl_dart_project_get_icu_data_path:
80+
* @project: a #FlDartProject
81+
*
82+
* Gets the path to the ICU data file in the Flutter application.
83+
*
84+
* Returns: (type filename): a file path, e.g.
85+
* "/projects/my_dart_project/icudtl.dat"
86+
*/
2487
gchar* fl_dart_project_get_icu_data_path(FlDartProject* project);
2588

2689
G_END_DECLS

shell/platform/linux/public/flutter_linux/fl_view.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ G_BEGIN_DECLS
1717

1818
G_DECLARE_FINAL_TYPE(FlView, fl_view, FL, VIEW, GtkWidget)
1919

20+
/**
21+
* FlView:
22+
*
23+
* #FlView is a GTK widget that is capable of displaying a Flutter application.
24+
*/
25+
26+
/**
27+
* fl_view_new:
28+
* @project: The project to show.
29+
*
30+
* Creates a widget to show Flutter application.
31+
*
32+
* Returns: a new #FlView
33+
*/
2034
FlView* fl_view_new(FlDartProject* project);
2135

2236
G_END_DECLS

0 commit comments

Comments
 (0)