Changeset 7c3fb9b in mainline for uspace/lib/graph/graph.h


Ignore:
Timestamp:
2018-05-17T08:29:01Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ff23ff
Parents:
fac0ac7
git-author:
Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
Message:

Fix block comment formatting (ccheck).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/graph/graph.h

    rfac0ac7 r7c3fb9b  
    5353        /**
    5454         * Device driver shall allocate any necessary internal structures
    55          * specific for a claimed visualizer. */
     55         * specific for a claimed visualizer.
     56         */
    5657        errno_t (*claim)(struct visualizer *vs);
    5758
     
    6061         * specific for a claimed visualizer. Driver shall also check whether
    6162         * the mode is set and if so it shall change its internal state
    62          * accordingly (e.g. deallocate frame buffers). */
     63         * accordingly (e.g. deallocate frame buffers).
     64         */
    6365        errno_t (*yield)(struct visualizer *vs);
    6466
     
    7173         * reason). If it is convenient for the device driver (e.g. for better
    7274         * optimization), the pointer to the handle_damage operation can be
    73          * changed at this point. */
     75         * changed at this point.
     76         */
    7477        errno_t (*change_mode)(struct visualizer *vs, vslmode_t new_mode);
    7578
     
    8184         * the shared backbuffer (i.e. when reading from backbuffer, the offsets
    8285         * shall be added to the coordinates and if necessary the result shall be
    83          * wrapped around the edge of the backbuffer). */
     86         * wrapped around the edge of the backbuffer).
     87         */
    8488        errno_t (*handle_damage)(struct visualizer *vs,
    8589            sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height,
     
    8993         * Upper layers of the graphic stack might report inactivity. In such
    9094         * case, device driver might enable power saving mode on the device
    91          * corresponding to the visualizer. */
     95         * corresponding to the visualizer.
     96         */
    9297        errno_t (*suspend)(struct visualizer *vs);
    9398
    9499        /**
    95100         * When upper layers detect activity on suspended visualizer, device
    96          * driver shall disable power saving mode on the corresponding device. */
     101         * driver shall disable power saving mode on the corresponding device.
     102         */
    97103        errno_t (*wakeup)(struct visualizer *vs);
    98104} visualizer_ops_t;
     
    105111        /**
    106112         * Link to the list of all visualizers belonging to the graphic device.
    107          * Field is fully managed by libgraph. */
     113         * Field is fully managed by libgraph.
     114         */
    108115        link_t link;
    109116
     
    112119         * when equals 0, visualizer is not claimed. At the time, visualizer
    113120         * can be claimed only by a single client.
    114          * Field is fully managed by libgraph. */
     121         * Field is fully managed by libgraph.
     122         */
    115123        atomic_t ref_cnt;
    116124
     
    121129         * If the visualizer is registered through libgraph functions, then the
    122130         * field is fully managed by libgraph. Otherwise, it is a driver
    123          * responsibility to set and update this field. */
     131         * responsibility to set and update this field.
     132         */
    124133        sysarg_t reg_svc_handle;
    125134
     
    130139         * in the compositor).
    131140         * Field is fully managed by libgraph. It is assigned when the visualizer
    132          * gets claimed and is valid until it is yielded. */
     141         * gets claimed and is valid until it is yielded.
     142         */
    133143        sysarg_t client_side_handle;
    134144
     
    141151         * degrees, virtual monitor is resized by the user).
    142152         * Field is fully managed by libgraph. Device driver can use it indirectly
    143          * through notification functions. */
     153         * through notification functions.
     154         */
    144155        async_sess_t *notif_sess;
    145156
     
    150161         * dimensions when virtual monitor is resized).
    151162         * Both device driver and libgraph must lock on this mutex when accessing
    152          * modes list or default mode index. */
     163         * modes list or default mode index.
     164         */
    153165        fibril_mutex_t mode_mtx;
    154166
     
    162174         * and final output device (e.g. monitor).
    163175         * Field is fully managed by device driver, libgraph reads it with locked
    164          * mutex. */
     176         * mutex.
     177         */
    165178        list_t modes;
    166179
     
    173186         * mode list.
    174187         * Field is fully managed by device driver, libgraph reads it with locked
    175          * mutex. */
     188         * mutex.
     189         */
    176190        sysarg_t def_mode_idx;
    177191
     
    181195         * driver can also read it to properly interpret the cell type and its
    182196         * internal structures when handling the damage.
    183          * Field is fully managed by libgraph, can be read by device driver. */
     197         * Field is fully managed by libgraph, can be read by device driver.
     198         */
    184199        vslmode_t cur_mode;
    185200
     
    187202         * Determines whether the visualizer is currently set to some mode or not,
    188203         * that is whether cur_mode field contains up-to-date data.
    189          * Field is fully managed by libgraph, can be read by device driver. */
     204         * Field is fully managed by libgraph, can be read by device driver.
     205         */
    190206        bool mode_set;
    191207
     
    193209         * Device driver function pointers.
    194210         * Field is fully managed by device driver, libgraph invokes driver's
    195          * functions through it. */
     211         * functions through it.
     212         */
    196213        visualizer_ops_t ops;
    197214
     
    200217         * Device driver reads the cells when handling damage. Cells shall be
    201218         * interpreted according to the currently set mode.
    202          * Field is fully managed by libgraph, can be read by device driver. */
     219         * Field is fully managed by libgraph, can be read by device driver.
     220         */
    203221        pixelmap_t cells;
    204222
     
    207225         * contain pointers to frontbuffers or information representing the
    208226         * final output device (e.g. hardware port for physical monitor).
    209          * Field is fully managed by device driver. */
     227         * Field is fully managed by device driver.
     228         */
    210229        void *dev_ctx;
    211230} visualizer_t;
     
    265284 * Fill in the basic visualizer structure. The device driver shall take the
    266285 * created torso and to complete it by adding its specific structures
    267  * (device context, modes). */
     286 * (device context, modes).
     287 */
    268288extern void graph_init_visualizer(visualizer_t *);
    269289
     
    281301
    282302/**
    283  * Allocate the visualizer so it can be initialized. */
     303 * Allocate the visualizer so it can be initialized.
     304 */
    284305extern visualizer_t *graph_alloc_visualizer(void);
    285306
     
    289310 * is considered ready to handle client connection. Since visualizer
    290311 * list is guarded by the mutex, visualizers might be added even after the
    291  * initialialization of the device driver. */
     312 * initialialization of the device driver.
     313 */
    292314extern errno_t graph_register_visualizer(visualizer_t *);
    293315
    294316/**
    295317 * Retrieve the visualizer from the visualizer list according to its
    296  * service ID. */
     318 * service ID.
     319 */
    297320extern visualizer_t *graph_get_visualizer(sysarg_t);
    298321
     
    300323 * Unregister the visualizer from the location service and remove it
    301324 * from the driver visualizer list. Function shall be called by device driver
    302  * before deallocating the resources for the visualizer. */
     325 * before deallocating the resources for the visualizer.
     326 */
    303327extern errno_t graph_unregister_visualizer(visualizer_t *);
    304328
     
    306330 * Destroy the rest of the visualizer. Device driver shall call this function
    307331 * only after it has unregistered the visualizer and deallocated all the
    308  * resources for which the driver is responsible. */
     332 * resources for which the driver is responsible.
     333 */
    309334extern void graph_destroy_visualizer(visualizer_t *);
    310335
     
    320345 * Device driver can call this function to notify the client through the
    321346 * callback connection that the visualizer with a specified service ID should
    322  * be switched to the mode with the given index. */
     347 * be switched to the mode with the given index.
     348 */
    323349extern errno_t graph_notify_mode_change(async_sess_t *, sysarg_t, sysarg_t);
    324350
     
    326352 * Device driver can call this function to notify the client through the
    327353 * callback connection that the visualizer with a specified service ID has
    328  * lost its output device (e.g. virtual monitor was closed by a user). */
     354 * lost its output device (e.g. virtual monitor was closed by a user).
     355 */
    329356extern errno_t graph_notify_disconnect(async_sess_t *, sysarg_t);
    330357
Note: See TracChangeset for help on using the changeset viewer.