2 * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
25 #include <glib-object.h>
29 #include "appcore_base.h"
30 #include "appcore_multiwindow_base.h"
31 #include "appcore_multiwindow_base_private.h"
33 extern appcore_multiwindow_base_context _appcore_mw_context;
35 static void __on_create(appcore_multiwindow_base_instance_h context, void *data)
37 appcore_multiwindow_base_class_on_create(context);
40 static void __on_terminate(appcore_multiwindow_base_instance_h context, void *data)
42 appcore_multiwindow_base_class_on_terminate(context);
45 static void __on_pause(appcore_multiwindow_base_instance_h context, void *data)
47 appcore_multiwindow_base_class_on_pause(context);
50 static void __on_resume(appcore_multiwindow_base_instance_h context, void *data)
52 appcore_multiwindow_base_class_on_resume(context);
55 EXPORT_API appcore_multiwindow_base_class appcore_multiwindow_base_class_get_default(void)
57 appcore_multiwindow_base_class cls = { 0, };
59 cls.create = __on_create;
60 cls.terminate = __on_terminate;
61 cls.pause = __on_pause;
62 cls.resume = __on_resume;
67 EXPORT_API void appcore_multiwindow_base_class_add(appcore_multiwindow_base_class cls)
69 appcore_multiwindow_base_class *c;
74 c = malloc(sizeof(appcore_multiwindow_base_class));
80 c->id = strdup(cls.id);
81 _appcore_mw_context.classes = g_list_append(_appcore_mw_context.classes, c);
84 EXPORT_API void appcore_multiwindow_base_class_on_create(appcore_multiwindow_base_instance_h context)
88 EXPORT_API void appcore_multiwindow_base_class_on_terminate(appcore_multiwindow_base_instance_h context)
90 appcore_multiwindow_base_window_unbind(context);
93 EXPORT_API void appcore_multiwindow_base_class_on_pause(appcore_multiwindow_base_instance_h context)
97 EXPORT_API void appcore_multiwindow_base_class_on_resume(appcore_multiwindow_base_instance_h context)