Lines Matching refs:ui
136 …struct scm_ui_framework_t *ui = (struct scm_ui_framework_t *)kmalloc(sizeof(struct scm_ui_framewor… in scm_register_alloc() local
137 memset(ui, 0, sizeof(struct scm_ui_framework_t)); in scm_register_alloc()
138 strncpy(ui->name, name, 15); in scm_register_alloc()
139 ui->type = type; in scm_register_alloc()
140 ui->ui_ops = ops; in scm_register_alloc()
141 list_init(&ui->list); in scm_register_alloc()
144 ui->id = scm_ui_max_id++; in scm_register_alloc()
148 ui->buf = __create_buffer(ui->type); in scm_register_alloc()
149 if ((uint64_t)(ui->buf) == (uint64_t)-ENOMEM) in scm_register_alloc()
151 kfree(ui); in scm_register_alloc()
155 list_add(&scm_framework_list, &ui->list); in scm_register_alloc()
158 ui->ui_ops->install(ui->buf); in scm_register_alloc()
159 ui->ui_ops->enable(NULL); in scm_register_alloc()
161 return scm_framework_enable(ui); in scm_register_alloc()
171 int scm_register(struct scm_ui_framework_t *ui) in scm_register() argument
173 if (ui == NULL) in scm_register()
175 if (__check_ui_param(ui->name, ui->type, ui->ui_ops) != 0) in scm_register()
178 list_init(&ui->list); in scm_register()
180 ui->id = scm_ui_max_id++; in scm_register()
183 ui->buf = __create_buffer(ui->type); in scm_register()
185 if ((uint64_t)(ui->buf) == (uint64_t)-ENOMEM) in scm_register()
189 list_add(&scm_framework_list, &ui->list); in scm_register()
192 ui->ui_ops->install(ui->buf); in scm_register()
193 ui->ui_ops->enable(NULL); in scm_register()
196 return scm_framework_enable(ui); in scm_register()
207 int scm_unregister(struct scm_ui_framework_t *ui) in scm_unregister() argument
218 int scm_unregister_alloc(struct scm_ui_framework_t *ui) in scm_unregister_alloc() argument
283 int scm_framework_enable(struct scm_ui_framework_t *ui) in scm_framework_enable() argument
285 if (ui->buf->vaddr == NULL) in scm_framework_enable()
292 retval = video_set_refresh_target(ui->buf); in scm_framework_enable()
294 __current_framework = ui; in scm_framework_enable()
297 __current_framework = ui; in scm_framework_enable()
298 ui->ui_ops->enable(NULL); in scm_framework_enable()
309 int scm_framework_disable(struct scm_ui_framework_t *ui) in scm_framework_disable() argument
311 if (ui->buf->vaddr == NULL) in scm_framework_disable()
314 if (ui != __current_framework) in scm_framework_disable()
326 ui->ui_ops->disable(NULL); in scm_framework_disable()