Skip to content

Commit

Permalink
add changes from redkite (expose native window)
Browse files Browse the repository at this point in the history
  • Loading branch information
iurienistor committed May 11, 2024
1 parent 0fce61f commit 656dbf9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/redkite/include/RkMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* File name: RkMain.h
* Project: Redkite (A small GUI toolkit)
*
* Copyright (C) 2019 Iurie Nistor
* Copyright (C) 2019 Iurie Nistor
*
* This file is part of Redkite.
*
Expand Down Expand Up @@ -38,6 +38,7 @@ class RkMain {
RkWidget* topLevelWidget(void) const;
int exec(bool block = true);
RkEventQueue* eventQueue() const;
const RkNativeWindowInfo* nativeWindowInfo() const;

protected:
RK_DECLARE_O_PTR(RkMain);
Expand Down
3 changes: 1 addition & 2 deletions src/redkite/src/RkEventQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
*/

#include "RkEventQueueImpl.h"

#include <RkAction.h>
#include "RkAction.h"

RkEventQueue::RkEventQueue()
: o_ptr{std::make_unique<RkEventQueueImpl>(this)}
Expand Down
7 changes: 7 additions & 0 deletions src/redkite/src/RkMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "RkLog.h"
#include "RkWidget.h"
#include "RkMainImpl.h"
#include "RkEventQueueImpl.h"
#include "RkSystemWindow.h"

RkMain::RkMain()
: o_ptr{std::make_unique<RkMainImpl>(this)}
Expand All @@ -50,6 +52,11 @@ RkEventQueue* RkMain::eventQueue() const
return o_ptr->getEventQueue();
}

const RkNativeWindowInfo* RkMain::nativeWindowInfo() const
{
return RK_IMPL_PTR(o_ptr->getEventQueue())->getSystemWindow()->nativeWindowInfo();
}

int RkMain::exec(bool block)
{
return o_ptr->exec(block);
Expand Down

0 comments on commit 656dbf9

Please sign in to comment.