GL CHOCO ENGINE
Loading...
Searching...
No Matches
platform_context.h
Go to the documentation of this file.
1
20#ifndef GLCE_ENGINE_PLATFORM_CONTEXT_PLATFORM_CONTEXT_H
21#define GLCE_ENGINE_PLATFORM_CONTEXT_PLATFORM_CONTEXT_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
28
32
34
40
73platform_result_t platform_initialize(linear_alloc_t* allocator_, platform_type_t platform_type_, platform_context_t** out_platform_context_);
74
97void platform_destroy(platform_context_t* platform_context_);
98
144platform_result_t platform_window_create(platform_context_t* platform_context_, const char* window_label_, int window_width_, int window_height_, int* framebuffer_width_, int* framebuffer_height_);
145
201 platform_context_t* platform_context_,
202 void (*window_event_callback)(const window_event_t* event_),
203 void (*keyboard_event_callback)(const keyboard_event_t* event_),
204 void (*mouse_event_callback)(const mouse_event_t* event_));
205
224
225#ifdef __cplusplus
226}
227#endif
228#endif
全プラットフォーム共通で使用可能なキーコード定義と、キーボードイベント構造体定義
サブシステム等、ライフサイクルが固定で、個別のメモリ開放が不要なメモリ確保に対応するリニアアロケータモジュールの定義
全プラットフォーム共通で使用可能なマウスボタン定義と、マウスイベント構造体定義
void platform_destroy(platform_context_t *platform_context_)
プラットフォームStrategyパターンのContext構造体インスタンスの内部データをクリアする
Definition: platform_context.c:169
platform_result_t platform_swap_buffers(platform_context_t *platform_context_)
描画サーフェイスのフロント/バックバッファをスワップする
Definition: platform_context.c:230
platform_result_t platform_window_create(platform_context_t *platform_context_, const char *window_label_, int window_width_, int window_height_, int *framebuffer_width_, int *framebuffer_height_)
プラットフォームに応じたウィンドウ生成処理を行う
Definition: platform_context.c:184
platform_result_t platform_pump_messages(platform_context_t *platform_context_, void(*window_event_callback)(const window_event_t *event_), void(*keyboard_event_callback)(const keyboard_event_t *event_), void(*mouse_event_callback)(const mouse_event_t *event_))
OSレイヤーからキーボード、マウス、ウィンドウイベントを吸い上げ、各コールバック関数へイベントを渡す
Definition: platform_context.c:205
platform_result_t platform_initialize(linear_alloc_t *allocator_, platform_type_t platform_type_, platform_context_t **out_platform_context_)
プラットフォームStrategyパターンを初期化する
Definition: platform_context.c:113
プラットフォームシステムで共通に使用されるデータ型を提供する
platform_type_t
ウィンドウ、キーボード、マウスシステム処理のプラットフォーム種別定義
Definition: platform_types.h:44
platform_result_t
プラットフォームシステム実行結果コード定義
Definition: platform_types.h:27
キーボードイベント構造体
Definition: keyboard_event.h:103
linear_alloc_t内部データ構造
Definition: linear_allocator.c:32
マウスイベント構造体
Definition: mouse_event.h:48
プラットフォームコンテキスト構造体
Definition: platform_context.c:62
ウィンドウイベント構造体
Definition: window_event.h:46
全プラットフォーム共通で使用可能なウィンドウイベント定義と、ウィンドウイベント構造体定義