wlmaker
|
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "container.h"
#include "element.h"
#include "libbase/libbase.h"
#include "popup.h"
#include "surface.h"
#include "util.h"
#include "window.h"
Go to the source code of this file.
Classes | |
struct | _wlmtk_content_vmt_t |
struct | _wlmtk_content_t |
struct | _wlmtk_fake_content_t |
Typedefs | |
typedef struct _wlmtk_content_t | wlmtk_content_t |
typedef struct _wlmtk_fake_content_t | wlmtk_fake_content_t |
typedef struct _wlmtk_content_vmt_t | wlmtk_content_vmt_t |
typedef struct _wlmtk_surface_t | wlmtk_surface_t |
typedef struct _wlmtk_fake_surface_t | wlmtk_fake_surface_t |
Variables | |
const bs_test_case_t | wlmtk_content_test_cases [] |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
typedef struct _wlmtk_content_t wlmtk_content_t |
Forward declaration: Content state.
typedef struct _wlmtk_content_vmt_t wlmtk_content_vmt_t |
Forward declaration: Content virtual method table.
typedef struct _wlmtk_fake_content_t wlmtk_fake_content_t |
Forward declaration: Fake content, for tests.
typedef struct _wlmtk_fake_surface_t wlmtk_fake_surface_t |
Forward declaration: Fake surface, for tests.
typedef struct _wlmtk_surface_t wlmtk_surface_t |
Forward declaration: State of a toolkit's WLR surface.
void wlmtk_content_add_popup | ( | wlmtk_content_t * | content_ptr, |
wlmtk_content_t * | popup_content_ptr | ||
) |
Adds a popup to the content.
content_ptr | |
popup_content_ptr |
void wlmtk_content_add_wlmtk_popup | ( | wlmtk_content_t * | content_ptr, |
wlmtk_popup_t * | popup_ptr | ||
) |
Adds a popup to the content.
content_ptr | |
popup_ptr |
void wlmtk_content_commit | ( | wlmtk_content_t * | content_ptr, |
int | width, | ||
int | height, | ||
uint32_t | serial | ||
) |
Commits size and serial: Calls into wlmtk_window_serial.
wlmtk_element_t * wlmtk_content_element | ( | wlmtk_content_t * | content_ptr | ) |
Returns the superclass' instance of wlmtk_element_t.
wlmtk_content_vmt_t wlmtk_content_extend | ( | wlmtk_content_t * | content_ptr, |
const wlmtk_content_vmt_t * | content_vmt_ptr | ||
) |
Extends the content by specifying virtual methods.
content_ptr | |
content_vmt_ptr |
void wlmtk_content_fini | ( | wlmtk_content_t * | content_ptr | ) |
Un-initializes the content.
content_ptr |
wlmtk_content_t * wlmtk_content_get_parent_content | ( | wlmtk_content_t * | content_ptr | ) |
void wlmtk_content_get_size | ( | wlmtk_content_t * | content_ptr, |
int * | width_ptr, | ||
int * | height_ptr | ||
) |
Gets size: Returns size from earlier wlmtk_content_commit.
bool wlmtk_content_init | ( | wlmtk_content_t * | content_ptr, |
wlmtk_element_t * | element_ptr | ||
) |
Initializes the content with the given element.
content_ptr | |
element_ptr |
void wlmtk_content_remove_popup | ( | wlmtk_content_t * | content_ptr, |
wlmtk_content_t * | popup_content_ptr | ||
) |
Removes a popup from the content.
popup_content_ptr
must have previously been added to content_ptr
.
content_ptr | |
popup_content_ptr |
void wlmtk_content_remove_wlmtk_popup | ( | wlmtk_content_t * | content_ptr, |
wlmtk_popup_t * | popup_ptr | ||
) |
Removes a popup from the content.
popup_ptr
must have previously been added to content_ptr
.
content_ptr | |
popup_ptr |
|
inlinestatic |
Requests close. See wlmtk_content_vmt_t::request_close.
|
inlinestatic |
Requests fullscreen. See wlmtk_content_vmt_t::request_fullscreen.
|
inlinestatic |
Requests maximized. See wlmtk_content_vmt_t::request_maximized.
|
inlinestatic |
Requests new size. See wlmtk_content_vmt_t::request_size.
|
inlinestatic |
Requests activation. See wlmtk_content_vmt_t::set_activated.
void wlmtk_content_set_element | ( | wlmtk_content_t * | content_ptr, |
wlmtk_element_t * | element_ptr | ||
) |
Sets or clears the content's element.
content_ptr | |
element_ptr | Element to set for the content, or NULL. |
void wlmtk_content_set_window | ( | wlmtk_content_t * | content_ptr, |
wlmtk_window_t * | window_ptr | ||
) |
Sets the window for the content.
Private: Should only be called by Window ctor (a friend).
content_ptr | |
window_ptr |
void wlmtk_fake_content_commit | ( | wlmtk_fake_content_t * | fake_content_ptr | ) |
Commits the state of last wlmtk_content_request_size call.
wlmtk_fake_content_t * wlmtk_fake_content_create | ( | wlmtk_fake_surface_t * | fake_surface_ptr | ) |
Creates a fake content, for tests.
void wlmtk_fake_content_destroy | ( | wlmtk_fake_content_t * | fake_content_ptr | ) |
Destroys the fake content.
|
extern |
Content's unit tests.